dash.js
dash.js copied to clipboard
enabling textTrack with setting its mode to 'showing' not working
Environment
- [ ] The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/
- [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [x] There are no network errors such as 404s in the browser console when trying to play the stream
- [x] The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ
- [x] The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: http://hrdash.akamaized.net/dash/live/2024543/hrdash/manifest.mpd (Geoblocked Germany)
- Dash.js version: v3.2.2
- Browser name/version: Firefox 89.0
- OS name/version: Windows 10
Steps to reproduce
- Create player, initialize it with video element and content URL
- Call attachTTMLRenderingDiv() with a div
- 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.
We are handling some internal variables in dash.js. What are the reasons to not use the dash.js API to enable the tracks?
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