Skip to main content
Sambo68
Known Participant
November 3, 2017
Answered

Event Video with delayed object apperance

  • November 3, 2017
  • 2 replies
  • 269 views

I have a slide with an Event  Video that Includes a return to main page button. I would like the return button to appear at the end of the video. I know that I can achieve the behavior with using the Multi-Slide Synchronized Video option, where I can place the button at a certain point of the timeline. However, I have a large video file that takes forever to buffer when using that option. Is there a JavaScript code out there I can use to solve the issue?

This topic has been closed for replies.
Correct answer Lilybiri

You asked for JS, so my answer will probably not fit your question.

If you know the duration of the event video, you could use the On Enter event with this action:

    Delay Next actions by X seconds                       (where X is the duration of the video)

    Show Bt_Next                                                     that button has to be hidden in Output

2 replies

TLCMediaDesign
Inspiring
November 3, 2017

Execute this JavaScript onEnter of the slide that contains the video:

setTimeout(function()

{

var myVid=document.getElementsByTagName("video")[0];

myVid.onended = function()

{

     cp.show("Button_1");

};

}, 3000);

Replace "Button_1" with the name of the element you want to show.

Note that this will probably not work if you have more than 1 event video.

Lilybiri
LilybiriCorrect answer
Legend
November 3, 2017

You asked for JS, so my answer will probably not fit your question.

If you know the duration of the event video, you could use the On Enter event with this action:

    Delay Next actions by X seconds                       (where X is the duration of the video)

    Show Bt_Next                                                     that button has to be hidden in Output

RodWard
Community Expert
Community Expert
November 3, 2017

Hmmm...Personally, I don't see how using a Delay Next action would solve this issue, because the problem here is not knowing exactly how long this largish Event video file will take to buffer up and start playing AFTER you reach the beginning of that slide. The initial buffering time is an unknown variable that changes according to end user's bandwidth limitations.

So, using a Delay Next action isn't really any better than just extending the length of the slide somewhat to compensate for the initial video buffer.  You might as well just place the button on the screen timed to appear near the end of the video playback (plus a judicious extra amount for buffering).

JavaScript is definitely a better solution.