Skip to content

Instantly share code, notes, and snippets.

@zintus
Created March 6, 2017 11:57
Show Gist options
  • Save zintus/fa8dbe58f2eb75d46fc923dd272685dc to your computer and use it in GitHub Desktop.
Save zintus/fa8dbe58f2eb75d46fc923dd272685dc to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections.Generic;
using Voximplant;
public class Conference : MonoBehaviour
{
VoximplantSDK vox;
public GameObject quad;
void Start()
{
vox = gameObject.AddVoximplantSDK();
vox.init(granted => {
if (granted) vox.connect();
});
vox.LogMethod += Debug.Log;
vox.ConnectionSuccessful += () => {
vox.login(new LoginClassParam("test11@videochat.yulia.voximplant.com", "testpass"));
};
vox.LoginSuccessful += name => {
vox.call(new CallClassParam("test10", true, false, ""));
};
vox.CallConnected += (id, headers) => {
vox.beginUpdatingTextureWithVideoStream(VoximplantSDK.VideoStream.Remote, texture => {
quad.GetComponent<MeshRenderer>().material.mainTexture = texture;
});
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment