-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Videos are interrupted in a slide-show #1983
Comments
Well I got no reply, so I had to invent a solution.
To see it in action open this test album and click the Play button (2nd button in the upper left corner). It works fine on a. PC, but on a mobile device like an iPad, the video sometimes does not start automatically in a slideshow. |
This code is still required in version 3.4 I think, correct? |
Hi, Slideshow now waits for html5 video to end (starting from v3.4.1) |
Nice, but what about YouTube and Vimea videos? |
Unfortunately, it is not so simple. It would be necessary to use each video vendor API to make it work. For example, Youtube - https://developers.google.com/youtube/iframe_api_reference Currently, fancybox avoids loading external scripts and does simple iframe embedding for videos, therefore it can not detect video status. |
Well, I use now with version 3.4 this code:
and this works fairly well as you can see in this album: https://andrewolff.jalbum.net/TestVideos_FB1/ Only the YouTube and Vimeo videos do not continue automatically at the end of the video. |
I did test with version 3.4.1 this code:
This works only correctly if you use mp4 video files, but I can't use this code because YouTube and Vimeo files are now interrupted before the video is ready as you can see in this album: https://andrewolff.jalbum.net/TestVideos_FB2/ So I have to add the outcommented code for YouTube and Vimea videos. |
I really did not want to boost file size by including this functionality, but after some thinking I decided to include. You can preview it here - https://codepen.io/fancyapps/pen/JayEMa?editors=1010 Actually, the gallery always moves to next item after video ends, I have not yet decided to make it optional or not. |
This looks great! |
If I have an album with both videos and images like in this test album and I start the slide-show with a short playing time for example 3s, videos with a longer playing time are interrupted before the movie is finished.
An easy solution would-be to pause the slideshow if a video is encountered and to forbid autoplay of video’s. The viewer decides in that case to play the video and start the slideshow immediately or after hè is ready viewing the mooie.
Is this possible?
The text was updated successfully, but these errors were encountered: