Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Enthusiast ,
Oct 12, 2020 Oct 12, 2020

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  @

451
Translate
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

correct answers 1 Correct answer

Community Expert , Oct 13, 2020 Oct 13, 2020

what's line 73 in video.js

Translate
Community Expert ,
Oct 13, 2020 Oct 13, 2020

your code is valid but animate v20.5.1 is broken.  test using another version.  (i know it works in v19.2.1)

Translate
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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

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

 

19.PNG191.PNG

Translate
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 ,
Oct 13, 2020 Oct 13, 2020

what's line 73 in video.js

Translate
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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

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.

Translate
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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

Can you upload the source file?

I'd like to compare my File.

Find out what's going on on my side.

 

 

Translate
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
Enthusiast ,
Oct 13, 2020 Oct 13, 2020

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

Translate
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 ,
Oct 14, 2020 Oct 14, 2020
LATEST

you're welcome.

Translate
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