Wanted to play audio in a loop.

Aug 31, 2019

Hi, 

I wanted to know that, whether it is possible to implement a functionality to play different audios in a loop. 

I wanted to implement below mentioned functionality -

1.  Functionality 1 :  There will be 20 buttons and clicking on each button will play a different audio.  

2. Functionality 2 : Instead of clicking on each button manually and play audios,  there will be another option, by which learner can define the range. To have this functionality, learner need to click on two buttons out of the range of 20 buttons.  For e.g. she can select button 5 as a start point and button 10 as end point. The moment he hit play button, audios of buttons 5,6,7,8,9 and 10 will start playing one after another. 

3. Functionality 3 : There will be text box to define the number of time(repetition) above audios (5,6,7,8,9 and 10) will play. 

5 Replies
dave faldasz

Hi Sameer!

short answer:
yes, you can set Articulate up to play different audios in a loop.

Wow, that will be a pretty slick application that you are describing, when you get it done!

Thoughts:
Might be easier to go through the looking glass (Alice in Wonderland reference) and pass 20 variables (1 for each button) from Articulate into the JavaScript world - do the math on what to play, based on buttons pressed, then JavaScript out back to Articulate to set the variables and, as a result, get the appropriate audios to be played.

or... Here are some rambling thoughts

Functionality 2:
I would require that the user press a "play" button to play the selected the range of audios. - You would need some logic to determine what the range of audios are, between the buttons pressed. You could brute force it with (pallbark guess here...) 80 combinations of ranges that are preset. Identify which range you just picked by comparing it to conditions in a trigger for the "Play" button.

Functionality 1:  
I would probably assign a variable to each button. When the button gets pressed, the variable gets added by +1 (for counting later), and then the audio for that assigned button would get played (and it would be counted/incremented, covering Functionality 3). But it would only be played if, when you have a trigger playing that audio, you require that the condition is met that the variable value is greater than 0.

I would start very small and prove the functionality of the programming before going for all 20 buttons.

hmmm...
Do you have a time limit on when this needs to be up and running? Do you know a little JavaScript?

 

dave

 

dave faldasz

Hi Sameer!
hope it helps.
Thinking more about this...
What if you build layers that have nothing but audio tracks - one audio track on each layer. 
Make a main menu with buttons to call up each layer. Do that for multiple audio/layers. Any time a different music button is pressed, a different music layer opens, closing the existing music layer.
Clicking on PodCast 1 in the demo I attached, plays music track 1. Click on PodCast 2 and it instantly switches to music track 2.
Roughed out a demo attached below.
I also added that when the Layer opens, it immediately stops that layer's audio - then the next trigger is to start the same audio. That way, you have a new start on each audio when you visit/revisit the layer by pressing the button. If, every time the user visits a layer, a variable for that layer is incremented, you can have JavaScript watch for a threshold, and act on it, when it is reached. Just more thoughts...

 

 

This discussion is closed. You can start a new discussion or contact Articulate Support.