-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Loop through sources then techs #2844
Conversation
Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED Commit: 7010016 (Please note that this is a fully automated comment.) |
We'd need a flag to enable this for backwards-compatibility. |
Took a test from @imbcmdth and part of his change. |
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: c74e116 (Please note that this is a fully automated comment.) |
.find(({source, tech}) => tech.canPlaySource(source)); | ||
|
||
return matchedSource ? | ||
{ source: matchedSource.source, tech: matchedSource.tech.name } : |
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 decided against using the .name
property on the constructor because there is no guarantee that the constructor will be named or have the same name as the "tech" mapping.
For instance:
Tech.registerTech('TotallyNotFoo', Foo);
Would have a name of Foo
but a "techName" of totallyNotFoo
.
Babel doesn't include .find 😢 |
Babel doesn't shim anything. We're still dealing with an es5 baseline and not an es3 baseline anymore, at least. |
I'll close this one |
This PR is to make it so that selectSources iterates through the sources then techOrder. This allows browsers without MSE to play HLS videos through Flash instead of falling back to a mp4 source.