Open malthejorgensen opened 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?
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:
TextSourceBuffer.createTextTrackFromMediaInfo
TextTracks.getNumberOfTextTracks()
since we need the total number of text tracks to call TextTracks.addTextTracks()
MediaInfo
type which isn't constructible (it's not exported from the package), but since TypeScript is structurally typed I think passing in an object with the right properties should still work.MediaPlayer
that should live somewhere else?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.
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
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 anhttp://
-URL while the page is loaded viahttps://
. Modern browsers like Chrome will block the request fetching the captions since it's Mixed-Content: Loading ahttp://
-resource from ahttps://
-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.