Skip to content

Commit

Permalink
Update src/big-vr-play-button.js
Browse files Browse the repository at this point in the history
Co-authored-by: Gary Katsevman <[email protected]>
  • Loading branch information
kevleyski and gkatsev authored Dec 20, 2022
1 parent 46c7207 commit 7bf68a5
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 7bf68a5

Please sign in to comment.