Remote Peer

Huddle01Core.PeerAdded(string peerInfo);

This event gets invoked when any peer is added in the current room. Subscribe to this event to get the notification

Parameters

ParamTypeDescription
peerInfostringThe peer ID of the Remote Peer who has joined the room
.csharp
private void OnEnable()
{
    Huddle01Core.PeerAdded += OnPeerJoined;
}    
 
private void OnDisable()
{
    Huddle01Core.PeerAdded -= OnPeerJoined;
}
 
private void OnPeerJoined(string peerId)
{
    Debug.Log($"Peer Joined : {peerId}");
}
 

Huddle01Core.PeerLeft(string peerId);

This is called when any peer left current room. Subscribe to this event to get the notification

Parameters

ParamTypeDescription
peerIdstringThe peer ID of the Remote Peer who has left the room
.csharp
private void OnEnable()
{
    Huddle01Core.PeerLeft += OnPeerLeft;
}    
 
private void OnDisable()
{
    Huddle01Core.PeerLeft -= OnPeerLeft;
}
 
private void OnPeerLeft(string peerId)
{
    Debug.Log($"Peer left : {peerId}");
}
 

Huddle01Core.PeerMetadata(string peerMetadata)

This is called when any peer in the room update its metadata. Subscribe to this event to get the notification

Parameters

ParamTypeDescription
peerMetadatastringThe peer ID of the Remote Peer who has updated the metadata. Peerid is a part od metadata
.csharp
private void OnEnable()
{
    Huddle01Core.PeerMetadata += OnPeerMetaDataUpdated;
}    
 
private void OnDisable()
{
    Huddle01Core.PeerMetadata -= OnPeerMetaDataUpdated;
}
 
private void OnPeerMetaDataUpdated(PeerMetadata peerInfo)
{
    Debug.Log($"OnPeerMetaDataUpdated : {peerInfo.PeerId}");
}
 
Audio/Video Infrastructure designed for developers to empower them to ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.