OdinMedia

export class OdinMedia

Class describing a single media stream inside an OdinRoom.

Properties

NameTypeDescription
activebooleanIndicates wether or not the media is currently sending/receiving data.
idnumberThe ID of the media.
peerIdnumberThe ID of the peer that owns the media.
remotebooleanIndicates wether or not the media belongs to a remote peer.
startedbooleanIndicates whether or not the media is registered in the audio service instance (e.g. started).
volumenumberThe individual playback volume of the media stream.

Public Methods

NameTypeDescription
addEventListenervoidRegisters to media events from IOdinMediaEvents.
changeVolumevoidChanges the playback volume of the media.
startPromise<void>Starts the encoder/decoder for the media and adds it to the room if its a local media.
stopPromise<void>Stops the encoder/decoder for the media and removes it from the room if its a local media.