private void button_join_api_Click(object sender, RoutedEventArgs e)
        {
            RegisterCallBack();
            ZOOM_SDK_DOTNET_WRAP.JoinParam param = new ZOOM_SDK_DOTNET_WRAP.JoinParam();
            param.userType = ZOOM_SDK_DOTNET_WRAP.SDKUserType.SDK_UT_WITHOUT_LOGIN;
            ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin join_api_param = new ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin();
            join_api_param.meetingNumber = 4186893292;
            join_api_param.userName      = textBox_username_api.Text;
            param.withoutloginJoin       = join_api_param;

            ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().Join(param);
            if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
            {
                Hide();
                var res = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAudioRawDataChannelWrap().Start(RawDataMemoryMode.RawDataMemoryMode_Stack, new TestReceiver());
                Console.WriteLine($"Raw data channel start with {res}");
                CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingAudioController()
                .Add_CB_onUserActiveAudioChange((list) =>
                {
                    if (list == null || list.Length == 0)
                    {
                        return;
                    }
                    var users = list.Select(userId => CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingParticipantsController().GetUserByUserID(userId));

                    var usernames = users.Select(u => u.GetUserNameW());
                    Console.WriteLine($"Active speakers: {string.Join(" ", usernames)}");
                });
            }
            else//error handle
            {
            }
        }
Exemplo n.º 2
0
        private void button_join_api_Click(object sender, RoutedEventArgs e)
        {
            if (textBox_DisplayName.Text.Length == 0)
            {
                MessageBox.Show("Please fill in a display name",
                                "Error",
                                MessageBoxButton.OK,
                                MessageBoxImage.Warning);
                return;
            }



            if (settings.Participants.Count > 1)
            {
                this.userName = $"{textBox_DisplayName.Text} x {settings.Participants.Count}";
            }
            else
            {
                this.userName = $"{textBox_DisplayName.Text}";
            }
            ZOOM_SDK_DOTNET_WRAP.JoinParam param = new ZOOM_SDK_DOTNET_WRAP.JoinParam();
            param.userType = ZOOM_SDK_DOTNET_WRAP.SDKUserType.SDK_UT_WITHOUT_LOGIN;
            ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin join_api_param = new ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin();
            join_api_param.meetingNumber = UInt64.Parse(textBox_meetingnumber_api.Text);
            join_api_param.userName      = this.userName;
            join_api_param.isAudioOff    = true;
            join_api_param.isVideoOff    = true;
            param.withoutloginJoin       = join_api_param;

            ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().Join(param);
            if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
            {
                Hide();
            }
            else//error handle
            {
            }

            if (SDKError.SDKERR_SUCCESS == err)
            {
                feedback.Content = $"Joining Meeting {textBox_meetingnumber_api.Text}: {err}";
                Hide();
            }
            else//error handle
            {
                feedback.Content = $"Failed to join meeting {textBox_meetingnumber_api.Text}: {err}";
                Console.WriteLine(err);
            }
        }
        private void button_join_api_Click(object sender, RoutedEventArgs e)
        {
            RegisterCallBack();
            ZOOM_SDK_DOTNET_WRAP.JoinParam param = new ZOOM_SDK_DOTNET_WRAP.JoinParam();
            param.userType = ZOOM_SDK_DOTNET_WRAP.SDKUserType.SDK_UT_WITHOUT_LOGIN;
            ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin join_api_param = new ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin();
            join_api_param.meetingNumber = UInt64.Parse(textBox_meetingnumber_api.Text);
            join_api_param.userName      = textBox_username_api.Text;
            param.withoutloginJoin       = join_api_param;

            ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().Join(param);
            if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
            {
                Hide();
            }
            else//error handle
            {
            }
        }
Exemplo n.º 4
0
        private void JoinRoom(string meetingId)
        {
            RegisterCallBack();
            ZOOM_SDK_DOTNET_WRAP.JoinParam param = new ZOOM_SDK_DOTNET_WRAP.JoinParam();
            param.userType = ZOOM_SDK_DOTNET_WRAP.SDKUserType.SDK_UT_WITHOUT_LOGIN;
            ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin join_api_param = new ZOOM_SDK_DOTNET_WRAP.JoinParam4WithoutLogin();
            join_api_param.meetingNumber = UInt64.Parse(meetingId);
            join_api_param.userName      = "******";
            param.withoutloginJoin       = join_api_param;

            // Settings to disable video and audio on join and minimize screen
            ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetSettingServiceWrap()
            .GetVideoSettings().EnableAutoTurnOffVideoWhenJoinMeeting(true);
            ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetSettingServiceWrap()
            .GetAudioSettings().EnableAutoJoinAudio(true);
            ZOOM_SDK_DOTNET_WRAP.SDKError err = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().Join(param);

            if (ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS == err)
            {
                _receiver = new RevAudioReceiver();
                var res = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAudioRawDataChannelWrap().Start(RawDataMemoryMode.RawDataMemoryMode_Stack, _receiver);
                Console.WriteLine($"Raw data channel start with {res}");
                //CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingAudioController()
                //    .Add_CB_onUserActiveAudioChange((list) =>
                //    {
                //        if (list == null || list.Length == 0)
                //        {
                //            return;
                //        }
                //        var users = list.Select(userId => CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().GetMeetingParticipantsController().GetUserByUserID(userId));

                //        var usernames = users.Select(u => u.GetUserNameW());
                //        Console.WriteLine($"Active speakers: {string.Join(" ", usernames)}");
                //    });
            }
            else//error handle
            {
            }
        }