mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-28 01:09:40 -05:00
Fixed bugs:
- addListeners() was throwing exception - 404 response code was return while connecting to tiktok for some users - configure.setRoomId() method for people that want to set roomId manually - client.roomInfo().isAgeRestricted() check if live has age restriction
This commit is contained in:
@@ -21,9 +21,12 @@ public class ConfigurationExample {
|
||||
clientSettings.setRetryOnConnectionFailure(true); // Reconnecting if TikTok user is offline
|
||||
clientSettings.setRetryConnectionTimeout(Duration.ofSeconds(1)); // Timeout before next reconnection
|
||||
|
||||
//Optional: Sometimes not every messages from chat are send to TikTokLiveJava to fix this issue you can set sessionId
|
||||
//Optional: Sometimes not every message from chat are send to TikTokLiveJava to fix this issue you can set sessionId
|
||||
// documentation how to obtain sessionId https://github.com/isaackogan/TikTok-Live-Connector#send-chat-messages
|
||||
clientSettings.setSessionId("86c3c8bf4b17ebb2d74bb7fa66fd0000");
|
||||
|
||||
//Optional:
|
||||
clientSettings.setRoomId("XXXXXXXXXXXXXXXXX");
|
||||
})
|
||||
.buildAndRun();
|
||||
System.in.read();
|
||||
|
||||
@@ -18,7 +18,7 @@ public class ListenerExample
|
||||
CustomListener customListener = new CustomListener();
|
||||
|
||||
// set tiktok username
|
||||
TikTokLive.newClient(Main.TEST_TIKTOK_USER)
|
||||
var client = TikTokLive.newClient(Main.TEST_TIKTOK_USER)
|
||||
.addListener(customListener)
|
||||
.buildAndRun();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user