Browse Source

Use m4v format and default to landscape mode.

CartBlanche 13 years ago
parent
commit
4bf72b93c9

+ 6 - 2
Samples/iOS/VideoPlayer/Info.plist

@@ -2,10 +2,14 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
+	<key>CFBundleDisplayName</key>
+	<string>Video Player</string>
+	<key>UIDeviceFamily</key>
+	<array>
+		<string>1</string>
+	</array>
 	<key>UISupportedInterfaceOrientations</key>
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
 	</array>

+ 13 - 4
Samples/iOS/VideoPlayer/Main.cs

@@ -6,13 +6,22 @@ using MonoTouch.UIKit;
 
 
 namespace MonoGame.Samples.VideoPlayer
 namespace MonoGame.Samples.VideoPlayer
 {
 {
-	public class Application
+	[Register("AppDelegate")]
+	class Program : UIApplicationDelegate
 	{
 	{
-		// This is the main entry point of the application.
+		private Game1 game;
+
+		public override void FinishedLaunching (UIApplication app)
+		{
+			game = new Game1 ();
+			game.Run ();
+		}
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
 		static void Main (string[] args)
 		static void Main (string[] args)
 		{
 		{
-			// if you want to use a different Application Delegate class from "AppDelegate"
-			// you can specify it here.
 			UIApplication.Main (args, null, "AppDelegate");
 			UIApplication.Main (args, null, "AppDelegate");
 		}
 		}
 	}
 	}

+ 23 - 1
Samples/iOS/VideoPlayer/MonoGame.Samples.VideoPlayer.csproj

@@ -16,7 +16,7 @@
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
+    <DefineConstants>DEBUG;IOS</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <ConsolePause>false</ConsolePause>
@@ -65,6 +65,28 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Compile Include="Main.cs" />
     <Compile Include="Main.cs" />
+    <Compile Include="..\..\MacOS\VideoPlayer\Game1.cs">
+      <Link>Game1.cs</Link>
+    </Compile>
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Content Include="..\..\MacOS\VideoPlayer\Content\spriteFont1.xnb">
+      <Link>Content\spriteFont1.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Default.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\MacOS\VideoPlayer\Content\sintel_trailer.m4v">
+      <Link>Content\sintel_trailer.m4v</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.iOS.csproj">
+      <Project>{DB8508BB-9849-4CC2-BC0F-8EB5DACB3C47}</Project>
+      <Name>MonoGame.Framework.iOS</Name>
+    </ProjectReference>
+  </ItemGroup>
 </Project>
 </Project>