mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Removed useless imports and altered logger message!
This commit is contained in:
@@ -26,6 +26,8 @@ package io.github.jwdeveloper.tiktok;
|
||||
import io.github.jwdeveloper.tiktok.extension.recorder.TikTokLiveRecorder;
|
||||
import io.github.jwdeveloper.tiktok.extension.recorder.impl.event.TikTokLiveRecorderStartedEvent;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class RecorderExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -42,8 +44,7 @@ public class RecorderExample {
|
||||
.addListener(TikTokLiveRecorder.use(recorderSettings ->
|
||||
{
|
||||
recorderSettings.setFfmpegPath("C:\\Users\\ja\\IdeaProjects\\TikTokLiveJava\\extension-recorder\\libs\\ffmpeg.exe");
|
||||
recorderSettings.setOutputPath("C:\\Users\\ja\\IdeaProjects\\TikTokLiveJava\\extension-recorder\\out");
|
||||
recorderSettings.setOutputFileName("test.flv");
|
||||
recorderSettings.setOutputFile(new File("C:\\Users\\ja\\IdeaProjects\\TikTokLiveJava\\extension-recorder\\out", "test.flv"));
|
||||
}))
|
||||
.onEvent(TikTokLiveRecorderStartedEvent.class, (liveClient, event) ->
|
||||
{
|
||||
@@ -52,4 +53,4 @@ public class RecorderExample {
|
||||
.buildAndConnect();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,11 +37,8 @@ import io.github.jwdeveloper.tiktok.models.ConnectionState;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
public class RecorderListener implements LiveRecorder {
|
||||
|
||||
private final Consumer<RecorderSettings> consumer;
|
||||
@@ -78,7 +75,7 @@ public class RecorderListener implements LiveRecorder {
|
||||
|
||||
liveDownloadThread = new Thread(() -> {
|
||||
try {
|
||||
liveClient.getLogger().info("Recording started");
|
||||
liveClient.getLogger().info("Recording started "+liveClient.getRoomInfo().getHostName());
|
||||
var url = new URL(downloadData.getFullUrl());
|
||||
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
|
||||
var headers = LiveClientSettings.DefaultRequestHeaders();
|
||||
|
||||
Reference in New Issue
Block a user