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.17k stars 1.68k forks source link

Ability to load captions/subtitles from file not listed in the manifest #3572

Open malthejorgensen opened 3 years ago

malthejorgensen commented 3 years ago

Is your feature request related to a problem? Please describe. I have a use-case in my company where it's impractical to add captions to the manifest files once they've been produced. We already have a large number of manifest files with no captions listed, since the video is produced first and captions added later. Customers would like to upload captions for these videos in cases where it makes sense.

For that reason, it would be nice to be able to load captions from a source that is not listed in the manifest file.

A similar use case could be the dash.js sample here: https://reference.dashif.org/dash.js/latest/samples/captioning/caption_vtt.html. The sample doesn't work since the manifest file it loads lists the captions as an http://-URL while the page is loaded via https://. Modern browsers like Chrome will block the request fetching the captions since it's Mixed-Content: Loading a http://-resource from a https://-Origin. This is different from my own issue, but can be solved in the same way – by allowing loading of captions from outside the manifest.

Describe the solution you'd like I'd like for dash.js to support loading captions from sources not listed in the manifest.

Describe alternatives you've considered Players like Plyr and Video.js fully rely on Dash.js for caption playback, so it's not possible to load external captions that way either.

Additional context I've made a proof-of-concept PR here: https://github.com/Dash-Industry-Forum/dash.js/pull/3573 I'm happy to adjust it to the style and requirements of this project.

dsilhavy commented 3 years ago

@malthejorgensen That sounds like a very nice addition. Regarding #3573 : Is this ready for review or are you still changing some parts?

malthejorgensen commented 3 years ago

Hi @dsilhavy. The PR is now in a reviewable state, but not finalized since I'd like someone more experienced with this codebase than me (that person is probably you 😁) to consider these parts of the PR:

If the current structure is okay, I'll finish it up. But also very open to moving things around so that they are more aligned with the codebase.

giorgos-epitropou-obs commented 8 months ago

Hi, any update? I see a lot of traction along with the DVB subtitles spec and I was wondering if this will be implemented too as it is very similar