K
K
kleilike2016-02-05 11:04:05
Android
kleilike, 2016-02-05 11:04:05

How to play video automatically on website in android?

Hello. The site has a video, it is used as a background. It doesn't work on mobile devices. Is there any way to fix this?

<video autoplay loop poster="<?=$arResult['DISPLAY_PROPERTIES']['FILE_3']['FILE_VALUE']['SRC'];?>">
    <source src="<?=$arResult['DISPLAY_PROPERTIES']['FILE_1']['FILE_VALUE']['SRC'];?>">
    <source src="<?=$arResult['DISPLAY_PROPERTIES']['FILE_2']['FILE_VALUE']['SRC'];?>">
</video>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Baev, 2016-02-05
@drugoi

No way.
Do not force mobile users to load extra traffic, you can get by with a poster or GIF for the background.

P
Peter, 2016-02-05
@petrtr

After the user clicks on the site, you can start the video from js
var vid = document.getElementById("myVideo");
function playVid() {
vid.play();
}
function pauseVid() {
vid.pause();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question