Skip to content
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: turn on strict mode again #6334

Merged
merged 2 commits into from
Dec 2, 2019
Merged

fix: turn on strict mode again #6334

merged 2 commits into from
Dec 2, 2019

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Nov 26, 2019

We had to turn off strict mode (#4551) in Video.js due to a change in vtt.js. That has now been fixed in videojs/vtt.js#40 and released as part of 0.15.2 which will be available via #6333.

Fixes videojs/vtt.js#15

@@ -1218,7 +1218,7 @@ Html5.Events = [
['featuresNativeVideoTracks', 'supportsNativeVideoTracks'],
['featuresNativeAudioTracks', 'supportsNativeAudioTracks']
].forEach(function([key, fn]) {
defineLazyProperty(Html5.prototype, key, () => Html5[fn](), false);
defineLazyProperty(Html5.prototype, key, () => Html5[fn](), true);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last property here was used to see whether we should create a setter for the property or not. Given that these values do change, particularly with text tracks, we do want these to be settable but because we weren't using strict mode, it was being set without a problem. Instead, we should just make sure these are settable.

@gkatsev gkatsev added the needs: LGTM Needs one or more additional approvals label Nov 26, 2019
@misteroneill misteroneill removed the needs: LGTM Needs one or more additional approvals label Dec 2, 2019
@gkatsev gkatsev merged commit ca84448 into master Dec 2, 2019
@gkatsev gkatsev deleted the use-strict branch December 2, 2019 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support strict mode
2 participants