Reputation: 560
I would like to play a MP4 video from a URL in my 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 that? Do I need to create my own Activity or is there a standard one in the leanback support library?
Upvotes: 4
Views: 5361
Reputation: 12339
The androidtv-Leanback example already includes video playback.
If you take a look at the PlaybackOverlayActivity, you will see that the VideoView
class is used to play sample videos (you can find the documentation here).
However, there is no standard component in the Leanback support library, so you will have to define an Activity yourself.
Upvotes: 3