Эх сурвалжийг харах

Merge pull request #9859 from nextcloud/fix/video-stacking

Misc fixes for video player
Álvaro Brey 3 жил өмнө
parent
commit
00009680a3

+ 1 - 1
scripts/analysis/findbugs-results.txt

@@ -1 +1 @@
-642
+641

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 102 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 94 warnings</span>

+ 24 - 18
src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java

@@ -305,9 +305,12 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
             // bind to any existing player
             mediaPlayerServiceConnection.bind();
 
-            exoPlayer = new ExoPlayer.Builder(requireContext()).build();
+            if (exoPlayer == null) {
+                exoPlayer = new ExoPlayer.Builder(requireContext()).build();
+            }
             binding.exoplayerView.setPlayer(exoPlayer);
 
+
             LinearLayout linearLayout = binding.exoplayerView.findViewById(R.id.exo_center_controls);
 
             if (linearLayout.getChildCount() == 5) {
@@ -470,15 +473,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
         // load the video file in the video player
         // when done, VideoHelper#onPrepared() will be called
         if (getFile().isDown()) {
-            binding.progress.setVisibility(View.GONE);
-
-            exoPlayer.addMediaItem(MediaItem.fromUri(getFile().getStorageUri()));
-            exoPlayer.prepare();
-
-            if (savedPlaybackPosition >= 0) {
-                exoPlayer.seekTo(savedPlaybackPosition);
-            }
-            exoPlayer.play();
+            playVideoUri(getFile().getStorageUri());
         } else {
             try {
                 new LoadStreamUrl(this, user, clientFactory).execute(getFile().getLocalId());
@@ -488,6 +483,18 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
         }
     }
 
+    private void playVideoUri(final Uri uri) {
+        binding.progress.setVisibility(View.GONE);
+
+        exoPlayer.addMediaItem(MediaItem.fromUri(uri));
+        exoPlayer.prepare();
+
+        if (savedPlaybackPosition >= 0) {
+            exoPlayer.seekTo(savedPlaybackPosition);
+        }
+        exoPlayer.play();
+    }
+
     @Override
     public void onFullScreenModeChanged(boolean isFullScreen) {
         Log_OC.e(TAG, "Fullscreen: " + isFullScreen);
@@ -532,12 +539,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
             if (previewMediaFragment != null && previewMediaFragment.binding != null && context != null) {
                 if (uri != null) {
                     previewMediaFragment.videoUri = uri;
-
-                    previewMediaFragment.binding.progress.setVisibility(View.GONE);
-
-                    previewMediaFragment.exoPlayer.addMediaItem(MediaItem.fromUri(uri));
-                    previewMediaFragment.exoPlayer.prepare();
-                    previewMediaFragment.exoPlayer.play();
+                    previewMediaFragment.playVideoUri(uri);
                 } else {
                     previewMediaFragment.emptyListView.setVisibility(View.VISIBLE);
                     previewMediaFragment.setVideoErrorMessage(
@@ -579,10 +581,14 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
     @Override
     public void onStop() {
         Log_OC.v(TAG, "onStop");
-        if (MimeTypeUtil.isAudio(getFile()) && !mediaPlayerServiceConnection.isPlaying()) {
+        final OCFile file = getFile();
+        if (MimeTypeUtil.isAudio(file) && !mediaPlayerServiceConnection.isPlaying()) {
             stopAudio();
+        } else if (MimeTypeUtil.isVideo(file) && exoPlayer.isPlaying()) {
+            savedPlaybackPosition = exoPlayer.getCurrentPosition();
+            exoPlayer.pause();
         }
-        
+
         mediaPlayerServiceConnection.unbind();
         toggleDrawerLockMode(containerActivity, DrawerLayout.LOCK_MODE_UNLOCKED);
         super.onStop();

+ 0 - 211
src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.java

@@ -1,211 +0,0 @@
-/*
- *   ownCloud Android client application
- *
- *   @author David A. Velasco
- *   Copyright (C) 2015 ownCloud Inc.
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.ui.preview;
-
-import android.content.Intent;
-import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnCompletionListener;
-import android.media.MediaPlayer.OnErrorListener;
-import android.media.MediaPlayer.OnPreparedListener;
-import android.net.Uri;
-import android.os.Bundle;
-
-import com.google.android.exoplayer2.ExoPlayer;
-import com.google.android.exoplayer2.MediaItem;
-import com.google.android.exoplayer2.SimpleExoPlayer;
-import com.google.android.exoplayer2.ui.StyledPlayerView;
-import com.nextcloud.client.media.ErrorFormat;
-import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.ui.activity.FileActivity;
-import com.owncloud.android.utils.MimeTypeUtil;
-
-import androidx.annotation.NonNull;
-import androidx.appcompat.app.AlertDialog;
-
-/**
- *  Activity implementing a basic video player.
- *
- *  Used as an utility to preview video files contained in an ownCloud account.
- *
- *  Currently, it always plays in landscape mode, full screen. When the playback ends,
- *  the activity is finished.
- */
-public class PreviewVideoActivity extends FileActivity implements OnCompletionListener, OnPreparedListener, OnErrorListener {
-
-    /** Key to receive a flag signaling if the video should be started immediately */
-    public static final String EXTRA_AUTOPLAY = "AUTOPLAY";
-
-    /** Key to receive the position of the playback where the video should be put at start */
-    public static final String EXTRA_START_POSITION = "START_POSITION";
-
-    public static final String EXTRA_STREAM_URL = "STREAM_URL";
-
-    private static final String TAG = PreviewVideoActivity.class.getSimpleName();
-
-    private long mSavedPlaybackPosition = -1;         // in the unit time handled by MediaPlayer.getCurrentPosition()
-    private boolean mAutoplay;                  // when 'true', the playback starts immediately with the activity
-    private ExoPlayer exoPlayer;             // view to play the file; both performs and show the playback
-    private Uri mStreamUri;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        Log_OC.v(TAG, "onCreate");
-
-        setContentView(R.layout.video_layout);
-
-        Bundle extras = getIntent().getExtras();
-
-        if (savedInstanceState == null && extras != null) {
-            mSavedPlaybackPosition = extras.getLong(EXTRA_START_POSITION);
-            mAutoplay = extras.getBoolean(EXTRA_AUTOPLAY);
-            mStreamUri = (Uri) extras.get(EXTRA_STREAM_URL);
-        } else if (savedInstanceState != null) {
-            mSavedPlaybackPosition = savedInstanceState.getLong(EXTRA_START_POSITION);
-            mAutoplay = savedInstanceState.getBoolean(EXTRA_AUTOPLAY);
-            mStreamUri = (Uri) savedInstanceState.get(EXTRA_STREAM_URL);
-        }
-
-        StyledPlayerView playerView = findViewById(R.id.videoPlayer);
-        exoPlayer = new SimpleExoPlayer.Builder(this).build();
-        playerView.setPlayer(exoPlayer);
-
-        findViewById(R.id.exo_exit_fs).setOnClickListener(v -> finish());
-
-        if (mSavedPlaybackPosition >= 0) {
-            exoPlayer.seekTo(mSavedPlaybackPosition);
-        }
-
-        if (getSupportActionBar() != null) {
-            getSupportActionBar().hide();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void onSaveInstanceState(@NonNull Bundle outState) {
-        super.onSaveInstanceState(outState);
-        outState.putLong(PreviewVideoActivity.EXTRA_START_POSITION, exoPlayer.getCurrentPosition());
-        outState.putBoolean(PreviewVideoActivity.EXTRA_AUTOPLAY, exoPlayer.isPlaying());
-        outState.putParcelable(PreviewVideoActivity.EXTRA_STREAM_URL, mStreamUri);
-    }
-
-
-    @Override
-    public void onBackPressed() {
-        Log_OC.v(TAG, "onBackPressed");
-        Intent i = new Intent();
-        i.putExtra(EXTRA_AUTOPLAY, exoPlayer.isPlaying());
-        i.putExtra(EXTRA_START_POSITION, exoPlayer.getCurrentPosition());
-        setResult(RESULT_OK, i);
-
-        exoPlayer.stop();
-        exoPlayer.release();
-
-        super.onBackPressed();
-    }
-
-
-    /**
-     * Called when the file is ready to be played.
-     *
-     * Just starts the playback.
-     *
-     * @param   mp    {@link MediaPlayer} instance performing the playback.
-     */
-    @Override
-    public void onPrepared(MediaPlayer mp) {
-        Log_OC.v(TAG, "onPrepare");
-        exoPlayer.seekTo(mSavedPlaybackPosition);
-        if (mAutoplay) {
-            exoPlayer.play();
-        }
-    }
-
-
-    /**
-     * Called when the file is finished playing.
-     *
-     * Rewinds the video
-     *
-     * @param   mp    {@link MediaPlayer} instance performing the playback.
-     */
-    @Override
-    public void onCompletion(MediaPlayer  mp) {
-        exoPlayer.seekTo(0);
-    }
-
-
-    /**
-     * Called when an error in playback occurs.
-     *
-     * @param   mp      {@link MediaPlayer} instance performing the playback.
-     * @param   what    Type of error
-     * @param   extra   Extra code specific to the error
-     */
-    @Override
-    public boolean onError(MediaPlayer mp, int what, int extra) {
-        Log_OC.e(TAG, "Error in video playback, what = " + what + ", extra = " + extra);
-
-        String message = ErrorFormat.toString(this, what, extra);
-        new AlertDialog.Builder(this)
-            .setMessage(message)
-            .setPositiveButton(android.R.string.VideoView_error_button,
-                               (dialog, whichButton) -> PreviewVideoActivity.this.onCompletion(null))
-            .setCancelable(false)
-            .show();
-        return true;
-    }
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-        if (getAccount() != null) {
-            OCFile file = getFile();
-            /// Validate handled file  (first image to preview)
-            if (file == null) {
-                throw new IllegalStateException("Instanced with a NULL OCFile");
-            }
-            if (!MimeTypeUtil.isVideo(file)) {
-                throw new IllegalArgumentException("Non-video file passed as argument");
-            }
-            file = getStorageManager().getFileById(file.getFileId());
-            if (file != null) {
-                if (file.isDown()) {
-                    exoPlayer.addMediaItem(MediaItem.fromUri(file.getStorageUri()));
-                } else {
-                    exoPlayer.addMediaItem(MediaItem.fromUri(mStreamUri));
-                }
-
-                exoPlayer.prepare();
-                exoPlayer.play();
-            } else {
-                finish();
-            }
-        } else {
-            finish();
-        }
-   }
-}

+ 227 - 0
src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt

@@ -0,0 +1,227 @@
+/*
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package com.owncloud.android.ui.preview
+
+import android.content.DialogInterface
+import android.content.Intent
+import android.media.MediaPlayer
+import android.media.MediaPlayer.OnCompletionListener
+import android.media.MediaPlayer.OnPreparedListener
+import android.net.Uri
+import android.os.Bundle
+import android.view.View
+import androidx.appcompat.app.AlertDialog
+import com.google.android.exoplayer2.ExoPlayer
+import com.google.android.exoplayer2.MediaItem
+import com.google.android.exoplayer2.Player
+import com.nextcloud.client.media.ErrorFormat.toString
+import com.owncloud.android.R
+import com.owncloud.android.databinding.ActivityPreviewVideoBinding
+import com.owncloud.android.datamodel.OCFile
+import com.owncloud.android.lib.common.utils.Log_OC
+import com.owncloud.android.ui.activity.FileActivity
+import com.owncloud.android.utils.MimeTypeUtil
+
+/**
+ * Activity implementing a basic video player.
+ *
+ * THIS CLASS NEEDS WORK; the old listeners (OnCompletion, OnPrepared; OnError) don't work with ExoPlayer
+ */
+@Suppress("TooManyFunctions")
+class PreviewVideoActivity :
+    FileActivity(),
+    OnCompletionListener,
+    OnPreparedListener,
+    MediaPlayer.OnErrorListener,
+    Player.Listener {
+
+    private var mSavedPlaybackPosition: Long = -1 // in the unit time handled by MediaPlayer.getCurrentPosition()
+    private var mAutoplay = false // when 'true', the playback starts immediately with the activity
+    private var exoPlayer: ExoPlayer? = null // view to play the file; both performs and show the playback
+    private var mStreamUri: Uri? = null
+    private lateinit var binding: ActivityPreviewVideoBinding
+
+    private lateinit var pauseButton: View
+
+    private lateinit var playButton: View
+
+    public override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        Log_OC.v(TAG, "onCreate")
+
+        binding = ActivityPreviewVideoBinding.inflate(layoutInflater)
+        setContentView(binding.root)
+
+        val extras = intent.extras
+
+        if (savedInstanceState == null && extras != null) {
+            mSavedPlaybackPosition = extras.getLong(EXTRA_START_POSITION)
+            mAutoplay = extras.getBoolean(EXTRA_AUTOPLAY)
+            mStreamUri = extras[EXTRA_STREAM_URL] as Uri?
+        } else if (savedInstanceState != null) {
+            mSavedPlaybackPosition = savedInstanceState.getLong(EXTRA_START_POSITION)
+            mAutoplay = savedInstanceState.getBoolean(EXTRA_AUTOPLAY)
+            mStreamUri = savedInstanceState[EXTRA_STREAM_URL] as Uri?
+        }
+
+        exoPlayer = ExoPlayer.Builder(this).build()
+        binding.videoPlayer.player = exoPlayer
+        exoPlayer!!.addListener(this)
+
+        binding.root.findViewById<View>(R.id.exo_exit_fs).setOnClickListener { onBackPressed() }
+
+        pauseButton = binding.root.findViewById(R.id.exo_pause)
+        pauseButton.setOnClickListener { exoPlayer!!.pause() }
+
+        playButton = binding.root.findViewById(R.id.exo_play)
+        playButton.setOnClickListener { exoPlayer!!.play() }
+
+        if (mSavedPlaybackPosition >= 0) {
+            exoPlayer?.seekTo(mSavedPlaybackPosition)
+        }
+
+        supportActionBar?.hide()
+    }
+
+    override fun onIsPlayingChanged(isPlaying: Boolean) {
+        super.onIsPlayingChanged(isPlaying)
+        if (isPlaying) {
+            playButton.visibility = View.GONE
+            pauseButton.visibility = View.VISIBLE
+        } else {
+            playButton.visibility = View.VISIBLE
+            pauseButton.visibility = View.GONE
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public override fun onSaveInstanceState(outState: Bundle) {
+        super.onSaveInstanceState(outState)
+        outState.putLong(EXTRA_START_POSITION, currentPosition())
+        outState.putBoolean(EXTRA_AUTOPLAY, isPlaying())
+        outState.putParcelable(EXTRA_STREAM_URL, mStreamUri)
+    }
+
+    override fun onBackPressed() {
+        Log_OC.v(TAG, "onBackPressed")
+        val i = Intent()
+        i.putExtra(EXTRA_AUTOPLAY, isPlaying())
+        i.putExtra(EXTRA_START_POSITION, currentPosition())
+        setResult(RESULT_OK, i)
+        exoPlayer?.stop()
+        exoPlayer?.release()
+        super.onBackPressed()
+    }
+
+    private fun isPlaying() = exoPlayer?.isPlaying ?: false
+    private fun currentPosition() = exoPlayer?.currentPosition ?: 0
+
+    /**
+     * Called when the file is ready to be played.
+     *
+     * Just starts the playback.
+     *
+     * @param mp    [MediaPlayer] instance performing the playback.
+     */
+    override fun onPrepared(mp: MediaPlayer) {
+        Log_OC.v(TAG, "onPrepare")
+        exoPlayer?.seekTo(mSavedPlaybackPosition)
+        if (mAutoplay) {
+            exoPlayer?.play()
+        }
+    }
+
+    /**
+     * Called when the file is finished playing.
+     *
+     * Rewinds the video
+     *
+     * @param mp    [MediaPlayer] instance performing the playback.
+     */
+    override fun onCompletion(mp: MediaPlayer?) {
+        exoPlayer?.seekTo(0)
+    }
+
+    /**
+     * Called when an error in playback occurs.
+     *
+     * @param mp      [MediaPlayer] instance performing the playback.
+     * @param what    Type of error
+     * @param extra   Extra code specific to the error
+     */
+    override fun onError(mp: MediaPlayer, what: Int, extra: Int): Boolean {
+        Log_OC.e(TAG, "Error in video playback, what = $what, extra = $extra")
+        val message = toString(this, what, extra)
+        AlertDialog.Builder(this)
+            .setMessage(message)
+            .setPositiveButton(android.R.string.VideoView_error_button) { _: DialogInterface?, _: Int ->
+                onCompletion(null)
+            }
+            .setCancelable(false)
+            .show()
+        return true
+    }
+
+    override fun onStart() {
+        super.onStart()
+        if (account != null) {
+
+            require(file != null) { throw IllegalStateException("Instanced with a NULL OCFile") }
+            var fileToPlay: OCFile? = file
+
+            // / Validate handled file  (first image to preview)
+            require(MimeTypeUtil.isVideo(fileToPlay)) { "Non-video file passed as argument" }
+
+            fileToPlay = storageManager.getFileById(fileToPlay!!.fileId)
+            if (fileToPlay != null) {
+                if (fileToPlay.isDown) {
+                    exoPlayer?.addMediaItem(MediaItem.fromUri(fileToPlay.storageUri))
+                } else {
+                    exoPlayer?.addMediaItem(MediaItem.fromUri(mStreamUri!!))
+                }
+                exoPlayer?.prepare()
+                exoPlayer?.play()
+            } else {
+                finish()
+            }
+        } else {
+            finish()
+        }
+    }
+
+    override fun onStop() {
+        super.onStop()
+        if (exoPlayer?.isPlaying == true) {
+            exoPlayer?.pause()
+        }
+    }
+
+    companion object {
+        /** Key to receive a flag signaling if the video should be started immediately  */
+        const val EXTRA_AUTOPLAY = "AUTOPLAY"
+
+        /** Key to receive the position of the playback where the video should be put at start  */
+        const val EXTRA_START_POSITION = "START_POSITION"
+        const val EXTRA_STREAM_URL = "STREAM_URL"
+        private val TAG = PreviewVideoActivity::class.java.simpleName
+    }
+}

+ 29 - 0
src/main/res/drawable/ripple.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+  ~ Nextcloud Android client application
+  ~
+  ~ @author Álvaro Brey Vilas
+  ~ Copyright (C) 2022 Álvaro Brey Vilas
+  ~ Copyright (C) 2022 Nextcloud GmbH
+  ~
+  ~ This program is free software: you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ (at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program. If not, see <https://www.gnu.org/licenses/>.
+  -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+    android:color="@color/grey_200">
+    <item android:id="@android:id/mask">
+        <shape android:shape="oval">
+            <solid android:color="?android:colorPrimary" />
+        </shape>
+        <color android:color="@color/white" />
+    </item>
+</ripple>

+ 0 - 0
src/main/res/layout/video_layout.xml → src/main/res/layout/activity_preview_video.xml


+ 20 - 18
src/main/res/layout/exo_player_control_view.xml

@@ -31,39 +31,41 @@
 
         <ImageButton
             android:id="@id/exo_prev"
-            style="@style/ExoMediaButton.Previous" />
+            style="@style/FullScreenExoControlButton"
+            android:background="?attr/selectableItemBackgroundBorderless"
+            android:src="@drawable/exo_controls_previous" />
 
         <ImageButton
             android:id="@id/exo_rew"
-            style="@style/ExoMediaButton.Rewind" />
-
-        <ImageButton
-            android:id="@id/exo_shuffle"
-            style="@style/ExoMediaButton" />
-
-        <ImageButton
-            android:id="@id/exo_repeat_toggle"
-            style="@style/ExoMediaButton" />
+            style="@style/FullScreenExoControlButton"
+            android:contentDescription="@string/exo_controls_rewind_description"
+            android:src="@drawable/exo_controls_rewind" />
 
         <ImageButton
             android:id="@id/exo_play"
-            style="@style/ExoMediaButton.Play" />
+            style="@style/FullScreenExoControlButton"
+            android:contentDescription="@string/exo_controls_play_description"
+            android:src="@drawable/exo_controls_play"
+            android:visibility="gone"
+            tools:visibility="visible" />
 
         <ImageButton
             android:id="@id/exo_pause"
-            style="@style/ExoMediaButton.Pause" />
+            style="@style/FullScreenExoControlButton"
+            android:contentDescription="@string/exo_controls_pause_description"
+            android:src="@drawable/exo_controls_pause" />
 
         <ImageButton
             android:id="@id/exo_ffwd"
-            style="@style/ExoMediaButton.FastForward" />
-
-        <ImageButton
-            android:id="@id/exo_vr"
-            style="@style/ExoMediaButton.VR" />
+            style="@style/FullScreenExoControlButton"
+            android:contentDescription="@string/exo_controls_fastforward_description"
+            android:src="@drawable/exo_controls_fastforward" />
 
         <ImageButton
             android:id="@+id/exo_exit_fs"
-            style="@style/ExoMediaButton.ExitFullscreen" />
+            style="@style/FullScreenExoControlButton"
+            android:contentDescription="@string/exo_controls_fullscreen_exit_description"
+            android:src="@drawable/exo_styled_controls_fullscreen_exit" />
 
     </LinearLayout>
 

+ 3 - 4
src/main/res/values/styles.xml

@@ -435,9 +435,8 @@
         <item name="android:textStyle">bold</item>
     </style>
 
-    <style name="ExoMediaButton.ExitFullscreen" parent="ExoStyledControls.Button.Center">
-        <item name="android:src">@drawable/exo_styled_controls_fullscreen_exit</item>
-        <item name="android:contentDescription">@string/exo_controls_fullscreen_exit_description</item>
-        <item name="android:padding">@dimen/exo_icon_padding</item>
+    <style name="FullScreenExoControlButton" parent="ExoStyledControls.Button.Center">
+        <item name="android:background">@drawable/ripple</item>
     </style>
+
 </resources>