Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Regarding the issue of obtaining music progress bar time and playlist progress time

Regarding the issue of obtaining music progress bar time and playlist progress time

I would like to know which API is used to obtain the total duration of playing songs. Currently, the song details page of we is returned through onMetadataChange and the song list is obtained through getQueue. They would like to know which method is more accurate for obtaining the total duration of playing songs

Plan

Free/Premium

Country

HONGKONG

Device

NA

Operating System

Android 11

 

My Question or Issue

The song duration obtained from the current mCurrentMetaData.getlona(MediaMetedataCompat.METADATA_KEY_DURATON) returned through onMetadataChanged is 573721
The total duration of the songs obtained by calling getExtras.getlong(MediaMetadataCompat.METADATA_KEY_DURATION) through the obtained QueueItem in the list is 575000, with a difference of 2 seconds. It's easy to handle 1 second. If this difference is significant, how can we maintain consistency

 

Reply
0 Replies

Suggested posts