Exemplo n.º 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
    }
Exemplo n.º 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));
 }
Exemplo n.º 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));
    }
Exemplo n.º 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));
     }
 }
Exemplo n.º 7
0
 public void PlayVideo(string url, Action OnVideoFinished)
 {
     videoFinishCallback = OnVideoFinished;
     if (!getFromWebServer)
     {
         StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, url, false));
     }
     else
     {
         StartCoroutine(NewRequest(url));
     }
 }
Exemplo n.º 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));
     }
 }
Exemplo n.º 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
Exemplo n.º 10
0
 public void PlayVideo(string url, Action OnVideoFinished)
 {
     videoFinishCallback = OnVideoFinished;
     StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, url, false));
 }
Exemplo n.º 11
0
 public void GetUrl()
 {
     StartCoroutine(_reqResolver.GetDownloadUrls(ArrangeTargetVideoInfo, VideoID));
 }
Exemplo n.º 12
0
 public void GetURL(string _videoId)
 {
     videoId = _videoId;
     StartCoroutine(resolver.GetDownloadUrls(FinishLoadingUrls, videoId, false));
 }