Commit 737fa9bc authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Disabled video button while call is not running

parent 3f93f6b5
......@@ -20,7 +20,7 @@
<Label x:Name="call_status" HorizontalOptions="Center" />
<Label x:Name="call_stats" HorizontalOptions="Center" />
<Button x:Name="video" Text="Start Video" Clicked="OnVideoClicked" HorizontalOptions="Center" />
<Button x:Name="video" Text="Start Video" Clicked="OnVideoClicked" HorizontalOptions="Center" IsEnabled="False" />
<StackLayout Orientation="Horizontal" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<Button x:Name="logs" Text="Upload Logs" Clicked="onUploadLogsCliked" HorizontalOptions="Center" />
<Label x:Name="logsUrl" Text="" HorizontalOptions="Center" />
......
......@@ -49,6 +49,8 @@ namespace Xamarin
if (lc.CallsNb > 0)
{
video.IsEnabled = state == CallState.StreamsRunning;
if (state == CallState.IncomingReceived)
{
call.Text = "Answer Call (" + lcall.RemoteAddressAsString + ")";
......@@ -68,6 +70,7 @@ namespace Xamarin
}
else
{
video.IsEnabled = false;
call.Text = "Start Call";
call_stats.Text = "";
}
......
Markdown is supported
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