Beispiel #1
0
 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
     }
 }
Beispiel #2
0
    // 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.");
        }
    }
Beispiel #3
0
    // 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);
        }
    }
Beispiel #4
0
    public void loadThumbnailFromFilePath(
        string path,
        Everyplay.ThumbnailLoadReadyDelegate thumbnailLoadReadyDelegate,
        Everyplay.ThumbnailLoadFailedDelegate thumbnailLoadFailedDelegate)
    {
        if (!IsSupported())
        {
            return;
        }

        Everyplay.LoadThumbnailFromFilePath(
            path,
            thumbnailLoadReadyDelegate,
            thumbnailLoadFailedDelegate);
    }
Beispiel #5
0
    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.");
            }
        }
    }
Beispiel #6
0
 public void LoadThumbnailFromFilePath(string filePath, Everyplay.ThumbnailLoadReadyDelegate readyDelegate, Everyplay.ThumbnailLoadFailedDelegate failedDelegate)
 {
     Everyplay.LoadThumbnailFromFilePath(filePath, readyDelegate, failedDelegate);
 }