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

autoMobileOrientation support #5

Closed zang closed 8 years ago

zang commented 8 years ago

Can I ask what mobile phone does this feature support? I checked your demo page on my Galaxy S7 edge and the video doesn't move when I move my phone around. thanks again.

zang commented 8 years ago

I lied, the video moves slightly. e.g. I turn the phone 180 degree and the video moves about 5 degree roughly. Is that the expected behavior?

yanwsh commented 8 years ago

Hey, I am still testing this feature. Please update new code here: https://github.com/yanwsh/videojs-panorama/tree/master/dist

You can speed up by setup mobileVibrationValue property.

By default, it's 0.022 on ios device and 1 on android or other phone.

It's possible to increase it by you own.

function isIos() {
    return /iPhone|iPad|iPod/i.test(navigator.userAgent);
}

 player.panorama({
       mobileVibrationValue: isIos()? 0.032 : 1.5
 });

Different devices will return different data, so I need to adjust it separately. Currently, it works on my nexus 6p and iphone 6 pluse. So please let me know which value is suit for galaxy edge. Thank you.

Let me know if you have any questions.

zang commented 8 years ago

Sure. May I have your email address and I will send you a demo page url later on this week.

yanwsh commented 8 years ago

yanwsh@gmail.com

sportexholdings commented 8 years ago

Hi!,It's work great on That run android 6 and ios 9(iphone 6plus). but need to update the speed...

function isIos() { return /iPhone|iPad|iPod/i.test(navigator.userAgent); }

player.panorama({ mobileVibrationValue: isIos()? 0.032 : 1.5 });

i didn't found any issue in this plugin.. also, can managed the plugin parameters easily.. Great work...