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.

1

Tuesday, December 16th 2014, 7:21pm

Audio after entering a hotspot

Hello,

I would like to create a virtual tour that could automatically play an audioguide (mp3/ogg) after clicking on a hotspot.

I can create a vtour using pictures and linking them by hotspots (via the editor).

But how can I autoplay an audioguiode?

What I would like to create is something similar to that: http://exibit.quirinale.it/qvv/visitavirtuale/palazzo.html

The only thing I managed to do (unsuccessfully) for the moment is that:

1) Create a simple working vtour (two pictures linked by hotspots with the editor)

2) in tour.xml I did as follows:

a) add: <plugin name="soundinterface"
url="%SWFPATH%/plugins/soundinterface.swf"
alturl="%SWFPATH%/plugins/soundinterface.js"
preload="true"
rootpath="/"
volume="1.0"
mute="false"
/>

b) modified: <hotspot name="spot1" url="skin/vtourskin_hotspot.png" ath="-162.027" atv="13.785" linkedscene="scene_foto" onclick="playsound(auto,sounds/audio.mp3);"

But when I click on the hotspot I get "ERROR: soundinterface - loading of /sounds/audio.mp3 failed!"

The audio.mp3 file is in the "sounds" directory

What's wrong with that?

Thanks for your help :-)

Tuur

Sage

Posts: 3,386

Location: Netherlands

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

  • Send private message

2

Tuesday, December 16th 2014, 10:37pm

Hi,
I'm on ipad right now but maybe first take the slash out of the rootpath in the plugin.
?
When that doesn't work i would try putting there ../
Not sure though, not on desktop now.
Tuur *thumbsup*

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

3

Tuesday, December 16th 2014, 11:29pm


4

Wednesday, December 17th 2014, 9:33am

Hello Tuur,

yes it was the / on rootpath; by removing it I could hear the audio. Thanks!

But why linkedscene="scene_foto" in the hotspot stuff does not work?

When I click on the spot I can only hear the audio, but I'm not taken to the scene I'm supposed to go...

Maybe is there another way to automatically play a specific audiofile whenever you get into the next scene in a vtour?

Thanks in advance for your help! *smile*

Tuur

Sage

Posts: 3,386

Location: Netherlands

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

  • Send private message

5

Wednesday, December 17th 2014, 11:23am

I would call the playsound etc in the onstart of the scene.
Tuur *thumbsup*

6

Wednesday, December 17th 2014, 11:50am

Thanks I'm almost there... *unsure*

is there a chance to put an audio control so a user can silence/stop the audio?

How can the audio be stopped when you move to another position? I tried to put onout="stopallsounds();" both on <hotspot> and <scene name> but it does not stop, moreover if you turn back a new audio is played overlapped to the first one...

I'm sorry to bother you with such a stupid question; I tried to search over the forum but I completely lost in tens of codes I can't understand where to put... *unsure*


Will you be so kind to help me? *g*

7

Thursday, March 10th 2016, 4:11pm

Autoplay sound in Mobile Devices

Hi Tuur

I have a similar question - autoplay sound in mobile devices.

I have this code

onstart="webvr.resetSensor(4.428); playsound(audioI,'audios/I.wav|audios/I.ogg', 1); "


it works fine on my desktop pc. But when i tried it on my smartphone, sometimes it starts without tapping the screen and sometimes it does not start. Any solution for this?