Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MediaElement.js - force Chrome to use flash player?

We're having problems with Chrome crashing, and it seems to be related to the html5 video player, is there any way to force MediaElement.js to use the flash player even if html5 is supported? I can do a browser test in jQuery if I can figure out what setting to pass to mediaelement.

I've seen a few tantalizing suggestions in blogs and forums that this can be done, but I'm not seeing a specific option in the documentation. Any help would be very much appreciated!

like image 878
David Avatar asked Feb 24 '11 22:02

David


2 Answers

Here you go:

new MediaElementPlayer('video',{mode:'shim'});
like image 182
John Dyer Avatar answered Oct 16 '22 02:10

John Dyer


I used the mode:shim on a site that was giving inexplicable problems with IE9's html5 interpretation. however, this mode tag forced all browsers to fall back to flash, and this was not desirable.

So I used conditional comments to specify IE9 and force it to use flash (or silverlight if that's your preference)

var player = new MediaElementPlayer('video', {
    /*@cc_on
    @if (@_jscript_version == 9)
            mode: 'shim',
    @end
    @*/
    // shows debug errors on screen
    enablePluginDebug: false,

    // etc...
}

This won't work for chrome, and I don't know of a chrome-specific workaround, but for anyone who stumbled on this answer as I did for IE problems, I hope it helps.

In reference to: Mediaelement.js malfunction in IE, no flashback works.

like image 3
russ24 Avatar answered Oct 16 '22 02:10

russ24