Transport Controls not Updating after MediaPlayerService is destroyed












0















Okay. I have been struggling with this issue for a while.
Since the latest Wear OS upgrade, a play/pause transport control is displayed in the notification panel instead of showing media controls on a notification. My media player service works fine until it has been paused for some time and android destroys it as it has moved to the background. If the user selects the play button from the transport controls, the music starts playing as it should, but the transport controls no longer update meaning the user can only hit play and can no longer pause. This can be very frustrating if they need to stop audio and can't.



Here is the code where I initialize the media session. This is called at onCreate



private void initMediaSession() {
if (mediaSessionManager != null) return;

mediaSessionManager = (MediaSessionManager) getSystemService(Context.MEDIA_SESSION_SERVICE);
//Create a new mediaSession
mediaSession = new MediaSessionCompat(getApplicationContext(), "com.turndapage.navmusic.mediaplayer");
//Get mediaSessions Transport Controls
mediaSession.getController().getTransportControls();
//Set Mediasession ready to receive media commands
mediaSession.setActive(true);

mediaSession.setFlags(
MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |
MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);

callback = new MediaSessionCompat.Callback() {
// Implement callbacks
@Override
public void onPlay() {
super.onPlay();
Cat.d("Playing from transport controls.");
// This is the event that is triggered from the transport controls
resumeMedia();
}

@Override
public void onPause() {
super.onPause();
Cat.d("Pausing from transport controls");
pauseMedia();
}

@Override
public void onSkipToNext() {
super.onSkipToNext();
skipToNext();
}

@Override
public void onSkipToPrevious() {
super.onSkipToPrevious();
skipToPrevious();
}

@Override
public void onStop() {
super.onStop();
stop();
}

@Override
public void onSeekTo(long position) {
super.onSeekTo(position);
mediaPlayer.seekTo((int)position);
}

@Override
public void onFastForward() {
super.onFastForward();
fastForward();
}

@Override
public void onRewind() {
super.onRewind();
rewind();
}

@Override
public void onPlayFromMediaId(String mediaId, Bundle extras) {
int id = Integer.parseInt(mediaId.replace("song", ""));
int thisIndex = 0;
for(Song song : songLibrary.getSongs()) {
if(song.getID() == id) {
ArrayList<Song> songs = getCurrentList();
thisIndex = songs.indexOf(song);
break;
}
}
int ids = new int[getCurrentList().size()];
for(int i = 0; i < ids.length; i++) {
ids[i] = getCurrentList().get(i).getID();
}
startPlaying(ids, thisIndex);
}

@Override
public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
KeyEvent event = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
Cat.e("onMediaButtonEvent called: " + event);
if (event.getAction() == KeyEvent.ACTION_UP) {
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_MEDIA_PAUSE:
pauseMedia();
break;
case KeyEvent.KEYCODE_MEDIA_PLAY:
playMedia();
break;
case KeyEvent.KEYCODE_MEDIA_NEXT:
//skipToNext();
break;
case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
//skipToPrevious();
break;
}
}
return super.onMediaButtonEvent(mediaButtonEvent);
}
};

// Attach a callback to receive MediaSession update
mediaSession.setCallback(callback);
setSessionToken(mediaSession.getSessionToken());
}


This method is called when the user clicks the play transport control



public void resumeMedia() {
wasPlaying = true;
if(mediaPlayer != null) {
try {
if (!getPlaying()) {
mediaPlayer.seekTo(resumePosition);
mediaPlayer.start();
sendPlayPauseUpdate(true);
buildNotification(true);
}
ComplicationHelper.updatePlayPause(this, true);
} catch (IllegalStateException ex) {
ex.printStackTrace();
//restoreState();
startMediaPlayer();
}
}
}


the send play/pause update just sends a broadcast to the activity to update controls there.



Inside the notification code, I have this to update the playback state of the media session. As you can see, the pause or play actions are only added based on whether the media player is playing or not. Despite this, the play action is still displayed:



long actions = MEDIA_SESSION_ACTIONS;
if(isPlaying)
actions |= PlaybackStateCompat.ACTION_PAUSE;
else
actions |= PlaybackStateCompat.ACTION_PLAY;
mediaSession.setPlaybackState(new PlaybackStateCompat.Builder()
.setActions(actions)
.setState(isPlaying ? PlaybackStateCompat.STATE_PLAYING :
PlaybackStateCompat.STATE_PAUSED, resumePosition, 1)
.build());


and here are the media session actions:



// Media Session Actions
private static final long MEDIA_SESSION_ACTIONS =
PlaybackStateCompat.ACTION_SEEK_TO |
PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
PlaybackStateCompat.ACTION_PREPARE |
PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH |
PlaybackStateCompat.ACTION_PLAY_PAUSE |
PlaybackStateCompat.ACTION_STOP |
PlaybackStateCompat.ACTION_FAST_FORWARD |
PlaybackStateCompat.ACTION_REWIND;


What I have tried:




  • Changing media session to static and back

  • making the callback a variable rather than a making a new one when created.

  • Manually setting the mediasession's playback state to playing after play from transport controls


This works find on the phone app although I am using a pending intent to send a start command to run the resume function rather than transport controls. I am also able to resume playback from the watch's transport controls if I am using the phone to play audio and the controls update correctly even though the phone app is using the exact same class.



Please let me know if any other information could be helpful.



Thanks!



-Joel










share|improve this question



























    0















    Okay. I have been struggling with this issue for a while.
    Since the latest Wear OS upgrade, a play/pause transport control is displayed in the notification panel instead of showing media controls on a notification. My media player service works fine until it has been paused for some time and android destroys it as it has moved to the background. If the user selects the play button from the transport controls, the music starts playing as it should, but the transport controls no longer update meaning the user can only hit play and can no longer pause. This can be very frustrating if they need to stop audio and can't.



    Here is the code where I initialize the media session. This is called at onCreate



    private void initMediaSession() {
    if (mediaSessionManager != null) return;

    mediaSessionManager = (MediaSessionManager) getSystemService(Context.MEDIA_SESSION_SERVICE);
    //Create a new mediaSession
    mediaSession = new MediaSessionCompat(getApplicationContext(), "com.turndapage.navmusic.mediaplayer");
    //Get mediaSessions Transport Controls
    mediaSession.getController().getTransportControls();
    //Set Mediasession ready to receive media commands
    mediaSession.setActive(true);

    mediaSession.setFlags(
    MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |
    MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);

    callback = new MediaSessionCompat.Callback() {
    // Implement callbacks
    @Override
    public void onPlay() {
    super.onPlay();
    Cat.d("Playing from transport controls.");
    // This is the event that is triggered from the transport controls
    resumeMedia();
    }

    @Override
    public void onPause() {
    super.onPause();
    Cat.d("Pausing from transport controls");
    pauseMedia();
    }

    @Override
    public void onSkipToNext() {
    super.onSkipToNext();
    skipToNext();
    }

    @Override
    public void onSkipToPrevious() {
    super.onSkipToPrevious();
    skipToPrevious();
    }

    @Override
    public void onStop() {
    super.onStop();
    stop();
    }

    @Override
    public void onSeekTo(long position) {
    super.onSeekTo(position);
    mediaPlayer.seekTo((int)position);
    }

    @Override
    public void onFastForward() {
    super.onFastForward();
    fastForward();
    }

    @Override
    public void onRewind() {
    super.onRewind();
    rewind();
    }

    @Override
    public void onPlayFromMediaId(String mediaId, Bundle extras) {
    int id = Integer.parseInt(mediaId.replace("song", ""));
    int thisIndex = 0;
    for(Song song : songLibrary.getSongs()) {
    if(song.getID() == id) {
    ArrayList<Song> songs = getCurrentList();
    thisIndex = songs.indexOf(song);
    break;
    }
    }
    int ids = new int[getCurrentList().size()];
    for(int i = 0; i < ids.length; i++) {
    ids[i] = getCurrentList().get(i).getID();
    }
    startPlaying(ids, thisIndex);
    }

    @Override
    public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
    KeyEvent event = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
    Cat.e("onMediaButtonEvent called: " + event);
    if (event.getAction() == KeyEvent.ACTION_UP) {
    switch (event.getKeyCode()) {
    case KeyEvent.KEYCODE_MEDIA_PAUSE:
    pauseMedia();
    break;
    case KeyEvent.KEYCODE_MEDIA_PLAY:
    playMedia();
    break;
    case KeyEvent.KEYCODE_MEDIA_NEXT:
    //skipToNext();
    break;
    case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
    //skipToPrevious();
    break;
    }
    }
    return super.onMediaButtonEvent(mediaButtonEvent);
    }
    };

    // Attach a callback to receive MediaSession update
    mediaSession.setCallback(callback);
    setSessionToken(mediaSession.getSessionToken());
    }


    This method is called when the user clicks the play transport control



    public void resumeMedia() {
    wasPlaying = true;
    if(mediaPlayer != null) {
    try {
    if (!getPlaying()) {
    mediaPlayer.seekTo(resumePosition);
    mediaPlayer.start();
    sendPlayPauseUpdate(true);
    buildNotification(true);
    }
    ComplicationHelper.updatePlayPause(this, true);
    } catch (IllegalStateException ex) {
    ex.printStackTrace();
    //restoreState();
    startMediaPlayer();
    }
    }
    }


    the send play/pause update just sends a broadcast to the activity to update controls there.



    Inside the notification code, I have this to update the playback state of the media session. As you can see, the pause or play actions are only added based on whether the media player is playing or not. Despite this, the play action is still displayed:



    long actions = MEDIA_SESSION_ACTIONS;
    if(isPlaying)
    actions |= PlaybackStateCompat.ACTION_PAUSE;
    else
    actions |= PlaybackStateCompat.ACTION_PLAY;
    mediaSession.setPlaybackState(new PlaybackStateCompat.Builder()
    .setActions(actions)
    .setState(isPlaying ? PlaybackStateCompat.STATE_PLAYING :
    PlaybackStateCompat.STATE_PAUSED, resumePosition, 1)
    .build());


    and here are the media session actions:



    // Media Session Actions
    private static final long MEDIA_SESSION_ACTIONS =
    PlaybackStateCompat.ACTION_SEEK_TO |
    PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
    PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
    PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
    PlaybackStateCompat.ACTION_PREPARE |
    PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH |
    PlaybackStateCompat.ACTION_PLAY_PAUSE |
    PlaybackStateCompat.ACTION_STOP |
    PlaybackStateCompat.ACTION_FAST_FORWARD |
    PlaybackStateCompat.ACTION_REWIND;


    What I have tried:




    • Changing media session to static and back

    • making the callback a variable rather than a making a new one when created.

    • Manually setting the mediasession's playback state to playing after play from transport controls


    This works find on the phone app although I am using a pending intent to send a start command to run the resume function rather than transport controls. I am also able to resume playback from the watch's transport controls if I am using the phone to play audio and the controls update correctly even though the phone app is using the exact same class.



    Please let me know if any other information could be helpful.



    Thanks!



    -Joel










    share|improve this question

























      0












      0








      0


      1






      Okay. I have been struggling with this issue for a while.
      Since the latest Wear OS upgrade, a play/pause transport control is displayed in the notification panel instead of showing media controls on a notification. My media player service works fine until it has been paused for some time and android destroys it as it has moved to the background. If the user selects the play button from the transport controls, the music starts playing as it should, but the transport controls no longer update meaning the user can only hit play and can no longer pause. This can be very frustrating if they need to stop audio and can't.



      Here is the code where I initialize the media session. This is called at onCreate



      private void initMediaSession() {
      if (mediaSessionManager != null) return;

      mediaSessionManager = (MediaSessionManager) getSystemService(Context.MEDIA_SESSION_SERVICE);
      //Create a new mediaSession
      mediaSession = new MediaSessionCompat(getApplicationContext(), "com.turndapage.navmusic.mediaplayer");
      //Get mediaSessions Transport Controls
      mediaSession.getController().getTransportControls();
      //Set Mediasession ready to receive media commands
      mediaSession.setActive(true);

      mediaSession.setFlags(
      MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |
      MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);

      callback = new MediaSessionCompat.Callback() {
      // Implement callbacks
      @Override
      public void onPlay() {
      super.onPlay();
      Cat.d("Playing from transport controls.");
      // This is the event that is triggered from the transport controls
      resumeMedia();
      }

      @Override
      public void onPause() {
      super.onPause();
      Cat.d("Pausing from transport controls");
      pauseMedia();
      }

      @Override
      public void onSkipToNext() {
      super.onSkipToNext();
      skipToNext();
      }

      @Override
      public void onSkipToPrevious() {
      super.onSkipToPrevious();
      skipToPrevious();
      }

      @Override
      public void onStop() {
      super.onStop();
      stop();
      }

      @Override
      public void onSeekTo(long position) {
      super.onSeekTo(position);
      mediaPlayer.seekTo((int)position);
      }

      @Override
      public void onFastForward() {
      super.onFastForward();
      fastForward();
      }

      @Override
      public void onRewind() {
      super.onRewind();
      rewind();
      }

      @Override
      public void onPlayFromMediaId(String mediaId, Bundle extras) {
      int id = Integer.parseInt(mediaId.replace("song", ""));
      int thisIndex = 0;
      for(Song song : songLibrary.getSongs()) {
      if(song.getID() == id) {
      ArrayList<Song> songs = getCurrentList();
      thisIndex = songs.indexOf(song);
      break;
      }
      }
      int ids = new int[getCurrentList().size()];
      for(int i = 0; i < ids.length; i++) {
      ids[i] = getCurrentList().get(i).getID();
      }
      startPlaying(ids, thisIndex);
      }

      @Override
      public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
      KeyEvent event = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
      Cat.e("onMediaButtonEvent called: " + event);
      if (event.getAction() == KeyEvent.ACTION_UP) {
      switch (event.getKeyCode()) {
      case KeyEvent.KEYCODE_MEDIA_PAUSE:
      pauseMedia();
      break;
      case KeyEvent.KEYCODE_MEDIA_PLAY:
      playMedia();
      break;
      case KeyEvent.KEYCODE_MEDIA_NEXT:
      //skipToNext();
      break;
      case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
      //skipToPrevious();
      break;
      }
      }
      return super.onMediaButtonEvent(mediaButtonEvent);
      }
      };

      // Attach a callback to receive MediaSession update
      mediaSession.setCallback(callback);
      setSessionToken(mediaSession.getSessionToken());
      }


      This method is called when the user clicks the play transport control



      public void resumeMedia() {
      wasPlaying = true;
      if(mediaPlayer != null) {
      try {
      if (!getPlaying()) {
      mediaPlayer.seekTo(resumePosition);
      mediaPlayer.start();
      sendPlayPauseUpdate(true);
      buildNotification(true);
      }
      ComplicationHelper.updatePlayPause(this, true);
      } catch (IllegalStateException ex) {
      ex.printStackTrace();
      //restoreState();
      startMediaPlayer();
      }
      }
      }


      the send play/pause update just sends a broadcast to the activity to update controls there.



      Inside the notification code, I have this to update the playback state of the media session. As you can see, the pause or play actions are only added based on whether the media player is playing or not. Despite this, the play action is still displayed:



      long actions = MEDIA_SESSION_ACTIONS;
      if(isPlaying)
      actions |= PlaybackStateCompat.ACTION_PAUSE;
      else
      actions |= PlaybackStateCompat.ACTION_PLAY;
      mediaSession.setPlaybackState(new PlaybackStateCompat.Builder()
      .setActions(actions)
      .setState(isPlaying ? PlaybackStateCompat.STATE_PLAYING :
      PlaybackStateCompat.STATE_PAUSED, resumePosition, 1)
      .build());


      and here are the media session actions:



      // Media Session Actions
      private static final long MEDIA_SESSION_ACTIONS =
      PlaybackStateCompat.ACTION_SEEK_TO |
      PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
      PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
      PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
      PlaybackStateCompat.ACTION_PREPARE |
      PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH |
      PlaybackStateCompat.ACTION_PLAY_PAUSE |
      PlaybackStateCompat.ACTION_STOP |
      PlaybackStateCompat.ACTION_FAST_FORWARD |
      PlaybackStateCompat.ACTION_REWIND;


      What I have tried:




      • Changing media session to static and back

      • making the callback a variable rather than a making a new one when created.

      • Manually setting the mediasession's playback state to playing after play from transport controls


      This works find on the phone app although I am using a pending intent to send a start command to run the resume function rather than transport controls. I am also able to resume playback from the watch's transport controls if I am using the phone to play audio and the controls update correctly even though the phone app is using the exact same class.



      Please let me know if any other information could be helpful.



      Thanks!



      -Joel










      share|improve this question














      Okay. I have been struggling with this issue for a while.
      Since the latest Wear OS upgrade, a play/pause transport control is displayed in the notification panel instead of showing media controls on a notification. My media player service works fine until it has been paused for some time and android destroys it as it has moved to the background. If the user selects the play button from the transport controls, the music starts playing as it should, but the transport controls no longer update meaning the user can only hit play and can no longer pause. This can be very frustrating if they need to stop audio and can't.



      Here is the code where I initialize the media session. This is called at onCreate



      private void initMediaSession() {
      if (mediaSessionManager != null) return;

      mediaSessionManager = (MediaSessionManager) getSystemService(Context.MEDIA_SESSION_SERVICE);
      //Create a new mediaSession
      mediaSession = new MediaSessionCompat(getApplicationContext(), "com.turndapage.navmusic.mediaplayer");
      //Get mediaSessions Transport Controls
      mediaSession.getController().getTransportControls();
      //Set Mediasession ready to receive media commands
      mediaSession.setActive(true);

      mediaSession.setFlags(
      MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |
      MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);

      callback = new MediaSessionCompat.Callback() {
      // Implement callbacks
      @Override
      public void onPlay() {
      super.onPlay();
      Cat.d("Playing from transport controls.");
      // This is the event that is triggered from the transport controls
      resumeMedia();
      }

      @Override
      public void onPause() {
      super.onPause();
      Cat.d("Pausing from transport controls");
      pauseMedia();
      }

      @Override
      public void onSkipToNext() {
      super.onSkipToNext();
      skipToNext();
      }

      @Override
      public void onSkipToPrevious() {
      super.onSkipToPrevious();
      skipToPrevious();
      }

      @Override
      public void onStop() {
      super.onStop();
      stop();
      }

      @Override
      public void onSeekTo(long position) {
      super.onSeekTo(position);
      mediaPlayer.seekTo((int)position);
      }

      @Override
      public void onFastForward() {
      super.onFastForward();
      fastForward();
      }

      @Override
      public void onRewind() {
      super.onRewind();
      rewind();
      }

      @Override
      public void onPlayFromMediaId(String mediaId, Bundle extras) {
      int id = Integer.parseInt(mediaId.replace("song", ""));
      int thisIndex = 0;
      for(Song song : songLibrary.getSongs()) {
      if(song.getID() == id) {
      ArrayList<Song> songs = getCurrentList();
      thisIndex = songs.indexOf(song);
      break;
      }
      }
      int ids = new int[getCurrentList().size()];
      for(int i = 0; i < ids.length; i++) {
      ids[i] = getCurrentList().get(i).getID();
      }
      startPlaying(ids, thisIndex);
      }

      @Override
      public boolean onMediaButtonEvent(Intent mediaButtonEvent) {
      KeyEvent event = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
      Cat.e("onMediaButtonEvent called: " + event);
      if (event.getAction() == KeyEvent.ACTION_UP) {
      switch (event.getKeyCode()) {
      case KeyEvent.KEYCODE_MEDIA_PAUSE:
      pauseMedia();
      break;
      case KeyEvent.KEYCODE_MEDIA_PLAY:
      playMedia();
      break;
      case KeyEvent.KEYCODE_MEDIA_NEXT:
      //skipToNext();
      break;
      case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
      //skipToPrevious();
      break;
      }
      }
      return super.onMediaButtonEvent(mediaButtonEvent);
      }
      };

      // Attach a callback to receive MediaSession update
      mediaSession.setCallback(callback);
      setSessionToken(mediaSession.getSessionToken());
      }


      This method is called when the user clicks the play transport control



      public void resumeMedia() {
      wasPlaying = true;
      if(mediaPlayer != null) {
      try {
      if (!getPlaying()) {
      mediaPlayer.seekTo(resumePosition);
      mediaPlayer.start();
      sendPlayPauseUpdate(true);
      buildNotification(true);
      }
      ComplicationHelper.updatePlayPause(this, true);
      } catch (IllegalStateException ex) {
      ex.printStackTrace();
      //restoreState();
      startMediaPlayer();
      }
      }
      }


      the send play/pause update just sends a broadcast to the activity to update controls there.



      Inside the notification code, I have this to update the playback state of the media session. As you can see, the pause or play actions are only added based on whether the media player is playing or not. Despite this, the play action is still displayed:



      long actions = MEDIA_SESSION_ACTIONS;
      if(isPlaying)
      actions |= PlaybackStateCompat.ACTION_PAUSE;
      else
      actions |= PlaybackStateCompat.ACTION_PLAY;
      mediaSession.setPlaybackState(new PlaybackStateCompat.Builder()
      .setActions(actions)
      .setState(isPlaying ? PlaybackStateCompat.STATE_PLAYING :
      PlaybackStateCompat.STATE_PAUSED, resumePosition, 1)
      .build());


      and here are the media session actions:



      // Media Session Actions
      private static final long MEDIA_SESSION_ACTIONS =
      PlaybackStateCompat.ACTION_SEEK_TO |
      PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
      PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
      PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
      PlaybackStateCompat.ACTION_PREPARE |
      PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH |
      PlaybackStateCompat.ACTION_PLAY_PAUSE |
      PlaybackStateCompat.ACTION_STOP |
      PlaybackStateCompat.ACTION_FAST_FORWARD |
      PlaybackStateCompat.ACTION_REWIND;


      What I have tried:




      • Changing media session to static and back

      • making the callback a variable rather than a making a new one when created.

      • Manually setting the mediasession's playback state to playing after play from transport controls


      This works find on the phone app although I am using a pending intent to send a start command to run the resume function rather than transport controls. I am also able to resume playback from the watch's transport controls if I am using the phone to play audio and the controls update correctly even though the phone app is using the exact same class.



      Please let me know if any other information could be helpful.



      Thanks!



      -Joel







      java android service android-mediaplayer wear-os






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 '18 at 16:14









      Joel PageJoel Page

      16711




      16711
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53503818%2ftransport-controls-not-updating-after-mediaplayerservice-is-destroyed%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53503818%2ftransport-controls-not-updating-after-mediaplayerservice-is-destroyed%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Lallio

          Unable to find Lightning Node

          Futebolista