Make MediaElement.js force Chrome to use a flash player?

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

I saw several painful suggestions in blogs and forums that this can be done, but I do not see a specific option in the documentation. Any help would be greatly appreciated!

+5
source share
3 answers

Here you go:

new MediaElementPlayer('video',{mode:'shim'}); 
+14
source

I used mode:shim on a site that was causing unexplained problems with interpreting IE9 html5. however, this mode tag caused all browsers to return to the flash, and this was undesirable.

So, I used conditional comments to point to IE9 and make it use flash (or silverlight if you prefer)

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

This will not work for chrome, and I don’t know about a limited chrome solution, but for those who stumbled upon this answer, as well as IE problems, hope this helps.

Citing: Mediaelement.js malfunction in IE, flashback does not work .

+3
source

To do this, you need to change the code. Find the code below in the file MediaElement.js or mediaelement-and-player.js.

  t.supportsMediaTag = (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid ); 

to

 t.supportsMediaTag = ( !t.isChrome) && (typeof v.canPlayType !== 'undefined' || t.isBustedAndroid ) ; 
0
source

Source: https://habr.com/ru/post/889474/


All Articles