-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
[REQUIRED] Issue description
Hello, I found that using simpleExoPlayer.duration, In some audio links, the total duration of playback is incorrect.
For example, a song that takes a total of 2 minutes, but can only play for one minute.
[REQUIRED] Reproduction steps
Use https://pro-audio.xiaoheiban.cn/201907/0fd5f017-cafe-4dfd-9f69-3a06cf4e2651.wav audio link
val url = "https://pro-audio.xiaoheiban.cn/201907/0fd5f017-cafe-4dfd-9f69-3a06cf4e2651.wav"
val mediaMetadataCompat = MediaMetadataCompat.Builder()
.putString(MediaMetadataCompat.METADATA_KEY_MEDIA_ID, "METADATA_KEY_MEDIA_ID")
.putString(MediaMetadataCompat.METADATA_KEY_TITLE, "METADATA_KEY_TITLE")
.putString(MediaMetadataCompat.METADATA_KEY_MEDIA_URI, url)
.build()
mediaMetadataCompat.description.extras?.putAll(mediaMetadataCompat.bundle)
val extractorMediaSource = ExtractorMediaSource.Factory(factory)
.setTag(mediaMetadataCompat.description)
.createMediaSource(Uri.parse(url))
val concatenatingMediaSource = ConcatenatingMediaSource()
concatenatingMediaSource.addMediaSource(extractorMediaSource)
simpleExoPlayer.prepare(concatenatingMediaSource)
simpleExoPlayer.seekTo(0, 0)When the music is playing, the total length of the music is found to be wrong.
val duration = simpleExoPlayer.duration[REQUIRED] Version of ExoPlayer being used
com.google.android.exoplayer:exoplayer:2.10.3
com.google.android.exoplayer:exoplayer-ui:2.10.3
com.google.android.exoplayer:extension-mediasession:2.10.3
Reactions are currently unavailable