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

Manejo de video en html5 canvas

New Here ,
Oct 24, 2023 Oct 24, 2023

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 ??

62
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 24, 2023 Oct 24, 2023
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();

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