Skip to main content
chenjil43641795
Legend
October 13, 2020
Answered

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

  • October 13, 2020
  • 2 replies
  • 531 views

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

 

 

 

 

 

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

    This topic has been closed for replies.
    Correct answer kglad

    what's line 73 in video.js

    2 replies

    kglad
    Community Expert
    Community Expert
    October 14, 2020

    you're welcome.

    kglad
    Community Expert
    Community Expert
    October 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)

    chenjil43641795
    Legend
    October 13, 2020

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

     

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    October 13, 2020

    what's line 73 in video.js