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);
|
.into(imgvCover);
|
||||||
|
|
||||||
fragmentLayout.setVisibility(View.VISIBLE);
|
fragmentLayout.setVisibility(View.VISIBLE);
|
||||||
// TODO change this to show play button if connected to chromecast
|
if (controller.isPlayingVideoLocally()) {
|
||||||
if (controller.isPlayingVideo()) {
|
|
||||||
butPlay.setVisibility(View.GONE);
|
butPlay.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
butPlay.setVisibility(View.VISIBLE);
|
butPlay.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -715,9 +715,9 @@ public abstract class PlaybackController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO this method probably needs to change
|
public boolean isPlayingVideoLocally() {
|
||||||
public boolean isPlayingVideo() {
|
return playbackService != null && PlaybackService.getCurrentMediaType() == MediaType.VIDEO
|
||||||
return playbackService != null && PlaybackService.getCurrentMediaType() == MediaType.VIDEO;
|
&& !PlaybackService.isCasting();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pair<Integer, Integer> getVideoSize() {
|
public Pair<Integer, Integer> getVideoSize() {
|
||||||
|
|
Loading…
Reference in New Issue