Media Controller

VLC for Android and Chrome OS specific usage questions
yairko
Blank Cone
Blank Cone
Posts: 16
Joined: 06 Dec 2016 12:25

Media Controller

Postby yairko » 23 Feb 2017 16:01

Hello

I have a working vlc project on android and I need to add media controller with features like pause stop seek etc.
I'm in a dead end about how to do that. I simply can not find any reference for that feature.

Please help if you can
Appreciate

SaundersB
Blank Cone
Blank Cone
Posts: 16
Joined: 30 Dec 2016 15:44

Re: Media Controller

Postby SaundersB » 05 Mar 2017 19:14

First, include the libVLC library via Maven in Android. Then you'll create a libVLC instance object. You'll have to provide a file path of the media you want to play. You'll create a libVLC MediaPlayer and load the media into the MediaPlayer object. That MediaPlayer object will have commands like, start, stop, pause, etc... for control.

Whatever user interaction, such as buttons, you'll need to add onClick listeners that will signal your MediaPlayer object to start stop.

Here is a pretty simple example. You'll just need to link up your button events to the libVLC functions to control the MediaPlayer object.

https://github.com/wtud/LibVLCAndroidSample


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 41 guests