How to embed VLC media player to my Android App

前端 未结 7 1973
萌比男神i
萌比男神i 2020-12-01 01:02

Is there a way to embed VLC media player to Android Application? I have several issues:

1) I have a video streaming Camera (from RTSP) and I cannot play its stream o

7条回答
  •  清歌不尽
    2020-12-01 01:16

    The libVLC is provided by the official VideoLAN project hosted on BinTray. You can directly use the library as a dependency without having to compile it.

    add maven url "https://dl.bintray.com/videolan/Android" to your project-level Gradle file as shown below:

    allprojects {
     repositories {
          google()
          jcenter()
          maven {
            url "https://maven.google.com";
            }
          maven { url "https://dl.bintray.com/videolan/Android" }
      }
    }
    

    and in your app-level Gradle file, add the libVLC dependency

    implementation 'org.videolan.android:libvlc-all:'
    

    Get the latest libVLC version from the below official VLC GitHub repository.

    find the string "libvlcVersion" to get the latest version.

    https://github.com/videolan/vlc-android/blob/master/build.gradle#L33

提交回复
热议问题