-
AuthorPosts
-
January 22, 2021 at 4:27 pm #1274782
Hello,
I have a Avia slider with 4 slide, the latest is a youtube video.
The video ends on related videos and stops.
I would like to go the next slide, which means starting from beginning.
So I can also hide the ugly related videosIn Advanced > Slider Animation tab, there is no flag on checkbox to disable auto rotation on last slide.
So should be set correctly, but it does not work.Thank you!
January 25, 2021 at 7:54 am #1275193Hey marcie73,
Thank you for the inquiry.
It seems to be working properly on my end. The slider resets back or transitions to the first slide when the video ended. It triggers the following function in the enfold\config-templatebuilder\avia-shortcodes\slideshow\slideshow.js file.
function onFinish(event) { console.log('test') //if the video is not looped resume the slideshow if (!event.data.slide.is('.av-single-slide') && !event.data.slide.is('.av-loop-video')) { event.data.slide.trigger('reset'); self._navigate('next'); self.resume(); } //safari 8 workaround for self hosted videos which wont loop by default if (event.data.slide.is('.av-loop-video') && event.data.slide.is('.av-video-service-html5')) { if ($html.is('.avia-safari-8')) { setTimeout(function () { event.data.slide.trigger('play'); }, 1); } } }
Best regards,
IsmaelJanuary 26, 2021 at 3:53 pm #1275512Hello Ismael,
I use Mac and and the issue is showing with all browser (chrome, Safari, Firefox)
I checked now with a Windows machine and actually it works as you said.
Is there any chance to fix it for apple computers?
Can you explain me technically what I’m supposed to do with the snippet above?Thank you!
MarziaJanuary 28, 2021 at 4:42 am #1275934Hi,
Thank you for the info.
The issue seems to also occur on IE browsers version 10 and older. Would you mind posting the FTP account so that we could edit the files and debug the issue? Please place the info in the private field.
Best regards,
IsmaelJanuary 28, 2021 at 12:32 pm #1276041Ok I added FTP credentials. Thank you!
January 29, 2021 at 6:02 am #1276244Hi,
For some reason we cannot connect to the server using the account above. Are you blocking certain countries? Please make sure that connections coming from these countries are allowed.
Thank you for your patience.
Best regards,
IsmaelJanuary 29, 2021 at 11:58 am #1276278Hello, I don’t think there is any block but I’m going to check with my hosting provider.
Please could you provide a screenshot with the error given?
thank youJanuary 29, 2021 at 3:32 pm #1276325Hi,
We tested the video on IE 11/10 for quite a while but we always get stuck in this error.
Screenshot: https://imgur.com/xXqUPhW
Do you see that error on Safari browser?
The slider does not reset because this line (297) in the slideshow-video.js file never gets executed.
_self.$option_container.trigger(command);
Or the onStateChange event never gets called.
Best regards,
IsmaelJanuary 29, 2021 at 5:00 pm #1276348Hello,
I tried to exclude slideshow-video.js from combination and minification in wp rocket,
but it did not help. Maybe check on your side in something changed in IE.
On Safari there is something related to trigger…Thank you
February 2, 2021 at 10:44 am #1277044Hi,
Looks like the onStateChange is triggered properly on Safari. Please look for this code in the slideshow-video.js around line 310:
var command = _self.options.loop != false ? 'loop' : 'av-video-ended';
Below, add this code.
console.log("YOUTUBE ENDED");
After that, make sure to purge any cache and in the browser console, check if you can see the log that we created above.
Is it working correctly when minification or compression is completely disabled? Please try to disable the WP Rocket plugin temporarily, remove the browser cache, then test it again.
Best regards,
IsmaelFebruary 3, 2021 at 1:23 pm #1277346I did it but I don’t know how to read these results.
I attach console of chrome windows (working), Chrome Mac and Safari Mac (not working)
thank you!ps: I have already excluded the script from minification/combination. Nothing changes.
- This reply was modified 3 years, 10 months ago by marcie73.
February 4, 2021 at 5:27 am #1277527Hi,
Thank you for the screenshot.
The screenshot is cut off at the very end. Are you waiting for the video to end? The console.log “YOUTUBE ENDED” above should show once the video ended, but if not, this means that the following condition (line 311) is not met.
if (event.data === YT.PlayerState.ENDED)
This might be the same issue as the one reported here.
// https://kriesi.at/support/topic/youtube-video-throwing-error-when-played-in-color-selection/
Best regards,
IsmaelFebruary 4, 2021 at 11:00 am #1277651Hi Ismael, which screenshot of the 4 I sent do you mean?
In chrome for windows, in which the video works as it should, the log continues in loop.
On other mac browsers the log stops. What you see it is all.
And the video plays and at end stops on related videos or poster image, and no more actions are taken.I read the link you gave but it does not seem to relate to my case.
I have a video playing and all cookies are allowed. Which it makes sense,What I’m supposed to di with this snippet?
if (event.data === YT.PlayerState.ENDED)Thank you!
February 5, 2021 at 3:42 pm #1278055Hi,
Hi Ismael, which screenshot of the 4 I sent do you mean?
I was referring to the most recent screenshot, the info at the very end of the console are cut off. You have to wait for the video to end before checking the console. If you do not see the text “YOUTUBE ENDED” in the console after the video ends, it means that the following conditions are not met and so it does not resume or reset the slider.
if (event.data === YT.PlayerState.ENDED)
Best regards,
IsmaelFebruary 21, 2021 at 8:47 pm #1282658Hello,
I did not cut anything and yes, I don’t see ENDED.
It seems too difficult to debug, I replaced video with Vimeo and seems to work.
Thank you anyway for trying!February 22, 2021 at 4:02 am #1282710Hi,
I’m glad you found a solution. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Youtube video in slider does not go to next slide’ is closed to new replies.