Exemple #1
0
    private void OnEnable()
    {
        if (!firstTime)
        {
            Player.Pause();
            Player.LoadYoutubeVideo(youtubeUrl + startingVidId);
        }
        else
        {
            firstTime = false;
        }

        disableVideoOptions = true;
        IntermissionPlayer.gameObject.SetActive(true);
        if (SessionData.IntermissionVideoIds.Count > 0)
        {
            IntermissionPlayer.LoadYoutubeVideo(youtubeUrl + SessionData.IntermissionVideoIds[0].VideoId);
            IntermissionPlayer.startFromSecondTime = SessionData.IntermissionVideoIds[0].VideoStartTime;
        }
        IntermissionPlayer.gameObject.SetActive(false);

        if (curCoroutine != null)
        {
            StopCoroutine(curCoroutine);
        }

        curCoroutine = StartCoroutine(VideoLoading());
    }
Exemple #2
0
    public void ReplayVid()
    {
        Player.Pause();
        Player.LoadYoutubeVideo(youtubeUrl + startingVidId);

        disableVideoOptions = true;

        if (curCoroutine != null)
        {
            StopCoroutine(curCoroutine);
        }

        curCoroutine = StartCoroutine(VideoLoading());
    }
Exemple #3
0
    void OnSearchDone(YoutubeData[] results)
    {
        string trailerURL = "https://www.youtube.com/watch?v=" + results[0].id;

        //player.youtubeUrl = trailerURL;
        player.LoadYoutubeVideo(trailerURL);
        Debug.Log(trailerURL);
        //player.Start();
        //player.PlayButton();
    }
Exemple #4
0
 void OnSearchDone(YoutubeData[] results)
 {
     trailerURL = "https://www.youtube.com/watch?v=" + results[0].id;
     player.LoadYoutubeVideo(trailerURL);
     //player.PlayButton();
 }