Skip to main content
col-vens41550123
Participant
Oct 24, 2023 5:29 PM UTC
Question

Manejo de video en html5 canvas

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

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    kglad
    Community Expert
    Community Expert
    Oct 25, 2023 1:03 AM UTC

    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