How to embed VLC media player to my Android App

混江龙づ霸主 提交于 2019-11-27 18:00:37

Yes, if you already have the vlc-sdk.7z (libVLC for android), here is the sample project to embedded VLC into your android apps.

If you do not have libVLC, here are the steps to build one. (After "sh compile.sh" finished, "make vlc-sdk.7z" to create the vlc-sdk.7z and unzip to the demo project.

I put the vlc-sdk.7z(only armeabi-v7a is included) here for testing.

Maruku has given a great answer.

In addition, if you don't want to compile libVLC on your own machine, mrmaffen has kindly thrown it up onto maven central. So in your .gradle file include

compile "de.mrmaffen:vlc-android-sdk:1.9.8"

Keep in mind that LibVLC may not be 100% updated because you aren't compiling the source yourself.

More info can be found here on GitHub

Some other answers link to outdated versions, however actual for 2019.03 is LibVlc for all platforms 3.1.8. This is .aar version, you may add it to your project with these instructions and use.

However if all-version is too large(over 70MB), here is armv7 version, and here if x86.

Step 1 : install Linux

Step 2 : install ndk and sdk

Step 3 : change your directory path upto compile.sh

then compile.sh run through your Linux terminal and generate apk

Compile - Run - Enjoy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!