Developer Documentation

Room.GetOrCreateDecoder

public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, out MediaDecoder decoder)
public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, uint samplerate, bool stereo, out MediaDecoder decoder)

Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer

Info

Will use the default samplerate and stereo flag set by the current room

Parameters

NameTypeDescription
peerIdUInt64id of peer
mediaIdUInt16id of output media
decoderMediaDecoderoutput object or null
samplerateUInt32custom samplerate
stereoBooleancustom stereo flag

Returns

TypeDescription
Booleantrue on decoder found or false

Variants

GetOrCreateDecoder(peerId, mediaId, decoder)

public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, out MediaDecoder decoder)

Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer

Warning

Will use the default samplerate and stereo flag set by the current room

Parameters

NameTypeDescription
peerIdUInt64id of peer
mediaIdUInt16id of output media
decoderMediaDecoderoutput object or null

Returns

TypeDescription
Booleantrue on decoder found or false

GetOrCreateDecoder(peerId, mediaId, samplerate, stereo, decoder)

public bool GetOrCreateDecoder(ulong peerId, ushort mediaId, uint samplerate, bool stereo, out MediaDecoder decoder)

Get a decoder from RemotePeers by id. If the decoder is not found create a new one that will be added to the Peer

Parameters

NameTypeDescription
peerIdUInt64id of peer
mediaIdUInt16id of output media
samplerateUInt32custom samplerate
stereoBooleancustom stereo flag
decoderMediaDecoderoutput object or null

Returns

TypeDescription
Booleantrue on decoder found or false