Audio

MuteMic(bool shouldMute, PeerMetadata metadata)

To mute microphone, call MuteMic function. It takes the bool and PeerMetadata as param. Keep that in mind, in case you want to make some changes in class PeerMetadata you need to make some changes in HuddleWebglPlugin.jslib accordingly.

Parameters

ParamsTypeDescription
shouldMuteboolsetting mute status of peer
metadataPeerMetadatacustom class object to store metadata of peer
.csharp
public void MuteMic(bool shouldMute,PeerMetadata metadata)
{
    Huddle01Core.Instance.MuteMic(shouldMute, metadata);
}

Huddel01Core.PeerMuted(string peerId, bool isMuted)

This event gets invoked when any peer toggle their audio. Subcribe to this event to receive notification.

Parameters

ParamsTypeDescription
peerIdstringpeer id
isMutedboolmic status, true if muted
.csharp
private void OnEnable()
{
    Huddle01Core.PeerMuted += OnPeerMute;
}    
 
private void OnDisable()
{
    Huddle01Core.PeerMuted -= OnPeerMute;
}
 
private void OnPeerMute(string peerId,bool isMuted)
{
    Debug.Log($"{peerId} : {isMuted}");
}
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.