Beispiel #1
0
 public void PlayVideo()
 {
     renderTexture.Release();
     videoPlayer.PlayURL(url);
     coolTimeTimer = coolTime;
     IsVideoPlaying(true);
 }
Beispiel #2
0
        /// <summary>
        /// Load a new song and automatically play it after done loading
        /// </summary>
        /// <param name="index"></param>
        private void LoadAndPlaySong(int index)
        {
            if (loading)
            {
                return;
            }

            nextSongIndex = index;

            nextSongPlaylistIndex = GetPlaylistIndexOfSong(nextSongIndex);

            GetActiveSongListItems();

            loading = true;

            loadingTime = 0f;

            Log($"Loading song: [{nextSongIndex}] {Titles[nextSongIndex]} - {Artists[nextSongIndex]} ({Urls[nextSongIndex]})");

            player.PlayURL(Urls[index]);
        }