atmoky Engage Server SDK is now available! Check out the documentation to learn more.
API Reference
Classes
RemoteVideoTrack

RemoteVideoTrack

Summary
RemoteVideoTrack represents a video track from a RemoteParticipant
Remarks
It provides methods to attach and detach the track to and from HTMLVideoElements.

Properties

sid

optional
Server assigned id.
Remarks
The value set after the track is published to the server, or if it's a remote track.
Type
string

streamState

Indicates the current state of stream.
Remarks
It'll indicate paused if the track has been paused by the congestion controller.
Type
StreamState

Accessors

isAdaptiveStream

Returns true if adaptive streaming is enabled.
Type
boolean

mediaStreamTrack

Returns the media stream track.
Type
MediaStreamTrack

Methods

attach

Attaches the video track to an HTML video element.
Signature
attach(element?: HTMLVideoElement)
NameTypeDescription
element optionalHTMLVideoElementThe video element to attach to (optional).
Returns
HTMLVideoElement The HTMLVideoElement the video track is attached to.
Remarks
If no element is provided, a new video element will be created and returned.

detach

Detaches the track from an HTML video element.
Signature
detach(element?: HTMLMediaElement)
NameTypeDescription
element optionalHTMLMediaElementThe video element to detach from (optional).
Returns
HTMLMediaElement | HTMLMediaElement[] The detached video element(s).
Remarks
If no element is provided, the track will be detached from all previously attached elements.

atmoky Logo

© 2024 atmoky, GmbH.
All rights reserved.

We use cookies to measure and improve your browsing experience, and serve personalized ads or content.