public static void LoadThumbnailFromFilePath(string filePath, Everyplay.ThumbnailLoadReadyDelegate readyDelegate, Everyplay.ThumbnailLoadFailedDelegate failedDelegate) { if (EveryplayInstance != null) { #if ((UNITY_IPHONE && EVERYPLAY_IPHONE) || (UNITY_ANDROID && EVERYPLAY_ANDROID)) && !UNITY_EDITOR EveryplayInstance.AsyncLoadThumbnailFromFilePath(filePath, readyDelegate, failedDelegate); #endif } }
// Private instance methods private void AsyncLoadThumbnailFromFilePath(string filePath, Everyplay.ThumbnailLoadReadyDelegate readyDelegateMethod, Everyplay.ThumbnailLoadFailedDelegate failedDelegateMethod) { if (filePath != null) { StartCoroutine(LoadThumbnailEnumerator(filePath, readyDelegateMethod, failedDelegateMethod)); } else { failedDelegateMethod("Everyplay error: Thumbnail is not ready."); } }
// THUMBNAIL #if BROADCAST_USE_EVERYPLAY public static void LoadThumbnailFromFilePath( string path, Everyplay.ThumbnailLoadReadyDelegate thumbnailLoadReadyDelegate, Everyplay.ThumbnailLoadFailedDelegate thumbnailLoadFailedDelegate) { if (Instance != null) { Instance.loadThumbnailFromFilePath( path, thumbnailLoadReadyDelegate, thumbnailLoadFailedDelegate); } }
public void loadThumbnailFromFilePath( string path, Everyplay.ThumbnailLoadReadyDelegate thumbnailLoadReadyDelegate, Everyplay.ThumbnailLoadFailedDelegate thumbnailLoadFailedDelegate) { if (!IsSupported()) { return; } Everyplay.LoadThumbnailFromFilePath( path, thumbnailLoadReadyDelegate, thumbnailLoadFailedDelegate); }
private IEnumerator LoadThumbnailEnumerator(string fileName, Everyplay.ThumbnailLoadReadyDelegate readyDelegateMethod, Everyplay.ThumbnailLoadFailedDelegate failedDelegateMethod) { WWW www = new WWW("file://" + fileName); yield return(www); if (!string.IsNullOrEmpty(www.error)) { failedDelegateMethod("Everyplay error: " + www.error); } else { if (www.texture) { readyDelegateMethod(www.texture); } else { failedDelegateMethod("Everyplay error: Loading thumbnail failed."); } } }
public void LoadThumbnailFromFilePath(string filePath, Everyplay.ThumbnailLoadReadyDelegate readyDelegate, Everyplay.ThumbnailLoadFailedDelegate failedDelegate) { Everyplay.LoadThumbnailFromFilePath(filePath, readyDelegate, failedDelegate); }