Fix Bluetooth AVRCP duration metadata

This commit is contained in:
Alan Nelson 2019-07-09 22:34:18 -05:00
parent ad79a71fbd
commit 224a607bc3
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public class BasePlayerMediaSession implements MediaSessionCallback {
// set additional metadata for A2DP/AVRCP // set additional metadata for A2DP/AVRCP
Bundle additionalMetadata = new Bundle(); Bundle additionalMetadata = new Bundle();
additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, item.getUploader()); additionalMetadata.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, item.getUploader());
additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, item.getDuration()); additionalMetadata.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, item.getDuration() * 1000);
descriptionBuilder.setExtras(additionalMetadata); descriptionBuilder.setExtras(additionalMetadata);
final Uri thumbnailUri = Uri.parse(item.getThumbnailUrl()); final Uri thumbnailUri = Uri.parse(item.getThumbnailUrl());