Audio go back 10sec and go forward 10sec (Seek)


#1

Hello, i want to asl anout ogg sound.
1-Is there any ready template for playing sound, like timeline to slide it to go back or go forward?
2- how i can play forwad or back 10second with ogg file?


#2

Hi @eliaskhs,

Thanks for the questions :slight_smile:

Unfortunately there is no way to seek to a specific point in an audio only clip. You can however, edit the existing video player template sub symbol to stream MP3 files instead of video files!

The way that the video player sub symbol is set up allows a URL value to be inputted into its properties, which in turn, will stream that video along with a seek bar and controls.

If instead of inserting a video URL, we add an MP3 file, we can then utilise the controls from the video player but only have an audio clip playing! Removing all of the unwanted video player parts of the sub symbol (backgrounds, touch to wake seek bar), we create a sub symbol completely for streaming audio (attached below).

The same rules apply as how the video must be saved to a server -

The audio clip must be saved to a server hosting site in order for it to play properly across all devices. We recommend using a CDN for faster, more scalable audio serving e.g. AWS CloudFront or CloudFlare.

I will have attached a copy of the audio player sub symbol template I have created below (It is a zip file so please extract before trying to add into the symbol definitions).

AudioPlayer.zip (559.3 KB)

To use it, you will need to drag and drop it into the symbol definitions within Studio. Once it is in Studio, please drag the whole sub symbol into the hierarchy and change the video url property to the MP3 file you would like to play!

I have added a screenshot to show how it will look in a scene with no target image -

Hope this helps!

George


#3

that seem to be very nice, but i have one question for this, let say i will add 3 symbols each symbol will have different mp3, and want when 1 mp3 play to pause all the other !
when i click on play button, to pause all the other mp3 that are playing ?