Tagged: x
-
AuthorPosts
-
December 28, 2016 at 7:50 am #1307112
Maksim VParticipantHi guys,
Thank you for your awesome work! Eagerly waiting for the V5 to come out 🙂Here is a question:
I have an Embedded Video Cornerstone element on my page. The parent column has Enable Fade Effect set to “On”. Embedded YouTube video is set to autoplay.
Can you help me with some jQuery to start the video only after the Fade effect fires (e.g. when a user scrolls down and the column with the Embedded Video element becomes visible) and then pause it whenever user scrolls the video out of a viewport?Here is the link for the page in question:
http://five.pictures/reconnectionAnd here is the HTML for the Embedded Video:
<iframe id="playerA" width="1280" height="720" src="https://www.youtube.com/embed/OmKh6x23qX8?list=PLh3o17jb8wfevaGgrF89LpUXCXFSXy54V&rel=0&modestbranding=1&showinfo=0&color=white&&enablejsapi=1&autoplay=0" frameborder="0" allowfullscreen></iframe>
I have No Container set to “On”.December 28, 2016 at 9:27 am #1307249
RupokMemberHi there,
Thanks for writing in! It’s not possible since you can’t control the start of the video with script since it will load through iframe. You should not use fade-in effect if you use autoplay.
Cheers!
December 28, 2016 at 10:31 am #1307314
Maksim VParticipantThank you for the quick reply!
I don’t mind loading the video via <div> or via the script all together.Basically, I need to play/pause the video when it is scrolled into/out of viewport..
I’ve tried something like https://jsfiddle.net/kmsdev/gsfkL6xL/ It kind of works, but the playback interrupts/jitters during the actual scroll. I recon it has to be done in a more X Theme – friendly way.Can you point me in the right direction?
December 28, 2016 at 6:29 pm #1307799
RadModeratorHi there,
That’s not possible with youtube embed code. Please add a self-hosted video with video player element then we can start testing it with video’s stop(), play() and setInterval().
And please provide your admin login credentials in private reply.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1307112 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
