have external player fragment show play button if casting
This commit is contained in:
parent
a77c77724b
commit
450329a5e3
|
@ -172,8 +172,7 @@ public class ExternalPlayerFragment extends Fragment {
|
|||
.into(imgvCover);
|
||||
|
||||
fragmentLayout.setVisibility(View.VISIBLE);
|
||||
// TODO change this to show play button if connected to chromecast
|
||||
if (controller.isPlayingVideo()) {
|
||||
if (controller.isPlayingVideoLocally()) {
|
||||
butPlay.setVisibility(View.GONE);
|
||||
} else {
|
||||
butPlay.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -715,9 +715,9 @@ public abstract class PlaybackController {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO this method probably needs to change
|
||||
public boolean isPlayingVideo() {
|
||||
return playbackService != null && PlaybackService.getCurrentMediaType() == MediaType.VIDEO;
|
||||
public boolean isPlayingVideoLocally() {
|
||||
return playbackService != null && PlaybackService.getCurrentMediaType() == MediaType.VIDEO
|
||||
&& !PlaybackService.isCasting();
|
||||
}
|
||||
|
||||
public Pair<Integer, Integer> getVideoSize() {
|
||||
|
|
Loading…
Reference in New Issue