mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Added casting button in full screen.
This commit is contained in:
parent
54f37ee5b2
commit
72c04e7556
3 changed files with 15 additions and 1 deletions
|
@ -1812,6 +1812,7 @@ class VideoDetailView : ConstraintLayout {
|
|||
_isCasting = isCasting;
|
||||
|
||||
if(isCasting) {
|
||||
setFullscreen(false);
|
||||
_player.stop();
|
||||
_player.hideControls(false);
|
||||
_cast.visibility = View.VISIBLE;
|
||||
|
|
|
@ -71,6 +71,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
private val _control_videosettings_fullscreen: ImageButton;
|
||||
private val _control_minimize_fullscreen: ImageButton;
|
||||
private val _control_rotate_lock_fullscreen: ImageButton;
|
||||
private val _control_cast_fullscreen: ImageButton;
|
||||
private val _control_play_fullscreen: ImageButton;
|
||||
private val _time_bar_fullscreen: TimeBar;
|
||||
private val _overlay_brightness: FrameLayout;
|
||||
|
@ -127,6 +128,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
_control_minimize_fullscreen = _videoControls_fullscreen.findViewById(R.id.exo_minimize);
|
||||
_control_videosettings_fullscreen = _videoControls_fullscreen.findViewById(R.id.exo_settings);
|
||||
_control_rotate_lock_fullscreen = _videoControls_fullscreen.findViewById(R.id.exo_rotate_lock);
|
||||
_control_cast_fullscreen = _videoControls_fullscreen.findViewById(R.id.exo_cast);
|
||||
_control_play_fullscreen = videoControls.findViewById(com.google.android.exoplayer2.ui.R.id.exo_play);
|
||||
_control_chapter_fullscreen = _videoControls_fullscreen.findViewById(R.id.text_chapter_current);
|
||||
_time_bar_fullscreen = _videoControls_fullscreen.findViewById(com.google.android.exoplayer2.ui.R.id.exo_progress);
|
||||
|
@ -213,7 +215,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
updateRotateLock();
|
||||
};
|
||||
_control_cast.setOnClickListener {
|
||||
UIDialogs.showCastingDialog(context);
|
||||
|
||||
};
|
||||
|
||||
_control_minimize_fullscreen.setOnClickListener {
|
||||
|
@ -229,6 +231,9 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
StatePlayer.instance.rotationLock = !StatePlayer.instance.rotationLock;
|
||||
updateRotateLock();
|
||||
};
|
||||
_control_cast_fullscreen.setOnClickListener {
|
||||
UIDialogs.showCastingDialog(context);
|
||||
};
|
||||
|
||||
var lastPos = 0L;
|
||||
videoControls.setProgressUpdateListener { position, bufferedPosition ->
|
||||
|
|
|
@ -57,6 +57,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
<ImageButton
|
||||
android:id="@+id/exo_cast"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:clickable="true"
|
||||
android:padding="12dp"
|
||||
app:srcCompat="@drawable/ic_cast" />
|
||||
<ImageButton
|
||||
android:id="@+id/exo_rotate_lock"
|
||||
android:layout_width="50dp"
|
||||
|
|
Loading…
Add table
Reference in a new issue