diff --git a/RingD.cpp b/RingD.cpp index 9f6c6acdc45fdd6dd562775b9b5f3c9b79546be9..07a5988e2093a38641cd74d34f757f0fc547bf80 100644 --- a/RingD.cpp +++ b/RingD.cpp @@ -434,6 +434,21 @@ RingD::registerCallbacks() audioMuted(callId, state); })); }), + DRing::exportable_callback<DRing::CallSignal::VideoMuted>([this]( + const std::string& callId, + bool state) + { + // why this cllaback exist ? why are we not using stateChange ? + MSG_("<VideoMuted>"); + MSG_("callId = " + callId); + MSG_("state = " + Utils::toString(state.ToString())); + + CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync( + CoreDispatcherPriority::High, ref new DispatchedHandler([=]() + { + videoMuted(callId, state); + })); + }), DRing::exportable_callback<DRing::CallSignal::StateChange>([this]( const std::string& callId, const std::string& state, diff --git a/RingD.h b/RingD.h index 05f89353ef2828d388b4d2049cb8e1d95db3402d..c7c727d6f8aa89eda92f37f490da3542a83aedf5 100644 --- a/RingD.h +++ b/RingD.h @@ -45,6 +45,7 @@ delegate void RegistrationStateRegistered(); delegate void SetLoadingStatusText(String^ statusText, String^ color); delegate void CallsListRecieved(const std::vector<std::string>& callsList); delegate void AudioMuted(const std::string& callId, bool state); +delegate void VideoMuted(const std::string& callId, bool state); delegate void NameRegistred(bool status); delegate void VolatileDetailsChanged(const std::string& accountId, const std::map<std::string, std::string>& details); @@ -162,6 +163,7 @@ internal: event SetLoadingStatusText^ setLoadingStatusText; event CallsListRecieved^ callsListRecieved; // est implemente a la base pour regler le probleme du boutton d'appel qui est present lorsqu'un appel est en cours, mais il n'est pas utilise. Voir si ca peut servir a autre chose event AudioMuted^ audioMuted; + event VideoMuted^ videoMuted; event NameRegistred^ nameRegistred; event VolatileDetailsChanged^ volatileDetailsChanged; diff --git a/VideoPage.xaml b/VideoPage.xaml index 7f0df4f1c66c404c780a0b15f0f27f4e94dab00a..5a13ca7bf3df281b0b0e97fbd55953db7fbe8a39 100644 --- a/VideoPage.xaml +++ b/VideoPage.xaml @@ -341,12 +341,26 @@ </TextBlock> </Grid> </Button> + <!--Tapped="_btnVideo__Tapped"--> <Button x:Name="_btnVideo_" PointerEntered="btnAny_entered" PointerExited="btnAny_exited" - Click="_btnVideo__Click" - Tapped="_btnVideo__Tapped"> - <SymbolIcon Symbol="Video"/> + Click="_btnVideo__Click"> + <Grid> + <SymbolIcon Symbol="Video"/> + <TextBlock x:Name="_txbkVideoMuted_" + Text="" + FontSize="16" + IsHitTestVisible="True" + Visibility="Collapsed" + Foreground="Red" + FontWeight="Bold" + FontFamily="Segoe MDL2 Assets"> + <TextBlock.RenderTransform> + <TranslateTransform X="1" Y="2"/> + </TextBlock.RenderTransform> + </TextBlock> + </Grid> </Button> <Button x:Name="_btnMemo_" PointerEntered="btnAny_entered" diff --git a/VideoPage.xaml.cpp b/VideoPage.xaml.cpp index 5fbd6a22f397aeb740adcf31b5173101c421825f..c2129907c70524dddd49c6d5ec5638ee15baf2b1 100644 --- a/VideoPage.xaml.cpp +++ b/VideoPage.xaml.cpp @@ -151,6 +151,7 @@ VideoPage::VideoPage() VideoManager::instance->captureManager()->startPreviewing += ref new RingClientUWP::StartPreviewing(this, &RingClientUWP::Views::VideoPage::OnstartPreviewing); VideoManager::instance->captureManager()->stopPreviewing += ref new RingClientUWP::StopPreviewing(this, &RingClientUWP::Views::VideoPage::OnstopPreviewing); RingD::instance->audioMuted += ref new RingClientUWP::AudioMuted(this, &RingClientUWP::Views::VideoPage::OnaudioMuted); + RingD::instance->videoMuted += ref new RingClientUWP::VideoMuted(this, &RingClientUWP::Views::VideoPage::OnvideoMuted); } void @@ -458,3 +459,10 @@ void RingClientUWP::Views::VideoPage::OnaudioMuted(const std::string &callId, bo _txbkMicrophoneMuted_->Visibility = (state) ? Windows::UI::Xaml::Visibility::Visible : Windows::UI::Xaml::Visibility::Collapsed; } + + +void RingClientUWP::Views::VideoPage::OnvideoMuted(const std::string &callId, bool state) +{ + _txbkVideoMuted_->Visibility = (state) ? Windows::UI::Xaml::Visibility::Visible + : Windows::UI::Xaml::Visibility::Collapsed; +} diff --git a/VideoPage.xaml.h b/VideoPage.xaml.h index 7b306d15175482497c5bb32efd5745c268dbcc73..ffd567a6075db204c2491fdba553f620d21659a7 100644 --- a/VideoPage.xaml.h +++ b/VideoPage.xaml.h @@ -124,6 +124,7 @@ private: void OnstopPreviewing(); void _btnMicrophone__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); void OnaudioMuted(const std::string &callId, bool state); + void OnvideoMuted(const std::string &callId, bool state); }; } } \ No newline at end of file