Pin card incident during live streaming and sales list during live streaming
llddy opened this issue · 2 comments
When do we expect to complete some events related to roomPin and Live shopping? Is this easy to do?
Do I need to analyze the proto message file for parsing? If you are late, I would like to work on it first. Can you give me some guidance?
tikTokShopEvent={
"title": "",
"price": "",
"picture": {
"link": ""
},
"shopUrl": "",
"shopName": "",
"messageId": 7312004053855109163,
"roomId": 731181099832562474,
"timeStamp": 1702460045321
}
Hi, I've skipped thoses events since I have no idea when they are triggered and what its data means. But I can give you guid how you can implement on your own.
This could propably will not meet your needs, but it's good point to start coding
TikTokLive.newClient("vadimpyrography")
.onCustomEvent(CustomPinEvent.class, (liveClient, event) ->
{
System.out.println("hello world!");
})
.onCustomEvent(CustomShopEvent.class, (liveClient, event) ->
{
System.out.println("hello world!");
})
.onError((liveClient, event) ->
{
event.getException().printStackTrace();
})
.onMapping(mapper ->
{
mapper.webcastObjectToEvent(WebcastRoomPinMessage.class, roomPinData ->
{
var someData = roomPinData.getPinnedMessage();
return new CustomPinEvent();
});
mapper.webcastObjectToEvent(WebcastOecLiveShoppingMessage.class,shopData ->
{
var someData = shopData.getShopData().getData1();
return new CustomShopEvent()
});
}).buildAndConnect();
``
When you figure out how does this messages works, please let me know so I will include your code to TikTokLiveJava