OdinMedia
export class OdinMedia
Class describing a single media stream inside an OdinRoom
.
Properties#
Name | Type | Description |
---|
active | boolean | Indicates wether or not the media is currently sending/receiving data. |
id | number | The ID of the media. |
peerId | number | The ID of the peer that owns the media. |
remote | boolean | Indicates wether or not the media belongs to a remote peer. |
started | boolean | Indicates whether or not the media is registered in the audio service instance (e.g. started). |
volume | number | The individual playback volume of the media stream. |
Public Methods#
Name | Type | Description |
---|
addEventListener | void | Registers to media events from IOdinMediaEvents . |
changeVolume | void | Changes the playback volume of the media. |
start | Promise<void> | Starts the encoder/decoder for the media and adds it to the room if its a local media. |
stop | Promise<void> | Stops the encoder/decoder for the media and removes it from the room if its a local media. |