Try to listen to events in javascript for a flat video in krpano

  • Hi everyone,
    This is may first post, so, congratulations for this wonderful tool *thumbsup* !!!

    As I said in the title, i try to listen to the events of time & url changing when a video is played.
    when a time is reached i wanna trigger a js function whatever it is

    I got this script that i put directly in my index.html file :

    Code
    function jstest()
    		{ 
    		var krpano = document.getElementById("krpanoSWFObject");
    		var time = krpano.get("plugin[video].time"); // or .totaltime or .videoDOM
    		setTimeout(function(){ alert(time); }, 3000);
    		}

    but it only alerts me "null"...

    Can someone tell me where i made a mistake ?

    kind regards, vYk

    Edited once, last by vyk (April 29, 2018 at 11:47 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!