• 製品
  • 価格
  • リソース
  • サポート
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

TUILiveGiftManager

Copyright (c) 2025 Tencent. All rights reserved.
Module: TUILiveGiftManager @ TUIKitEngine
Function: Live-Gift APIs

TUILiveGiftManager

TUILiveGiftManager

FuncList
DESC
Callback for gift count changed.
Callback for receive gift message.
Callback for receive likes message.
Add event callback
Remove event callback
Request get gift category list.
send gift to room.
send like to room.
Request get gift count by anchor.
Request get likes count

StructType

FuncList
DESC
Gift information.
Gift Category Information

onGiftCountChanged

onGiftCountChanged
void onGiftCountChanged
(String roomId

long totalGiftsSent

long totalGiftCoins

long totalUniqueGiftSenders)

Callback for gift count changed.

Param
DESC
roomId
the room id.
totalGiftCoins
the gift total coins.
totalGiftsSent
the gift total count.
totalUniqueGiftSenders
the gift sender count.

onReceiveGiftMessage

onReceiveGiftMessage
void onReceiveGiftMessage
(String roomId

GiftInfo giftInfo

long giftCount

TUIRoomDefine.UserInfo sender)

Callback for receive gift message.

Param
DESC
giftCount
the gift count.
giftInfo
the gift info.
roomId
the room id.
sender
the gift sender user info.

onReceiveLikesMessage

onReceiveLikesMessage
void onReceiveLikesMessage
(String roomId

long totalLikesReceived

TUIRoomDefine.UserInfo sender)

Callback for receive likes message.

Param
DESC
roomId
the room id.
sender
the gift sender user info.
totalLikesReceived
the likes total count.

addObserver

addObserver
void addObserver
(Observer observer)

Add event callback

Param
DESC
observer
The instance being listened to.

removeObserver

removeObserver
void removeObserver
(Observer observer)

Remove event callback

Param
DESC
observer
The instance being listened to.

getGiftList

getGiftList
void getGiftList
(String roomId

GetGiftListCallback callback)

Request get gift category list.

Param
DESC
roomId
current entered room id.

sendGift

sendGift
void sendGift
(String roomId

String giftId

int count

TUIRoomDefine.ActionCallback callback)

send gift to room.

Param
DESC
count
gift count.
giftId
gift id.
roomId
current entered room id.

sendLike

sendLike
void sendLike
(String roomId

int count

TUIRoomDefine.ActionCallback callback)

send like to room.

Param
DESC
count
like count.
roomId
current entered room id.

getGiftCountByAnchor

getGiftCountByAnchor
void getGiftCountByAnchor
(String roomId

GetGiftCountCallback callback)

Request get gift count by anchor.

Param
DESC
roomId
current entered room id.

getLikesCount

getLikesCount
void getLikesCount
(String roomId

GetLikesCountCallback callback)

Request get likes count

Param
DESC
roomId
current entered room id.

TUIGiftInfo

TUIGiftInfo

Gift information.

EnumType
DESC
coins
The gift coins.
desc
The gift description.
extensionInfo
The gift extension info.
giftId
The gift id.
iconUrl
The gift icon url.
level
The gift level.
name
The gift name.
resourceUrl
The gift resource url.

TUIGiftCategory

TUIGiftCategory

Gift Category Information

EnumType
DESC
categoryId
The category id of the gift.
desc
The description of the gift.
extensionInfo
The extension info of the gift.
giftList
The gift info list of the gift.
name
The name of the gift.