-
Notifications
You must be signed in to change notification settings - Fork 149
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
fix: make cardboard button psudeo fullscreen on iOS #12
Conversation
src/cardboard-button.js
Outdated
handleClick() { | ||
window.dispatchEvent(new window.Event('vrdisplayactivate')); | ||
|
||
handleActivate_() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to look into is whether player.enterFullWindow
and player.exitFullWindow
work for this usecase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not appear to work
fix: hide cardboard button when fullscreen on Android fix: typo that caused an error in the console
27423c0
to
cc42fa0
Compare
src/cardboard-button.js
Outdated
super(player, options); | ||
|
||
window.addEventListener('vrdisplayactivate', () => this.handleActivate_()); | ||
window.addEventListener('vrdisplaydeactivate', () => this.handleDeactivate_()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably make sure we clean up after ourselves in a dispose
listener.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, going to take some time to do that in player.js
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scratch that its going to take a revamp of player.js
which I would rather do in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
chore: Swap webvr for webxr polyfill packages
fix: hide cardboard button when fullscreen on Android
fix: typo that caused an error in the console