Created
March 6, 2017 11:57
-
-
Save zintus/fa8dbe58f2eb75d46fc923dd272685dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("[email protected]", "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