Search in sources :

Example 6 with YoutubeAudioSourceManager

use of com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager in project FlareBot by FlareBot.

the class RandomExtractor method newSourceManagerInstance.

@Override
public AudioSourceManager newSourceManagerInstance() throws Exception {
    YoutubeAudioSourceManager manager = new YoutubeAudioSourceManager();
    manager.setPlaylistPageCount(100);
    return manager;
}
Also used : YoutubeAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager)

Example 7 with YoutubeAudioSourceManager

use of com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager in project SkyBot by duncte123.

the class AudioUtils method initPlayerManager.

private void initPlayerManager() {
    if (playerManager == null) {
        playerManager = new DefaultAudioPlayerManager();
        playerManager.enableGcMonitoring();
        // Disable cookies for youtube
        YoutubeAudioSourceManager youtubeAudioSourceManager = new YoutubeAudioSourceManager(true);
        SoundCloudAudioSourceManager soundcloud = new SoundCloudAudioSourceManager();
        playerManager.registerSourceManager(new SpotifyAudioSourceManager(youtubeAudioSourceManager));
        playerManager.registerSourceManager(new ClypitAudioSourceManager());
        playerManager.registerSourceManager(youtubeAudioSourceManager);
        playerManager.registerSourceManager(soundcloud);
        playerManager.registerSourceManager(new BandcampAudioSourceManager());
        playerManager.registerSourceManager(new VimeoAudioSourceManager());
        playerManager.registerSourceManager(new TwitchStreamAudioSourceManager());
        playerManager.registerSourceManager(new BeamAudioSourceManager());
        playerManager.registerSourceManager(new HttpAudioSourceManager());
        AudioSourceManagers.registerLocalSource(playerManager);
    }
}
Also used : ClypitAudioSourceManager(ml.duncte123.skybot.objects.audiomanagers.clypit.ClypitAudioSourceManager) HttpAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager) YoutubeAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager) SoundCloudAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.soundcloud.SoundCloudAudioSourceManager) BeamAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.beam.BeamAudioSourceManager) BandcampAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.bandcamp.BandcampAudioSourceManager) TwitchStreamAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager) VimeoAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager) DefaultAudioPlayerManager(com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager) SpotifyAudioSourceManager(ml.duncte123.skybot.objects.audiomanagers.spotify.SpotifyAudioSourceManager)

Example 8 with YoutubeAudioSourceManager

use of com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager in project lavaplayer by sedmelluq.

the class AudioSourceManagers method registerRemoteSources.

/**
 * Registers all built-in remote audio sources to the specified player manager. Local file audio source must be
 * registered separately.
 *
 * @param playerManager Player manager to register the source managers to
 */
public static void registerRemoteSources(AudioPlayerManager playerManager) {
    playerManager.registerSourceManager(new YoutubeAudioSourceManager(true));
    playerManager.registerSourceManager(new SoundCloudAudioSourceManager());
    playerManager.registerSourceManager(new BandcampAudioSourceManager());
    playerManager.registerSourceManager(new VimeoAudioSourceManager());
    playerManager.registerSourceManager(new TwitchStreamAudioSourceManager());
    playerManager.registerSourceManager(new BeamAudioSourceManager());
    playerManager.registerSourceManager(new HttpAudioSourceManager());
}
Also used : HttpAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager) YoutubeAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager) SoundCloudAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.soundcloud.SoundCloudAudioSourceManager) BeamAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.beam.BeamAudioSourceManager) BandcampAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.bandcamp.BandcampAudioSourceManager) TwitchStreamAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager) VimeoAudioSourceManager(com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager)

Aggregations

YoutubeAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager)8 BandcampAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.bandcamp.BandcampAudioSourceManager)2 BeamAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.beam.BeamAudioSourceManager)2 HttpAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager)2 SoundCloudAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.soundcloud.SoundCloudAudioSourceManager)2 TwitchStreamAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager)2 VimeoAudioSourceManager (com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager)2 AudioLoadResultHandler (com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler)1 DefaultAudioPlayerManager (com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager)1 FriendlyException (com.sedmelluq.discord.lavaplayer.tools.FriendlyException)1 AudioPlaylist (com.sedmelluq.discord.lavaplayer.track.AudioPlaylist)1 AudioTrack (com.sedmelluq.discord.lavaplayer.track.AudioTrack)1 AudioTrackInfo (com.sedmelluq.discord.lavaplayer.track.AudioTrackInfo)1 Color (java.awt.Color)1 Optional (java.util.Optional)1 TimeUnit (java.util.concurrent.TimeUnit)1 IntConsumer (java.util.function.IntConsumer)1 Slf4j (lombok.extern.slf4j.Slf4j)1 ClypitAudioSourceManager (ml.duncte123.skybot.objects.audiomanagers.clypit.ClypitAudioSourceManager)1 SpotifyAudioSourceManager (ml.duncte123.skybot.objects.audiomanagers.spotify.SpotifyAudioSourceManager)1