diff --git a/projects/Demo/Demo/MainPage.xaml.cs b/projects/Demo/Demo/MainPage.xaml.cs index 877b3917..e7ef487a 100644 --- a/projects/Demo/Demo/MainPage.xaml.cs +++ b/projects/Demo/Demo/MainPage.xaml.cs @@ -29,7 +29,7 @@ namespace Demo e.Cancel = true; CrossLocalNotifications.Current.Show("title", e.Url); } - else if (e.Url.Contains("rtmp://")) + else if (e.Url.Contains("rtmp://") || e.Url.Contains(".flv") || e.Url.Contains(".m3u8")) { e.Cancel = true; this.Navigation.PushAsync(new OnvifPage(e.Url)); diff --git a/projects/Demo/Demo/OnvifPage.xaml b/projects/Demo/Demo/OnvifPage.xaml index 29395744..1a7aea31 100644 --- a/projects/Demo/Demo/OnvifPage.xaml +++ b/projects/Demo/Demo/OnvifPage.xaml @@ -3,11 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:shared="clr-namespace:LibVLCSharp.Forms.Shared;assembly=LibVLCSharp.Forms" x:Class="Demo.OnvifPage"> - - - - - - - + + + \ No newline at end of file diff --git a/projects/Demo/Demo/OnvifPage.xaml.cs b/projects/Demo/Demo/OnvifPage.xaml.cs index 3c1fa508..9a3efd37 100644 --- a/projects/Demo/Demo/OnvifPage.xaml.cs +++ b/projects/Demo/Demo/OnvifPage.xaml.cs @@ -15,6 +15,7 @@ namespace Demo { this._url = url; InitializeComponent(); + NavigationPage.SetHasNavigationBar(this, false); Core.Initialize(); this._libvlc = new LibVLC(); } @@ -22,7 +23,7 @@ namespace Demo protected override void OnAppearing() { var media = new Media(_libvlc, this._url, FromType.FromLocation); - media.AddOption(new MediaConfiguration().EnableHardwareDecoding()); + //media.AddOption(new MediaConfiguration().EnableHardwareDecoding()); media.AddOption(":network-caching=0"); media.AddOption(":clock-jitter=0"); media.AddOption(":clock-synchro=0"); diff --git a/projects/Demo/Demo/wwwroot/index.html b/projects/Demo/Demo/wwwroot/index.html index 876444a2..2911fb1c 100644 --- a/projects/Demo/Demo/wwwroot/index.html +++ b/projects/Demo/Demo/wwwroot/index.html @@ -539,11 +539,13 @@
操作
-