Video tag does not play on android chrome

0

I have a web created with WordPress, which has a video inserted at the beginning. In web browsers the video plays without problems but on mobile phones android I do not even see the label. I have tried a thousand ways .. removing attributes "controls", "mute", "autoplay" etc. But I can not show this label. The code I have is the following:

<video autoplay="" loop="" muted="" "> 
<source src="https://www.lebecuesta.com/wp- 
 content/uploads/2018/05/lebecuesta-solo-video-1.mp4" type="video/mp4"> 
</video>

Simply this in android does not appear to me. I do not have any media query to cancel it or anything.

Any suggestions?

    
asked by 05.06.2018 в 13:14
source

2 answers

1

I already pass through this in my application and it turns out that it is not only a thing of the code of the application or the web application, but it is because of the encoding of the video (regardless of whether it is mp4).  Download a few different and you'll see that some if they go and others do not.

    
answered by 05.06.2018 / 13:54
source
0

The address of src= has a line break that it should not have.

If fixing the line break is still not working try the following code, without specifying the type :

<video id="video" autobuffer>
    <source src="https://www.lebecuesta.com/wp-content/uploads/2018/05/lebecuesta-solo-video-1.mp4">
</video>

Surely you need a JS file to call the play function:

var video = document.getElementById('video');
video.addEventListener('click',function(){
  video.play();
},false);

Source: StackOverflow English: HTML5 video element on Android.

    
answered by 05.06.2018 в 13:53