silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

feat: textTrack (e.g. subtitles) support, session restoring/resuming support #112

Closed zemlanin closed 1 year ago

zemlanin commented 2 years ago

version of #89 with resolved conflicts and review changes


original PR comment by @jbreemhaar:

TextTrack support

Added support for textTracks (e.g. subtitles, captions, descriptions). The active track will automatically be enabled on chromecast. Switching and disabling works. For details, see https://developers.google.com/cast/docs/chrome_sender/advanced#using_the_tracks_apis https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.Track https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.Media#editTracksInfo

Session restoring/resuming

Added support for restoring chromecast sessions. E.g. when a user refreshes/reloads the player, it will automatically restore its state as if no refresh happened. See https://developers.google.com/cast/docs/chrome_sender/integrate

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 0.0% when pulling 157b067da97e2b3dcff8adc61666d3c5bd899cb2 on zemlanin:master into 6f1275854d359a18ab583d0b25d89fb61eb4abb4 on silvermine:master.

jthomerson commented 2 years ago

@jbreemhaar and @zemlanin - thanks for the contribution. Sorry it sat for so long in the backlog. We're about to start doing some work on these plugins in January, and we may have time to look at your code changes and test this along with that work. In the meantime, I left a review of some coding standards / consistency issues to clean it up a bit where it's closer to something we could merge. Could you fix those?

Additionally, please squash the commits into a single feature commit (see our standards, and especially the paragraph starting with "Commits that contain only code review changes are never allowed.")

Thanks! This is a feature we'd like to see integrated, so we're happy to see some interest in it.

zemlanin commented 2 years ago

@jthomerson FYI, neither original http://www.caminandes.com/download/03_caminandes_llamigos_1080p.mp4 nor added by @jbreemhaar https://storage.googleapis.com/webfundamentals-assets/videos/chrome.webm/https://storage.googleapis.com/webfundamentals-assets/videos/chrome.mp4 URLs respond with CORS headers, so demo doesn't work without CORS-disabling shenanigans (--disable-web-security in Chrome or "Develop > Disable Cross-Origin Restrictions" in Safari)

jthomerson commented 2 years ago

Ping @yokuze @izkmdz