Pause audio playback

Pauses an ongoing audio playback instance with the given playback ID.

Pauses an ongoing audio playback instance with the given playback ID.

Once the playback instance has been paused, the first output is triggered. If the playback instance is already paused, the playback remains paused.

If there is an error, the second output is triggered.

Input arguments

Label

Key

Type

Required?

Default

Description

Audio playback ID

playbackId

String

Yes

ID of the audio playback to pause.

Output arguments

Number of outputs: 2

Label

Key

Type

Description

Playback instance

playback

Object

Object representing the playback instance after it was paused

  • Playback ID

playback.playbackId

String

Unique ID for this audio playback

  • Duration

playback.duration

Number

Duration of the audio file, in milliseconds.

  • Current time

playback.currentTime

Number

Current time of the ongoing playback, in milliseconds.

  • Status

playback.status

String

Status of the current playback.

  • Looping

playback.looping

Boolean

True/false value describing if the audio file is set to loop.

  • Remaining loops

playback.remainingLoops

Number

If looping, the number of remaining loops until the playback stops.

  • Source URL/path

playback.source

String|String

Absolute local filesystem path or external URL to the audio file being played

  • Current playback started at

playback.currentPlaybackStartedAt

String

ISO 8601 timestamp for when the playback was started. Can be used to calculate e.g. elapsed time.

Events

No events.

Errors

Label

Code

Description

Playback instance not found

playbackInstanceNotFound

Thrown if no audio playback instance with the given ID could be found.

Unknown error

unknown

Thrown if an unknown error occurred while pausing the audio file.