videojs / mpd-parser

https://videojs.github.io/mpd-parser/
Other
77 stars 54 forks source link

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

Open mwhipple opened 6 years ago

mwhipple commented 6 years ago

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.

mwhipple commented 6 years ago

This looks like a manifestation of the known issue around segments inside of representations, closing for now.

mwhipple commented 6 years ago

Still poking my way through this :). The exception referenced above seems to be a result of incorrect attributes on the MPD element...so most likely not valid but should likely be caught and made a friendlier message.

gkatsev commented 4 years ago

Yeah, the error output from this is definitely not great.