Android TV Play video from URL

I would like to play an MP4 video from a URL in an Android TV app.

I couldn't find an example in the sample code ( https://github.com/googlesamples/androidtv-Leanback ).

Does anyone know how to do this? Do I need to create my own activity or is there a standard one in the unsupported support library?

+3


source to share


1 answer


The androidtv-Leanback example already includes video playback .

If you look at PlaybackOverlayActivity , you can see that the class is VideoView

used to play video samples (you can find the documentation here ).



However, there is no standard component in the Leanback support library, so you will need to define the action yourself.

+2


source







All Articles