mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
hide loading when player's Ready
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parent
01a9042913
commit
d71c2f3d4a
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue