yanwsh / videojs-panorama

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

script for orientation reset to default (mobile and desktop) #83

Closed quintenm closed 7 years ago

quintenm commented 7 years ago

I have 2 pages, the video page (with panorama) and a page with video-controll buttons (play/pause/rewind/restart/orientation reset) — connected via Socket.io — what code can I use, so the orientation in a videojs panorama video wil be reseted (animate to) to the default orientation (mobile and desktop).

The second page, is made so i can remotly play/pause/... a video on a phone that's placed in a VR-headset.

yanwsh commented 7 years ago

Hello, please check iframe and iframe-video code for detail.

It use post message, but you can use any data like web socket to control.

quintenm commented 7 years ago

Can't find the the variables to send trought the function, could you give somme tips. player.contentWindow.postMessage({type: "device-motion", events: obj}, "*");

the connection with the socket library, works for example, i can control fullscreen/play/pause)

(function will be called in socket.js)