Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually selecting quality triggers: Cannot read 'timescale' of undefined #1120

Closed
AwokeKnowing opened this issue Apr 19, 2021 · 1 comment · Fixed by #1121
Closed

Manually selecting quality triggers: Cannot read 'timescale' of undefined #1120

AwokeKnowing opened this issue Apr 19, 2021 · 1 comment · Fixed by #1121

Comments

@AwokeKnowing
Copy link

Please do not delete the template, by filling out the required information we can investigate your issue more quickly.

Before opening an issue see if your problem can be resolved with the troubleshooting guide.

Description

When manually selecting the quality level, videojs 7.11.0 did not throw error. But videojs 7.11.1 throw:

video.js:34267 Uncaught TypeError: Cannot read property 'timescale' of undefined
at addSegmentsToPlaylist (video.js:34267)
at updateMaster$1 (video.js:40777)
at DashPlaylistLoader.handleMaster_ (video.js:41330)
at DashPlaylistLoader.refreshMedia_ (video.js:41428)
at DashPlaylistLoader.haveMetadata (video.js:41129)
at video.js:41115
at video.js:40976

Sources

here is the mpd, generated from shaka packager

<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/google/shaka-packager version v2.4.3-dd9870075f-release-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT63.7971305847168S">
  <Period id="0">
    <AdaptationSet id="0" contentType="audio" lang="en" subsegmentAlignment="true">
      <ContentProtection value="cbcs" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="51a4e326-e816-c661-b632-2c31c604bc52"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFJI88aJmwY=</cenc:pssh>
      </ContentProtection>
      <Representation id="0" bandwidth="135733" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>a_AUDIO_128k_AAC_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1050-1213" timescale="48000">
          <Initialization range="0-1049"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>


    <AdaptationSet id="2" contentType="video" maxWidth="1920" maxHeight="1080" frameRate="11988/400" par="16:9">
      <ContentProtection value="cbcs" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="51a4e326-e816-c661-b632-2c31c604bc52"/>
      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGASEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFISEFGk4yboFsZhtjIsMcYEvFJI88aJmwY=</cenc:pssh>
      </ContentProtection>
      <Representation id="4" bandwidth="439278" codecs="avc1.42c01e" mimeType="video/mp4" sar="640:639" width="426" height="240">
        <BaseURL>v_SD_240p_H264_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1071-1234" timescale="11988">
          <Initialization range="0-1070"/>
        </SegmentBase>
      </Representation>
      <Representation id="8" bandwidth="1073434" codecs="avc1.4d401f" mimeType="video/mp4" sar="160:159" width="848" height="480">
        <BaseURL>v_SD_480p_H264_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1106-1269" timescale="11988">
          <Initialization range="0-1105"/>
        </SegmentBase>
      </Representation>
      <Representation id="10" bandwidth="2104278" codecs="avc1.4d401f" mimeType="video/mp4" sar="1:1" width="1280" height="720">
        <BaseURL>v_HD_720p_H264_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1088-1251" timescale="11988">
          <Initialization range="0-1087"/>
        </SegmentBase>
      </Representation>
      <Representation id="11" bandwidth="822806" codecs="avc1.42c01e" mimeType="video/mp4" sar="1:1" width="640" height="360">
        <BaseURL>v_SD_360p_H264_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1052-1215" timescale="11988">
          <Initialization range="0-1051"/>
        </SegmentBase>
      </Representation>
      <Representation id="12" bandwidth="4084050" codecs="avc1.640028" mimeType="video/mp4" sar="1:1" width="1920" height="1080">
        <BaseURL>v_HD_1080p_H264_COM1102-zmhg2.mp4</BaseURL>
        <SegmentBase indexRange="1091-1254" timescale="11988">
          <Initialization range="0-1090"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

ACTUAL WORKING DEMO CODEPEN AVAILABLE UPON REQUEST (not posted here due to eme)

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

player = videojs('coursevideo', {controls:true,plugins:{eme:{}, qualityLevels:{}, httpSourceSelector:{}}});
    player.src([{
     "src": "video.mpd",
     "type": "application/dash+xml",
     "keySystems": {
      "com.widevine.alpha": {
       "url": "https://contentlicense.server",
      }
     }
    }])

After setting up a video as above, just manually select a quality.

Results

The timescale error shows in js console, the first time selecting a quality

Expected

7.11.0 and below don't throw error.

Error output

video.js:34267 Uncaught TypeError: Cannot read property 'timescale' of undefined
at addSegmentsToPlaylist (video.js:34267)
at updateMaster$1 (video.js:40777)
at DashPlaylistLoader.handleMaster_ (video.js:41330)
at DashPlaylistLoader.refreshMedia_ (video.js:41428)
at DashPlaylistLoader.haveMetadata (video.js:41129)
at video.js:41115
at video.js:40976

Additional Information

vjs 7.11.0 and below do not have this issue. it seems 7.11.1 updated http-streaming to 2.4

videojs-http-streaming version

videojs-http-streaming 2.4.1

videojs version

what version of videojs does this occur with?
video.js7.11.1+

Browsers

chrome/Edge

Platforms

Windows

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
eme
quality-levels
http-source-selector

Other JavaScript

none

@welcome
Copy link

welcome bot commented Apr 19, 2021

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant