Pavan Sharma
Pavan Sharma

Reputation: 11

How to load video from Firebase

In case of image we use the following code for load multiple images from firebase database in recycler view

Picasso.with(this).load(imageUrl)
  .into(imageview)

but in case of video how the code will change? please guide me and tell what will be code for it

Upvotes: 1

Views: 1292

Answers (2)

Rander Gabriel
Rander Gabriel

Reputation: 647

Picasso is an image downloading and caching library and doesn't support playing videos. If you wanna play a video you will have to use another aproach. You can use ExoPlayer as jonyiash answered, for example. There is a tutorial for achieving that by using the VideoView component:

https://google-developer-training.github.io/android-developer-advanced-course-practicals/unit-5-advanced-graphics-and-views/lesson-13-media/13-1-p-playing-video-with-videoview/13-1-p-playing-video-with-videoview.html

Hope it helps :)

Upvotes: 3

Pehr Sibusiso
Pehr Sibusiso

Reputation: 912

Picasso is only for pictures. I think the best way to upload videos from url is Exoplayer.

Upvotes: 2

Related Questions