Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.DV8FromTheWorld:JDA-Player:'
}
dependencies {
implementation("com.github.DV8FromTheWorld:JDA-Player:")
}
<dependency>
<groupId>com.github.DV8FromTheWorld</groupId>
<artifactId>JDA-Player</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.DV8FromTheWorld" % "JDA-Player" % ""
:dependencies [[com.github.DV8FromTheWorld/JDA-Player ""]]
JDA-Player is a music player implementation for JDA (Java Discord API) which provides functionality to stream audio to a Discord VoiceChannel.
JDA-Player is deprecated and we will no longer offer support for possible issues and bugs.
Please use a more powerful library like lavaplayer, which is way more efficient and optimized, and runs exclusively on Java (no need for ffmpeg/ytdl/python).
If you have any questions feel free to join the JDA Guild on Discord and request support in the lavaplayer channel.
JDA-Player provides functionality to do this from both local files (LocalSource) and from remote sources like Youtube and Soundcloud (RemoteSource). It uses Youtube-dl for remote resource downloading, a combination of Youtube-dl and FFprobe for info gathering, and FFmpeg for audio encoding/decoding and general processing.
JDA-Player also has support for Discord4J, an alternate api to JDA. This separate verison is refered to as D4J-Player, but it remains within this repo.
We provide a small set of examples in the Repository's Wiki. If you need further help you can join the Discord Guild to ask any possible questions.
This project requires: