-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load text tracks on demand #6043
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Upstream PR in progress, will add more adjustments to it and later will be able to remove this patch here. videojs/video.js#6043 Bug: T222763 Change-Id: I4d2eeb44dacdcd12c7717d208b21bed2775a8360
* Update TimedMediaHandler from branch 'master' to c6390e0b29d05093f31d5b22b4840fe7fdae884a - video.js: Local patch for subtitle loading behavior Upstream PR in progress, will add more adjustments to it and later will be able to remove this patch here. videojs/video.js#6043 Bug: T222763 Change-Id: I4d2eeb44dacdcd12c7717d208b21bed2775a8360
Upstream PR in progress, will add more adjustments to it and later will be able to remove this patch here. videojs/video.js#6043 Bug: T222763 Change-Id: I4d2eeb44dacdcd12c7717d208b21bed2775a8360 (cherry picked from commit c6390e0)
* Update extensions/TimedMediaHandler from branch 'wmf/1.34.0-wmf.8' to a43b42a4e3438769ec53d679a4ad9b14cd310f13 - video.js: Local patch for subtitle loading behavior Upstream PR in progress, will add more adjustments to it and later will be able to remove this patch here. videojs/video.js#6043 Bug: T222763 Change-Id: I4d2eeb44dacdcd12c7717d208b21bed2775a8360 (cherry picked from commit c6390e0b29d05093f31d5b22b4840fe7fdae884a)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'll fix this up shortly... |
57a43a5
to
55367a6
Compare
New version of this patch retains previous default behavior, adding a Should pass tests, but I'm not 100% sure this is the right way to set up such a config option. Comments & recommendations welcome. :) |
Not sure why the tests are failing, but there's a lot of 404s reported? Not sure if something's wrong with the test runner or if the code's broken in a way I don't understand. |
Yeah, not sure what's up with the test. Restarted but I'll check it out tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should the behavior be when we have default
attribute set? It looks like it'll preload all the tracks if any have default
enabled. Also, it looks like it'll always preload the descriptions track, it probably shouldn't be preloaded as well.
It should only load the individual track labeled with |
Reimplementation of videojs#2192 on current code. Seems to work but has not been carefully tested, especially on conditions such as slow networks and complex tracks. For videojs#5252 A `preloadTextTracks` tech option is added, set to true by default, to keep current behavior intact. Alternate behavior can be enabled by setting this to false. This delays loading of the VTT cue files until they are selected. For sites like Wikipedia that tend to have large numbers of crowdsourced subtitles and can show many files together on one page, this saves a lot of unnecessary network transfer and API hits. Does mean there may be dropped cues while switching to a track that requires on-demand loading. Example usage: videojs(element, { html5: { preloadTextTracks: false } };
55367a6
to
9ab12f8
Compare
Congrats on merging your first pull request! 🎉🎉🎉 |
Description
Reimplementation of #2192
on current code. Seems to work but has not been carefully tested,
especially on conditions such as slow networks or default tracks.
Would appreciate testing and any advice on ways this may go
wrong and need additional work.
For #5252
This delays loading of the VTT cue files until they are selected.
For sites like Wikipedia that tend to have large numbers of
crowdsourced subtitles and can show many files together on one
page, this saves a lot of unnecessary network transfer and API
hits.
Specific Changes proposed
Requirements Checklist