更换启动屏幕图片,ios下必须卸载并重启才会生效,否则必须更换文件名。从vlc页删除截图代码,更换vlc页图标和布局。

TangShanKaiPing
wanggang 6 years ago
parent a928e3b9f8
commit 48a42a305d

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

@ -1,53 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDisplayName</key>
<string>Demo</string>
<key>CFBundleIdentifier</key>
<string>com.nbaxp.Demo</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleName</key>
<string>Demo</string>
<key>NSCameraUsageDescription</key>
<string>request camera permission</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>video-camera</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true />
</dict>
<key>UIMainStoryboardFile</key>
<string>LaunchScreen</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>XSLaunchImageAssets</key>
<string>Assets.xcassets/LaunchImages.launchimage</string>
<key>MinimumOSVersion</key>
<string>12.1</string>
</dict>
</plist>
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDisplayName</key>
<string>Demo</string>
<key>CFBundleIdentifier</key>
<string>com.nbaxp.Demo</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleName</key>
<string>Demo</string>
<key>NSCameraUsageDescription</key>
<string>request camera permission</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>video-camera</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIMainStoryboardFile</key>
<string>LaunchScreen</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>XSLaunchImageAssets</key>
<string>Assets.xcassets/LaunchImages.launchimage</string>
</dict>
</plist>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="X5k-f2-b5h">
<device id="retina4_7" orientation="portrait">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
@ -17,15 +17,16 @@
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" colorSpace="calibratedRGB" red="1" green="1" blue="1" alpha="1"/>
<color key="backgroundColor" colorSpace="calibratedRGB" red="0.94117647058823528" green="0.97254901960784312" blue="1" alpha="1"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="220" translatesAutoresizingMaskIntoConstraints="NO" fixedFrame="YES" image="splash.png" placeholderIntrinsicWidth="240" placeholderIntrinsicHeight="128">
<rect key="frame" x="67.5" y="269.5" width="240" height="128"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="220" translatesAutoresizingMaskIntoConstraints="NO" fixedFrame="YES" placeholderIntrinsicWidth="128" placeholderIntrinsicHeight="128" image="splash.png">
<rect key="frame" x="123.5" y="342" width="128" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinX="YES" flexibleMaxY="YES" flexibleMinY="YES"/>
</imageView>
</subviews>
<color key="tintColor" colorSpace="calibratedRGB" red="0.94117647058823528" green="0.97254901960784312" blue="1" alpha="1"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
@ -33,7 +34,8 @@
<point key="canvasLocation" x="349" y="339"/>
</scene>
</scenes>
<color key="tintColor" colorSpace="calibratedRGB" red="0.0392156862745098" green="0.37647058823529411" blue="1" alpha="1"/>
<resources>
<image name="splash.png" width="314" height="203"/>
<image name="splash.png" width="128" height="128"/>
</resources>
</document>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EmbedIO" Version="2.5.0" />
<PackageReference Include="EmbedIO" Version="2.6.0" />
<PackageReference Include="Flurl" Version="2.8.1" />
<PackageReference Include="LibVLCSharp.Forms" Version="0.8.1" />
<PackageReference Include="Xam.Plugins.Notifier" Version="3.0.1" />

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Demo.Infrastructure;assembly=Demo"
x:Class="Demo.MainPage">
<StackLayout Orientation="Vertical" BackgroundColor="Green">
<WebView x:Name="webView" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Blue" />
<!--<local:HybridWebView x:Name="webView" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Blue" />-->
</StackLayout>
</ContentPage>

@ -6,30 +6,30 @@
<AbsoluteLayout>
<shared:VideoView x:Name="videoView" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1" />
<ImageButton BackgroundColor="Transparent" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds="0.01,0.01,48,48" x:Name="back" Clicked="Back_Clicked" />
<ImageButton BackgroundColor="Transparent" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds=".5,0.01,48,48" x:Name="shot" Clicked="Shot_Clicked" />
<AbsoluteLayout BackgroundColor="Transparent" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds="0.99,0.01,148,48">
<ImageButton BackgroundColor="Transparent" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds="0,0,48,48" x:Name="mute" Clicked="Mute_Clicked" />
<Slider BackgroundColor="Transparent" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds="1,0,100,48" Minimum="0" Maximum="100" ThumbColor="LightBlue" x:Name="volume" ValueChanged="Volume_ValueChanged" />
</AbsoluteLayout>
<Grid AbsoluteLayout.LayoutBounds=".5,0.99,210,270" AbsoluteLayout.LayoutFlags="PositionProportional" RowSpacing="10" ColumnSpacing="10">
<Grid AbsoluteLayout.LayoutBounds=".5,0.99,250,150" AbsoluteLayout.LayoutFlags="PositionProportional" RowSpacing="0" ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="60" />
<ColumnDefinition Width="60" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="50" />
</Grid.ColumnDefinitions>
<ImageButton Grid.Row="0" Grid.Column="1" Opacity="0.3" BackgroundColor="Transparent" x:Name="up" Pressed="Control_Pressed" Released="Control_Released" ClassId="26up" />
<ImageButton Grid.Row="1" Grid.Column="0" Opacity="0.3" BackgroundColor="Transparent" x:Name="left" Pressed="Control_Pressed" Released="Control_Released" ClassId="24left" />
<ImageButton Grid.Row="1" Grid.Column="1" Opacity="0.3" BackgroundColor="Transparent" x:Name="stop" Pressed="Control_Pressed" Released="Control_Released" ClassId="23stopzoom" />
<ImageButton Grid.Row="1" Grid.Column="2" Opacity="0.3" BackgroundColor="Transparent" x:Name="right" Pressed="Control_Pressed" Released="Control_Released" ClassId="25right" />
<ImageButton Grid.Row="2" Grid.Column="1" Opacity="0.3" BackgroundColor="Transparent" x:Name="down" Pressed="Control_Pressed" Released="Control_Released" ClassId="27down" />
<ImageButton Grid.Row="3" Grid.Column="0" Opacity="0.3" BackgroundColor="Transparent" x:Name="zoomin" Pressed="Control_Pressed" Released="Control_Released" ClassId="21zoomin" />
<ImageButton Grid.Row="3" Grid.Column="2" Opacity="0.3" BackgroundColor="Transparent" x:Name="zoomout" Pressed="Control_Pressed" Released="Control_Released" ClassId="22zoomout" />
<ImageButton Grid.Row="0" Grid.Column="2" Opacity="0.5" BackgroundColor="Transparent" x:Name="up" Pressed="Control_Pressed" Released="Control_Released" ClassId="26up" />
<ImageButton Grid.Row="1" Grid.Column="1" Opacity="0.5" BackgroundColor="Transparent" x:Name="left" Pressed="Control_Pressed" Released="Control_Released" ClassId="24left" />
<ImageButton Grid.Row="1" Grid.Column="2" Opacity="0.5" BackgroundColor="Transparent" x:Name="stop" Pressed="Control_Pressed" Released="Control_Released" ClassId="23stopzoom" />
<ImageButton Grid.Row="1" Grid.Column="3" Opacity="0.5" BackgroundColor="Transparent" x:Name="right" Pressed="Control_Pressed" Released="Control_Released" ClassId="25right" />
<ImageButton Grid.Row="2" Grid.Column="2" Opacity="0.5" BackgroundColor="Transparent" x:Name="down" Pressed="Control_Pressed" Released="Control_Released" ClassId="27down" />
<ImageButton Grid.Row="2" Grid.Column="0" Opacity="0.5" BackgroundColor="Transparent" x:Name="zoomin" Pressed="Control_Pressed" Released="Control_Released" ClassId="21zoomin" />
<ImageButton Grid.Row="2" Grid.Column="4" Opacity="0.5" BackgroundColor="Transparent" x:Name="zoomout" Pressed="Control_Pressed" Released="Control_Released" ClassId="22zoomout" />
</Grid>
</AbsoluteLayout>
</ContentPage>

@ -2,7 +2,6 @@
using LibVLCSharp.Shared;
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -40,9 +39,8 @@ namespace Demo
this.zoomout.IsEnabled = false;
}
this.back.Source = SetImage("back.png");
this.shot.Source = SetImage("shot.png");
this.mute.Source = SetImage("volume.png");
this.volume.Value = 50;
this.mute.Source = SetImage("mute.png");
this.volume.Value = 0;
}
protected override void OnAppearing()
@ -57,7 +55,7 @@ namespace Demo
media.AddOption(":clock-synchro=0");
}
var player = new MediaPlayer(_libvlc);
//this.mute.Source = this.SetImage("mute2.png");
player.Volume = 0;
videoView.MediaPlayer = player;
player.Play(media);
}
@ -79,18 +77,6 @@ namespace Demo
this.Navigation.PopAsync();
}
private void Shot_Clicked(object sender, EventArgs e)
{
var path = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
Console.WriteLine(path);
if (this.videoView.MediaPlayer.TakeSnapshot(2, path, 0, 0))
{
}
else
{
}
}
private void Volume_ValueChanged(object sender, ValueChangedEventArgs e)
{
if (this.videoView?.MediaPlayer != null)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Loading…
Cancel
Save