Welcome, Guest Login

Support Center

Audio Video Time and Play Properties

Last Updated: Aug 28, 2015 04:49PM EDT
Properties are values that can be used to observe or modify the behavior of blocks, view or your entire app.

To get the value of a property use an expression like [[prop:videoPlaybackSpeed]]  to obtain the current value of the property named "videoPlaybackSpeed."

To set a property's value, use the script action Set a Property. In the script action, just give the property name, for example videoPlaybackSpeed to refer to the property you want to set.

The following list identifies all the currently-supported properties you can get or set

An Important Note on Property Names
Property names always have a slash in them. What comes before the slash indicates the scope of the property; what follows is the name of the property within that scope. When setting a property with the Set a Property script action, the editor supplies "App" in the dropdown, so only the name of the property must be entered in the action.


ais/authenticated is a read-only property; you cannot set its value. It returns a comma-separated list of all the platform IDs for which the user is currently authenticated. This is an iOS-only property.

ais/channelAccess is a read-only property; you cannot set its value. [[prop:ais/channelAccess/foo]] returns the channel IDs, separated by commas, for the "foo" platform. The values will only return if the user is authenticated for the specified platform. It only includes the channels that the app was requested to check using the AIS Login action. This is an iOS-only property.

ais/channelError is a read-only property; you cannot set its value. [[prop:ais/channelError/foo]] returns the last error for the channel specified, for example "foo" in this example, which must be a valid channel ID. This is an iOS-only property.

app/audioCurrentTime gets or sets the playback position for the Audio Block. This feature only works if the Audio Block has the "Global Time Sync" option checked.

 

Retrieving the property:

iOS/Android

The value is returned as ‘h:mm:ss’ or ‘mm:ss’ (if under an hour) or just ‘ss’ (if under a minute).

 

Setting the property:

iOS

Currently not available on iOS

 

Android

To set the playback position, the input value must be in seconds.

 

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. Valid settings are in the ‘h:mm:ss’ format - for example, ‘00:10:01’ would indicate the first second after the tenth minute of the track. This is an Android-only property.


app/audioDuration gets audio content duration for the Audio Block. This feature only works if the Audio Block has the "Global Time Sync" option checked.
 

Retrieving the property:

iOS

The value is returned as ‘h:mm:ss’ or ‘mm:ss’ (if under an hour)

 

Android

This setting is the same on Android.


app/audioPlaySpeed controls the playback speed for the Audio Block. This feature only works if the Audio Block has the "Global Time Sync" option checked.
 

Setting the property:

iOS

Any positive number as play and any negative number (or 0) as paused. Values can be integers or floating point numbers. This feature only works if the Audio Block has the "Global Time Sync" option checked.

 

Android

A value of 1 means playback at normal speed, 0 means pause, 2 means playback a twice the normal speed and -2 means go backwards at twice the normal playback speed. Values can be integers or floating point numbers. This feature only works if the Audio Block has the "Global Time Sync" option checked.


app/videoCurrentTime is similar to the app/AudioCurrentTime property, but controls video playback in the Video Block. It does not regulate playback of the Full-Screen Video Block. This feature only works if the Video Block has the "Global Time Sync" option checked.
 

Retrieving the property:

iOS/Android

The value is returned as ‘h:mm:ss’ or ‘mm:ss’ (if under an hour) or just ‘ss’ (if under a minute)

 

Setting the property:

iOS

Currently not available on iOS

 

Android

To set the playback position, the input value must be in seconds.

 

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 video track, the playback position will be set to the end of the track. This feature only works if the Video Block has the "Global Time Sync" option checked. Valid settings are in the ‘h:mm:ss’ format - for example, ‘00:10:01’ would indicate the first second after the tenth minute of the track. This is an Android-only property.



app/videoDuration is similar to the app/AudioDuration property, but controls video playback in the Video Block. It does not regulate playback of the Full-Screen Video Block. This feature only works if the Video Block has the "Global Time Sync" option checked.
 

Retrieving the property:

iOS

The value is returned as ‘h:mm:ss’ or ‘mm:ss’ (if under an hour)

 

Android

This setting is the same on Android.



app/videoPlaySpeed  is similar to the app/audioPlaySpeed property, but controls video playback in the Video Block. It does not regulate playback of the Full-Screen Video Block. This feature only works if the Video Block has the "Global Time Sync" option checked.
 

Setting the property:

iOS

Any positive number as play and any negative number (or 0) as paused. Values can be integers or floating point numbers. This feature only works if the Video Block has the "Global Time Sync" option checked.

 

Android

A value of 1 means playback at normal speed, 0 means pause, 2 means playback a twice the normal speed and -2 means go backwards at twice the normal playback speed. Values can be integers or floating point numbers. This feature only works if the Video Block has the "Global Time Sync" option checked.



Formatters

The :add and :sub formatters expect the input value to be a number. When working with durations expressed as mm:ss or hh:mm:ss it is generally more convenient to use the formatter :toSeconds which converts these durations into seconds. NOTE: toSeconds only supported on Android

For example, use of a formatter to change the current video/audio position:

[[prop:app/videoCurrentTime:toSeconds|add 5]]

[[prop:app/audioCurrentTime:toSeconds|sub 5]]


Retrieving Property for Video/Audio current media position:

[[prop:app/videoCurrentTime]]

[[prop:app/audioCurrentTime]]

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