The Huddle Unity WebGL Plugin SDK provides a process and method for seamless integration of real-time audio and video in Unity

QuickStart

Installing the package

To get started with the Huddle01 Unity Webgl Plugin, you can download the unitypackage from here

Import the unitypackage file in your project include all the files mentioned in below image:

HuddlePackage_01.PNG

Initializing Huddle01

To initialize the Huddle01, you need to call Huddle01Init.Instance.Init method

using UnityEngine;
using Huddle01;

public class AudioVideoMeet : MonoBehaviour
{
		void Start()
    {
        Huddle01Init.Instance.Init("Your_project_id");
        Debug.Log("Huddle01 Initiated");
    }
}

Join Room

After initializing Huddle01 plugin, you can call join room function and subscribe to OnJoinRoom Event

private void OnEnable()
{
    Huddle01Init.OnJoinRoom += OnJoinRoom;
}

private void OnDisable()
{
    Huddle01Init.OnJoinRoom -= OnJoinRoom;  
}

public void JoinRoom(string roomId,string token)
{
    Huddle01Init.Instance.JoinRoom(roomId, token);
}

private void OnJoinRoom()
{
    Debug.Log("Room Joined");
}

Methods:

Room:

Methods: