Exemple #1
0
        /// <summary>Disables event based updates for the player state and currently playing track.</seummary>
        public Task DisableUpdates()
        {
            //mmSession.Runtime.Disable(new Disable()).ConfigureAwait(false);
            mmSession.UnSubscribe <ConsoleAPICalledEvent>(OnPlayerStateChanged);
            Player.DisableUpdates(mmSession);

            return(SendCommandAsync("if(typeof mmNetRepeatListen==='function'){app.unlisten(app.player,'repeatchange',mmNetRepeatListen)};" +
                                    "if(typeof mmNetShuffleListen==='function'){app.unlisten(app.player,'shufflechange',mmNetShuffleListen)};" +
                                    "if(typeof mmNetStateListen==='function'){app.unlisten(app.player,'playbackState',mmNetStateListen)};"));
        }
Exemple #2
0
 /// <summary>Disables event based updates for the player state.</summary>
 public void DisableUpdates(ChromeSession session)
 {
     session.UnSubscribe <ConsoleAPICalledEvent>(OnPlayerStateChanged);
 }