예제 #1
0
        /// <summary>
        /// 回应音视频通话邀请
        /// </summary>
        /// <param name="channel_id">音视频通话通道id</param>
        /// <param name="accept">true 接受,false 拒绝</param>
        /// <param name="info">json扩展封装类,见NIMVChatInfo</param>
        /// <returns>bool true 调用成功,false 调用失败(可能channel_id无匹配,如要接起另一路通话前先结束当前通话)</returns>
        public static bool CalleeAck(long channel_id, bool accept, NIMVChatInfo info)
        {
            if (info == null)
            {
                info = new NIMVChatInfo();
            }
            string json_extension = info.Serialize();

            //string debug_info = string.Format("callee ack.cid:{0},accept:{1},info:{2}", channel_id, accept, json_extension);
            //System.Diagnostics.Debug.WriteLine(debug_info);
            return(VChatNativeMethods.nim_vchat_callee_ack(channel_id, accept, json_extension, IntPtr.Zero));
        }
예제 #2
0
        /// <summary>
        /// 回应音视频通话邀请
        /// </summary>
        /// <param name="channel_id">音视频通话通道id</param>
        /// <param name="accept">true 接受,false 拒绝</param>
        /// <param name="info">json扩展封装类,见NIMVChatInfo</param>
        /// <returns>bool true 调用成功,false 调用失败(可能channel_id无匹配,如要接起另一路通话前先结束当前通话)</returns>
        public static bool CalleeAck(long channel_id, bool accept, NIMVChatInfo info)
        {
#if NIMAPI_UNDER_WIN_DESKTOP_ONLY || UNITY_STANDALONE_WIN
            if (info == null)
            {
                info = new NIMVChatInfo();
            }
            string json_extension = info.Serialize();
            return(VChatNativeMethods.nim_vchat_callee_ack(channel_id, accept, json_extension, IntPtr.Zero));
#else
            return(false);
#endif
        }
예제 #3
0
        /// <summary>
        /// 回应音视频通话邀请
        /// </summary>
        /// <param name="channel_id">音视频通话通道id</param>
        /// <param name="accept">true 接受,false 拒绝</param>
        /// <param name="json_extension">接起时有效 参数可选 如{"custom_video":0, "custom_audio":0}</param>
        /// <returns></returns>
        public static bool CalleeAck(long channel_id, bool accept, NIMVChatInfo info)
        {
            string json_extension = info.Serialize();

            return(VChatNativeMethods.nim_vchat_callee_ack(channel_id, accept, json_extension, IntPtr.Zero));
        }