videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.99k stars 7.44k forks source link

TypeError: setting getter-only property "inBandMetadataTrackDispatchType" #8053

Open rtkac opened 1 year ago

rtkac commented 1 year ago

Description

Hello everyone,

there is an error in the console, that comes from /node_modules/video.js/dist/video.js when nativeTextTracks: true is used in the player configuration, so the player is broken. It's important for styled text tracks.

The error comes from

if (_this.useCueTags_) {
  _this.cueTagsTrack_ = _this.tech_.addTextTrack('metadata', 'ad-cues');
  _this.cueTagsTrack_.inBandMetadataTrackDispatchType = ''; // the error is here 
}

addTextTrack() method pointing to the function addTrack() which returns getter, so it's locked:

Object.defineProperty(this, index, {
  get: function get() {
    return this.tracks_[index];
  }
}); 

Does anyone experienced similar issue?

Thanks a lot!

Reduced test case

No response

Steps to reproduce

  1. add nativeTextTracks: true to the player config
  2. run player on Firefox browser
  3. check the console tab on the browser

Errors

TypeError: setting getter-only property "inBandMetadataTrackDispatchType"

What version of Video.js are you using?

7.19.2, same issue with 7.20.3

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Firefox 108.0.1

What OS(es) and version(s) does this occur with?

masOS Monterey 12.5.1

welcome[bot] commented 1 year ago

👋 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.

mister-ben commented 1 year ago

Yes, we'd need a conditional at https://github.com/videojs/http-streaming/blob/cf340f2e01586827360a70599b80e1d27197f9a7/src/playlist-controller.js#L196 as that doesn't need to be set for native tracks

BucherTomas commented 1 year ago

Is there any tentative timeline when someone from the core dev team or from knowledgeable contributors could find time to look at this? Thank you.

kikklop commented 4 months ago

Hey guys, do you have some update on this issue? Is there any chance get it on the timeline? It would help us a lot. Thank you