Search in sources :

Example 1 with MpegAudioTrack

use of com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack in project lavaplayer by sedmelluq.

the class VimeoAudioTrack method process.

@Override
public void process(LocalAudioTrackExecutor localExecutor) throws Exception {
    try (HttpInterface httpInterface = sourceManager.getHttpInterface()) {
        String playbackUrl = loadPlaybackUrl(httpInterface);
        log.debug("Starting Vimeo track from URL: {}", playbackUrl);
        try (PersistentHttpStream stream = new PersistentHttpStream(httpInterface, new URI(playbackUrl), null)) {
            processDelegate(new MpegAudioTrack(trackInfo, stream), localExecutor);
        }
    }
}
Also used : HttpInterface(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface) MpegAudioTrack(com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack) PersistentHttpStream(com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream) URI(java.net.URI)

Example 2 with MpegAudioTrack

use of com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack in project lavaplayer by sedmelluq.

the class NicoAudioTrack method process.

@Override
public void process(LocalAudioTrackExecutor localExecutor) throws Exception {
    sourceManager.checkLoggedIn();
    try (HttpInterface httpInterface = sourceManager.getHttpInterface()) {
        loadVideoMainPage(httpInterface);
        String playbackUrl = loadPlaybackUrl(httpInterface);
        log.debug("Starting NicoNico track from URL: {}", playbackUrl);
        try (PersistentHttpStream stream = new PersistentHttpStream(httpInterface, new URI(playbackUrl), null)) {
            processDelegate(new MpegAudioTrack(trackInfo, stream), localExecutor);
        }
    }
}
Also used : HttpInterface(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface) MpegAudioTrack(com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack) PersistentHttpStream(com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream) URI(java.net.URI)

Aggregations

MpegAudioTrack (com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack)2 HttpInterface (com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface)2 PersistentHttpStream (com.sedmelluq.discord.lavaplayer.tools.io.PersistentHttpStream)2 URI (java.net.URI)2