123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using LitJson;
- public class WSRtcHandler {
-
- public delegate void OnIceCandidateDelegate(JsonData data);
- public delegate void OnOfferDelegate(JsonData data);
- public delegate void OnAnswerDelegate(JsonData data);
- public delegate void OnSpeekingDelegate (JsonData data);
- public delegate void OnProhibitSpeekDelegate (JsonData data);
- public OnIceCandidateDelegate OnIceCandidate;
- public OnOfferDelegate OnOffer;
- public OnAnswerDelegate OnAnswer;
- public OnSpeekingDelegate OnSpeeking;
- public OnProhibitSpeekDelegate OnProhibitSpeek;
- public void IceCandidate (string socketId, string label, string id, string candidate)
- {
- }
- public void Offer(string socketId, string sdpType, string sdpDescription)
- {
- }
- public void Answer(string socketId, string sdpType, string sdpDescription)
- {
- }
- public void Speeking( bool isSpeeking)
- {
- }
- public void ProhibitSpeek(string socketId, bool canSpeek)
- {
- }
- public void OnMessageReceived(JsonData data)
- {
- }
- private void OnIceCandidateReceived(JsonData data)
- {
- if (OnIceCandidate != null) {
- OnIceCandidate (data);
- }
- }
- private void OnOfferReceived(JsonData data)
- {
- if (OnOffer != null) {
- OnOffer (data);
- }
- }
- private void OnAnswerReceived(JsonData data)
- {
- if (OnAnswer != null) {
- OnAnswer (data);
- }
- }
- private void OnSpeekingReceived(JsonData data)
- {
- }
- private void OnProhibitSpeekReceived(JsonData data)
- {
- }
- }
|