Exemple #1
0
    public void PlayYoutubeVideo(string _videoId)
    {
        if (this.GetComponent <VideoController>() != null)
        {
            this.GetComponent <VideoController>().ShowLoading("Loading...");
        }
        videoId              = _videoId;
        isRetry              = false;
        lastTryQuality       = videoQuality;
        lastTryVideoId       = _videoId;
        lastPlayTime         = Time.time;
        lastVideoReadyToPlay = 0;

#if UNITY_WEBGL
        StartCoroutine(NewRequest(videoId));
#else
        if (!getFromWebserver)
        {
            StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
        }
        else
        {
            StartCoroutine(NewRequest(videoId));
        }
#endif
    }
    public void PlayYoutubeVideo(string _videoId)
    {
        if (this.GetComponent <VideoController>() != null)
        {
            this.GetComponent <VideoController>().ShowLoading("Loading...");
        }
        videoId = _videoId;

#if UNITY_WEBGL
        StartCoroutine(NewRequest(videoId));
#else
        StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
        StartCoroutine(resolver.GetDownloadUrls(FinishLoadingAudioUrls, audioId, false));
#endif
    }
Exemple #3
0
 public void PlayYoutubeVideo(string _videoId)
 {
     if (youtubeLogo != null)
     {
         youtubeLogo.youtubeurl = "https://www.youtube.com/watch?v=" + _videoId;
     }
     videoId = _videoId;
     StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
 }
Exemple #4
0
    public void PlayYoutubeVideo(string _videoId)
    {
        if (this.GetComponent <VideoController>() != null)
        {
            this.GetComponent <VideoController>().ShowLoading("Loading..." + _videoId);
        }
        videoId = _videoId;

        StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
    }
Exemple #5
0
 public void PlayYoutubeVideo(string _videoId)
 {
     videoId = _videoId;
     if (!getFromWebServer)
     {
         StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
     }
     else
     {
         StartCoroutine(NewRequest(videoId));
     }
 }
 public void PlayVideo(string url)
 {
     CheckVideoUrlAndExtractThevideoId(videoUrl);
     if (!getFromWebServer)
     {
         resolver.GetDownloadUrls(FinishLoadingUrls, url, null);
     }
     else
     {
         StartCoroutine(NewRequest(url));
     }
 }
Exemple #7
0
 public void PlayVideo(string url, Action OnVideoFinished)
 {
     videoFinishCallback = OnVideoFinished;
     if (!getFromWebServer)
     {
         StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, url, false));
     }
     else
     {
         StartCoroutine(NewRequest(url));
     }
 }
Exemple #8
0
 public void PlayYoutubeVideo(string _videoId)
 {
     if (youtubeLogo != null)
     {
         youtubeLogo.youtubeurl = "https://www.youtube.com/watch?v=" + _videoId;
     }
     videoId = _videoId;
     if (!getFromWebServer)
     {
         StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
     }
     else
     {
         StartCoroutine(NewRequest(videoId));
     }
 }
Exemple #9
0
        } //END RequestURL

        //-------------------------------------//
        private void GetVideoInAnotherThread()
        //-------------------------------------//
        {
            
            if( ShowDebug ) { Debug.Log( "YouTubeFinder.cs GetVideoInAnotherThread() about to call StartCoroutine( requestResolver.GetDownloadUrls() )" ); }

            //StartCoroutine( requestResolver.GetDownloadUrls( GetDownloadUrlsComplete, videoURL, false ) );

            //
            try
            {
                StartCoroutine( requestResolver.GetDownloadUrls( GetDownloadUrlsComplete, videoURL, false, OnFailed ) );
            }
            catch( Exception exception )
            {
                Debug.Log( "catch works ... exception = " + exception );
            }
            //

        } //END GetTheVideo
 public void PlayVideo(string url, Action OnVideoFinished)
 {
     videoFinishCallback = OnVideoFinished;
     StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, url, false));
 }
Exemple #11
0
 public void GetUrl()
 {
     StartCoroutine(_reqResolver.GetDownloadUrls(ArrangeTargetVideoInfo, VideoID));
 }
Exemple #12
0
 public void GetURL(string _videoId)
 {
     videoId = _videoId;
     StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
 }