I've noticed the problems with autoplay muted video on mobile devices lately. It's mainly due to new policies for browsers - Data Saving management etc..
1.
Is it possible to implement the play() / promise code to the video so the play button appears if the device can't autoplay?
I've found this piece of code, but I'm not sure if that would do the job or how to implement it..
varpromise = document.querySelector('video').play(); if(promise !== undefined) { promise.then(_ => { // Autoplay started! }).catch(error => { // Autoplay was prevented. // Show a "Play" button so that user can start playback. }); }
2. Is there some way to have just one click to autoplay all videos on slider or sliders (like FB)?
3. can i have only play button without progress bar as the video controls? Can i stylize video controls? Can i make a button as a layer and then assign the video play to it?
Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today.
I would like to confirm that we have received your message. Due to the nature of the issue you are experiencing, I will have to contact and consult with the development team first. I will get back to you as soon as I can.
We appreciate your patience while we're working towards your ticket.
The dev team said that we're going to rework the autoplay function on mobiles, so users can start videos (expect backgrounds) manually. Every LayerSlider skins has default play buttons, so even if there is no autoplay available on certain devices, the manual start buttons will be there.
Well the thing is, the video doesn't behave like that, at least in the Chrome mobile. Its data saving feature (which is usually turned on) prevents from autoplaying and it won't show up the controls nor the fallback image in that case. It just goes black. This behaviour changes from Chrome's update to update. I guess we have to count on manual play on mobile, so good luck with creating a good solution there. In the meanwhile I guess I'll try what can be done with animated GIFs or APNGs.
Hi,
I've noticed the problems with autoplay muted video on mobile devices lately. It's mainly due to new policies for browsers - Data Saving management etc..
1.
Is it possible to implement the play() / promise code to the video so the play button appears if the device can't autoplay?
I've found this piece of code, but I'm not sure if that would do the job or how to implement it..
var
promise = document.querySelector(
'video'
).play();
if
(promise !== undefined) {
promise.then(_ => {
// Autoplay started!
}).
catch
(error => {
// Autoplay was prevented.
// Show a "Play" button so that user can start playback.
});
}
2. Is there some way to have just one click to autoplay all videos on slider or sliders (like FB)?
3. can i have only play button without progress bar as the video controls? Can i stylize video controls? Can i make a button as a layer and then assign the video play to it?
Thanks
Hello the_soundtouchables,
Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today.
I would like to confirm that we have received your message. Due to the nature of the issue you are experiencing, I will have to contact and consult with the development team first. I will get back to you as soon as I can.
We appreciate your patience while we're working towards your ticket.
The dev team said that we're going to rework the autoplay function on mobiles, so users can start videos (expect backgrounds) manually. Every LayerSlider skins has default play buttons, so even if there is no autoplay available on certain devices, the manual start buttons will be there.
Well the thing is, the video doesn't behave like that, at least in the Chrome mobile. Its data saving feature (which is usually turned on) prevents from autoplaying and it won't show up the controls nor the fallback image in that case. It just goes black. This behaviour changes from Chrome's update to update. I guess we have to count on manual play on mobile, so good luck with creating a good solution there. In the meanwhile I guess I'll try what can be done with animated GIFs or APNGs.
Cheers!
We will working on it, thank you for your understanding.
Best Regards,
George | Kreatura Dev Team