mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-25 16:23:54 +01:00
Do not set player status before player object is created
This commit is contained in:
parent
28f424e3c1
commit
0339ce7bca
@ -174,9 +174,9 @@ public class PlaybackServiceFlavorHelper {
|
||||
}
|
||||
callback.sendNotificationBroadcast(PlaybackService.NOTIFICATION_TYPE_RELOAD,
|
||||
PlaybackService.EXTRA_CODE_CAST);
|
||||
switchMediaPlayer(new RemotePSMP(context, callback.getMediaPlayerCallback()),
|
||||
info,
|
||||
wasLaunched);
|
||||
RemotePSMP remotePSMP = new RemotePSMP(context, callback.getMediaPlayerCallback());
|
||||
switchMediaPlayer(remotePSMP, info, wasLaunched);
|
||||
remotePSMP.init();
|
||||
// hardware volume buttons control the remote device volume
|
||||
mediaRouter.setMediaSessionCompat(callback.getMediaSession());
|
||||
registerWifiBroadcastReceiver();
|
||||
|
@ -62,7 +62,9 @@ public class RemotePSMP extends PlaybackServiceMediaPlayer {
|
||||
startWhenPrepared = new AtomicBoolean(false);
|
||||
isBuffering = new AtomicBoolean(false);
|
||||
remoteState = MediaStatus.PLAYER_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
public void init () {
|
||||
try {
|
||||
if (castMgr.isConnected() && castMgr.isRemoteMediaLoaded()) {
|
||||
onRemoteMediaPlayerStatusUpdated();
|
||||
|
Loading…
Reference in New Issue
Block a user