Ejemplo n.º 1
0
        private void OnStationChanged(Session s, string id)
        {
            if (!initialStation) paused = true;

            initialStation = false;
        }
Ejemplo n.º 2
0
 /*
  * Server has been told that we've started playback
  */
 private void OnPlayStarted(Session s, JSONNode play)
 {
     if ((activePlayState != null) && (activePlayState.id == (string) play["id"])) {
         activePlayState.startReportedToServer = true;
     }
 }
Ejemplo n.º 3
0
 /*
  * Take us out of pause if we've run out of songs
  */
 private void OnPlaysExhausted(Session s)
 {
     paused = false;
 }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
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));
        }
Ejemplo n.º 6
0
        private void OnPlacementChanged(Session s, string id)
        {
            if (!initialPlacement) paused = true;

            initialPlacement = false;
        }