Gray screen in videos

1

I'm playing videos on android (versions above 5 only) using a webview along with the <video> tag in the html. The video plays perfectly and fires all the events correctly, however every time a video is playing it always has a preview image similar to this one (to play it by opening youtube by chrome on your smartphone):

Is there any elegant way to work around this problem? The only option I thought, but I did not test it, was before the video started to play (timeupdate event tells the time of the video, if it happens of 0.1 seconds I can know that he is already touching) to make some changes of layer with css putting a div with black background in the front, but it seems a lot of gambiarra.

    
asked by anonymous 03.02.2017 / 19:57

1 answer

0

This image is called "poster". It serves to show something before the video starts playing, it usually appears when the video is being uploaded.

I circumvented the problem by adding the following code in the video element:

<video poster='#' id="video" class="autoAdjust visible"></video>

and in css:

video {
  background: black;
}
    
08.02.2017 / 14:14