コード例 #1
0
        /// <summary>
        /// Clear the track from this node. </summary>
        /// <param name="executor"> Executor of the track </param>
        /// <param name="notifyNode"> Whether it is necessary to notify the node </param>
        public virtual void trackEnded(RemoteAudioTrackExecutor executor, bool notifyNode)
        {
            if (playingTracks.remove(executor.ExecutorId) != null)
            {
                log.LogInformation("Track {} removed from node {} (context {})", executor.Track.Identifier, nodeAddress, executor.ExecutorId);

                if (notifyNode)
                {
                    log.LogInformation("Notifying node {} of track stop for {} (context {})", nodeAddress, executor.Track.Identifier, executor.ExecutorId);

                    queuedMessages.add(new TrackStoppedMessage(executor.ExecutorId));
                }

                executor.detach();
            }
        }