Ejemplo n.º 1
0
        private async Task InitializeMediaSessionManager()
        {
            SimpleLogger.DefaultLog("NowPlayingDeskbandControl::InitializeMediaSessionManager called...");

            while (!IsHandleCreated)
            {
                SimpleLogger.DefaultLog("    No handle yet, waiting...");
                await Task.Delay(250);
            }

            SessionManager = await MediaSessionManager.CreateAsync();

            SessionManager.CurrentSongChanged += OnCurrentSongChanged;
            SessionManager.ForceUpdate();

            SimpleLogger.DefaultLog("NowPlayingDeskbandControl::InitializeMediaSessionManager DONE");
        }
Ejemplo n.º 2
0
 private void OnForceUpdateSessions(object sender, EventArgs e)
 {
     SessionManager?.ForceUpdate();
 }