WebM does not return to Flash in browsers that do not support it with mediaelement.js

I am trying to use mediaelement.js to display video in HTML5 with a return to Flash if browsers do not support it. It says that when the codec is not supported, it automatically returns, but it does not show and only displays the image. If I delete the WebM line, it will show me the Flash player.

Does anyone know how to fix this?

This is the code I'm using:

<video class="videos" width="560" height="315" controls="controls" poster="img/img.jpg">
                        <source type="video/webm" src="videos/video.webmvp8.webm" />

                        <object width="560" height="315" type="application/x-shockwave-flash" data="flashmediaelement.swf">
                            <param name="movie" value="flashmediaelement.swf" />
                            <param name="flashvars" value="controls=true&poster=img.jpg&file=videos/video.flv" />
                            <!-- Image as a last resort -->
                            <img src="img/img.jpg" width="560" height="315" title="No se encontr&oacute; posibilidad de reproducir el video" />
                        </object>
        </video>
+3
source share
1 answer

The img element "last resort" must be outside and below the element of the object.

0
source

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


All Articles