Perspective - Audio Scripting
This page details the various scripting, component, and extension functions available for Perspective's Audio component.
Component Eventsβ
The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.
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.