Compare commits

..

2 Commits

Author SHA1 Message Date
kohlerpop1
15d5c8bc54 Add Goody Bag proto for testing and update TikTokBarrageEvent for potential use in SuperFan events. 2026-03-03 22:23:55 -05:00
GitHub Action
203d7f414d Update version in pom.xml 2025-12-29 03:17:11 +00:00
11 changed files with 91 additions and 13 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>API</artifactId>

View File

@@ -39,9 +39,12 @@ public class TikTokBarrageEvent extends TikTokHeaderEvent {
private final String eventName;
private final int duration;
private final BarrageParam barrageParam;
// Expose for now until we know what this is used for
private final WebcastBarrageMessage barrageMessage;
public TikTokBarrageEvent(WebcastBarrageMessage msg) {
super(msg.getCommon());
this.barrageMessage = msg;
icon = Picture.map(msg.getIcon());
eventName = msg.getEvent().getEventName();
backGround = Picture.map(msg.getBackground());

View File

@@ -836,3 +836,33 @@ enum BattleCardMsgType {
BATTLE_CARD_MSG_TYPE_USE_TOP_2_CARD = 10;
BATTLE_CARD_MSG_TYPE_USE_TOP_3_CARD = 11;
}
enum GoodyBagMessageType {
GOODY_BAG_MESSAGE_TYPE_UNKNOWN = 0;
GOODY_BAG_MESSAGE_TYPES_END = 1;
GOODY_BAG_MESSAGE_TYPE_JOIN = 2;
GOODY_BAG_MESSAGE_TYPE_WINNERS_INFO = 3;
}
enum GoodyBagBiz {
GOODY_BAG_BIZ_UNKNOWN = 0;
GOODY_BAG_BIZ_NORMAL_COIN = 1;
GOODY_BAG_BIZ_FANS_CLUB = 2;
GOODY_BAG_BIZ_PLATFORM_NORMAL = 100;
GOODY_BAG_BIZ_PLATFORM_FANS_CLUB = 101;
GOODY_BAG_BIZ_LEVEL_UP_PARTY_REWARD_NORMAL = 110;
GOODY_BAG_BIZ_LEVEL_UP_PARTY_REWARD_FANS_CLUB = 111;
}
enum ParticipateMethod {
PARTICIPATE_METHOD_UNKNOWN = 0;
PARTICIPATE_METHOD_COMMENT = 1;
PARTICIPATE_METHOD_SHARE = 2;
PARTICIPATE_METHOD_NO_THRESHOLD = 3;
}
enum ParticipateThresholdType {
PARTICIPATE_THRESHOLD_TYPE_PARTICIPATE_THRESHOLD_UNKNOWN = 0;
PARTICIPATE_THRESHOLD_TYPE_PARTICIPATE_THRESHOLD_ALL_VIEWER = 1;
PARTICIPATE_THRESHOLD_TYPE_PARTICIPATE_THRESHOLD_FANS_CLUB = 2;
}

View File

@@ -1589,3 +1589,49 @@ message WebcastLinkMicBattleItemCard {
}
}
}
message WebcastGoodyBagMessage {
CommonMessageData base_message = 1;
GoodyBagBaseInfo base_info = 2;
repeated GoodyBagWinnerInfo winners = 3;
GoodyBagMessageType type = 4;
message GoodyBagBaseInfo {
string goody_bag_id = 1;
GoodyBagBiz biz = 2;
string room_id = 3;
GoodyBagCommonDetail common_detail = 4;
GoodyBagCoinDetail coin_detail = 5;
message GoodyBagCommonDetail {
int32 winner_headcount = 1;
int32 joined_headcount = 2;
ParticipateMethod participate_method = 3;
string participate_method_content = 4;
int32 open_at = 5;
int32 count_down_minutes = 6;
ParticipateThresholdSelected participate_threshold_selected = 7;
message ParticipateThresholdSelected {
ParticipateThresholdType type = 1;
int64 value = 2;
}
}
message GoodyBagCoinDetail {
int32 total_coin = 1;
}
}
message GoodyBagWinnerInfo {
GoodyBagUserInfo user_info = 1;
int32 coins = 2;
}
message GoodyBagUserInfo {
string user_id = 1;
string nickname = 2;
string display_id = 3;
Image avatar = 4;
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -26,10 +26,7 @@ import io.github.jwdeveloper.dependance.api.DependanceContainer;
import io.github.jwdeveloper.tiktok.data.events.*;
import io.github.jwdeveloper.tiktok.data.events.link.*;
import io.github.jwdeveloper.tiktok.mappers.data.MappingResult;
import io.github.jwdeveloper.tiktok.mappers.handlers.TikTokCommonEventHandler;
import io.github.jwdeveloper.tiktok.mappers.handlers.TikTokGiftEventHandler;
import io.github.jwdeveloper.tiktok.mappers.handlers.TikTokRoomInfoEventHandler;
import io.github.jwdeveloper.tiktok.mappers.handlers.TikTokSocialMediaEventHandler;
import io.github.jwdeveloper.tiktok.mappers.handlers.*;
import io.github.jwdeveloper.tiktok.messages.webcast.*;
import static io.github.jwdeveloper.tiktok.messages.enums.LinkMessageType.*;
@@ -58,7 +55,6 @@ public class MessagesMapperFactory {
return MappingResult.of(messageObject, new TikTokCaptionEvent(messageObject));
});
//User Interactions events
mapper.forMessage(WebcastChatMessage.class, (inputBytes, messageName, mapperHelper) ->
{
@@ -145,7 +141,10 @@ public class MessagesMapperFactory {
//Others events
// mapper.webcastObjectToConstructor(WebcastInRoomBannerMessage.class, TikTokInRoomBannerEvent.class);
// mapper.webcastObjectToConstructor(WebcastMsgDetectMessage.class, TikTokDetectEvent.class);
// mapper.webcastObjectToConstructor(WebcastBarrageMessage.class, TikTokBarrageEvent.class);
mapper.forMessage(WebcastBarrageMessage.class, (inputBytes, messageName, mapperHelper) -> {
var message = mapperHelper.bytesToWebcastObject(inputBytes, WebcastBarrageMessage.class);
return MappingResult.of(message, new TikTokBarrageEvent(message));
});
// mapper.webcastObjectToConstructor(WebcastUnauthorizedMemberMessage.class, TikTokUnauthorizedMemberEvent.class);
// mapper.webcastObjectToConstructor(WebcastOecLiveShoppingMessage.class, TikTokShopEvent.class);
// mapper.webcastObjectToConstructor(WebcastImDeleteMessage.class, TikTokIMDeleteEvent.class);

View File

@@ -41,7 +41,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<artifactId>TikTokLiveJava</artifactId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>extension-recorder</artifactId>

View File

@@ -7,7 +7,7 @@
<groupId>io.github.jwdeveloper.tiktok</groupId>
<artifactId>TikTokLiveJava</artifactId>
<packaging>pom</packaging>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
<modules>
<module>API</module>
<module>Client</module>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>TikTokLiveJava</artifactId>
<groupId>io.github.jwdeveloper.tiktok</groupId>
<version>1.11.8-Release</version>
<version>1.11.9-Release</version>
</parent>
<modelVersion>4.0.0</modelVersion>