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

Manejo de video en html5 canvas

New Here ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

Hola, cuando quiero insertar un video mp4 en el canvas de html, la unica forma que se es insertando el componente "video", pero no logro detectar cuando el video termina... ¿como podria tener mas control sobre la reproduccion de video ??

Views

37

Translate

Translate

Report

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 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

one way if your instance name is videoPlayer:

 

var video;
function checkInitF() {
if (video) {
video.addEventListener("ended", function(){
// video ended. do whatever
alert("End");
});
} else {
video = $("#videoPlayer")[0];
setTimeout(checkInitF, 100);
}
}
checkInitF();

Votes

Translate

Translate

Report

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