muxinc / videojs-mux-kit

MIT License
33 stars 11 forks source link

Subtitle Support #31

Closed james-mux closed 3 years ago

james-mux commented 3 years ago

What's new?

How to use

  1. Ingest a video to Mux with subtitles
  2. Use the asset's playback_id like normal, and the subtitles should automatically appear
dylanjha commented 3 years ago

Good find! Overall this looks like it solves the bug. Question:

More of a product question, maybe we want to show subtitles by default? (and if multiple, show the first one). It would mean that videojs-mux-kit takes an "accessibility first" opinion. Thoughts?

james-mux commented 3 years ago

Thanks @dylanjha for the feedback!

In answer to your questions:

  1. Yes, we jump into the default video.js subtitles / cc switcher UI. Screenshot below. The only comment to note is here, where hls.js has a little bug at present which means cc aren't correctly assigned the captions type and prevents the track being labelled with 'cc' - but when this is resolved, we'll get the fix just by upgrading our hls.js version.

Screenshot 2021-06-17 at 09 10 48

  1. I've tested following the 'Subtitles by default' instructions for Mux, where a query string parameter can be applied to the playback_id, like so {playback_id}?default_subtitles_lang=en which works for enabling a subtitle track by default, and correctly sets the UI too. Do you think that is OK for users?

I plan to update our docs accordingly, as well as get signed URLs support implemented and documented too (in a PR coming to cinema's near you soon)

dylanjha commented 3 years ago

@james-mux cool, as long as default_subtitles_lang= works, then that's good. I was thinking we can be even more a11y first by always showing subtitles by default, but since that behavior can be opted in with the query param, then I would say that's good for now 👍🏼