Skip to content

Commit

Permalink
Merge pull request #1 from MetaCDN/main
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
kevleyski authored Dec 20, 2022
2 parents 7c0c62b + 1cc47ef commit 13d2b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/big-vr-play-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class BigVrPlayButton extends BigPlayButton {
handleClick() {
// For iOS we need permission for the device orientation data, this will pop up an 'Allow' if not already set
// eslint-disable-next-line
if (typeof(window.DeviceMotionEvent) === 'function' && typeof(window.DeviceMotionEvent.requestPermission) === "function") {
if (typeof window.DeviceMotionEvent === 'function' &&
typeof window.DeviceMotionEvent.requestPermission === "function") {
window.DeviceMotionEvent.requestPermission().then(response => {
if (response !== 'granted') {
this.log('DeviceMotionEvent permissions not set');
Expand Down
3 changes: 2 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,8 @@ void main() {

// For iOS we need permission for the device orientation data, this will pop up an 'Allow'
// eslint-disable-next-line
if (typeof(window.DeviceMotionEvent) === 'function' && typeof(window.DeviceMotionEvent.requestPermission) === "function") {
if (typeof window.DeviceMotionEvent === 'function' &&
typeof window.DeviceMotionEvent.requestPermission === "function") {
const self = this;

window.DeviceMotionEvent.requestPermission().then(response => {
Expand Down

0 comments on commit 13d2b02

Please sign in to comment.