Change layout for audio-only streams
This commit is contained in:
parent
b500c3f526
commit
a6eb871f5e
|
@ -329,7 +329,11 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.detail_thumbnail_root_layout:
|
case R.id.detail_thumbnail_root_layout:
|
||||||
openVideoPlayer();
|
if (currentInfo.video_streams.isEmpty() && currentInfo.video_only_streams.isEmpty()) {
|
||||||
|
openBackgroundPlayer();
|
||||||
|
} else {
|
||||||
|
openVideoPlayer();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.detail_title_root_layout:
|
case R.id.detail_title_root_layout:
|
||||||
toggleTitleAndDescription();
|
toggleTitleAndDescription();
|
||||||
|
@ -1055,6 +1059,12 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
|
||||||
showSnackBarError(info.errors, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(info.service_id), info.url, 0);
|
showSnackBarError(info.errors, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(info.service_id), info.url, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (info.video_streams.isEmpty() && info.video_only_streams.isEmpty()) {
|
||||||
|
detailControlsBackground.setVisibility(View.GONE);
|
||||||
|
detailControlsPopup.setVisibility(View.GONE);
|
||||||
|
thumbnailPlayButton.setImageResource(R.drawable.ic_headset_white_24dp);
|
||||||
|
}
|
||||||
|
|
||||||
if (autoPlayEnabled) {
|
if (autoPlayEnabled) {
|
||||||
openVideoPlayer();
|
openVideoPlayer();
|
||||||
// Only auto play in the first open
|
// Only auto play in the first open
|
||||||
|
@ -1098,4 +1108,4 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
|
||||||
|
|
||||||
showError(getString(R.string.blocked_by_gema), false, R.drawable.gruese_die_gema);
|
showError(getString(R.string.blocked_by_gema), false, R.drawable.gruese_die_gema);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,7 +250,7 @@
|
||||||
android:paddingBottom="6dp"
|
android:paddingBottom="6dp"
|
||||||
android:paddingTop="6dp"
|
android:paddingTop="6dp"
|
||||||
android:text="@string/controls_background_title"
|
android:text="@string/controls_background_title"
|
||||||
android:textSize="12sp"/>
|
android:textSize="12sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!--UPLOADER-->
|
<!--UPLOADER-->
|
||||||
|
|
Loading…
Reference in New Issue