Skip to content

Commit

Permalink
only run polyfill if nativeWebVR is not available
Browse files Browse the repository at this point in the history
If you run the polyfill when native VR is available, you won't be able to put the player into VR mode properly. This should fix borismus/webvr-boilerplate#170 and videojs/videojs-vr#14
  • Loading branch information
gkatsev authored and jsantell committed Sep 12, 2017
1 parent c329fbe commit e859581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webvr-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function WebVRPolyfill() {
navigator.getVRDisplays :
null;

if (!this.nativeLegacyWebVRAvailable) {
if (!this.nativeLegacyWebVRAvailable && !this.nativeWebVRAvailable) {
this.enablePolyfill();
if (window.WebVRConfig.ENABLE_DEPRECATED_API) {
this.enableDeprecatedPolyfill();
Expand Down

0 comments on commit e859581

Please sign in to comment.