yanwsh / videojs-panorama

a plugin for videojs run a full 360 degree panorama video.
http://yanwsh.github.io/videojs-panorama/
Other
488 stars 160 forks source link

Hi, I want to get Latitude and Longitude in panorama. #11

Closed JoogonGo closed 7 years ago

JoogonGo commented 7 years ago

Hi, my name is Joogon and I'm reaaaaaaaaaaally appreciate for this plugin. I use this in my player and all of things are good. However, it's too hard to get latitude and longitude. I want to do that give two values simultaneously and real time. Can you make it in options or etc...? Thx.

yanwsh commented 7 years ago

Hello, here's the code which you can get those two values.

player.on("play", function () {
   var canvas = player.getChild('Canvas');
   canvas.lot;
   canvas.lat;
}
//or you can get the lon and lat on time updated.

player.on('timeupdate', function () {
   var canvas = player.getChild('Canvas');
   canvas.lot;
   canvas.lat;
});
JoogonGo commented 7 years ago

Good! Everything what I want to do is perfect! Thanks a lot.