Exemple #1
0
        // receive event notifications from MusicBee
        // you need to set about.ReceiveNotificationFlags = PlayerEvents to receive all notifications, and not just the startup event
        public void ReceiveNotification(string sourceFileUrl, NotificationType type)
        {
            // perform some action depending on the notification type
            switch (type)
            {
            case NotificationType.PluginStartup:
                //Start the server on start
                StartServer();
                break;

            case NotificationType.TrackChanged:
                // ...
                break;

            case NotificationType.NowPlayingListChanged:
                wsServer.SendMessage("{\"callback_function\": \"updatePlaylistData\"} ");
                break;
            }
        }