Skip to main content
Participant
January 4, 2018
Answered

Hiding video component after video has finished.

  • January 4, 2018
  • 2 replies
  • 4636 views

Hi, I am currently creating an interactive documentary in an HTML5 canvas where it has to start with a video auto playing and then goes to my menu screen with buttons. I have added my video through the video component and when I test it, the video plays over everything but then when is finished it just does nothing. I have search a lot and cannot find how I hide the video after it has finished so that the user can then navigate the menu.

Could anyone help me with this? Would me massively appreciated.

This topic has been closed for replies.
Correct answer Colin Holgate

Any HTML5 components that you add to the timeline can be positioned like any other timeline object. If you jump from the intro to your menu frame, just make sure the component is moved off screen, or removed from the timeline.

2 replies

Legend
January 6, 2018

Indeed, a looping video never ends.

kglad
Community Expert
Community Expert
January 6, 2018

i figured that was the case during my testing.  but that was while i was trying to add the listener to the component.

after your suggestion to use the element, the default loop was ticked again and i failed to untick it while testing.

Colin Holgate
Colin HolgateCorrect answer
Inspiring
January 4, 2018

Any HTML5 components that you add to the timeline can be positioned like any other timeline object. If you jump from the intro to your menu frame, just make sure the component is moved off screen, or removed from the timeline.

kglad
Community Expert
Community Expert
January 4, 2018

how do you detect when the video completes play?

Legend
January 4, 2018

i don't know why they don't work, i just know ended and onended don't work (for me).


Were you targeting the component when you tried, or the element? Adding event listeners to the component instance won't do anything.