Skip to content

Commit

Permalink
Fix VRView in videos with mediaelement
Browse files Browse the repository at this point in the history
Rewrites 561f134
  • Loading branch information
AngelFQC committed Jun 2, 2020
1 parent 9f0244f commit aa1956a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main/inc/lib/javascript/mediaelement/plugins/vrview/vrview.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ var VrRenderer = {
mediaElement.originalNode.parentNode.insertBefore(vrContainer, mediaElement.originalNode);
mediaElement.originalNode.style.display = 'none';

if (mediaElement.originalNode.getAttribute('data-360video-stereo') === 'false') {
options.vrIsStereo = false;
}

var vrSettings = {
path: options.vrPath,
is_stereo: options.vrIsStereo,
Expand Down Expand Up @@ -339,6 +343,10 @@ Object.assign(MediaElementPlayer.prototype, {
return;
}

if (player.node.getAttribute('data-360video') !== 'true') {
return;
}

var button = document.createElement('div');

player.detectFullscreenMode();
Expand Down

0 comments on commit aa1956a

Please sign in to comment.