问题
I would like to embed a 360 youtube video into a web page and then allow the user to 'look around' by affecting which direction of the video is displayed based on the phone's gyroscope.
Does Youtube provide an API for this level of control in the browser?
(See here for an example of a 360 youtube video: https://www.youtube.com/watch?v=gQEyezu7G20)
回答1:
The YouTube IFrame API (API for embedding a YouTube video into a webpage) doesn't currently allow for controlling pan/tilt of 360 degree videos. I filed an enhancement request for this feature.
来源:https://stackoverflow.com/questions/30732653/can-i-change-the-view-of-a-360-youtube-video-with-the-gyroscope-in-the-browser