Delay Init until Video Loaded

244 views
Skip to first unread message

Mar

unread,
Jul 13, 2015, 3:16:22 PM7/13/15
to gwd...@googlegroups.com
Is there a way to delay the animations in my ad until after my initial autoplay video has loaded?

I tried this code:

//Event handler
gwd.actions.events.addHandler('gwd-video_1', 'canplay', gwd.auto_Gwd_video_1Waiting, false);

/Fnc
gwd.auto_Gwd_video_1Waiting = function(event) {
// GWD Predefined Function
gwd.actions.gwdDoubleclick.initAd('gwd-ad');
};

But my text animation starts then the video plays. Is there a way to wait for the video??

Thanks!

Matt Phillips

unread,
Jul 13, 2015, 3:40:39 PM7/13/15
to gwd...@googlegroups.com
Do you want the animation to play once the video starts, or after its finished playing back?

Mar

unread,
Jul 13, 2015, 3:44:21 PM7/13/15
to gwd...@googlegroups.com
I would like the animation to start once the video starts, so they play/start simultaneously.

Matt Phillips

unread,
Jul 13, 2015, 3:57:53 PM7/13/15
to gwd...@googlegroups.com
If you're using the GWD video component, you should be able to add an event to the video element. Right click, add event, and it should show option for "Video" as well as the usual Mouse and Touch. If you select option "Playing" to bind the event to, then under Action target your animation with "Timeline" (has options like "goToAndPlay") or custom code, I believe that should load it when the video starts playing. Haven't tested it, so I'm not 100% sure, but worth a shot

Mar

unread,
Jul 13, 2015, 4:24:38 PM7/13/15
to gwd...@googlegroups.com
Oh, that's a great idea. I had not thought of that. I will try it and see what happens.

Mar

unread,
Jul 13, 2015, 5:26:28 PM7/13/15
to gwd...@googlegroups.com
That seemed to do the trick. Not sure how it behaves on mobile, but thank you so much!

Matt Phillips

unread,
Jul 13, 2015, 5:32:39 PM7/13/15
to gwd...@googlegroups.com
Np. Let us know if any issues come up
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages