Commit f11cbec8 authored by Nicolas Jager's avatar Nicolas Jager
Browse files

video : add icon for muted video

Change-Id: Iba4f3c03c0fb833d4e4caf19fc5d1218f9937a78
Tuleap: #790
parent c680e4f0
...@@ -434,6 +434,21 @@ RingD::registerCallbacks() ...@@ -434,6 +434,21 @@ RingD::registerCallbacks()
audioMuted(callId, state); 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]( DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
const std::string& callId, const std::string& callId,
const std::string& state, const std::string& state,
......
...@@ -45,6 +45,7 @@ delegate void RegistrationStateRegistered(); ...@@ -45,6 +45,7 @@ delegate void RegistrationStateRegistered();
delegate void SetLoadingStatusText(String^ statusText, String^ color); delegate void SetLoadingStatusText(String^ statusText, String^ color);
delegate void CallsListRecieved(const std::vector<std::string>& callsList); delegate void CallsListRecieved(const std::vector<std::string>& callsList);
delegate void AudioMuted(const std::string& callId, bool state); 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 NameRegistred(bool status);
delegate void VolatileDetailsChanged(const std::string& accountId, const std::map<std::string, std::string>& details); delegate void VolatileDetailsChanged(const std::string& accountId, const std::map<std::string, std::string>& details);
...@@ -162,6 +163,7 @@ internal: ...@@ -162,6 +163,7 @@ internal:
event SetLoadingStatusText^ setLoadingStatusText; 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 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 AudioMuted^ audioMuted;
event VideoMuted^ videoMuted;
event NameRegistred^ nameRegistred; event NameRegistred^ nameRegistred;
event VolatileDetailsChanged^ volatileDetailsChanged; event VolatileDetailsChanged^ volatileDetailsChanged;
......
...@@ -341,12 +341,26 @@ ...@@ -341,12 +341,26 @@
</TextBlock> </TextBlock>
</Grid> </Grid>
</Button> </Button>
<!--Tapped="_btnVideo__Tapped"-->
<Button x:Name="_btnVideo_" <Button x:Name="_btnVideo_"
PointerEntered="btnAny_entered" PointerEntered="btnAny_entered"
PointerExited="btnAny_exited" PointerExited="btnAny_exited"
Click="_btnVideo__Click" Click="_btnVideo__Click">
Tapped="_btnVideo__Tapped"> <Grid>
<SymbolIcon Symbol="Video"/> <SymbolIcon Symbol="Video"/>
<TextBlock x:Name="_txbkVideoMuted_"
Text="&#xE25B;"
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>
<Button x:Name="_btnMemo_" <Button x:Name="_btnMemo_"
PointerEntered="btnAny_entered" PointerEntered="btnAny_entered"
......
...@@ -151,6 +151,7 @@ VideoPage::VideoPage() ...@@ -151,6 +151,7 @@ VideoPage::VideoPage()
VideoManager::instance->captureManager()->startPreviewing += ref new RingClientUWP::StartPreviewing(this, &RingClientUWP::Views::VideoPage::OnstartPreviewing); 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); 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->audioMuted += ref new RingClientUWP::AudioMuted(this, &RingClientUWP::Views::VideoPage::OnaudioMuted);
RingD::instance->videoMuted += ref new RingClientUWP::VideoMuted(this, &RingClientUWP::Views::VideoPage::OnvideoMuted);
} }
void void
...@@ -458,3 +459,10 @@ void RingClientUWP::Views::VideoPage::OnaudioMuted(const std::string &callId, bo ...@@ -458,3 +459,10 @@ void RingClientUWP::Views::VideoPage::OnaudioMuted(const std::string &callId, bo
_txbkMicrophoneMuted_->Visibility = (state) ? Windows::UI::Xaml::Visibility::Visible _txbkMicrophoneMuted_->Visibility = (state) ? Windows::UI::Xaml::Visibility::Visible
: Windows::UI::Xaml::Visibility::Collapsed; : 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;
}
...@@ -124,6 +124,7 @@ private: ...@@ -124,6 +124,7 @@ private:
void OnstopPreviewing(); void OnstopPreviewing();
void _btnMicrophone__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); void _btnMicrophone__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void OnaudioMuted(const std::string &callId, bool state); void OnaudioMuted(const std::string &callId, bool state);
void OnvideoMuted(const std::string &callId, bool state);
}; };
} }
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment