Merge pull request #129 from lbryio/always-use-flash

Bypass check for Flash being installed in MediaElement.js
This commit is contained in:
Jeremy Kauffman 2017-01-13 17:54:12 -05:00 committed by GitHub
commit 9f9a1b66c2
3 changed files with 12 additions and 2 deletions

2
dist/index.html vendored
View file

@ -21,7 +21,7 @@
<body>
<div id="canvas"></div>
<script src="./js/mediaelement/jquery.js"></script>
<script src="./js/mediaelement/mediaelement-and-player.min.js"></script>
<script src="./js/mediaelement/mediaelement-and-player.js"></script>
<script src="./js/bundle.js"></script>
</body>
</html>

View file

@ -309,6 +309,16 @@ mejs.PluginDetector = {
// main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]);
hasPluginVersion: function(plugin, v) {
/**
* Workaround for LBRY: Safari now reports Flash being disabled even when it's installed.
* So we have to pretend we know it's installed. (This also makes sure that users of all
* browsers get a "missing plugin" message if they don't have Flash installed.)
*/
if (plugin == 'flash') {
return true;
}
var pv = this.plugins[plugin];
v[1] = v[1] || 0;
v[2] = v[2] || 0;

View file

@ -34,7 +34,7 @@ var WatchPage = React.createClass({
mimeType: status.mime_type,
})
var player = new MediaElementPlayer(this.refs.player, {
mode: 'auto_plugin',
mode: 'shim',
plugins: ['flash'],
setDimensions: false,
});