-
Notifications
You must be signed in to change notification settings - Fork 428
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
feat: remove experimental options #1301
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. |
This probably should go against the |
47d1261
to
b8da6d6
Compare
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.
Yeah, we should, I think. The others are blocked by lack of enough real world data.
src/manifest.js
Outdated
@@ -23,7 +23,7 @@ export const createPlaylistID = (index, uri) => { | |||
* An array of custom tag parsers for the m3u8-parser instance | |||
* @param {Object[]} [customTagMappers] | |||
* An array of custom tag mappers for the m3u8-parser instance | |||
* @param {boolean} [experimentalLLHLS=false] | |||
* @param {boolean} [llhls=false] |
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 should default to true
now.
@@ -34,7 +34,7 @@ export const parseManifest = ({ | |||
manifestString, | |||
customTagParsers = [], | |||
customTagMappers = [], | |||
experimentalLLHLS | |||
llhls |
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.
The change to the JSDoc isn't enough to default it to true
. It would need to be changed here as well
llhls | |
llhls = true |
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.
LGTM. @gesinger would you mind having a quick look?
src/playlist-loader.js
Outdated
// force experimentalLLHLS for IE 11 | ||
// force llhls for IE 11 | ||
if (videojs.browser.IE_VERSION) { | ||
this.experimentalLLHLS = false; | ||
this.llhls = false; | ||
} |
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 this whole block can be removed.
src/manifest.js
Outdated
@@ -34,7 +34,7 @@ export const parseManifest = ({ | |||
manifestString, | |||
customTagParsers = [], | |||
customTagMappers = [], | |||
experimentalLLHLS | |||
llhls = true |
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 this default should be at a higher level (probably in src/videojs-http-streaming.js), as, as it stands, it looks like playlist-loader will set it to false if left unspecified.
src/playlist-loader.js
Outdated
if (videojs.browser.IE_VERSION) { | ||
this.llhls = false; | ||
} | ||
this.llhls = (vhsOptions && vhsOptions.llhls) || true; |
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 line will always evaluate to true. But I think the option should to be set at a higher level (in src/videojs-http-streaming.js, probably in setOptions_
https://github.com/videojs/http-streaming/blob/main/src/videojs-http-streaming.js#L622 ).
src/manifest.js
Outdated
@@ -23,7 +23,7 @@ export const createPlaylistID = (index, uri) => { | |||
* An array of custom tag parsers for the m3u8-parser instance | |||
* @param {Object[]} [customTagMappers] | |||
* An array of custom tag mappers for the m3u8-parser instance | |||
* @param {boolean} [experimentalLLHLS=false] | |||
* @param {boolean} [llhls=true] |
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.
* @param {boolean} [llhls=true] | |
* @param {boolean} [llhls] |
src/playlist-loader.js
Outdated
@@ -395,7 +395,7 @@ export default class PlaylistLoader extends EventTarget { | |||
|
|||
this.customTagParsers = (vhsOptions && vhsOptions.customTagParsers) || []; | |||
this.customTagMappers = (vhsOptions && vhsOptions.customTagMappers) || []; | |||
this.llhls = (vhsOptions && vhsOptions.llhls) || true; | |||
this.llhls = (vhsOptions && vhsOptions.llhls) || false; |
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.
Since the option is set at a higher level, I think we can just use:
this.llhls = (vhsOptions && vhsOptions.llhls) || false; | |
this.llhls = vhsOptions && vhsOptions.llhls; |
@@ -597,6 +597,7 @@ class VhsHandler extends Component { | |||
this.options_.customTagParsers = this.options_.customTagParsers || []; | |||
this.options_.customTagMappers = this.options_.customTagMappers || []; | |||
this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; | |||
this.options_.llhls = this.options_.llhls === false ? false : true; |
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 know we use this style above, but I think it's clearer as:
this.options_.llhls = this.options_.llhls === false ? false : true; | |
this.options_.llhls = Boolean(this.options_.llhls); |
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.
Coming back to this, Kevin has restored the previous state:
this.options_.llhls === false ? false : true
This is because simply doing Boolean(this.options_.llhls)
was not defaulting to true
, which is what was wanted.
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 the build is failing due to some linting issues in scripts/index.js
Codecov Report
@@ Coverage Diff @@
## next #1301 +/- ##
==========================================
- Coverage 86.27% 86.23% -0.04%
==========================================
Files 39 39
Lines 9791 9757 -34
Branches 2275 2276 +1
==========================================
- Hits 8447 8414 -33
+ Misses 1344 1343 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
scripts/old-index.js
Outdated
@@ -398,9 +398,9 @@ | |||
vhs: { |
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 removed this entire file in #1308
src/videojs-http-streaming.js
Outdated
@@ -597,6 +597,7 @@ class VhsHandler extends Component { | |||
this.options_.customTagParsers = this.options_.customTagParsers || []; | |||
this.options_.customTagMappers = this.options_.customTagMappers || []; | |||
this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; | |||
this.options_.llhls = Boolean(this.options_.llhls); |
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 could be wrong, but this would still default to false
, right?
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.
Yes
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 want it to default to true
, though. Maybe something like this?
this.options_.llhls = Boolean(this.options_.llhls); | |
this.options_.llhls = this.options_.hasOwnProperty('llhls') ? this.options_.llhls : true; |
src/videojs-http-streaming.js
Outdated
@@ -641,11 +642,11 @@ class VhsHandler extends Component { | |||
'initialPlaylistSelector', | |||
'experimentalBufferBasedABR', |
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.
Also, we do want to rename this to bufferBasedABR
- but leave it defaulting to false
for the time being.
c99b0ca
to
d6d4ed1
Compare
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.
The netlify preview is broken. Also, I noticed that fields in the "Options" tabs still say "[EXPERIMENTAL]".
scripts/index.js
Outdated
[ | ||
'exact-manifest-timings', | ||
'pixel-diff-selector', | ||
'bufferBasedABR' |
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 is throwing an error on the Netlify preview build:
'bufferBasedABR' | |
'buffer-water' |
src/videojs-http-streaming.js
Outdated
@@ -597,6 +597,7 @@ class VhsHandler extends Component { | |||
this.options_.customTagParsers = this.options_.customTagParsers || []; | |||
this.options_.customTagMappers = this.options_.customTagMappers || []; | |||
this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; | |||
this.options_.llhls = Boolean(this.options_.llhls); |
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 want it to default to true
, though. Maybe something like this?
this.options_.llhls = Boolean(this.options_.llhls); | |
this.options_.llhls = this.options_.hasOwnProperty('llhls') ? this.options_.llhls : true; |
d6d4ed1
to
4b1d2a3
Compare
@@ -597,6 +597,7 @@ class VhsHandler extends Component { | |||
this.options_.customTagParsers = this.options_.customTagParsers || []; | |||
this.options_.customTagMappers = this.options_.customTagMappers || []; | |||
this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false; | |||
this.options_.llhls = this.options_.llhls === false ? false : true; |
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.
Coming back to this, Kevin has restored the previous state:
this.options_.llhls === false ? false : true
This is because simply doing Boolean(this.options_.llhls)
was not defaulting to true
, which is what was wanted.
Congrats on merging your first pull request! 🎉🎉🎉 |
Description
Removed some experimental options and make them default.