Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.09k stars 1.67k forks source link

enabling textTrack with setting its mode to 'showing' not working #3657

Open mitxp opened 3 years ago

mitxp commented 3 years ago
Environment
Steps to reproduce
  1. Create player, initialize it with video element and content URL
  2. Call attachTTMLRenderingDiv() with a div
  3. Set HTML5videoElement.textTracks[0].mode = 'showing';
Observed behavior

Subtitles not showing. However, they start showing when calling player.setTextTrack(0) or player.enableText(true). After that, they can be controlled by setting the mode to 'hidden' / 'disabled' / 'showing'.

Console output

None

Expected behavior

Subtitles should also show when setting the textTrack to 'showing' to be compatible with the HTML5 video API without the need of using the dash.js player API.

dsilhavy commented 3 years ago

We are handling some internal variables in dash.js. What are the reasons to not use the dash.js API to enable the tracks?

mitxp commented 3 years ago

We're using dash.js as a drop-in replacement for running HbbTV applications in non-HbbTV environments. HbbTV is a standard for interactive TV (running web apps provided by a browadcaster on a browser on your Smart TV), which is quite common in the EU, see https://www.hbbtv.org/ This standard defines that the HTML5 video element should support DASH content out of the box, and of course, to enable subtitles / closed-captions you should be using the HTML5 way of enabling/disabling them. It would just make many things easier in this case. Other scenario: Creating a player that supports playing back mp4 files and DASH files. In this case, the UI that configures subtitles / closed-captions would be identical for videos played back with regular HTML5