Fixed NPE in ExternalPlayerFragment
This commit is contained in:
parent
5e0bf5d827
commit
5ad60a8272
@ -79,8 +79,10 @@ public class ExternalPlayerFragment extends Fragment {
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
butPlay.setOnClickListener(v -> {
|
||||
if (controller != null) {
|
||||
if (controller.getMedia().getMediaType() == MediaType.VIDEO
|
||||
if (controller == null) {
|
||||
return;
|
||||
}
|
||||
if (controller.getMedia() != null && controller.getMedia().getMediaType() == MediaType.VIDEO
|
||||
&& controller.getStatus() != PlayerStatus.PLAYING) {
|
||||
controller.playPause();
|
||||
getContext().startActivity(PlaybackService
|
||||
@ -88,8 +90,6 @@ public class ExternalPlayerFragment extends Fragment {
|
||||
} else {
|
||||
controller.playPause();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
loadMediaInfo();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user