Sie sind nicht angemeldet.

1

Mittwoch, 8. Februar 2023, 00:09

Krpano Working Offline on Smartphones?

I've searched this forum extensively, and whilst there's lots of similar questions, I've been unable to find a solution that works.

I've been using Krpano to create virtual tours, with .mp3 audio files attached, for visitor attractions. At some of the visitor attractions, there is no mobile phone signal, so what I'd like to do is to let users download the tour over Wi-Fi before they set off.

I tried downloading files to the browser cache using the manifest method, but then realised that it's been deprecated. I've tried setting up a service worker to download files to the cache, but couldn't get that working. I've hunted for, and installed many website downloader Apps, but none work. I don't want to have users downloading a .APK, and anyhow, I'd need something else for iPhones.

Can anyone recommend a simple way of achieving what I'm trying to do?
Cheers, Chris

2

Donnerstag, 9. Februar 2023, 22:30

...I think I've cracked it...!
Cheers, Chris

4

Freitag, 10. Februar 2023, 00:02

...I think I've cracked it...!


tell us ! ;-)
Hang on for two ticks...
Cheers, Chris

5

Freitag, 10. Februar 2023, 00:26

Just setup a webserver on the device?

6

Freitag, 10. Februar 2023, 12:20

THIS IS HOW WE DO IT!

After a couple of days of Googling, faffing, trying apps and getting nowhere, I finally managed to find out how to achieve this. I’m really
surprised no one else has posted regarding this as it seems like it’s pretty fundamental to be able to make tours work offline.

To see an example of what I’ve done, go to https://www.chrisl.me/vr/blueball/. As you’ll see, it takes a while for the first panorama to display and that’s because all the other panoramas and audio are downloading in the background. Before you click to go to the next panorama, disconnect your computer / smartphone from the Internet. Then, when you go to the other panoramas, you’ll see that the images and audio correctly load, even though you’re offline.

Here’s what you need to put into the tour.html file. For each image you need to have a line such as:

<link as="image" rel="preload" href="https://www.chrisl.me/vr/blueball/panos/01_Main_Bar.tiles/pano_b.jpg" />

For the audio, it needs to be:

<audio id="01" preload="auto"><source src="https://www.chrisl.me/vr/blueball/audio/01.mp3"></audio>

If you check out https://www.chrisl.me/vr/blueball/tour.xml you’ll see how I’ve added the audio to the panoramas.
Cheers, Chris

7

Freitag, 10. Februar 2023, 13:17

Hello, see this thread on preloading, it might be helpful

https://krpano.com/forum/wbb/index.php?p…89047#post89047

8

Freitag, 10. Februar 2023, 18:54

Thanks Александр, I'll check that out...
Cheers, Chris

9

Dienstag, 14. März 2023, 13:49

Hello fellows!

Use preload method is a good start, but i recently had to do a app with my tour and only way that a I found was using PWA. With this, you can control when to download and where you storage your files.

It is strange at first, you can try *g*

10

Samstag, 9. September 2023, 09:44

I had to revisit this as it was only intermittently working. I’ve now rehashed the whole lot so thought I’d post my new method for getting it working.

It’s all live at https://chrisl.me/vr/blueball/.

If you look at the source code, you’ll see that I’m now using a set of JavaScript functions to preload the images and audio.
Cheers, Chris