Skip to content

Instantly share code, notes, and snippets.

@rdelrosario
Created October 19, 2021 14:24
Show Gist options
  • Save rdelrosario/a35f85548ce18f35c9c94fffadea9a43 to your computer and use it in GitHub Desktop.
Save rdelrosario/a35f85548ce18f35c9c94fffadea9a43 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
...>
<Label
Text="{Binding Position, StringFormat='{}{0:hh\\:mm\\:ss}'}"/>
<controls:VideoPlayer
AutoPlay="{Binding CanAutoPlay}"
Command="{Binding VideoActionCommand}"
Position="{Binding Position, Mode=TwoWay}"
Source="https://sec.ch9.ms/ch9/5d93/a1eab4bf-3288-4faf-81c4-294402a85d93/XamarinShow_mid.mp4"/>
<StackLayout
HorizontalOptions="CenterAndExpand"
Orientation="Horizontal">
<Button
Command="{Binding TriggerCommand}"
CommandParameter="{x:Static local:VideoTrigger.Play}"
IsVisible="{Binding CanPlay}" />
<Button
Command="{Binding TriggerCommand}"
CommandParameter="{x:Static local:VideoTrigger.Pause}"
IsVisible="{Binding CanPause}" />
<Button
Command="{Binding TriggerCommand}"
CommandParameter="{x:Static local:VideoTrigger.Stop}"
IsVisible="{Binding CanStop}"/>
<Button
Command="{Binding TriggerCommand}"
CommandParameter="{x:Static local:VideoTrigger.Rewind}"
IsVisible="{Binding CanStop}" />
<Button
Command="{Binding TriggerCommand}"
CommandParameter="{x:Static local:VideoTrigger.Forward}"
IsVisible="{Binding CanStop}" />
</StackLayout>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment