Welcome, Guest Login

Support Center

Working with Properties

Last Updated: Sep 09, 2015 01:57PM 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. 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.
 
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 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. Currently iOS treats any positive number as play and any negative number (or 0) as pause. This property is available on iOS and Android.
 
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. This is an Android-only property.

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. This is available on iOS and Android.

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 :timeAdd and :timeSub. These formatters expect durations to be expressed as mm:ss or hh:mm:ss and return a value in that same format. The argument must be a integer representing the number of seconds to add to the input value. For example, [[prop15:10 timeAdd 5, output  915





 
Formatters:
timeAdd
The expected input to this formatter is in the format h:mm:ss or mm:ss
The add value is an integer number to add to the current time.
The returned value is the seconds representation of the input plus the time to add
i.e.  
 
timeSub
The expected input to this formatter is in the format h:mm:ss or mm:ss
The sub value is an integer number to add to the current time.
The returned value is the seconds representation of the time
i.e. 15:10 timeSub 5, output  905 


 


Changes the current Video playing in the Video block to the corresponding position. If value is less then 0 then it will set it to 0. If value is greater then the duration, then it will set value to duration
 
 

 
Retrieving Property for Video/Audio current media position:
[[prop:app/videoCurrentTime]]
[[prop:app/audioCurrentTime]]
 
Use of a formatter to change the current video/audio position:
[[prop:app/videoCurrentTime:timeAdd 5]]
[[prop:app/audioCurrentTime:timeSub 5]]

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