aca479888a
In order to write an equivalent tutorial for Xamarin, I am first following the UWP tutorial. Fixed many little spelling mistakes and rephrased some sentences. Fixed a crash when video is requested but the device has no camera. Fixed a crash when opening an audio recording. (Linphone.Content.FilePath returns a path with mixed '/' and '\'. I don't know why and I'm not sure I understand why the file was auto-downloaded either)
72 lines
3.4 KiB
XML
72 lines
3.4 KiB
XML
<Page
|
|
x:Class="_05_FileTransfer.Views.CallsPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}" Padding="10">
|
|
<TextBlock x:Name="HelloText" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Hello " />
|
|
</Border>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" VerticalAlignment="Center" Margin="20">
|
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock Text="URI to call : " />
|
|
<TextBox x:Name="UriToCall" Width="350" MinWidth="350" MaxWidth="350" Text="sip:" />
|
|
</StackPanel>
|
|
|
|
<Button x:Name="CallButton" Content="Call" Click="CallClick" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5" />
|
|
|
|
<TextBlock x:Name="CallText" Text="Your call state is : Idle" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" />
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
|
<Button x:Name="HangUp" Content="Hang up" Click="OnHangUpClicked" IsEnabled="False" />
|
|
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False" />
|
|
<Button x:Name="Camera" Content="Switch on Camera" Click="CameraClick" IsEnabled="False" />
|
|
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1" x:Name="VideoGrid" Canvas.ZIndex="-1" Background="Black" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3" />
|
|
|
|
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3">
|
|
</SwapChainPanel>
|
|
</Grid>
|
|
|
|
<StackPanel Grid.Row="2" x:Name="IncomingCallStackPanel" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="10">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock Text="You have a call from :" />
|
|
<TextBlock x:Name="IncommingCallText" Text="" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<Button x:Name="Answer" Content="Answer" Click="AnswerClick" />
|
|
<Button x:Name="Decline" Content="Decline" Click="DeclineClick" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Page> |