Note - the Sound Interface actions are not available until the plugin was loaded.
Either use the plugin onloaded event or use the
preload="true" setting to make sure that the
plugin was loaded and is ready for usage.
The plugin will automatically set keep="true" for itself,
so it is not necessary to set that!
globalstop = true or false, default=false (*optional)
By default only the sounds started by the soundinterface will be stopped,
but with true as parameter also all other flash sounds, e.g. from the videoplayer plugin or
any other source, will be stopped.
When a sound will be played a sound[name] object will be created in krpano.
This object can be dynamically modifed with other krpano actions. The sound object will remove itself automatically
when that sound has played or when stopsound will be called.
For example to tween/change the volume of a sound:
Some HTML5 browsers doesn't support MP3 or MP4 audio files like the Flashplayer.
There different audio formats like OGG or WAV need to be used.
To provide several audio formats and let the plugin automatically choose the appropriate one,
set the paths to all audio files at once and separate them by a pipe | character.
The technically possibilities with HTML5 are not same as with the Flashplayer.
So when using the krpano HTML5 viewer not all features of the soundinterface plugin are supported.
Especially the 3D Sound features are not available here, as long as there is no volume panning available in HTML5 '3D Sound' will be not possible.
There are additional system limitations on iOS devices (iPhone and iPad):
No Autoplay / Autostart!
A sound can't start to play automatically!
An user interaction is needed to start playing the sound, e.g. a touch on the screen by the user.
The krpano soundinterface plugin automatically detects that situations and when the playing is not possible
it automatically queues the playsound() command and waits for the next user interaction to start the sound
automatically (e.g. when the user touches the screen to pan the pano or to click a button).
Only one sound at one time!
Only one sound file can be played at one time! When there is the new playsound() call the last sound will be automatically stopped.
No volume change!
Changing the volume of a sound is not allowed on iOS devices.