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

Thursday, June 11th 2015, 10:30pm

how to get information on video player

hi~
i'm trying to make a project on video player.

i have questions.

1. how to get the video current time and total time? i don't want to use xml.
krpano.get("any variables for times")?

2. how to get the plugin class on JS ? i tried a lot of ways... but i couldn't any ways...
because i want to know event that video play,stop,buffer,play end, play start....

please let me know...

2

Monday, June 15th 2015, 11:40am

Hi,

Quoted

1. how to get the video current time and total time? i don't want to use xml.

krpano.get("any variables for times")?
e.g. via:

Source code

1
2
krpano.get("plugin[NAME].time");
krpano.get("plugin[NAME].totaltime");
where NAME is the name of the plugin element inside the xml.



Quoted

2. how to get the plugin class on JS ? i tried a lot of ways... but i couldn't any ways...
because i want to know event that video play,stop,buffer,play end, play start....
The HTML5 videoplayer plugin exposes the internal <video> DOM element via:

Source code

1
krpano.get("plugin[NAME]").videoDOM
but when changing the video state directly via that object, the krpano states might not match. Also note - when playing a new video that object might change too.

To avoid cross-browsers problems, I would recommend using the krpano videoplayer APIs.

Best regards,
Klaus