• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

html5 canvas plays video just once

Community Beginner ,
May 12, 2023 May 12, 2023

Copy link to clipboard

Copied

I am creating a html5 canvas project with Animate CC 23.0. Frame 5 of my project displays a schematically description of a tanker. Some parts of that schema are clickable for a description accept one (Picture 1). This one (yellow marked) jumps to Frame 6 with a video component, a blue background for the descriptional text and a Play Button (Picture 2) . The video file (mp4) can be started, stopped, started as long as one want.

Going back to Frame 5 and enters Frame 6 again you can see on Picture 3 no video component, no blue background, no Button.

I tried it just with component controls ( just with this.stop() on Frame 6), with the code from the components and different other structures. Always the same. First visit it plays second visit it's gone.

When using scripts like

function playVideo()
{
	$("#FWA")[0].play();
	$("#FWA")[0].addEventListener("ended",videoEnde,false);		
}

on the second visit it marks $(...) in line 3 as unidentified.

Is it possible that - when video has ended - all variables e.g. $("#FWA")[0].src, $("#FWA")[0].currentTime and so on keeps in memory and entering Frame 6 again the Browser tries to load the same video file a second time?

Did anyone had the same problem or an idea why happened what happened? Thank you in advance.
   

Views

196

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2023 May 12, 2023

Copy link to clipboard

Copied

LATEST

open your developer console to check for errors.

 

Lesson 1: https://youtu.be/bG05_am-fQI

Lesson 2: https://youtu.be/H9e9toftvdM

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines