Play audio continuous


(Steve Warby) #1

Hi Guys,

I am using :

<audio width="400" controls="controls" preload="auto" id="bananasound1">
<source src="${resourcesFolderName}/Banana.ogg" type="audio/ogg"> <!-- Firefox and Chrome -->
<source src="${resourcesFolderName}/test.mp3" type="audio/mpeg"> <!-- Safari and iPhone -->
</audio> 

<!-- Download links outside of the audio tag -->
<p>Download Audio: <br><a href="${resourcesFolderName}/test.mp3">MP3 Format</a> | <a            href="${resourcesFolderName}/Banana.ogg">OGG Format</a></p>

I am trying to get the sound to play when there is page navigation.
On button click

var snd = hypeDocument.getElementById('bananasound');
snd.play();	

I created a persistent symbol and set to show on all pages.

The audio stops on a page change.
I need the audio to play in the back ground without any user intervention ( ie hide the player)

Is this possible ?

Cheers

Steve Warby


(strmiska) #2

no javascript, just start sound on button play:
audioPermanent.hype.zip (130,4 KB)


(Steve Warby) #3

Thanks for the help.

If I set the audio to play on scene load then goto scene 2 then go back to scene the audio starts again.

How do I set a flag that the audio has started so the audio don’t re-start?


(strmiska) #4

load audio not on scene load, but on symbolLoad.
audioPermanent.hype.zip (130,4 KB)


Is there an Example file....? Continuous Audio Across Scenes
(Steve Warby) #5

Thanks.

Sometimes things are simple…

Cheers

Steve Warby