Welcome, Guest Login

Support Center

Play STREAMING Audio

Last Updated: Oct 05, 2016 05:14PM EDT

This Action has been retired.

Please review Play Audio


Introduction

​EachScape makes it easy to stream and control audio.

With that feature you can develop Radio, online Music apps,Podcast apps or any app needing to play streamed audio.
Many large radio apps are built using EachScape

Demo

Install the app 'RADIO' to better understand Streaming audio.
Go to Dashboard, select Base App then the 'RADIO' app:

 

 

The Audio stream can come from any source of data, the audio can be stored in EachScape Cloud Collection or in any third party CMS.

It can be a Live Stream (radio) or a remote file (like a song or Podcast).



Usage


To play an Audio Stream attach the 'Play Streaming Audio' Action to any Event.

In this example we use a Tap event from an Image Block used as a button.
 

The 'Play Streaming Audio' is available under the list of Action under 'Media Control'
 

'Play Streaming Audio' will require a data source, the location on the Cloud or on a specific server where the audio file is located..

 

Stop, Pause, Fast Forward & Rewind
 

To control a streaming audio behavior we use 
Properties Values or autoprop value


Autoprop apply to a wider set of use case than Audio.
In our case we are interested in 2 properties.

app/audioPlaySpeed controls the playback speed for the Audio Block.
A value of
                  1 means playback at normal speed
                  0 means pause
                  2 means playback a twice the normal speed
                -2 means go backwards at twice the normal playback speed.
Values can be integers or floating point numbers.

Set a Property

Example on how to set audio/playbackSpeed value in an app (note that there is a forward slash between audio and playbackSpeed


In this example, we set the global property to a value of 1 i.e. normal speed.

This action is usually attached to a Button or any event controlling the Streaming Audio play.

Note:
If you use the Audio Block  "Global Time Sync" option has to be checked.
Currently iOS treats any positive number as play and any negative number (or 0) as pause.
This property is available on iOS and Android.



Current Time
Another interesting property is audioCurrentTime

app/audioCurrentTime gets or sets the playback position for the Audio Block.
The value is returned as hh:mm:ss or mm:ss (if under an hour).

To set the playback position, a similar format must be used to set the position of the playback. For convenience, use the :timeAdd or :timeSub formatters to adjust the current time. See the description of this, below. If you attempt to set the time to a value less than zero, the playback position will be set to the beginning. If you set it beyond the end of the audio track, the playback position will be set to the end of the track. This feature only works if the Audio Block has the "Global Time Sync" option checked. This is an Android-only property.
 

EVENT

App Wide Event are triggered by a Playback.
You can access these event in the App Edit section:
 

Select Events to access App Wide Events then the Audio Playback section:
 

Here are the different App Wide Actions available to trigger action based on these respective events:

Learn More
- Play Local Audio File
- Play streaming video

Help us improve! Rate this article:

Yes I found this article helpful

Ask a Question   

support@eachscape.com
http://assets1.desk.com/
false
eachscape
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete