Skip to main content
Version: 1.x

Class Peer

Client/Remote peer

Declaration
public class Peer : IDisposable

Properties

Id

Peer id

Declaration
public ulong Id { get; }

RoomName

Associated room name of this peer

Declaration
public string RoomName { get; }

UserId

Peers user id

Declaration
public string UserId { get; }

UserData

Peer userdata

Declaration
public UserData UserData { get; }

Medias

Associated medias of this peer

Declaration
public MediaCollection Medias { get; }

Methods

AddMedia(PlaybackStream)

Associate a media with the peer

Declaration
public void AddMedia(PlaybackStream stream)
Parameters
TypeNameDescription
Global.PlaybackStreamstreammedia stream

RemoveMedia(long)

Remove a associated media from the peer

Declaration
public bool RemoveMedia(long mediaStreamId)
Returns

System.Boolean

Parameters
TypeNameDescription
System.Int64mediaStreamIdstream handle id

GetMediaStreamIds()

Get a copy of all ids of OdinNative.Odin.Media.MediaStream from this peer

Declaration
public List<long> GetMediaStreamIds()
Returns

Global.List<System.Int64>: MediaStreamIds### ToString() Debug

Declaration
public override string ToString()
Returns

System.String: info### Dispose(bool) Free peer with all associated medias

Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

~Peer()

Default deconstructor

Declaration
protected ~Peer()

Dispose()

Free peer with all associated medias

Declaration
public void Dispose()