-
Notifications
You must be signed in to change notification settings - Fork 424
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: null check return value of selectPlaylist #779
Conversation
src/master-playlist-controller.js
Outdated
// ensure we have some buffer before we switch up to prevent us running out of | ||
// buffer while loading a higher rendition. | ||
forwardBuffer >= bufferLowWaterLine) { | ||
if (nextPlaylist && |
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.
It may be worth having a message being logged somewhere (maybe even as a warning) in this case. Will make debugging easier if we ever run into it.
This implemention mirrors the original if statement. This is becasuse if it were to invert it, it would actually end the chain too early. Thus, we return true This is because if were to invert it, we actually would end too early in the checks chain.
note 70ad314 |
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.
Looks good, but might be good to have a test for the null
nextPlaylist
this.masterPlaylistController.mainSegmentLoader_.trigger('bandwidthupdate'); | ||
assert.strictEqual(calls, 3, 'selects after additional segments'); | ||
// verify stats | ||
assert.equal(this.player.tech_.hls.stats.bandwidth, 4194304, 'default bandwidth'); |
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.
I think we can remove this.
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.
I kept it because it's literally a copy and paste from the above test but I guess we can remove it.
This is #779 but against master.
This is #779 but against master.
No description provided.