Copy link to clipboard
Copied
I need to play the video automatically and jump to the specified frame at the end.
I need help.
this.stop();
var op= this;
stage.on("drawstart", initVideo, this, true);
function initVideo() {
alert("yes")
$("#video1")[0].addEventListener("ended",nextFrame);
$("#video1")[0].play();
}
function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended",nextFrame);
op.gotoAndStop("ed");
}
what's line 73 in video.js
Copy link to clipboard
Copied
your code is valid but animate v20.5.1 is broken. test using another version. (i know it works in v19.2.1)
Copy link to clipboard
Copied
I switched to an older version.But it hasn't worked yet.
Copy link to clipboard
Copied
what's line 73 in video.js
Copy link to clipboard
Copied
73 The js file could not be connected.I changed to a managed library.(73)The error disappeared.
However, the other prompts are the same as the first prompts.
'addEventListener' of Undefined.The same error prompt as version 20.
Copy link to clipboard
Copied
Can you upload the source file?
I'd like to compare my File.
Find out what's going on on my side.
Copy link to clipboard
Copied
I found a workable way.
It can now work well.
The problem is the stage or event.(stage.on ("drawstart")
Anyway, I can use it.
Thank you for your answer, too.
But I really want it to play automatically.
var ts=this
canvas.style.zIndex = "1";
var videoURL = "kc_1.mp4";
this.py.addEventListener("click", bfsp.bind(this));
function bfsp()
{ts.gotoAndStop('cc');
$("#video1")[0].src=videoURL;
$("#video1")[0].addEventListener("ended",nextFrame);
$("#video1")[0].play();
}
function nextFrame(evt) {
evt.currentTarget.removeEventListener("ended",nextFrame);
alert("22")
}
this.stop()
Copy link to clipboard
Copied
you're welcome.