mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
MINOR
Fixed poms files
This commit is contained in:
@@ -63,13 +63,19 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
<artifactId>extension-collector</artifactId>
|
<artifactId>extension-collector</artifactId>
|
||||||
<version>1.0.14-Release</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
<artifactId>extension-recorder</artifactId>
|
<artifactId>extension-recorder</artifactId>
|
||||||
<version>1.0.14-Release</version>
|
<version>${project.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
|
<artifactId>extension-collector</artifactId>
|
||||||
|
<version>1.0.17-Release</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -22,9 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.jwdeveloper.tiktok;
|
package io.github.jwdeveloper.tiktok;
|
||||||
|
|
||||||
import io.github.jwdeveloper.tiktok.extension.collector.TikTokLiveCollector;
|
|
||||||
|
|
||||||
|
|
||||||
|
import io.github.jwdeveloper.tiktok.extension.collector.TikTokLiveCollector;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
<artifactId>TikTokLiveJava</artifactId>
|
<artifactId>TikTokLiveJava</artifactId>
|
||||||
<version>1.0.14-Release</version>
|
<version>1.0.17-Release</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>TikTokLiveJava</artifactId>
|
<artifactId>TikTokLiveJava</artifactId>
|
||||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
<version>1.0.14-Release</version>
|
<version>1.0.17-Release</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>extension-recorder</artifactId>
|
<artifactId>extension-recorder</artifactId>
|
||||||
@@ -16,12 +16,6 @@
|
|||||||
<version>1.0.14-Release</version>
|
<version>1.0.14-Release</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.bramp.ffmpeg</groupId>
|
|
||||||
<artifactId>ffmpeg</artifactId>
|
|
||||||
<version>0.8.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
<groupId>io.github.jwdeveloper.tiktok</groupId>
|
||||||
<artifactId>API</artifactId>
|
<artifactId>API</artifactId>
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ import io.github.jwdeveloper.tiktok.extension.recorder.impl.enums.LiveQuality;
|
|||||||
import io.github.jwdeveloper.tiktok.extension.recorder.impl.event.TikTokLiveRecorderStartedEvent;
|
import io.github.jwdeveloper.tiktok.extension.recorder.impl.event.TikTokLiveRecorderStartedEvent;
|
||||||
import io.github.jwdeveloper.tiktok.http.HttpClientFactory;
|
import io.github.jwdeveloper.tiktok.http.HttpClientFactory;
|
||||||
import io.github.jwdeveloper.tiktok.live.LiveClient;
|
import io.github.jwdeveloper.tiktok.live.LiveClient;
|
||||||
import net.bramp.ffmpeg.FFmpeg;
|
|
||||||
import net.bramp.ffmpeg.FFmpegExecutor;
|
|
||||||
import net.bramp.ffmpeg.RunProcessFunction;
|
|
||||||
import net.bramp.ffmpeg.builder.FFmpegBuilder;
|
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@@ -95,39 +91,6 @@ public class RecorderListener implements LiveRecorder {
|
|||||||
|
|
||||||
@TikTokEventObserver
|
@TikTokEventObserver
|
||||||
private void onConnected(LiveClient liveClient, TikTokConnectedEvent event) {
|
private void onConnected(LiveClient liveClient, TikTokConnectedEvent event) {
|
||||||
/* liveDownloadThread = new Thread(() ->
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
var ffmpeg = new FFmpeg(settings.getFfmpegPath(), new RunProcessFunction() {
|
|
||||||
@Override
|
|
||||||
public Process run(final List<String> args) throws IOException {
|
|
||||||
var process = super.run(args);
|
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
|
||||||
terminateFfmpeg(process);
|
|
||||||
}, "FFmpeg process destroyer"));
|
|
||||||
return process;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var builder = new FFmpegBuilder()
|
|
||||||
.setInput(downloadData.getFullUrl())
|
|
||||||
.addOutput(settings.getOutputPath() + File.separator + settings.getOutputFileName()) // Set the output file path
|
|
||||||
.setFormat("mp4")
|
|
||||||
.done();
|
|
||||||
|
|
||||||
var executor = new FFmpegExecutor(ffmpeg);
|
|
||||||
var ffmpegProcess = executor.createJob(builder, (progress)-> {
|
|
||||||
liveClient.getLogger().info("Downloading stream: " +progress.total_size);
|
|
||||||
});
|
|
||||||
ffmpegProcess.run();
|
|
||||||
liveClient.publishEvent(new TikTokLiveRecorderStartedEvent(downloadData));
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new TikTokLiveException("Unable to run ffmpeg drivers",e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
liveDownloadThread = new Thread(() ->
|
liveDownloadThread = new Thread(() ->
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -139,7 +102,6 @@ public class RecorderListener implements LiveRecorder {
|
|||||||
socksConnection.setRequestProperty(entry.getKey(), entry.getValue());
|
socksConnection.setRequestProperty(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(socksConnection.getResponseCode());
|
|
||||||
try (var in = new BufferedInputStream(socksConnection.getInputStream())) {
|
try (var in = new BufferedInputStream(socksConnection.getInputStream())) {
|
||||||
var path = settings.getOutputPath() + File.separator + settings.getOutputFileName();
|
var path = settings.getOutputPath() + File.separator + settings.getOutputFileName();
|
||||||
var file = new File(path);
|
var file = new File(path);
|
||||||
|
|||||||
Reference in New Issue
Block a user