Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Assignment Client Scripts
TheRecording
API makes and plays back recordings of voice and avatar movements. Playback may be done on a
user's avatar or an assignment client agent (see the Agent API).Methods
Name | Return Value | Summary |
---|---|---|
getDefaultRecordingSaveDirectory
|
string |
Gets the default directory that recordings are saved in. |
getPlayerUseAttachments
|
boolean |
Not used. Deprecated: This method is deprecated and will be removed. |
getPlayerUseDisplayName
|
boolean |
Gets whether recording playback will use the display name that the recording was made with. |
getPlayerUseHeadModel
|
boolean |
Not used. Deprecated: This method is deprecated and will be removed. |
getPlayerUseSkeletonModel
|
boolean |
Gets whether recording playback will use the avatar model that the recording was made with. |
getPlayFromCurrentLocation
|
boolean |
Gets whether recordings are played at the current avatar location or the recorded location. |
isPaused
|
boolean |
Gets whether recording playback is currently paused. |
isPlaying
|
boolean |
Gets whether a recording is currently playing. |
isRecording
|
boolean |
Gets whether a recording is currently being made. |
loadLastRecording
|
None |
Loads the most recently made recording and plays it back on your avatar. |
loadRecording
|
None |
Loads a recording so that it is ready for playing. |
pausePlayer
|
None |
Pauses playback of the recording currently playing. Use startPlaying to resume playback or stopPlaying to stop playback. |
playerElapsed
|
number |
Gets the current playback time in the loaded recording, in seconds. |
playerLength
|
number |
Gets the length of the loaded recording, in seconds. |
recorderElapsed
|
number |
Gets the duration of the recording currently being made or recently made, in seconds. |
saveRecording
|
None |
Saves the most recently made recording to a file. |
saveRecordingToAsset
|
boolean |
Saves the most recently made recording to the domain's asset server. |
setPlayerAudioOffset
|
None |
Not implemented: This method is not implemented yet. |
setPlayerLoop
|
None |
Sets whether playback should repeat in a loop. |
setPlayerTime
|
None |
Sets the current playback time in the loaded recording. |
setPlayerUseAttachments
|
None |
Not used. Deprecated: This method is deprecated and will be removed. |
setPlayerUseDisplayName
|
None |
Sets whether recording playback will use the display name that the recording was made with. |
setPlayerUseHeadModel
|
None |
Not used. Deprecated: This method is deprecated and will be removed. |
setPlayerUseSkeletonModel
|
None |
Sets whether recording playback will use the avatar model that the recording was made with. |
setPlayerVolume
|
None |
Sets the playback audio volume. |
setPlayFromCurrentLocation
|
None |
Sets whether recordings are played at the current avatar location or the recorded location. |
startPlaying
|
None |
Starts playing the recording currently loaded or paused. |
startRecording
|
None |
Starts making a recording. |
stopPlaying
|
None |
Stops playing the recording currently playing or paused. |
stopRecording
|
None |
Stops making a recording. The recording may be saved using saveRecording or saveRecordingToAsset, or immediately played back with loadLastRecording. |
Type Definitions
loadRecordingCallback( success, url )
Type: function |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Called when a Recording.loadRecording call is complete. Parameters
|
saveRecordingToAssetCallback( url )
Type: function |
||||||
---|---|---|---|---|---|---|
Called when a Recording.saveRecordingToAsset call is complete. Parameters
|
Method Details
(static) getDefaultRecordingSaveDirectory( ) → {string}
Returns: The default recording save directory. |
---|
Gets the default directory that recordings are saved in. Example
|
(static) getPlayerUseAttachments( ) → {boolean}
Returns: Use attachments. |
---|
Not used. Deprecated: This method is deprecated and will be removed. |
(static) getPlayerUseDisplayName( ) → {boolean}
Returns: true if recording playback will use the display name that the recording was made with,
false if playback will keep the current display name.
|
---|
Gets whether recording playback will use the display name that the recording was made with. |
(static) getPlayerUseHeadModel( ) → {boolean}
Returns: Use head model. |
---|
Not used. Deprecated: This method is deprecated and will be removed. |
(static) getPlayerUseSkeletonModel( ) → {boolean}
Returns: true if recording playback will use the avatar model that the recording was made with,
false if playback will use the current avatar model.
|
---|
Gets whether recording playback will use the avatar model that the recording was made with. |
(static) getPlayFromCurrentLocation( ) → {boolean}
Returns: true if recordings are played at the current avatar location, false if
played at the recorded location.
|
---|
Gets whether recordings are played at the current avatar location or the recorded location. |
(static) isPaused( ) → {boolean}
Returns: true if recording playback is currently paused, false if it isn't.
|
---|
Gets whether recording playback is currently paused. |
(static) isPlaying( ) → {boolean}
Returns: true if a recording is being played, false if one isn't.
|
---|
Gets whether a recording is currently playing. |
(static) isRecording( ) → {boolean}
Returns: true if a recording is currently being made, false if one isn't.
|
---|
Gets whether a recording is currently being made. |
(static) loadLastRecording( ) |
---|
Loads the most recently made recording and plays it back on your avatar. Example
|
(static) loadRecording( url, callbackopt ) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Loads a recording so that it is ready for playing. Parameters
Example
|
(static) pausePlayer( ) |
---|
Pauses playback of the recording currently playing. Use startPlaying to resume playback or stopPlaying to stop playback. |
(static) playerElapsed( ) → {number}
Returns: The current playback time in the loaded recording, in seconds. |
---|
Gets the current playback time in the loaded recording, in seconds. |
(static) playerLength( ) → {number}
Returns: The length of the recording currently loaded, in seconds |
---|
Gets the length of the loaded recording, in seconds. |
(static) recorderElapsed( ) → {number}
Returns: The duration of the recording currently being made or recently made, in seconds. |
---|
Gets the duration of the recording currently being made or recently made, in seconds. |
(static) saveRecording( filename ) | ||||||
---|---|---|---|---|---|---|
Saves the most recently made recording to a file. Parameters
Example
|
(static) saveRecordingToAsset( callback ) → {boolean}
Returns: true if the recording is successfully being saved, false if not.
|
||||||
---|---|---|---|---|---|---|
Saves the most recently made recording to the domain's asset server. Parameters
Example
|
(static) setPlayerAudioOffset( audioOffset ) | ||||||
---|---|---|---|---|---|---|
Not implemented: This method is not implemented yet. Parameters
|
(static) setPlayerLoop( loop ) | ||||||
---|---|---|---|---|---|---|
Sets whether playback should repeat in a loop. Parameters
|
(static) setPlayerTime( time ) | ||||||
---|---|---|---|---|---|---|
Sets the current playback time in the loaded recording. Parameters
|
(static) setPlayerUseAttachments( useAttachments ) | ||||||
---|---|---|---|---|---|---|
Not used. Deprecated: This method is deprecated and will be removed. Parameters
|
(static) setPlayerUseDisplayName( useDisplayName ) | ||||||
---|---|---|---|---|---|---|
Sets whether recording playback will use the display name that the recording was made with. Parameters
|
(static) setPlayerUseHeadModel( useHeadModel ) | ||||||
---|---|---|---|---|---|---|
Not used. Deprecated: This method is deprecated and will be removed. Parameters
|
(static) setPlayerUseSkeletonModel( useSkeletonModel ) | ||||||
---|---|---|---|---|---|---|
Sets whether recording playback will use the avatar model that the recording was made with. Parameters
|
(static) setPlayerVolume( volume ) | ||||||
---|---|---|---|---|---|---|
Sets the playback audio volume. Parameters
|
(static) setPlayFromCurrentLocation( playFromCurrentLocation ) | ||||||
---|---|---|---|---|---|---|
Sets whether recordings are played at the current avatar location or the recorded location. Parameters
|
(static) startPlaying( ) |
---|
Starts playing the recording currently loaded or paused. |
(static) startRecording( ) |
---|
Starts making a recording. |
(static) stopPlaying( ) |
---|
Stops playing the recording currently playing or paused. |
(static) stopRecording( ) |
---|
Stops making a recording. The recording may be saved using saveRecording or saveRecordingToAsset, or immediately played back with loadLastRecording. |