GiftStore

abstract class GiftStore

Gift management class, used to handle gift-related business logic in live rooms/voice chat rooms.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Create a gift management instance.

Properties

Link copied to clipboard
abstract val giftState: GiftState

Gift state subscription for the current room, containing information such as available gift lists. By subscribing to this state, you can get real-time updates of gift data in the room. {@link GiftState}

Functions

Link copied to clipboard
abstract fun addGiftListener(listener: GiftListener?)

Gift event publisher, through which you can subscribe/remove gift events in live rooms/voice chat rooms. After subscription, you will receive corresponding notifications when audiences send gifts. {@link GiftListener}

Link copied to clipboard
abstract fun refreshUsableGifts(completion: CompletionHandler?)

Manually refresh the available gift list for the current room.

Link copied to clipboard
abstract fun removeGiftListener(listener: GiftListener?)
Link copied to clipboard
abstract fun sendGift(giftID: String, count: Int, completion: CompletionHandler?)

Send a specified gift to the current room

Link copied to clipboard
abstract fun setLanguage(language: String)

Set the display language for gift information.