Skip to content

fix: turn on strict mode again#6334

Merged
gkatsev merged 2 commits intomasterfrom
use-strict
Dec 2, 2019
Merged

fix: turn on strict mode again#6334
gkatsev merged 2 commits intomasterfrom
use-strict

Conversation

@gkatsev
Copy link
Copy Markdown
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

['featuresNativeAudioTracks', 'supportsNativeAudioTracks']
].forEach(function([key, fn]) {
defineLazyProperty(Html5.prototype, key, () => Html5[fn](), false);
defineLazyProperty(Html5.prototype, key, () => Html5[fn](), true);
Copy link
Copy Markdown
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