We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

celinafregoso99's avatar
celinafregoso99
Explorer | Level 3
5 years ago

why I can't stream an audio stored in dropbox using Android Exoplayer?

I can use an exoplayer like this

 

lateinit var player : SimpleExoPlayer!

val mediaItem = MediaItem.fromUri("https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3")
player = SimpleExoPlayer.Builder(mContext).build()
player.setMediaItem(mediaItem)
playerView.player = player

 

I can stream the audio without any use if I use the code above.

but if I want to use an audio file that have in dropbox, the sound will never play, the code and link is like this

 

val mediaItem = MediaItem.fromUri("https://www.dropbox.com/s/lbe1kod9t6yuh5j/sample1.m4a")

how to solve this ?

2 Replies

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers814 PostsLatest Activity: 2 years ago
274 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!