mrmaffen / vlc-android-sdk

VLC Android SDK pushed to Maven Central. Primarily used in project tomahawk-android.
792 stars 244 forks source link

Play music in background. #120

Open ErJeetChaudhary opened 6 years ago

ErJeetChaudhary commented 6 years ago

Using this library can we play music in background without showing video.? Thanx...

KnIfER commented 6 years ago

just don't attach views.

    mLibVLC = new LibVLC(context);    
    mPlayer = new MediaPlayer(mLibVLC);  
    mPlayer.setMedia(....)  
    mPlayer.play();  

and you can try this:

    ArrayList<String> options = new ArrayList(1);  
    options.add("--no-video");  
    mLibVLC = new LibVLC(context,options);