Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
Hi Rob, thanks for replying! I can confirm that it is fixed using the latest build, however, it seems to only work when starting VR through the skin toolbar button, not any custom hotspot using onclick="webvr.enterVR();" I can't figure out why that would be but I'll keep testing and post an update if I manage to resolve it.Thanks for fixing this one Klaus, The 1.20.10 wakelock fix is working ok for me on new tours using panotour, on an iPhone 6s Alexander, but the example on the krpano site did still timeout/dim, I did clear the cache. Some of the tours I've updated the viewer files of on my own site take a few days to show the update versions, could that be the same for the krpano ones maybe? Works perfectly on new built tours for sure.
Best regards,
Rob
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Alexander360« (8. Oktober 2021, 15:34)
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »bob1010« (11. Oktober 2021, 12:23)
the VR wakelock doesn't seem to work on first load of a tour when clicking allow access motion and orientation now, but if you load the same tour again or any others from the same server it works fine, just the initial load of VR mode the screen dims/timesout.
Hi Klaus, thank you for your response. But what is the code to start / restart the wakelock? (Sorry if I am repeatnig myself...) I have video distorted hotspots in my project so when the user taps to play the video on iOS device then the video starts to play but it knocks out the iOS wakelock fix (which I presume is a video file being played in the background)?Hi,
the VR wakelock doesn't seem to work on first load of a tour when clicking allow access motion and orientation now, but if you load the same tour again or any others from the same server it works fine, just the initial load of VR mode the screen dims/timesout.
This makes sense - the user permission-asking dialog probably conflicts with the touch user-interaction that is required to start playing the internal wake-lock video. I will change that order - first start the wakelock, then request the gyro permission. Then this case should also work. Will report when there is a new version with that.
Best regards,
Klaus
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
<style>
.DeviceMotionRequestBanner {
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width:300px;
height:120px;
top:40%;
background-color: #ef2d5e;
padding: 20px;
color: #fff;
font-family: Open Sans, Helvetica, Arial, sans-serif;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
z-index:99;
display:none;
}
.DeviceMotionRequestBanner > h3 {
font-size: 28px;
margin: 0;
font-size: 28px;
font-weight: 300;
line-height: 1.2;
letter-spacing: -.05rem;
}
.DeviceMotionRequestBanner > p {
font-size: 1.1rem;
}
.DeviceMotionRequestBanner > button {
background-color: #fff;
color: #000;
padding: 8px 30px;
text-transform: uppercase;
border: none;
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 100px;
}
.DeviceMotionRequestBanner > button:hover {
color: #ef2d5e;
}
.DeviceMotionRequestBanner > a {
color: #fff;
margin-left: 25px;
}
</style>
<script>
//script for ios wakelock issue
window.onload = function () {
// Check if is IOS when page loads.
if ( window.DeviceMotionEvent && typeof window.DeviceMotionEvent.requestPermission === 'function' ){
// Everything here is just a lazy banner. You can do the banner your way.
const banner = document.createElement('div')
banner.innerHTML = `<div id="DeviceMotionRequestBannerID" class="DeviceMotionRequestBanner" style="display:block;"><p>This app requires you to enable the DeviceMotion event on your device.</p><button>Enable</button></div>`
banner.onclick = ClickRequestDeviceMotionEvent // You NEED to bind the function into a onClick event. An artificial 'onClick' will NOT work.
document.querySelector('body').appendChild(banner)
}
}
function ClickRequestDeviceMotionEvent () {
document.getElementById('DeviceMotionRequestBannerID').style.display='none';
window.DeviceMotionEvent.requestPermission()
.then(response => {
if (response === 'granted') {
window.addEventListener('devicemotion',
() => { console.log('DeviceMotion permissions granted.') },
(e) => { throw e }
)} else {
console.log('DeviceMotion permissions not granted.')
}
})
.catch(e => {
console.error(e)
})
}
</script>
|
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
Zitat
Hi Klaus,
Any Christmas gift to krpano coders from you? :)
: https://pame.virtualtuur.com
Zitat
Hi Klaus,
Any Christmas gift to krpano coders from you? :)
You should know by now that Santa NEVER is giving inside-information about confidential cases before they are publicly released.
In holland we have saying: " Children who ask questions are skipped. "
![]()
g inside-information about confidential cases before they are publicly released.
In holland we have saying: " Children who ask questions are skipped. "