private void Screen_Loaded(object sender, RoutedEventArgs e)
        {
            trtcCloud = ITRTCCloud.getTRTCShareInstance();
            Log.I(String.Format(" SDKVersion : {0}", trtcCloud.getSDKVersion()));
            trtcCloud.addCallback(this);

            TRTCParams trtcParams = new TRTCParams();

            trtcParams.sdkAppId      = GenerateTestUserSig.SDKAPPID;
            trtcParams.roomId        = (uint)m_nPeerMachineGUID;
            trtcParams.userId        = $"ctrl_{m_nMachineGUID}";
            trtcParams.userSig       = GenerateTestUserSig.GetInstance().GenTestUserSig(trtcParams.userId);
            trtcParams.privateMapKey = "";
            trtcParams.businessInfo  = "";
            trtcParams.role          = TRTCRoleType.TRTCRoleAnchor;

            TRTCVideoEncParam   encParams = DataManager.GetInstance().videoEncParams; // 视频编码参数设置
            TRTCNetworkQosParam qosParams = DataManager.GetInstance().qosParams;      // 网络流控相关参数设置

            trtcCloud.setVideoEncoderParam(ref encParams);
            trtcCloud.setNetworkQosParam(ref qosParams);

            // 用户进房
            trtcCloud.enterRoom(ref trtcParams, TRTCAppScene.TRTCAppSceneVideoCall);
        }
Exemple #2
0
        private void EnterSelfRoom()
        {
            if (trtcCloud == null)
            {
                trtcCloud = ITRTCCloud.getTRTCShareInstance();
                Log.I(String.Format(" SDKVersion : {0}", trtcCloud.getSDKVersion()));
                trtcCloud.addCallback(this);

                TRTCParams trtcParams = new TRTCParams();
                trtcParams.sdkAppId      = GenerateTestUserSig.SDKAPPID;
                trtcParams.roomId        = (uint)m_nMachineGUID;
                trtcParams.userId        = "source";
                trtcParams.userSig       = GenerateTestUserSig.GetInstance().GenTestUserSig(trtcParams.userId);
                trtcParams.privateMapKey = "";
                trtcParams.businessInfo  = "";
                trtcParams.role          = TRTCRoleType.TRTCRoleAnchor;

                //trtcCloud.setVideoEncoderParam();

                // 用户进房
                TRTCVideoEncParam   encParams = DataManager.GetInstance().videoEncParams; // 视频编码参数设置
                TRTCNetworkQosParam qosParams = DataManager.GetInstance().qosParams;      // 网络流控相关参数设置
                trtcCloud.setVideoEncoderParam(ref encParams);
                trtcCloud.setSubStreamEncoderParam(ref encParams);
                trtcCloud.setNetworkQosParam(ref qosParams);

                trtcCloud.enterRoom(ref trtcParams, TRTCAppScene.TRTCAppSceneVideoCall);
            }
        }
 public static GenerateTestUserSig GetInstance()
 {
     if (mInstance == null)
     {
         mInstance = new GenerateTestUserSig();
     }
     return(mInstance);
 }