Perspective - Audio Scripting
This page details the component-specific events and functions available for Perspective's Audio component. Right-click on the component or select Components from the Designer menubar to access the Configure Events and Configure Scripts popups.
Component Events​
The Perspective Event Types Reference page describes all the possible component event types for Perspective components.
onPlay​
This event is fired when playback has begun.
event​
-
Object Path
- event
-
Type
- Null
-
Description
- An empty event object.
onPause​
This event is fired when playback has been paused.
event​
-
Object Path
- event
-
Type
- Null
-
Description
- An empty event object.
onError​
This event is fired when there is an error attempting to play the media file.
This component event is designed to be used in tandem with a script action. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.
event.errorMessage​
-
Object Path
- event.errorMessage
-
Type
- String
-
Description
- Error message when attempting to play the media file.
onEnded​
This event is fired when playback has ended due to reaching the end of the media.
event​
-
Object Path
- event
-
Type
- Null
-
Description
- An empty event object.
onLoaded​
This event is fired when the first frame of the media has loaded.
event​
-
Object Path
- event
-
Type
- Null
-
Description
- An empty event object.
onRateChanged​
This event is fired when the playback rate of the media has changed.
event​
-
Object Path
- event
-
Type
- Null
-
Description
- An empty event object.
Component Functions​
.play()​
-
Description
- Plays the media file, triggering the onPlay component event.
-
Parameters
- None
-
Return
- Nothing
.pause()​
-
Description
- Pauses the media file, triggering the onPause component event.
-
Parameters
- None
-
Return
- Nothing
.replay()​
-
Description
- Replays the media file from the beginning.
-
Parameters
- None
-
Return
- Nothing
Extension Functions​
This component does not have extension functions associated with it.