コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            NavigationController.NavigationBarHidden = true;
            RoomNameLabel.Text = AgoraSettings.Current.RoomName;
            BackgroundTap.ShouldRequireFailureOfGestureRecognizer(BackgroundDoubleTap);
            AgoraDelegate = new AgoraRtcDelegate(this);
            AgoraKit      = AgoraRtcEngineKit.SharedEngineWithAppIdAndDelegate(AgoraTestConstants.AgoraAPI, AgoraDelegate);
            AgoraKit.SetChannelProfile(ChannelProfile.Communication);
            AgoraKit.EnableVideo();
            //var profile = AgoraSettings.Current.UseMySettings ? AgoraSettings.Current.Profile.ToAgoraRtcVideoProfile() : DT.Xamarin.Agora.VideoProfile.Default;
            //AgoraKit.SetVideoProfile(profile, false);

            //AgoraRtcVideoCanvas videoCanvas = new AgoraRtcVideoCanvas();
            //videoCanvas.Uid = 0;
            //videoCanvas.View = LocalView;
            //LocalView.Hidden = false;
            //videoCanvas.RenderMode = VideoRenderMode.Adaptive;
            //AgoraKit.SetupLocalVideo(videoCanvas);

            if (!string.IsNullOrEmpty(AgoraSettings.Current.EncryptionPhrase))
            {
                AgoraKit.SetEncryptionMode(AgoraSettings.Current.EncryptionType.GetModeString());
                AgoraKit.SetEncryptionSecret(AgoraSettings.Current.EncryptionPhrase);
            }
            AgoraKit.StartPreview();
            Join();
        }
コード例 #2
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     NavigationController.NavigationBarHidden = true;
     RoomNameLabel.Text = OpentokSettings.Current.RoomName;
     BackgroundTap.ShouldRequireFailureOfGestureRecognizer(BackgroundDoubleTap);
     BusyIndicatorView.StartAnimating();
     _opentokService = OpentokStreamingService.Instance;
     StartSessionAsync();
     _opentokService.OnPublishStarted += () => { VideoMuted = false; };
     _opentokService.OnSessionEnded   += () => { LeaveChannel(); };
 }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            NavigationController.NavigationBarHidden = true;
            RoomNameLabel.Text = AgoraSettings.Current.RoomName;
            BackgroundTap.ShouldRequireFailureOfGestureRecognizer(BackgroundDoubleTap);

            RtmService.Instance.OnSignalReceived += OnSignalReceived;
            RtmService.Instance.OnJoinChannel    += OnJoinChannel;

            InitAgoraRtc();
            JoinRtc();
            JoinRtm();
        }