Rate this page:

Player

Represents an audio player.

Methods

addEventListener

Copy URL
addEventListener(event: 

PlayerEvents

,
callback:

Function

):

void

Adds a handler for the specified PlayerEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called

Parameters

Returns

  • type:

    void

addMarker

Copy URL
addMarker(offset: 

number

):

void

Add a playback marker. The PlayerEvents.PlaybackMarkerReached event is triggered when the marker is reached.

Parameters

  • offset:

    number

    Positive/negative offset (ms) from the start/end of media.

Returns

  • type:

    void

id

Copy URL
id(): 

string

Returns the player's id.

Returns

  • type:

    string

pause

Copy URL
pause(): 

void

Pauses playback. To continue the playback use the Player.resume method.

Returns

  • type:

    void

removeEventListener

Copy URL
removeEventListener(event: 

PlayerEvents

,
callback:

Function

):

void

Removes a handler for the specified PlayerEvents event

Parameters

Returns

  • type:

    void

resume

Copy URL
resume(): 

void

Resumes playback after the Player.pause method is called.

Returns

  • type:

    void

sendMediaTo

Copy URL
sendMediaTo(mediaUnit: 

VoxMediaUnit

,
parameters:

SendMediaParameters

):

void

Starts sending media (voice and video) from this call to the media unit specified in targetMediaUnit. Each call can send media to any number of other calls, but can receive from just one. So if targetCall is already receiving media from another call, that link would break.

Parameters

Returns

  • type:

    void

stop

Copy URL
stop(): 

void

Stops playback. The current player's instance is destroyed.

Returns

  • type:

    void

stopMediaTo

Copy URL
stopMediaTo(mediaUnit: 

VoxMediaUnit

):

void

Stop sending media (voice and video) from this call to media unit specified in targetMediaUnit.

Parameters

  • mediaUnit:

    VoxMediaUnit

    Media unit that does not need to receive media from this conference anymore.

Returns

  • type:

    void