Exemplo n.º 1
0
        /*
         * Server has been told that we completed playback of the current song
         */
        private void OnPlayCompleted(Session s, JSONNode play)
        {
            if ((activePlayState != null) && (activePlayState.id == (string) play["id"])) {
                activePlayState = null;

                // force us into play mode in case we were paused and hit
                // skip to complete the current song
                paused = false;
            }
        }
Exemplo n.º 2
0
        private void OnPlayActive(Session s, JSONNode play)
        {
            activePlayState = new ActivePlayState {
                id = play["id"],
                playStarted = false,
                startReportedToServer = false,
                soundCompleted = false,
                previousPosition = 0
            };

            StartCoroutine(PlaySound(play["id"], play["audio_file"]["url"], play["audio_file"]["duration_in_seconds"].AsFloat));
        }