what is the exact PATH to read the video local file generated by everyplay ?
???/tmp/Everyplay/sessions/[Strange numbers]/screen-001.mp4?
what is the exact PATH to read the video local file generated by everyplay ?
???/tmp/Everyplay/sessions/[Strange numbers]/screen-001.mp4?
I made a function for retrieving the videos on iOS and Android. You’ll find the results on iOS to be a bit disappointing I’ll warn you. The video will be upside down (vertically inverted) and I found it was not possible to upload it to Facebook either. Android seems to work very well though! Don’t forget to import System.IO.
static string GetVideoPath ()
{
#if UNITY_IOS
var root = new DirectoryInfo(Application.persistentDataPath).Parent.FullName;
var everyplayDir = root + "/tmp/Everyplay/session";
#elif UNITY_ANDROID
var root = new DirectoryInfo(Application.temporaryCachePath).FullName;
var everyplayDir = root + "/sessions";
#endif
var files = new DirectoryInfo(everyplayDir).GetFiles("*.mp4", SearchOption.AllDirectories);
var videoLocation = "";
// Should only be one video, if there is one at all
foreach (var file in files) {
#if UNITY_ANDROID
videoLocation = "file://" + file.FullName;
#else
videoLocation = file.FullName;
#endif
break;
}
return videoLocation;
}