diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt
index 6261b6e1..75539f9c 100644
--- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt
+++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt
@@ -1812,6 +1812,7 @@ class VideoDetailView : ConstraintLayout {
_isCasting = isCasting;
if(isCasting) {
+ setFullscreen(false);
_player.stop();
_player.hideControls(false);
_cast.visibility = View.VISIBLE;
diff --git a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt
index 83a8355c..5f7435cb 100644
--- a/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt
+++ b/app/src/main/java/com/futo/platformplayer/views/video/FutoVideoPlayer.kt
@@ -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 ->
diff --git a/app/src/main/res/layout/video_player_ui_fullscreen.xml b/app/src/main/res/layout/video_player_ui_fullscreen.xml
index 3425d232..23ef18d1 100644
--- a/app/src/main/res/layout/video_player_ui_fullscreen.xml
+++ b/app/src/main/res/layout/video_player_ui_fullscreen.xml
@@ -57,6 +57,14 @@
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent">
+