Skip to content

Commit

Permalink
kotlinaudio: default mediaId to audioItem.audioUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
puckey committed Nov 18, 2024
1 parent 067ca53 commit 02bc35d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum class MediaType(val value: String) {

fun audioItem2MediaItem(audioItem: AudioItem, context: Context? = null): MediaItem {
return MediaItem.Builder()
.setMediaId(audioItem.mediaId ?: UUID.randomUUID().toString())
.setMediaId(audioItem.mediaId ?: audioItem.audioUrl)
.setUri(audioItem.audioUrl)
.setMediaMetadata(
MediaMetadata.Builder()
Expand Down

0 comments on commit 02bc35d

Please sign in to comment.