public ConversationViewModel(IClientChannel clientChannel,
                              IForegroundUpdateService foregroundUpdateService,
                              IVoipChannel voipChannel)
 {
     _clientChannel = clientChannel;
     _voipChannel = voipChannel;
     _foregroundUpdateService = foregroundUpdateService;
     foregroundUpdateService.OnRelayMessagesUpdated += OnRelayMessagesUpdated;
     foregroundUpdateService.OnVoipStateUpdate += OnVoipStateUpdate;
     foregroundUpdateService.OnFrameFormatUpdate += OnFrameFormatUpdate;
     foregroundUpdateService.OnFrameRateUpdate += OnFrameRateUpdate;
     SendInstantMessageCommand = new DelegateCommand(OnSendInstantMessageCommandExecute,
         OnSendInstantMessageCommandCanExecute);
     AudioCallCommand = new DelegateCommand(OnCallCommandExecute, OnCallCommandCanExecute);
     VideoCallCommand = new DelegateCommand(OnVideoCallCommandExecute, OnVideoCallCommandCanExecute);
     HangupCommand = new DelegateCommand(OnHangupCommandExecute, OnHangupCommandCanExecute);
     AnswerCommand = new DelegateCommand(OnAnswerCommandExecute, OnAnswerCommandCanExecute);
     RejectCommand = new DelegateCommand(OnRejectCommandExecute, OnRejectCommandCanExecute);
     CloseConversationCommand = new DelegateCommand(OnCloseConversationCommandExecute, () => _canCloseConversation);
     MuteMicrophoneCommand = new DelegateCommand(MuteMicCommandExecute, MicCommandCanExecute);
     UnMuteMicrophoneCommand = new DelegateCommand(UnMuteCommandExecute, MicCommandCanExecute);
     SwitchVideoCommand = new DelegateCommand(SwitchVideoCommandExecute, SwitchVideoCommandCanExecute);
     LayoutService.Instance.LayoutChanged += LayoutChanged;
     LayoutChanged(LayoutService.Instance.LayoutType);
     SetVideoPresenters();
 }
 public ConversationViewModel(IClientChannel clientChannel,
                              IForegroundUpdateService foregroundUpdateService,
                              IVoipChannel voipChannel)
 {
     _clientChannel           = clientChannel;
     _voipChannel             = voipChannel;
     _foregroundUpdateService = foregroundUpdateService;
     foregroundUpdateService.OnRelayMessagesUpdated += OnRelayMessagesUpdated;
     foregroundUpdateService.OnVoipStateUpdate      += OnVoipStateUpdate;
     foregroundUpdateService.OnFrameFormatUpdate    += OnFrameFormatUpdate;
     foregroundUpdateService.OnFrameRateUpdate      += OnFrameRateUpdate;
     SendInstantMessageCommand = new DelegateCommand(OnSendInstantMessageCommandExecute,
                                                     OnSendInstantMessageCommandCanExecute);
     AudioCallCommand                      = new DelegateCommand(OnCallCommandExecute, OnCallCommandCanExecute);
     VideoCallCommand                      = new DelegateCommand(OnVideoCallCommandExecute, OnVideoCallCommandCanExecute);
     HangupCommand                         = new DelegateCommand(OnHangupCommandExecute, OnHangupCommandCanExecute);
     AnswerCommand                         = new DelegateCommand(OnAnswerCommandExecute, OnAnswerCommandCanExecute);
     RejectCommand                         = new DelegateCommand(OnRejectCommandExecute, OnRejectCommandCanExecute);
     CloseConversationCommand              = new DelegateCommand(OnCloseConversationCommandExecute, () => _canCloseConversation);
     MuteMicrophoneCommand                 = new DelegateCommand(MuteMicCommandExecute, MicCommandCanExecute);
     UnMuteMicrophoneCommand               = new DelegateCommand(UnMuteCommandExecute, MicCommandCanExecute);
     SwitchVideoCommand                    = new DelegateCommand(SwitchVideoCommandExecute, SwitchVideoCommandCanExecute);
     LayoutService.Instance.LayoutChanged += LayoutChanged;
     LayoutChanged(LayoutService.Instance.LayoutType);
     SetVideoPresenters();
 }
 public SignalingClient(ISignalingSocketService signalingSocketService,
     IForegroundChannel foregroundChannel,
     IVoipChannel voipChannel)
 {
     _signalingSocketService = signalingSocketService;
     _voipChannel = voipChannel;
     _foregroundChannel = foregroundChannel;
     ServerChannelInvoker = new ChannelInvoker(this);
 }
Exemple #4
0
 public SignalingClient(ISignalingSocketService signalingSocketService,
                        IForegroundChannel foregroundChannel,
                        IVoipChannel voipChannel)
 {
     _signalingSocketService = signalingSocketService;
     _voipChannel            = voipChannel;
     _foregroundChannel      = foregroundChannel;
     ServerChannelInvoker    = new ChannelInvoker(this);
 }
        private void SetupVoipContext()
        {
            if (_voipChannel == null)
            {
                var renderResolver = new Func <IVideoRenderHelper>(() => new VideoRenderHelper());

                var voipCoordinator = new VoipCoordinator();
                _voipContext = new VoipContext(this, null, renderResolver, voipCoordinator);
                _voipChannel = new VoipChannel(this, null, _voipContext);
            }
            if (_mediaSettingsChannel == null)
            {
                _mediaSettingsChannel = new MediaSettingsChannel(this, null, _voipContext);
            }
        }
        public SettingsViewModel(IUnityContainer container,
                                 CoreDispatcher dispatcher)
        {
            _localSettings = ApplicationData.Current.LocalSettings;
            _dispatcher    = dispatcher;

            _mediaSettings = container.Resolve <IMediaSettingsChannel>();
            _voipChannel   = container.Resolve <IVoipChannel>();
            _ntpService    = container.Resolve <NtpService>();

            _ntpService.OnNTPSyncFailed    += handleNtpSynFailed;
            _ntpService.OnNTPTimeAvailable += handleNtpTimeSync;

            CloseCommand           = new DelegateCommand(OnCloseCommandExecute);
            SaveCommand            = new DelegateCommand(OnSaveCommandExecute);
            QuitAppCommand         = new DelegateCommand(OnQuitAppCommandExecute);
            DeleteIceServerCommand = new DelegateCommand <IceServerViewModel>(OnDeleteIceServerCommandExecute);
            AddIceServerCommand    = new DelegateCommand(OnAddIceServerCommandExecute);
        }
        public SettingsViewModel(IUnityContainer container,
                                 CoreDispatcher dispatcher)
        {
            _localSettings = ApplicationData.Current.LocalSettings;
            _dispatcher = dispatcher;

            _mediaSettings = container.Resolve<IMediaSettingsChannel>();
            _voipChannel = container.Resolve<IVoipChannel>();
            _ntpService = container.Resolve<NtpService>();

            _ntpService.OnNTPSyncFailed += handleNtpSynFailed;
            _ntpService.OnNTPTimeAvailable += handleNtpTimeSync;

            CloseCommand = new DelegateCommand(OnCloseCommandExecute);
            SaveCommand = new DelegateCommand(OnSaveCommandExecute);
            QuitAppCommand = new DelegateCommand(OnQuitAppCommandExecute);
            DeleteIceServerCommand = new DelegateCommand<IceServerViewModel>(OnDeleteIceServerCommandExecute);
            AddIceServerCommand = new DelegateCommand(OnAddIceServerCommandExecute);            
        }
 public ConversationViewModel(IClientChannel clientChannel,
                              IForegroundUpdateService foregroundUpdateService,
                              IVoipChannel voipChannel)
 {
     _clientChannel = clientChannel;
     _voipChannel = voipChannel;
     _foregroundUpdateService = foregroundUpdateService;
     foregroundUpdateService.OnRelayMessagesUpdated += OnRelayMessagesUpdated;
     foregroundUpdateService.OnVoipStateUpdate += OnVoipStateUpdate;
     foregroundUpdateService.OnFrameFormatUpdate += OnFrameFormatUpdate;
     SendInstantMessageCommand = new DelegateCommand(OnSendInstantMessageCommandExecute,
         OnSendInstantMessageCommandCanExecute);
     CallCommand = new DelegateCommand(OnCallCommandExecute, OnCallCommandCanExecute);
     VideoCallCommand = new DelegateCommand(OnVideoCallCommandExecute, OnVideoCallCommandCanExecute);
     HangupCommand = new DelegateCommand(OnHangupCommandExecute, OnHangupCommandCanExecute);
     AnswerCommand = new DelegateCommand(OnAnswerCommandExecute, OnAnswerCommandCanExecute);
     RejectCommand = new DelegateCommand(OnRejectCommandExecute, OnRejectCommandCanExecute);
     CloseConversationCommand = new DelegateCommand(OnCloseConversationCommandExecute);
     SwitchMicCommand = new DelegateCommand(SwitchMicCommandExecute, SwitchMicCommandCanExecute);
     SwitchVideoCommand = new DelegateCommand(SwitchVideoCommandExecute, SwitchVideoCommandCanExecute);
 }
Exemple #9
0
        private void SetupVoipContext()
        {
            if (_voipChannel == null)
            {
                var renderResolver = new Func<IVideoRenderHelper>(() => new VideoRenderHelper());

                var voipCoordinator = new VoipCoordinator();
                _voipContext = new VoipContext(this, null, renderResolver, voipCoordinator);
                _voipChannel = new VoipChannel(this, null, _voipContext);
            }
            if (_mediaSettingsChannel == null)
            {
                _mediaSettingsChannel = new MediaSettingsChannel(this, null, _voipContext);
            }
        }