Sie sind nicht angemeldet.

Scott Witte

Fortgeschrittener

  • »Scott Witte« ist der Autor dieses Themas

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

1

Mittwoch, 12. Oktober 2016, 07:15

WebVR Wakelock failing

Strangely, my latest attempt at a WebVR tour has a Wakelock problem. The phone falls asleep after two minutes without a physical touch. Two minutes being the Auto-lock time on my iPhone. This doesn't happen with other tours in VR mode. The main addition for this tour is two sound tracks, voice over plus music. Also a thumbnail menu. Can't imagine either being the cause.

iOS 10.0.2, KRPano 1.19pr6, iPhone 6s

Before spending a few hours running this down are there known situations that could cause this?

Here is the site (work in progress).

Thanks

Scott Witte

Fortgeschrittener

  • »Scott Witte« ist der Autor dieses Themas

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

2

Freitag, 14. Oktober 2016, 06:49

Another test

Did a quick test with the clean, out of the box v1.19pr8. Wakelock doesn't lock. The phone goes to sleep after the autolock timeout.

Example here: Wakelock test. Same problem happened in v1.19pr6. It did not happen with v1.19pr3. Example: Lakehouse.

I am seeing this on iPhone 6s, iOS 10.0.2.

I'm not seeing anyone else with this problem so is it really just me? Any ideas what I'm doing wrong? Or is it a bug??

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Freitag, 14. Oktober 2016, 14:26

Hi Scott,

i am testing your latest 1.19pr8 example on my iPhone6 iOS 10.0.1 (http://www.tourdeforce360.com/test/wakelock/)
After 3 minutes (which is my autolock setting) the phone starts to lock down.
I have it open in VR without touching or moving the phone.
i did a second test with moving the phone. Also then the phone shuts down after my 3 minutes.

I will update to 10.0.2 and do the test again, but i think there is something else going on.
Most logic conclusion i think is that Apple changed protocols... They could better fix their cross domain bug and webgl to canvas rendering.. Or maybe design a better mac pro that could be a workhorse..

i will do an other test, maybe in the weekend, with my own factory default output of the latest droplet.

Testing the lake house now and it seems that that one works good.
After, re-reading your post it could be possible that it is a krpano bug or lose end of some kind. Or maybe a small error in the new vtourskin code or so..
Maybe Klaus can confirm?

Hope it helps,

Tuur *thumbsup*

Scott Witte

Fortgeschrittener

  • »Scott Witte« ist der Autor dieses Themas

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

4

Freitag, 14. Oktober 2016, 22:58

Thanks for the confirmation, Tuur. I hope Klaus can shed some light on how to fix this. I suddenly have several clients very interested in webVR tours and it isn't workable with the current situation.

5

Samstag, 15. Oktober 2016, 09:02

Hi,

right the current wakelock-hack code isn't strangely working anymore...
I know it was working previously, but I'm not sure yet if that's now iOS10 related or not...

The original hack code was this:

Quellcode

1
window.location = window.location;
This forces a page reload and so resets the Safari internal wakelock counter.

But when the page url was containing a query '#', then the reloading wasn't working due the query - instead of reloading, the browser would have tried to scroll to that '#' anchor. And so the wakelock wasn't working.

Therefore in version 1.19-pr5 the code was changed to something like this:

Quellcode

1
window.location.href = filter_query(window.location.href);

The change was using 'location.href' instead of just 'location' and additionally filtering the query from the url.
But as it seems when setting 'location.href' instead of 'location' then wakelock hack doesn't work anymore (although technically both should be the same).

This will be changed back in the next release.
Then 'location' instead of 'location.href' will be used again.

For the meantime here a workaround code - add this anywhere in the xml:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
<action name="ios10_webvr_wakelock_workaround" type="Javascript" autorun="onstart" if="device.iosversion GE 9"><![CDATA[
    setInterval(function()
    {
        if(krpano.webvr && krpano.webvr.isenabled)
        {
            krpano.trace(0,"iOS wakelock hack");
            window.location = (""+window.location.href).split("#")[0];
            window.setTimeout(window.stop, 0);
            window.setTimeout(krpano.Kloader.iOSWakelockCheck, 1);  // an internal API: restart pending loading requests
        }
    }, 15000);
]]></action>


Best regards,
Klaus

Scott Witte

Fortgeschrittener

  • »Scott Witte« ist der Autor dieses Themas

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

6

Samstag, 15. Oktober 2016, 17:24

That works! And just in time for a client presentation.

Thanks Klaus!

Scott

7

Sonntag, 16. Oktober 2016, 18:36

thanks klaus,

adding this to my defaults for now

please leave us a note when it is obsolete

best, index

Beiträge: 130

Wohnort: Venezia

Beruf: interactive pictures

  • Nachricht senden

8

Montag, 24. Oktober 2016, 17:16

May I ask a piece of code not to let phones go to sleep, something working both android and ios, independently from webvr???
THANKYOU!
Luca.

Scott Witte

Fortgeschrittener

  • »Scott Witte« ist der Autor dieses Themas

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

9

Montag, 24. Oktober 2016, 21:29

I expect if you

remove: && krpano.webvr.isenabled

and change: if="device.iosversion GE 9" to if="device.mobile"

But I haven't tried.

Beiträge: 130

Wohnort: Venezia

Beruf: interactive pictures

  • Nachricht senden

10

Donnerstag, 27. Oktober 2016, 09:43

THANX!!!

I put in the webvr this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
 <action name="ios10_webvr_wakelock_workaround" type="Javascript" autorun="onstart" if="device.mobile"><![CDATA[
	setInterval(function()
	{
  	
        	krpano.trace(0,"iOS wakelock hack");
        	window.location = (""+window.location.href).split("#")[0];
        	window.setTimeout(window.stop, 0);
        	window.setTimeout(krpano.Kloader.iOSWakelockCheck, 1);  // an internal API: restart pending loading requests
    	
	}, 15000);
]]></action>

but it doesn't work...

11

Dienstag, 1. November 2016, 14:56

May I ask a piece of code not to let phones go to sleep, something working both android and ios, independently from webvr???
That hack is iOS specific, Android requires a different hack (playing a video in background).

You could try to use the nosleep.js script for Android (but only for Android! iOS requires that loading requests will be restarted - therefore the internal 'iOSWakelockCheck' function):
https://github.com/richtr/NoSleep.js

Best regards,
Klaus

12

Dienstag, 1. November 2016, 15:57


That hack is iOS specific, Android requires a different hack (playing a video in background).
You could try to use the nosleep.js script for Android (but only for Android! iOS requires that loading requests will be restarted
Best regards,
Klaus


does that mean there is no android-wakelock hack included in the actual release? (1.19pr8)
and how is the status for ios?
in effect: do we need to take care for wakelock ourselves or is it integrated in krpano?

13

Mittwoch, 2. November 2016, 11:55

Hi,
does that mean there is no android-wakelock hack included in the actual release? (1.19pr8)
No, that doesn't mean that.
It means the iOS workaround from above works only for iOS and not for Android.

and how is the status for ios?
In the next krpano release it will be fixed and until then the workaround from above could be used.

in effect: do we need to take care for wakelock ourselves or is it integrated in krpano?
For WebVR usage it is integrated (see mobilevr_wakelock ), for non WebVR usage there is currently no wakelock support.

Best regards,
Klaus

14

Donnerstag, 10. August 2017, 09:27

hi klaus,

i still had that in my code...
i guess it is obsolete since a while
and can be removed?

(on 1.19pr12 now)

best, index

15

Donnerstag, 10. August 2017, 18:38

Hi,

yes, that code is obsolete - it works only before iOS 10.3 and the newer WebVR plugin versions have that automatically integrated for older iOS versions and an new hack for newer iOS versions.

Best regards,
Klaus

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

16

Montag, 21. Dezember 2020, 11:27

Looks like this code is not obsolete anymore ;)
Clients reported that wakelock feature wasn't working on iPhones (I don't have one to test) and Tuur confirmed, but using this old hack seems to fix the problem ;)

17

Montag, 21. Dezember 2020, 12:14

Looks like this code is not obsolete anymore ;)
It it still obsolete, because that code is INTEGRATED into the webvr plugin.

Clients reported that wakelock feature wasn't working on iPhones (I don't have one to test) and Tuur confirmed, but using this old hack seems to fix the problem ;)
I have a pile of iphones here (but no fun testing them all) with different device versions and different iOS versions (also beta versions) and in my tests (just tried again) the WebVR wakelock is still working...

So the problem must be something else...

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

18

Montag, 21. Dezember 2020, 12:19

Well the Webvr wakelock feature wasn't working on iPhones and was working as expected on android.
I just added this old code and the problem was solved (according to Tuur) ? I dodn't changed anything else between the 2 versions.

Ähnliche Themen