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()); }
public void ReplayVid() { Player.Pause(); Player.LoadYoutubeVideo(youtubeUrl + startingVidId); disableVideoOptions = true; if (curCoroutine != null) { StopCoroutine(curCoroutine); } curCoroutine = StartCoroutine(VideoLoading()); }
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(); }
void OnSearchDone(YoutubeData[] results) { trailerURL = "https://www.youtube.com/watch?v=" + results[0].id; player.LoadYoutubeVideo(trailerURL); //player.PlayButton(); }