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
|
||||
{
|
||||
@@ -363,15 +363,15 @@ public class UnityGraph : Singleton<UnityGraph>
|
||||
VideoPlayer m_tex = movieFrame.obj.transform.gameObject.AddComponent<VideoPlayer>();
|
||||
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";
|
||||
//Material newMat = new Material(Shader.Find("Unlit/Texture") as Shader);
|
||||
/*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 = url;
|
||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + ".webm");
|
||||
//m_tex.url = Pathing.BaseContentPath + path + HelperFunctions.getMovieFileTypeForPlatform();
|
||||
//m_tex.url = url;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user