document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".bppiv_panorama_video2").forEach((function(e){var t=e.querySelector("video").getAttribute("id"),i={};try{i=JSON.parse(e.getAttribute("data-attributes"))}catch(e){i={}}var n=i,a=n.enabledInitialView,o=n.initialView,r=window.videojs(t,{width:getComputedStyle(e).width||"640",controls:!0,autoplay:!1,html5:{nativeControlsForTouch:!1}});r.mediainfo=r.mediainfo||{},r.mediainfo.projection="equirectangular",window.player=r;var d=r.vr({projection:"AUTO",debug:!0,forceCardboard:!1,antialias:!1});if(window.vr=d,r.on("ready",(function(){d.camera&&"1"===a&&(d.camera.position.setX(o.top||0),d.camera.position.setY(o.right||0),d.camera.position.setZ(o.bottom||1))})),document.getElementById("wp-admin-bar-edit")){var c=document.createElement("div");c.classList.add("camera_position_wrapper"),e.appendChild(c);var l=document.createElement("button");l.innerText="Get Camera Position",c.appendChild(l);var s=document.createElement("p");l.addEventListener("click",(function(){c.appendChild(s),s.innerHTML=JSON.stringify(d.camera.position)+" <br /> this is only for admin. user can't see this",c.appendChild(m)}));var m=document.createElement("button");m.classList.add("close"),m.innerText="x",m.addEventListener("click",(function(){c.removeChild(s),c.removeChild(m)}))}}))}));