(ANCC,HTMML5,video Component)The end of the video could not be detected.

Enthusiast ,
Oct 12, 2020

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");
}

 

视频2.PNG

 

 

 

视频1.PNG

 

@JoãoCésar  @kglad  @Colin Holgate  @

Views

114

Likes

Translate

Translate

Report

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

1 Correct Answer

Adobe Community Professional , Oct 13, 2020
kglad Adobe Community Professional , Oct 13, 2020
what's line 73 in video.js

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Oct 13, 2020

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)

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 13, 2020

Copy link to clipboard

Copied

I switched to an older version.But it hasn't worked yet.

 

19.PNG191.PNG

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 13, 2020

Copy link to clipboard

Copied

what's line 73 in video.js

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 13, 2020

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 13, 2020

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.

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Enthusiast ,
Oct 13, 2020

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()

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
kglad LATEST
Adobe Community Professional ,
Oct 14, 2020

Copy link to clipboard

Copied

you're welcome.

Likes

Translate

Translate

Report

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