mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-28 01:09:40 -05:00
Breaking changes:
'Gift': changed from class to enum, so now you can handle
incoming gifts in switch
`Events`
- new:
onGiftComboFinished
- Removed:
onGiftBrodcast
- Rename:
onGiftMessage -> onGift
onRoomPinMessage -> onRoomPin
onRoomMessage -> onRoom
onLinkMessage -> onLink
onBarrageMessage -> onBarrage
onPollMessage -> onPoll
onShopMessage -> onShop
onDetectMessage -> onDetect
`GiftManager`
added:
registerGift
findById
findByName
getGifts
removed:
getActiveGifts
This commit is contained in:
@@ -32,7 +32,7 @@ public class ConfigurationExample {
|
||||
TikTokLive.newClient(Main.TEST_TIKTOK_USER)
|
||||
.configure(clientSettings ->
|
||||
{
|
||||
clientSettings.setHostName(Main.TEST_TIKTOK_USER); // TikTok user name
|
||||
clientSettings.setHostName(Main.TEST_TIKTOK_USER); // TikTok hostname
|
||||
clientSettings.setClientLanguage("en"); // Language
|
||||
clientSettings.setTimeout(Duration.ofSeconds(2)); // Connection timeout
|
||||
clientSettings.setLogLevel(Level.ALL); // Log level
|
||||
@@ -49,6 +49,7 @@ public class ConfigurationExample {
|
||||
clientSettings.setRoomId("XXXXXXXXXXXXXXXXX");
|
||||
})
|
||||
.buildAndConnect();
|
||||
|
||||
System.in.read();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ public class Main {
|
||||
clientSettings.setRetryOnConnectionFailure(true);
|
||||
clientSettings.setHandleExistingEvents(true);
|
||||
})
|
||||
.onGift((liveClient, event) ->
|
||||
.onError((liveClient, event) ->
|
||||
{
|
||||
var i=0;
|
||||
|
||||
})
|
||||
.onConnected(Main::onConnected)
|
||||
.onDisconnected(Main::onDisconnected)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user