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(); }
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(); }; }
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(); }
void ReleaseDesignerOutlets() { if (BackgroundDoubleTap != null) { BackgroundDoubleTap.Dispose(); BackgroundDoubleTap = null; } if (BackgroundTap != null) { BackgroundTap.Dispose(); BackgroundTap = null; } if (ContainerView != null) { ContainerView.Dispose(); ContainerView = null; } if (EndCallButton != null) { EndCallButton.Dispose(); EndCallButton = null; } if (LocalVideoHeight != null) { LocalVideoHeight.Dispose(); LocalVideoHeight = null; } if (LocalVideoWidth != null) { LocalVideoWidth.Dispose(); LocalVideoWidth = null; } if (LocalView != null) { LocalView.Dispose(); LocalView = null; } if (MutedView != null) { MutedView.Dispose(); MutedView = null; } if (RoomNameLabel != null) { RoomNameLabel.Dispose(); RoomNameLabel = null; } if (SwitchCamButton != null) { SwitchCamButton.Dispose(); SwitchCamButton = null; } if (ToggleAudioButton != null) { ToggleAudioButton.Dispose(); ToggleAudioButton = null; } if (ToggleCamButton != null) { ToggleCamButton.Dispose(); ToggleCamButton = null; } if (DebugData != null) { DebugData.Dispose(); DebugData = null; } }