Coder Social home page Coder Social logo

mpd-parser's Introduction

mpd-parser

Build Status Greenkeeper badge Slack Status

NPM

mpd parser

Table of Contents

Installation

npm install --save mpd-parser

Usage

// get your manifest in whatever way works best
// for example, by reading the file from the filesystem in node
// or using fetch in a browser like so:

const manifestUri = 'https://example.com/dash.xml';
const res = await fetch(manifestUri);
const manifest = await res.text();

// A callback function to handle events like errors or warnings
const eventHandler = ({ type, message }) => console.log(`${type}: ${message}`);

var parsedManifest = mpdParser.parse(manifest, { manifestUri, eventHandler });

If dealing with a live stream, then on subsequent calls to parse, the previously parsed manifest object should be provided as an option to parse using the previousManifest option:

const newParsedManifest = mpdParser.parse(
  manifest,
  // parsedManifest comes from the prior example
  { manifestUri, previousManifest: parsedManifest }
);

Parsed Output

The parser ouputs a plain javascript object with the following structure:

Manifest {
  allowCache: boolean,
  contentSteering: {
    defaultServiceLocation: string,
    proxyServerURL: string,
    queryBeforeStart: boolean,
    serverURL: string
  },
  endList: boolean,
  mediaSequence: number,
  discontinuitySequence: number,
  playlistType: string,
  playlists: [
    {
      attributes: {},
      Manifest
    }
  ],
  mediaGroups: {
    AUDIO: {
      'GROUP-ID': {
        default: boolean,
        autoselect: boolean,
        language: string,
        uri: string,
        instreamId: string,
        characteristics: string,
        forced: boolean
      }
    },
    VIDEO: {},
    'CLOSED-CAPTIONS': {},
    SUBTITLES: {}
  },
  dateTimeString: string,
  dateTimeObject: Date,
  targetDuration: number,
  totalDuration: number,
  discontinuityStarts: [number],
  segments: [
    {
      byterange: {
        length: number,
        offset: number
      },
      duration: number,
      attributes: {},
      discontinuity: number,
      uri: string,
      timeline: number,
      key: {
        method: string,
        uri: string,
        iv: string
      },
      map: {
        uri: string,
        byterange: {
          length: number,
          offset: number
        }
      },
      'cue-out': string,
      'cue-out-cont': string,
      'cue-in': string
    }
  ]
}

Including the Parser

To include mpd-parser on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include it on your page.

<script src="//path/to/mpd-parser.min.js"></script>
<script>
  var mpdParser = window['mpd-parser'];
  var parsedManifest = mpdParser.parse(manifest, { manifestUri });
</script>

Browserify

When using with Browserify, install mpd-parser via npm and require the parser as you would any other module.

var mpdParser = require('mpd-parser');

var parsedManifest = mpdParser.parse(manifest, { manifestUri });

With ES6:

import { parse } from 'mpd-parser';

const parsedManifest = parse(manifest, { manifestUri });

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the parser as you normally would:

require(['mpd-parser'], function(mpdParser) {
  var parsedManifest = mpdParser.parse(manifest, { manifestUri });
});

License

Apache-2.0. Copyright (c) Brightcove, Inc

mpd-parser's People

Contributors

adrums86 avatar alex-barstow avatar amtins avatar apackouz avatar brandonocasey avatar dviewy avatar forbesjo avatar gesinger avatar gjanblaszczyk avatar gkatsev avatar greenkeeper[bot] avatar grusell avatar ishita12 avatar kchang-brightcove avatar ldayananda avatar mhk-etn avatar mister-ben avatar misteroneill avatar mjneil avatar oshinkaramian avatar philjhale avatar romainmenke avatar romerodiver avatar shahlabs avatar wseymour15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpd-parser's Issues

Undefined dateTimeObject values for live mpd manifests

Hi,

Thanks for creating such an awesome parser! I'm currently migrating a service that parses manifests to use mpd instead of m3u8 manifests. I am trying to find our when the stream's absolute start time is. Similar to the X-PROGRAM-DATE-TIME of HLS.

Looking at the Docs' parsed output, it looks like there should be a dateTimeObject. In the m3u8 parser, this object definitely exists, and I can see in the code that it gets populated.

I am parsing both Live and Vod mpd manifests but this value never gets populated - and I can't see anywhere in the code where it gets set.

Looking at some Shaka player documentation, I've been able to manually calculate the startTime of my stream as seen here. However, I can't see the variables exposed anywhere, such as timescale etc.

Hopefully I'm missing something obvious, pretty new to all this.

Thanks.

Not functional in nodejs

I tried to use mpd-parser in a node environment and there are multiple issues

  1. TypeError: window$1.DOMParser is not a constructor
  2. TypeError: Cannot read property 'href' of undefined

I could workaround for #1 by using 'xmldom' and then setting that in global. Couldn;t get #2 working

Matching upper-case keysystem UUID string in generateKeySystemInformation

Hello,

we encountered an issue where during parsing/reading of the adaptation set content protection information from the manifest it does not consider upper case keySystem UUID string on input. The matching is done against fixed lower case UUID string in the videojs/mpd-parser and there shouldn't be any reason not to convert the manifest value to lower case before the keySystem UUID matching.

Of course we considered changing the uuid case in the output manifest but we are sadly unable to do so in the streaming provider delivery application.

Example content protection segment from the manifest.

<ContentProtection
  schemeIdUri="urn:uuid:EDEF8BA9-79D6-4ACE-A3C8-27DCD51D21ED">
  <cenc:pssh>some base 64 encoded string</cenc:pssh>
</ContentProtection>

KeySystemsMap from inheritAttributes.js:

const keySystemsMap = {
  'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',
  'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',
  'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',
  'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'
};

The matching itself is done in the generateKeySystemInformation method:

const generateKeySystemInformation = (contentProtectionNodes) => {
  return contentProtectionNodes.reduce((acc, node) => {
    const attributes = parseAttributes(node);
    const keySystem = keySystemsMap[attributes.schemeIdUri];

    if (keySystem) {
      acc[keySystem] = { attributes };

      const psshNode = findChildren(node, 'cenc:pssh')[0];

      if (psshNode) {
        const pssh = getContent(psshNode);
        const psshBuffer = pssh && decodeB64ToUint8Array(pssh);

        acc[keySystem].pssh = psshBuffer;
      }
    }

    return acc;
  }, {});
};

Specifically this is the line where keySystems UUID matching is done:
const keySystem = keySystemsMap[attributes.schemeIdUri];

Although it could be argued that according to the UUID RFC spec the UUID string (a-f chars) should be generated as a lowercase string it also mentions it should be treated as case-insensitive on input. Since the key system UUIDs in the keySystemsMap are hardcoded as lowercase in the codebase there isn't any reason not to do .toLowerCase() on the input UUID string from the manifest (at least I could not think of one).
RFC 4122

I created this issue mostly for the reason of hearing your opinions on the matter and whether such a minor change would make sense and whether a subsequent PR would be considered/accepted.

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.27.6 to 1.27.7.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.27.7

2019-12-01

Bug Fixes

  • Fix a scenario where a reassignments to computed properties were not tracked (#3267)

Pull Requests

Commits

The new version differs by 4 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Uncaught TypeError: Cannot set properties of undefined (setting 'discontinuity')

Exception occur when play follow url:
https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd

video.js:36749 Uncaught TypeError: Cannot set properties of undefined (setting 'discontinuity')
at video.js:36749:44
at Array.forEach ()
at updateSequenceNumbers (video.js:36705:18)
at positionManifestOnTimeline (video.js:36841:5)
at toM3u8 (video.js:37268:14)
at parse (video.js:38645:12)
at parseMainXml (video.js:42611:22)
at DashPlaylistLoader.handleMain_ (video.js:43150:21)
at DashPlaylistLoader.refreshMedia_ (video.js:43254:14)
at DashPlaylistLoader.haveMetadata (video.js:42978:12)

Cannot handle multiple languages and subtitles

This is a duplication of the following issue:
videojs/http-streaming#645

A playlist like this is not properly parsed:

    <AdaptationSet mimeType="text/vtt" lang="de">
      <Role schemeIdUri="urn:mpeg:dash:role" value="subtitle"/>
      <Label>Deutsch</Label>
      <Representation id="4" bandwidth="256">
        <BaseURL>dashcaption_de_dash.mpd</BaseURL>
      </Representation>
    </AdaptationSet>
    <AdaptationSet mimeType="text/vtt" lang="de">
      <Role schemeIdUri="urn:mpeg:dash:role" value="subtitle"/>
      <Label>Forced</Label>
      <Representation id="5" bandwidth="256">
        <BaseURL>dashcaption_forced_dash.mpd</BaseURL>
      </Representation>
    </AdaptationSet>```

only the first `de` will be available in the result.

I think this boils down to [this line](https://github.com/videojs/mpd-parser/blob/12387495d2fe472eab2fdd7d0c7f1b4bbc22c7cb/src/toM3u8.js#L181).

**The same applies to audio tracks.**

Duplicate Playlist Entries with BaseURL tags at different levels of the Manifest

There are occurrences in the inheritAttributes functionality where this representationInfo array contains undesired duplicates. This generally occurs when there are multiple BaseURL nodes that are direct children of the MPD node. When we attempt to resolve URLs from a combination of the parent BaseURL and a child BaseURL, and the value does not resolve, we end up returning the child BaseURL multiple times. We need to determine a way to remove these duplicates in a safe way.

See: #17 (comment)

Example Input (Note that there are multiple BaseURLs as direct children of the MPD tag)

<MPD type="dyanmic">
    <BaseURL serviceLocation="alpha">https://cdn1.example.com/</BaseURL>
    <BaseURL serviceLocation="beta">https://cdn2.example.com/</BaseURL>
    <Period start="PT0S">
      ...
      <AdaptationSet mimeType="text/vtt" lang="en">
        <Representation bandwidth="256" id="en">
          <BaseURL>https://example.com/en.vtt</BaseURL>
        </Representation>
      </AdaptationSet>
    </Period>
  </MPD>

Current Actual RepresentationInfo

representationInfo: [
      {
        attributes: {
          baseUrl: 'https://cdn1.example.com/',
          ...
        },
        segmentInfo: {...}
      },
      {
        attributes: {
          baseUrl: 'https://cdn2.example.com/',
          ... 
        },
        segmentInfo: {...}
      },
      {
        attributes: {
          baseUrl: 'https://example.com/en.vtt',
          ... 
        },
        segmentInfo: {...}
      },
      {
        attributes: {
          baseUrl: 'https://example.com/en.vtt',
          ...
        },
        segmentInfo: {...}
      }
    ]

Expected (Notice there is one less entry than the last)

representationInfo: [
      {
        attributes: {
          baseUrl: 'https://cdn1.example.com/',
          ...
        },
        segmentInfo: {...}
      },
      {
        attributes: {
          baseUrl: 'https://cdn2.example.com/',
          ... 
        },
        segmentInfo: {...}
      },
      {
        attributes: {
          baseUrl: 'https://example.com/en.vtt',
          ... 
        },
        segmentInfo: {...}
      }
    ]

Usage in react-native

Hello , i want to ask you how can i implement this in react-native ?
i mean i did implement it , but the "manifest" part is really confusing to me , can you clarify it a bit pls ?
an example would be wonderful !

Parsing error for representations without segment info

The following file fails to parse:

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="static" minBufferTime="PT30S" profiles="urn:mpeg:dash:profile:isoff-main:2011" mediaPresentationDuration="PT1M4.800S">
  <Period start="PT0S" duration="PT1M4.800S" id="1">
    <AdaptationSet mimeType="video/webm" frameRate="30/1" segmentAlignment="true" subsegmentAlignment="true" startWithSAP="1" subsegmentStartsWithSAP="1" bitstreamSwitching="false">
      <Representation id="1" width="1920" height="1080" bandwidth="1800000" codecs="vp9">
        <BaseURL>864_vp9.webm</BaseURL>
      </Representation>
    </AdaptationSet>
    <AdaptationSet mimeType="audio/mp4" lang="eng" segmentAlignment="0">
      <Representation id="2" bandwidth="96000" audioSamplingRate="48000" codecs="mp4a.40.2">
        <BaseURL>864_aac.mp4</BaseURL>
        <SegmentBase indexRange="658-961">
          <Initialization range="0-657"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

The problem seems to be in

const segmentsInfo = {
attributes
};
if (!segmentsFn) {
return segmentsInfo;
}

For the first representation, there are no elements with any segment information, so segmentsFn is not set. The toM3u8 function requires segmentsInfo.segments to be a list, leading to a error that is hard to debug (trying to call undefined.reduce())

xmldom vulnerability

The version of xmldom depended on has a vulnerability which has since been fixed. The dependency needs to be updated to a later version of xmldom.

Update @xmldom/xmldom to fix a security advisory

Using the latest version of mpd-parser causes a security advisory on GitHub

GHSA-9pgh-qqpf-7wqj

$ npm audit
# npm audit report

@xmldom/xmldom  <0.8.3
Severity: moderate
Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in @xmldom/xmldom and xmldom - https://github.com/advisories/GHSA-9pgh-qqpf-7wqj
fix available via `npm audit fix --force`
Will install [email protected], which is a breaking change
node_modules/@xmldom/xmldom
  mpd-parser  >=0.19.0
  Depends on vulnerable versions of @xmldom/xmldom
  node_modules/mpd-parser
    @videojs/http-streaming  >=2.10.2
    Depends on vulnerable versions of mpd-parser
    node_modules/@videojs/http-streaming
    video.js  >=7.15.3
    Depends on vulnerable versions of @videojs/http-streaming
    Depends on vulnerable versions of mpd-parser
    node_modules/video.js

4 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Wrong resolvedUri

Hi, I'm trying to parse SlingTV manifest, however the uri and resolvedUri in the returned parser manifest seems to be wrong.

{ uri: 'audio/stereo/192/$Number%08x$.m4s', timeline: 1, duration: 2.048, resolvedUri: 'http://p-cdn1-c-cg14-linear-cbd46b77.movetv.com/15807/live/CNNHD-DYN/6986bd324cdc11ebb62f0025b5472115/audio/stereo/192/$Number%08x$.m4s', map: [Object], number: 2877 }

The real url should be:
http://p-cdn1-c-cg14-linear-cbd46b77.movetv.com/15807/live/CNNHD-DYN/6986bd324cdc11ebb62f0025b5472115/audio/stereo/192/00000ffc.m4s

example.mpd.txt

Audio only MPD cannot be converted using toM3u8

I'm trying to load an audio only MPD in video.js using http-streaming.

I've traced down the issue to the following line in the mpd-parser :

playlists: addSegmentInfoFromSidx(videoPlaylists, sidxMapping),

master.playlists is only initialized from the videoPlaylists (which are empty on an audio only MPD). I've tried simply adding addSegmentInfoFromSidx(audioPlaylists, sidxMapping) as a quick workaround in the debugger, but that crashes the tab in chrome and triggers out of memory on firefox (after some time).
I'll try to investigate this further but would be thankful for any input regarding the issue.

Wrong resolvedUri

Hi, I'm trying the code provided in this example videojs.github.io/mpd-parser and passing to it the url https://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd. However, the resolvedUri in the returned parser manifest seems to be wrong.

I. e., parsedMpd.playlists[0].segments[0]

map: {uri: "bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_0.m4v", resolvedUri: "https://videojs.github.io/mpd-parser/bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_0.m4v"}
number: 1
resolvedUri: "https://videojs.github.io/mpd-parser/bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_1.m4v"
timeline: 0
uri: "bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_1.m4v"

I was expected a resolvedUri such as https://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_0.m4v. Am I misunderstanding something?

An in-range update of karma is breaking the build 🚨

The devDependency karma was updated from 3.1.1 to 3.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

karma is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v3.1.2

Bug Fixes

Features

Commits

The new version differs by 11 commits.

  • 7d4d347 chore: release v3.1.2
  • 5077c18 chore: update contributors
  • fb05fb1 fix(server): use flatted for json.stringify (#3220)
  • 2682bff feat(docs): callout the key debug strategies. (#3219)
  • 4e87902 fix(changelog): remove release which does not exist (#3214)
  • 30ff73b fix(browser): report errors to console during singleRun=false (#3209)
  • 5334d1a fix(file-list): do not preprocess up-to-date files (#3196)
  • dc5f5de fix(deps): upgrade sinon-chai 2.x -> 3.x (#3207)
  • d38f344 fix(package): bump lodash version (#3203)
  • ffb41f9 refactor(browser): log state transitions in debug (#3202)
  • 240209f fix(dep): Bump useragent to fix HeadlessChrome version (#3201)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of conventional-changelog-cli is breaking the build 🚨

The devDependency conventional-changelog-cli was updated from 2.0.5 to 2.0.7.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Security issue

Hello,

According to snyk.io, video js present a security issue cause by [email protected] imported by mpd-parser, updating to 0.7.7 would fix it.

Thanks

Incorrect total number of audio tracks

In the manifest file:
Total audio tracks are 8 tracks
But using mpd-parser, total audio tracks are 4 tracks

const mpdParser = require('mpd-parser');
mpdParser.parse(response.body)
audio_tracks_counter = Object.keys(parsedManifest.mediaGroups.AUDIO.audio).length;

Screenshot from 2020-04-08 17-15-43

Note: response.body is the content of the manifest file (in the attachment)
Env: Ubuntu 18.04, mpd-parser version 0.10.1

manifest.txt

Parser failing with blob url

I am using video.js which calls the mpd-parser in the background. An error occurs in mpd-parser if I call video.js with a blob url of an .mpd file, instead of a url from the internet.

I create the url as follows:

    const blob = new Blob([mpdContents], {type: 'application/dash+xml'})
    const url = URL.createObjectURL(blob)

It throws the following error:

resolve-url.js?fd22:31 Uncaught TypeError: Failed to construct 'URL': Invalid URL
    at resolveUrl (resolve-url.js?fd22:31)
    at eval (mpd-parser.es.js?2202:1601)
    at Array.map (<anonymous>)
    at eval (mpd-parser.es.js?2202:1600)
    at Array.map (<anonymous>)
    at buildBaseUrls (mpd-parser.es.js?2202:1599)
    at inheritAttributes (mpd-parser.es.js?2202:2063)
    at parse (mpd-parser.es.js?2202:2176)
    at parseMasterXml (video.es.js?7ac5:31399)
    at DashPlaylistLoader.handleMaster_ (video.es.js?7ac5:32020)
    at eval (video.es.js?7ac5:31929)
    at callbackWrapper (video.es.js?7ac5:30636)
    at Object.eval [as callback] (video.es.js?7ac5:30661)
    at cbOnce (index.js?b664:104)
    at XMLHttpRequest.loadFunc (index.js?b664:178)

Are blob urls supported ? It would be great if they were :)

Live/dynamic and multi period documentation

Thanks for open sourcing this. I've managed to get a basic VOD player playing DASH content from mpd parser input. My next challenge will be live content and multi period content. Are these supported and how are these represented in your schema ?

It would be really helpful to have some basic documentation around your schema explaining how each property relates to DASH XML input.

Thanks

Parser dropping values from AdaptionSet

It looks like the parser is not including certain values. For example, in this AdaptationSet, we are completely dropping the Accessibility tag

<AdaptationSet contentType="video" minWidth="640" maxWidth="1280" minHeight="360" maxHeight="720" segmentAlignment="true" mimeType="video/mp4" startWithSAP="1">
  <ContentProtection schemeIdUri="" value="cenc"/>
  <ContentProtection schemeIdUri=""></ContentProtection>
  <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95">
  <Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015" value="CC3=spa" id=""/>
  <Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015" value="CC1=eng" id=""/>
  <Representation id="" bandwidth="2700000" width="1280" height="720" frameRate="30000/1001" codecs="avc1.64001F">
  <SegmentTemplate media="" initialization="" duration="120120" startNumber="0" timescale="30000"/
</Representation>

I believe its tied to the toM3U8 -

export const formatVideoPlaylist = ({ attributes, segments, sidx }) => {
. Was there a particular reason for dropping these values?

An MPD with incorrect root element attributes leads to an uncaught exception.

An MPD such as:

<?xml version="1.0"?>
  <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:full:2011" minBufferTime="PT1.5S">
    <Period duration="PT30S">
      <BaseURL>main/</BaseURL>
      <AdaptationSet mimeType="video/mp2t">
      <Representation id="720p" bandwidth="3200000" width="1280" height="720">
        <SegmentList timescale="90000" duration="5400000"></SegmentList>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

Results in: TypeError: Cannot set property 'duration' of undefined rather than something defined like MISSING_SEGMENT_INFORMATION

Still working out the specifics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.