Copy link to clipboard
Copied
I am looking for how to code (code snippet) a stop button for a video inside of HTML5 Canvas. I want the button to stop the video and go to the beginning of the video but not play the video. Here is my code (actions) so far: Thanks in advance.
this.playBtn.dyn.text = "play";
this.pauseBtn.dyn.text = "pause";
this.stopBtn.dyn.text = "stop";
this.playBtn.addEventListener("click", fl_MouseClickHandler_4.bind(this));
function fl_MouseClickHandler_4()
{
$("#myVideo")[0].play();
}
this.pauseBtn.addEventListener("click", fl_MouseClickHandler_5.bind(this));
function fl_MouseClickHandler_5()
{
$("#myVideo")[0].pause();
}
Hi.
One possible solution would be to pause the video and set its current time to 0.
function onStopVideo(e)
{
$("#video0")[0].pause();
$("#video0")[0].currentTime = 0;
}
Copy link to clipboard
Copied
Because no one has answered this one so far, have a look at this article for insights Adobe ActionScript 3.0 * Controlling movie clip playback
Copy link to clipboard
Copied
Hi.
One possible solution would be to pause the video and set its current time to 0.
function onStopVideo(e)
{
$("#video0")[0].pause();
$("#video0")[0].currentTime = 0;
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now