diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt index 9943b1c165..8ab256a114 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt @@ -377,9 +377,15 @@ class PreviewMediaActivity : } private fun prepareAudioPlayer(uri: Uri) { - hideProgressLayout() audioMediaController?.let { audioPlayer -> audioPlayer.addListener(object : Player.Listener { + + override fun onPlaybackStateChanged(playbackState: Int) { + if(playbackState == Player.STATE_READY){ + hideProgressLayout() + } + } + override fun onMediaMetadataChanged(mediaMetadata: MediaMetadata) { val artworkBitmap = mediaMetadata.artworkData?.let { bytes: ByteArray -> BitmapFactory.decodeByteArray(bytes, 0, bytes.size)