Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iframe-video - autoMobileOrientation #148

Open
numericgraphics opened this issue Dec 22, 2017 · 2 comments
Open

iframe-video - autoMobileOrientation #148

numericgraphics opened this issue Dec 22, 2017 · 2 comments

Comments

@numericgraphics
Copy link

numericgraphics commented Dec 22, 2017

Hello,
I implemented videojs-panorama in iframe with the postMessage configuration. The result is fine, but when i try to use the autoMobileOrientation mode, the plugin doesn't make difference between landscape and portrait mode. The result is inverted orientation in the portrait mode, moving top to bottom for showing left and right !

If i change the iframe dimensions having the height bigger than the width, the result is good and the orientation even in portrait mode.

In the Iframe-video.html example the autoMobileOrientation is set to false. But, in videojs-panorama.v5.js, in case of iframe you sended the event directly to the handleMobileOrientation function...
Can you tell me more about this implementation, is it possible to use the mobile orientation ?
Thx anyway for this and for your work ;-)

@numericgraphics
Copy link
Author

After invertigation, i realized that the problem comes from the fact of the listener in the playOnMobile function and the direct call of the handleMobileOrientation function using the postMessage ... the portrait mode is false then true ... causing a bad behavior.
Using var portrait = event.portrait, var landscape = event.landscape; directly the behavior in landscape mode is portrait is good.
Do you have any advice to avoid modifying the handleMobileOrientation function?
Have you ever encountered this problem? Thank you in advance.

@numericgraphics
Copy link
Author

Please let me know, maybe it's not very clear !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant