TUILiveGiftManager
Copyright (c) 2025 Tencent. All rights reserved.
Module: TUILiveGiftManager @ TUIKitEngine
Function: Live-Gift APIs
TUILiveGiftManager
TUILiveGiftObserver
FuncList | DESC |
Callback for gift count changed. | |
Callback for receive gift message. | |
Callback for receive likes message. |
TUILiveGiftManager
FuncList | DESC |
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:totalGiftsSent:totalGiftCoins:totalUniqueGiftSenders:
onGiftCountChanged:totalGiftsSent:totalGiftCoins:totalUniqueGiftSenders:
- (void)onGiftCountChanged: | (NSString *)roomId |
totalGiftsSent: | (NSUInteger)totalGiftsSent |
totalGiftCoins: | (NSUInteger)totalGiftCoins |
totalUniqueGiftSenders: | (NSUInteger)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:giftInfo:giftCount:sender:
onReceiveGiftMessage:giftInfo:giftCount:sender:
- (void)onReceiveGiftMessage: | (NSString *)roomId |
giftInfo: | |
giftCount: | (NSUInteger)giftCount |
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:totalLikesReceived:sender:
onReceiveLikesMessage:totalLikesReceived:sender:
- (void)onReceiveLikesMessage: | (NSString *)roomId |
totalLikesReceived: | (NSUInteger)totalLikesReceived |
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: |
Add event callback
Param | DESC |
observer | The instance being listened to. |
removeObserver:
removeObserver:
- (void)removeObserver: |
Remove event callback
Param | DESC |
observer | The instance being listened to. |
getGiftList:onSuccess:onError:
getGiftList:onSuccess:onError:
- (void)getGiftList: | (NSString *)roomId |
onSuccess: | (TUIGetGiftListBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
Request get gift category list.
Param | DESC |
roomId | current entered room id. |
sendGift:giftId:count:onSuccess:onError:
sendGift:giftId:count:onSuccess:onError:
- (void)sendGift: | (NSString *)roomId |
giftId: | (NSString *)giftId |
count: | (NSUInteger)count |
onSuccess: | (TUISuccessBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
send gift to room.
Param | DESC |
count | gift count. |
giftId | gift id. |
roomId | current entered room id. |
sendLike:count:onSuccess:onError:
sendLike:count:onSuccess:onError:
- (void)sendLike: | (NSString *)roomId |
count: | (NSUInteger)count |
onSuccess: | (TUISuccessBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
send like to room.
Param | DESC |
count | like count. |
roomId | current entered room id. |
getGiftCountByAnchor:onSuccess:onError:
getGiftCountByAnchor:onSuccess:onError:
- (void)getGiftCountByAnchor: | (NSString *)roomId |
onSuccess: | (TUIGetGiftCountBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
Request get gift count by anchor.
Param | DESC |
roomId | current entered room id. |
getLikesCount:onSuccess:onError:
getLikesCount:onSuccess:onError:
- (void)getLikesCount: | (NSString *)roomId |
onSuccess: | (TUIGetLikesCountBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
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. |