Пример #1
0
        /// <summary>
        /// 音视频通话重新连接,用于底层链接在上层认为异常时尝试重连
        /// </summary>
        /// <param name="json_extension">可扩展添加kNIMVChatSessionId,用于指定对应的通话</param>
        /// <param name="cb">操作结果的回调函数,当通话通话不存在或通话</param>
        public static void NIMVChatRelogin(string sessionid, NIMVChatOptHandler cb)
        {
            NIMVChatInfo vchatinfo = new NIMVChatInfo();

            vchatinfo.SessionId = sessionid;
            string json_extension = vchatinfo.Serialize();
            var    ptr            = NimUtility.DelegateConverter.ConvertToIntPtr(cb);

            VChatNativeMethods.nim_vchat_relogin(json_extension, VChatNormalOptCb, ptr);
        }
Пример #2
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(nim_vchat_callee_ack(channel_id, accept, json_extension, IntPtr.Zero));
        }
Пример #3
0
        /// <summary>
        /// 启动通话
        /// </summary>
        /// <param name="mode">启动音视频通话类型</param>
        /// <param name="json_extension">扩展,kNIMVChatUids成员id列表(必填),其他可选 如{"uids":["uid_temp"],"custom_video":0, "custom_audio":0}</param>
        /// <returns></returns>
        public static bool Start(NIMVideoChatMode mode, NIMVChatInfo info)
        {
            string json_extension = info.Serialize();

            return(nim_vchat_start(mode, null, null, json_extension, IntPtr.Zero));
        }