good afternoon!
to play music, I use soundinteface.xml . I would really like to add a progress bar for the viewer that displays how long the music is playing and how much is left (as in all audio players). how to do it? thank you
good afternoon!
to play music, I use soundinteface.xml . I would really like to add a progress bar for the viewer that displays how long the music is playing and how much is left (as in all audio players). how to do it? thank you
Hi,
the sound objects are providing information like position and duration and also multiple events:
krpano.com - Plugins - Sound Interface
These could be used to automatically adjust the size or position of layers elements to make a player UI.
Best regards,
Klaus
Hi,
here a quick updated old example, using the videoplayer.
https://www.virtualtuur.com/krpano/121/bare_bones/examples/audio_progressbar/1/code/audioplayer.xml
Interesting to try to make one with the sound objects only as Klaus suggested.
.. well.. i hope this helps... not fully tested.
Tuur
I am interested in doing specific tasks during the sound.
For example imagine pano from viwing toewer and audio guide. In 12th second to zoom somewhere, in 25th-34th seconds to chanje the look about 90 degrres and zoom to something else.
Or if I click on something in pano, sound starts playing from specific second.
Any example? Thanks in advance.
Tuur, Thanks for the example. Would it be possible to stop that sound when another scene loads? I've tried stopallsounds(); in the onstart section of the new scene but it's still playing in the background.
try this code:
stopsound(bgsnd);loadpano(....);
its work in my projects
Thanks for your code Alexbar78.
I have previously used it in other projects but unfortunately, it doesn't work with this player and the audio continues. I currently use a html5 player that opens in a popup window (webpage) as it allows a playlist and other features but I liked the look and simplicity of Tuur's krpano version.
No worries, there's no rush and I'll wait for something else to turn up in the future.
Cheers
martyhr you could add for example in the audioplayer_audioready action:
callwhen(tuur, plugin[audioplayer].time GT 3, stopcallwhen(tuur);lookto(-90,0,100));
if you have many tasks/moments you could write an action that monitors the 'time' and assign actions to a certain time.
andrew22222 keep in mind we are using the video player here (!)
so.. <scene name="scene_2" title="pano1" onstart="plugin[audioplayer].stop();" >
playlist is also very good possible etc etc
Hope it helps,
When i find time i'll try to make one with the soundinterface.
Tuur
Don’t have an account yet? Register yourself now and be a part of our community!