Videos use .mp4 for supported platforms and .webm for all other platforms
This commit is contained in:
@@ -40,7 +40,7 @@ public class GalleryMovieWindow : BaseWindow
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.webm", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie" + HelperFunctions.getMovieFileTypeForPlatform(), this.gameObject));
|
||||
this.state = GalleryMovieWindow.STATE.END;
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class LogoMovieWindow : BaseWindow
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8.webm", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/normal/quinrose_logo_8" + HelperFunctions.getMovieFileTypeForPlatform(), this.gameObject));
|
||||
this.state = LogoMovieWindow.STATE.END;
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ public static class MovieManager
|
||||
/*string url = Pathing.BaseContentPath + path + ".webm";
|
||||
if (!System.IO.File.Exists(url))
|
||||
{
|
||||
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
|
||||
url = Application.streamingAssetsPath + "/JP/" + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
}
|
||||
m_tex.url = url;*/
|
||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm");
|
||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path + HelperFunctions.getMovieFileTypeForPlatform());
|
||||
m_tex.isLooping = false;
|
||||
movieFrame.SetMaterial(newMat, 960, 544);
|
||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
|
||||
@@ -44,13 +44,13 @@ public class MovieTex : MonoBehaviour
|
||||
this.m_tex.playOnAwake = false;
|
||||
Material newMat = new Material(Shader.Find("QO/Sprite") as Shader);
|
||||
//this.m_tex.m_path = path + ".mp4";
|
||||
/*string url = Pathing.BaseContentPath + path + ".webm";
|
||||
/*string url = Pathing.BaseContentPath + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
if (!System.IO.File.Exists(url))
|
||||
{
|
||||
url = Application.streamingAssetsPath + "/JP" + path + ".webm";
|
||||
url = Application.streamingAssetsPath + "/JP" + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
}
|
||||
this.m_tex.url = "file:///" + url;*/
|
||||
this.m_tex.url = HelperFunctions.CreateFilePath(path + ".webm");
|
||||
this.m_tex.url = HelperFunctions.CreateFilePath(path + HelperFunctions.getMovieFileTypeForPlatform());
|
||||
this.m_tex.isLooping = isLoop;
|
||||
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
//this.m_tex.targetMaterialRenderer = newMat;
|
||||
|
||||
@@ -10,7 +10,7 @@ public class ScreenMovieSample : MonoBehaviour
|
||||
{
|
||||
//TODO fix movie playing. either make platform specific versions OR make platform agnostic
|
||||
//yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.mp4", FullScreenMovieControlMode.CancelOnInput));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie.webm", this.gameObject));
|
||||
yield return base.StartCoroutine(MovieManager.PlayMovie("mp4/high/op_movie" + HelperFunctions.getMovieFileTypeForPlatform(), this.gameObject));
|
||||
Debug.Log(" #DEBUGLOG::MOVIE OWATA ");
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class UnityGraph : Singleton<UnityGraph>
|
||||
NMB_FILEINFO fileInfo = Nmb.GetFileInfo(name);
|
||||
if (fileInfo == null)
|
||||
{
|
||||
name = "ogv/effect/" + name + ".webm";
|
||||
name = "ogv/effect/" + name + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -364,14 +364,14 @@ public class UnityGraph : Singleton<UnityGraph>
|
||||
m_tex.playOnAwake = false;
|
||||
Material newMat = new Material(Shader.Find("QO/Sprite Add") as Shader);
|
||||
//Material newMat = new Material(Shader.Find("Unlit/Texture") as Shader);
|
||||
/*string url = Pathing.BaseContentPath + path + ".webm";
|
||||
/*string url = Pathing.BaseContentPath + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
if (!System.IO.File.Exists(url))
|
||||
{
|
||||
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
|
||||
url = Application.streamingAssetsPath + "/JP/" + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
}*/
|
||||
//m_tex.url = Pathing.BaseContentPath + path + ".webm";
|
||||
//m_tex.url = Pathing.BaseContentPath + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
//m_tex.url = url;
|
||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + ".webm");
|
||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + HelperFunctions.getMovieFileTypeForPlatform());
|
||||
m_tex.isLooping = false;
|
||||
movieFrame.SetMaterial(newMat, 960, 544);
|
||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||
|
||||
@@ -32,5 +32,23 @@ public static class HelperFunctions
|
||||
return updatedPath;
|
||||
|
||||
}
|
||||
|
||||
public static string getMovieFileTypeForPlatform()
|
||||
{
|
||||
if (Application.platform == RuntimePlatform.WindowsPlayer ||
|
||||
Application.platform == RuntimePlatform.WindowsEditor ||
|
||||
Application.platform == RuntimePlatform.OSXPlayer ||
|
||||
Application.platform == RuntimePlatform.OSXEditor ||
|
||||
Application.platform == RuntimePlatform.Android ||
|
||||
Application.platform == RuntimePlatform.IPhonePlayer
|
||||
)
|
||||
{
|
||||
return ".mp4";
|
||||
}
|
||||
else
|
||||
{
|
||||
return ".webm";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35e148d09a9c9504eb4e19fcfaee9f85
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed0b302b57cb08d45b7dbade4fd0a360
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96d5c81d30b2b984e88589d790da0df2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b2a39a4dc0dfbc43bda0cc77e6209b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 288d7e48cc0af8045b80fd545a0bd69c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecc4063470ed6dc4fa15112c2f669d10
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ea91315eec11a34ea32b46aa7c2d310
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ab19317885cb6b4baf895b047ccbff0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Reference in New Issue
Block a user