Beispiel #1
0
        void OnLocalInvitationRefusedHandler(LocalInvitation localInvitation, string response)
        {
            string msg = string.Format("OnLocalInvitationRefused channel:{0}, callee:{1}", localInvitation.GetChannelId(), localInvitation.GetCalleeId());

            Debug.Log(msg);
            messageDisplay.AddTextToDisplay(msg, Message.MessageType.Info);
        }
Beispiel #2
0
        void OnLocalInvitationFailureHandler(LocalInvitation localInvitation, LOCAL_INVITATION_ERR_CODE errorCode)
        {
            string msg = string.Format("OnLocalInvitationFailure channel:{0}, callee:{1} error:{2}",
                                       localInvitation.GetChannelId(), localInvitation.GetCalleeId(), errorCode);

            Debug.Log(msg);
            messageDisplay.AddTextToDisplay(msg, Message.MessageType.Info);
        }
Beispiel #3
0
 void OnJoinSuccessHandler2(int id)
 {
     Debug.Log("client2  OnJoinSuccess --- id = " + id);
     rtmCallEventHandler = new RtmCallEventHandler();
     rtmCallEventHandler.OnLocalInvitationReceivedByPeer = OnLocalInvitationReceivedByPeerHandler;
     rtmCallEventHandler.OnRemoteInvitationReceived      = OnRemoteInvitationReceivedHandler;
     rtmCallManager  = rtmClient.GetRtmCallManager(rtmCallEventHandler);
     localInvitation = rtmCallManager.CreateLocalCallInvitation("222");
     rtmCallManager.SendLocalInvitation(localInvitation);
     localInvitation.SetChannelId("1212");
     localInvitation.SetContent("23232");
 }
Beispiel #4
0
        public void InvitePeer()
        {
            string peerUid = peerUserBox.text;

            if (string.IsNullOrEmpty(peerUid))
            {
                return;
            }
            // Creates LocalInvitation
            LocalInvitation invitation = callManager.CreateLocalCallInvitation(peerUid);

            invitation.SetChannelId(ChannelName);
            invitation.SetContent("Calling You...hello");
            // Sends call invitation
            int rc = callManager.SendLocalInvitation(invitation);

            Debug.Log("Send invitation to " + peerUid + " rc = " + rc);
        }
Beispiel #5
0
 void OnLocalInvitationReceivedByPeerHandler(LocalInvitation localInvitation)
 {
     Debug.Log("rtmCallManager  OnLocalInvitationReceivedByPeerHandler " + localInvitation.GetCalleeId() + "  " + localInvitation.GetChannelId());
 }