Skip to content
Snippets Groups Projects
Commit 72c04e75 authored by Koen's avatar Koen
Browse files

Added casting button in full screen.

parent 54f37ee5
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment