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
Important
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.
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.
Duration
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.
Video Playback Speed
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.
Video Playback Speed
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.
Video Playback Speed Tutorial App
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]]