Sie sind nicht angemeldet.

1

Sonntag, 29. April 2018, 02:35

Try to listen 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 event 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 :

Quellcode

1
2
3
4
5
6
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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »vyk« (29. April 2018, 02:47)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

2

Sonntag, 29. April 2018, 12:43

Hi,

here a simple example.
http://www.virtualtuur.com/krpano/videotime_js/1/

at video time between 4-5 secs the time text layer tweens the y value and when time is more then 8 secs it stops the video and loads the krpano site.
Press P to 'alert' current video time.
xml:
http://www.virtualtuur.com/krpano/videotime_js/1/tour.xml

Hope it helps,
Tuur *thumbsup*

3

Sonntag, 29. April 2018, 14:07

Hi,

here a simple example.
http://www.virtualtuur.com/krpano/videotime_js/1/

at video time between 4-5 secs the time text layer tweens the y value and when time is more then 8 secs it stops the video and loads the krpano site.
Press P to 'alert' current video time.
xml:
http://www.virtualtuur.com/krpano/videotime_js/1/tour.xml

Hope it helps,
Tuur *thumbsup*


oh God, you really rock Tuur !!!

Thanks a bunch !

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Sonntag, 29. April 2018, 15:15

my two favorite styles *thumbsup*