You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

1

Saturday, April 4th 2020, 8:43pm

Sound at start

Hi all. My cient The National Historic Museum has asked me if we can create sound at each pano·

Of course this is easy I thought.

However i discovered that it is impossible to make a sound work at start up.
Everyting works offline but as soon as I upload it its all silence.

It does not matter how I do it.
The simple way like this on each scene works fine but not on the initial pano
onstart="stopallsounds();wait(1);playsound(soundinterface,sounds/start.mp3,3);"
Om the second pano it works fine.

And not even if I do it on the Start button like in this demo it works http://360-foto.dk/nationalhistorisk-museum/indexsound.html

<plugin zorder="205" name="banner" url="images/start-transp.png" devices="desktop|tablet|iphone" scale="0.7" keep="true" x="0" y="20" align="center" visible="true" enabled="true" alpha="1" onclick="action(closestart);playsound(soundinterface,sounds/start.mp3,3);" />

I tried also to include it in the startup action and also as a preload onstart.

I need to have this working on monday.

This post has been edited 1 times, last edit by "HansNyb" (Apr 4th 2020, 9:01pm)


spacerywirtualne

Professional

Posts: 1,112

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

2

Saturday, April 4th 2020, 9:07pm

The lock is only at the beginning, then everything works fine. After clicking your button the sounds should work OK.

onclick="action(closestart);playsound(startsound,'sounds/start.mp3',false);"

BDW. the third parameter, loop, is as BOOL, not NUMBER


edit: *g* " -> '
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

This post has been edited 1 times, last edit by "spacerywirtualne" (Apr 5th 2020, 10:10am)


HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

3

Saturday, April 4th 2020, 9:33pm

I am sorry but your code i a Fatal error.

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

5

Saturday, April 4th 2020, 10:03pm

SOLVED
1. I changed the order of the action and playsound and it works.
2. The problem is only on Safari.

onclick="playsound(soundinterface,sounds/start.mp3);action(closestart);"

Anyone can tell me why,? I have not done much coding the last 7 years so maybe ther is an explanation I do not know of.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

6

Saturday, April 4th 2020, 10:12pm

I hope that it works on all platforms now. I never had a problem that could only be seen on Safari.
Hope it works on Windows now
http://360-foto.dk/nationalhistorisk-museum/indexsound.html

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

7

Saturday, April 4th 2020, 10:18pm

Works fine on iphone11 first load
Touch screen audio plays..
But when i go to next scene i need to touch again to hear audio..
Should/could be better i think.
Keep it simple and try the set up from the other thread.

On phone now
Tuur *thumbsup*

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

8

Saturday, April 4th 2020, 10:22pm

The whole idea is to not stop the sound but change the audio url only on scene change!

Tuur *thumbsup*

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

9

Saturday, April 4th 2020, 10:41pm

Just checked on iPad and you are right it does not work.
It takes a lot of interaction to start sound,You actually have to klik on the pano·

This is really bad. I just checked one of my first tours made in 2013 which has autostart mp3 sound on all panos. They always worked fine but not any more.

When did this change.?

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

10

Saturday, April 4th 2020, 11:05pm

Stuff changes often..
Especially with browsers and also apple. Security stuff etc

All tours running on older then krpano 1.20.5 With gyro or vr will have issues on latest ios and osx..

If you need help on the code for the audio just let me know in PM..
Depends a bit on the size of your tour what is the best way to help

Tuur *thumbsup*

11

Sunday, April 5th 2020, 9:22am

no wonder it doesnt work... ;-)

your tour.js and soundinterface.js is from 1.19-pr14
the old soundinterface is outdated and cant handle modern browser requirements

before going on you must update everything to the newest version (1.20.5)

This post has been edited 4 times, last edit by "indexofrefraction" (Apr 5th 2020, 9:36am)


HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

12

Sunday, April 5th 2020, 10:33am

Sorry but thats not the problem.

I just discovered that IOS latest updates hav caused several problems on my iPhone.

The big problem is the may updates that Apple makes introducing new bugs.

You can not do Virtual Tours for clients any more and deliver them for their own servers.

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

14

Sunday, April 5th 2020, 11:13am

Stuff changes often..
Especially with browsers and also apple. Security stuff etc


Yes its really a problem. I actually thought it had become stable now and I have planning to transfer all tours to the clients serveer.

But it seems to still be much trouble with IOS updates.
I got the sound working by removing the stopallsounds() code as it seeems not to have any function when you load just one sound in a new scene.
However ifyou do not have any sound in the next scene you have to ad it unless you want the sound to comtinue.

But now I found a weird problem on iPhone when using the Homescreen buttons.
If you close down the iour with the sound playing it will actually start agin when opening another tour even if there is no sound at all on that tour.

This only happens with Homescreen buttons. Directly in Safari all is fine. And only on my iPhone which is updated to 13.1.3
My iPad is still on 12.4.5 as I do not have automatic update on it and the problem is not on it.

This post has been edited 1 times, last edit by "HansNyb" (Apr 5th 2020, 1:33pm)


15

Sunday, April 5th 2020, 11:56am

Sorry but thats not the problem.

ofc that is the problem. the tour.js and soundinterface you're using are from 2017.

The big problem is the may updates that Apple makes introducing new bugs.

klaus addresses this with new builds. you should use them, specially 1.20 fix a load of problems.

but right, this is a problem. over time most tours will break due such (i)os and browser changes.
one should avoid any warranties to clients ;-) its would not even possible to give one.

This post has been edited 2 times, last edit by "indexofrefraction" (Apr 5th 2020, 1:18pm)


HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

16

Sunday, April 5th 2020, 3:06pm

klaus addresses this with new builds. you should use them, specially 1.20 fix a load of problems.



It has given me a lot of problems.
Just updated and it destroyed my interface. Zoomed in double size on iPhone.

Had to go back to 1.19.14
After all the 1.20 is only 7 months old.

Tuur

Sage

Posts: 3,784

Location: Netherlands

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

  • Send private message

17

Sunday, April 5th 2020, 3:41pm

Quoted

Zoomed in double size on iPhone.


check and compare the old and new index.html (tour.html)

Tuur *thumbsup*

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

18

Sunday, April 5th 2020, 4:09pm

Quoted

Zoomed in double size on iPhone.


check and compare the old and new index.html (tour.html)

Tuur *thumbsup*



Just done that . See separate post in Viewer section 1.20 ZOOMED in.