示例#1
0
        private void dllJoinChannel(AuthInfo autoinfo)
        {
            ImportDll.joinResultCB = new ImportDll.setJoinResultCB(OnJoinResult);
            ImportDll.setJoinResultCallBack(ImportDll.joinResultCB);

            ImportDll.RemoteUserOnLineNotifyCB = new ImportDll.setRemoteUserOnLineNotifyCB(onRemoteUserOnLineNotify);
            ImportDll.setRemoteUserOnLineNotifyCallBack(ImportDll.RemoteUserOnLineNotifyCB);
            ImportDll.RemoteUserOffLineNotifyCB = new ImportDll.setRemoteUserOffLineNotifyCB(onRemoteUserOffLineNotify);
            ImportDll.setRemoteUserOffLineNotifyCallBack(ImportDll.RemoteUserOffLineNotifyCB);
            ImportDll.SubscribeChangedNotifyCB = new ImportDll.setSubscribeChangedNotifyCB(onSubscribeChangedNotify);
            ImportDll.setSubscribeChangedNotifyCallBack(ImportDll.SubscribeChangedNotifyCB);
            ImportDll.RemoteTrackAvailableNotifyCB = new ImportDll.setRemoteTrackAvailableNotifyCB(onRemoteTrackAvailableNotify);
            ImportDll.setRemoteTrackAvailableNotifyCallBack(ImportDll.RemoteTrackAvailableNotifyCB);

            ImportDll.ByeCB = new ImportDll.setByeCB(onBye);
            ImportDll.setByeCallBack(ImportDll.ByeCB);
            ImportDll.OccurErrorCB = new ImportDll.setOccurErrorCB(onOccurError);
            ImportDll.setOccurErrorCallBack(ImportDll.OccurErrorCB);


            ImportDll.setLogLevel(AliRtcLogLevel.AliRtcLogLevelInfo);
            ImportDll.setAutoPublishSubscribe(m_ParamInfo.bAutoPush, m_ParamInfo.bAutoSub);
            ImportDll.configLocalAudioPublish(m_ParamInfo.bPushAudio);
            ImportDll.configLocalCameraPublish(m_ParamInfo.bPushCamera);
            ImportDll.configLocalScreenPublish(m_ParamInfo.bPushScreen);
            ImportDll.configLocalSimulcast(true, AliRtcVideoTrack.AliRtcVideoTrackCamera);

            bool bRet = ImportDll.joinChannel(autoinfo.strChannel, autoinfo.strAppId, autoinfo.strUserId, autoinfo.strNonce, autoinfo.strToken, autoinfo.strGlsb, autoinfo.strUserName, autoinfo.iTimesTamp);

            if (bRet == false)
            {
                listBox_Tips.Items.Add("加入房间失败...");
            }
        }
示例#2
0
        private void checkScreen_CheckedChanged(object sender, EventArgs e)
        {
            if (!m_bInitialItem)
            {
                return;
            }
            m_ParamInfo.bPushScreen = mainFrm.checkScreen.Checked;
            ImportDll.configLocalScreenPublish(m_ParamInfo.bPushScreen);

            ImportDll.setPubResultCB PubResultCB;
            PubResultCB = new ImportDll.setPubResultCB(onPubResult);
            ImportDll.setPublishResultCallBack(PubResultCB);
            ImportDll.publish();
        }