Skip to content

TypeError: cue.scaleCue is not a function #3788

@l1bbcsg

Description

@l1bbcsg
Environment
  • Dash.js version: 4.1.0
Steps to reproduce

Any vtt text track that starts at 0 timestamp (or probably close to it) causes Dash.js to throw an uncaught exception. Playback is not affected, however.

Example of such track:

WEBVTT
Language: en

00:00:00.000 --> 00:00:05.000
Oh

It could be embedded into any manifest as follows:

    <AdaptationSet contentType="text" lang="en" mimeType="text/vtt">
      <Representation id="subtitles">
        <BaseURL>subtitles.vtt</BaseURL>
      </Representation>
    </AdaptationSet>

It seems scaleCue is monkey patched only for TTML tracks, but is invoked for VTT tracks as well at start.
If a text track happens to have activeCues by the time loadedmetada event is fired the error happens.

Observed behavior

Video plays normally

Console output
Uncaught TypeError: cue.scaleCue is not a function
    at Object.checkVideoSize (TextTracks.js:283)
    at Object.onMetadataLoaded (TextTracks.js:164)
    at EventBus.js:124
    at Array.forEach (<anonymous>)
    at Object.trigger (EventBus.js:124)
    at HTMLVideoElement._onPlaybackMetaDataLoaded (PlaybackController.js:550)
Expected behavior

No uncaught exceptions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions