Link Search Menu Expand Document

Properties

mediaStreamTrack

PeerTrack MediaStreamTrack, use it for render video or audio in your application

@returns MediaStreamTrack readonly

id

Return this mediaStreamTrack id

@returns String readonly

kind

Return kind of mediaStreamTrack

@returns MediaKind readonly

producerId

Return id of track publisher

@returns String or undefined readonly

isPublished

Track status - published or not

@returns Boolean readonly

getLabel

Track label

@returns TrackLabel readonly

Methods

setPriority()

Sets the priority for this track publisher. See more

Argument Type Description Required Default
priority RTCPriorityType   Yes  

@async
@throws invalid params


publish()

Publish this mediaStreamTrack into channel

@async
@throws Not enough access to produce


unpublish()

Unpublish this mediaStreamTrack

@async


pause()

pause this mediaStreamTrack and publisher

@async
@throws Track is not published
@throws Can`t pause track


resume()

resume this mediaStreamTrack and publisher

@async
@throws Track is not published
@throws Can`t resume track


Enums

MediaKind

Value Description
video  
audio  

TrackLabel

Value Description
camera  
microphone  
screen-video  
screen-audio  
unknown