You are not logged in.

thienkd

Beginner

  • "thienkd" started this thread

Posts: 21

Location: Viet Nam

  • Send private message

1

Tuesday, May 25th 2021, 12:52pm

SoundInterface doesn't work on iPhone. Why?

Hello everyone, hello Klaus!
I am facing problem with SoundInterface where it works fine on PC and Android but not on my iPhone. Even the example on krpano's homepage. I tried on my iphone and it doesn't work either. Can someone help me with this problem? I use iPhone 7 Plus, IOS 13.5

https://krpano.com/releases/1.20.9/viewe…groundsound.xml

2

Tuesday, May 25th 2021, 4:34pm

Hi,

hmm... it should work (and it does on all my iOS test devices)...

Did you touch the screen to start the sound?

Best regards,
Klaus

thienkd

Beginner

  • "thienkd" started this thread

Posts: 21

Location: Viet Nam

  • Send private message

3

Wednesday, May 26th 2021, 2:53am

Hi,

hmm... it should work (and it does on all my iOS test devices)...

Did you touch the screen to start the sound?

Best regards,
Klaus
yes, but there is no sound coming out on my iPhone :( I do know that Apple blocks autoplay sound, and I tried touching the screen and it doesn't work either

jeromebg

Professional

Posts: 1,116

Location: Angers - France

Occupation: 360 experiences creator

  • Send private message

4

Wednesday, May 26th 2021, 11:00am

Just tried on iPhone 6S with latest IOS and it works as expected BUT on the krpano exemple you posted playsound is used, that means the audio file must be fully loaded before playing (not like streamsound) so if you connection is slow it can take a while before you hear anything.

thienkd

Beginner

  • "thienkd" started this thread

Posts: 21

Location: Viet Nam

  • Send private message

5

Wednesday, May 26th 2021, 11:19am

Just tried on iPhone 6S with latest IOS and it works as expected BUT on the krpano exemple you posted playsound is used, that means the audio file must be fully loaded before playing (not like streamsound) so if you connection is slow it can take a while before you hear anything.
Hi jeromebg !

This is my code:

<action name="startup" autorun="onstart">
if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
loadscene(get(startscene), null, MERGE);
if(startactions !== null, startactions() );
preloadsound(audio/bgsound.mp3 || audio/bgsound.ogg);
playsound(bgsound, audio/bgsound.mp3 || audio/bgsound.ogg, true, 0.75);
</action>


Is it correct?
If possible can you give me an example? Thank you.

jeromebg

Professional

Posts: 1,116

Location: Angers - France

Occupation: 360 experiences creator

  • Send private message

6

Wednesday, May 26th 2021, 11:28am

preloadsound can be used to preload sounds that you want to play later, but it will not help if you try playing the sound at the same time.
Instead of using preloadsound + playsound try streamsound : https://krpano.com/plugins/soundinterface/#streamsound

thienkd

Beginner

  • "thienkd" started this thread

Posts: 21

Location: Viet Nam

  • Send private message

7

Wednesday, May 26th 2021, 12:01pm

thank you veru much.