-
AuthorPosts
-
May 24, 2024 at 8:58 pm #1445640
Hello
I would like to play videos on mobile in the original video window with the option to click on fullscreen. But with or without the “show fullscreen button” enabled, the video only plays in fullscreen. (all videos under: Our Work)
I don’t want it on Autoplay, because they are music videos and I need to hear the sound when the video starts playing.
On the homepage I have 2 videos on autoplay, they play the video in the original video window and on fullscreen when that fullscreen button is clicked.
Why does this only work with autoplay enabled? Is there a way to change that?May 26, 2024 at 5:42 pm #1446475Hey birte5,
Thanks for your patience, with I check your video “Roar”, linked below, on Android mobile the video will play in screen with the fullscreen button, this video is not autoplay:
I don’t have a iPhone so I don’t know if it is different. Please check this page and see if this is the same for you.Best regards,
MikeMay 27, 2024 at 2:17 am #1446647Hi Mike,
the way it shows on Android is exactely how I want it, no autoplay, when you press play, video should play in screen with fullscreen option. Unfortunately, it is not like that on iPhone, even though it does show the fullscreen button before you start the video, it will only play in fullscreen and not in screen.
Iphone display“>
Is there a solution?
Thank you for your help!best,
BirteMay 27, 2024 at 4:53 am #1446661Hi,
Why does this only work with autoplay enabled? Is there a way to change that?
The theme only adds the playsinline attribute when autoplay is enabled. This attribute (playsinline) allows the video to play directly on the page without going into fullscreen. If you want to alter this behavior, keep the autoplay option enabled, then add this code in the functions.php file:
add_filter('avf_html5_autoplay_mobile', function($play, $video, $attributes) { return "playsinline"; }, 10, 3);
Please note that this will be applied to every video, so you may need to add a few conditions, such as checking for the video URL.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.