You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, April 29th 2018, 2:35am

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 :

Source code

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

This post has been edited 1 times, last edit by "vyk" (Apr 29th 2018, 2:47am)


Tuur

Sage

Posts: 3,164

Location: Netherlands

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

  • Send private message

2

Sunday, April 29th 2018, 12:43pm

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*
http://www.virtualtuur.com
Skype:studiotuur

3

Sunday, April 29th 2018, 2:07pm

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

Sage

Posts: 3,164

Location: Netherlands

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

  • Send private message

4

Sunday, April 29th 2018, 2:11pm

Rock and Jazz

*thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

5

Sunday, April 29th 2018, 3:15pm

my two favorite styles *thumbsup*