-
Notifications
You must be signed in to change notification settings - Fork 425
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
fix: do not request manifests until play when preload is none #1060
Conversation
@@ -3718,7 +3718,7 @@ QUnit.test('switching playlists with an outstanding key request aborts request a | |||
); | |||
}); | |||
|
|||
QUnit.test('does not download segments if preload option set to none', function(assert) { | |||
QUnit.test('does not download anything until play if preload option set to none', function(assert) { |
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.
This test was failing, and didn't really make sense anymore. I modified for the new behavior.
Great. I haven't tested it yet. But this probably also prevents a scenario with experimentalBufferBasedABR where the buffer check is constantly repeated at a short interval while the player is not 'loaded', see #1041 |
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.
Works nicely!
@@ -85,6 +88,13 @@ <h3>Options</h3> | |||
<input id=override-native type="checkbox" checked> | |||
Override Native (reloads player) | |||
</label> | |||
<label> |
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.
awesome
@@ -279,7 +279,16 @@ export class MasterPlaylistController extends videojs.EventTarget { | |||
this.logger_ = logger('MPC'); | |||
|
|||
this.triggeredFmp4Usage = false; | |||
this.masterPlaylistLoader_.load(); | |||
if (this.tech_.preload() === 'none') { |
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.
glad it's surprisingly simple.
Description
We don't do a very good job respecting
preload=none
on the video element because even with preload=none we still download the manifests and potentially waste bandwidth with videos that never get played. We should prevent that when preload is set tonone
.