Polyv Help Center

Help Center

Interaction Features

Updated: 2026-08-28 16:01:47

This document provides API descriptions for obtaining singleton instances of the Interaction Feature SDK.

1. Install the Interaction Receiver SDK

The viewer page SDK does not load the Interaction Receiver SDK by default. To use interaction features, call this method after watchCore.setup() to load the Interaction Receiver SDK.

API Method: setupIarCore(): Promise<void>

Example:

// 安装观看页 SDK
await watchCore.setup();
// 加载互动功能
await watchCore.interactReceive.setupIarCore();
// 加载后即可获取互动功能单一实例

2. Get Interaction Settings

Used to retrieve the interaction feature information configured in the management backend.

API Method: getInteractSetting(): InteractSetting

Return Value Description: Interaction feature settings information, type InteractSetting. Detailed type description is as follows:

Property Name Description Type
recruitmentEnabled Recruitment Live Toggle boolean
productEnabled Product Library Toggle boolean
liveProductEnabled Product Library Super Admin Master Toggle boolean
productTrackEnabled Product Library Data Reporting Toggle boolean
productLinkJumpTipEnabled Product Library Link Jump Prompt Toggle boolean
outLinkProductRedirectEnabled Product Direct External Link Jump Toggle boolean
productEntryPosition Product Entry Position ProductEntryPosition
enrollLotteryEnabled Enrollment Lottery Toggle boolean
lotteryManualEndEnabled Lottery Manual End Toggle boolean
conditionLotteryEnabled Conditional Lottery Toggle boolean
conditionLotteryAutoPopperEnabled Conditional Lottery Auto Popup Toggle boolean
lotteryVersion Lottery Version 'v1' | 'v2'
watchFeedbackEnabled Complaint Feedback Toggle boolean
watchFeedbackButtonPositions Complaint Feedback Button Position string[]
voteActiveEnabled Voting Activity Toggle boolean
redpackEnabled Interactive Red Packet Toggle boolean
redpackImage Red Packet Background Image string
redpackRainBottomImage Red Packet Rain Bottom Background Image string
redpackRainImages Red Packet Rain Falling Object Image string[]
seatTableEnabled Cloud Seat Feature Toggle boolean
seatTableTemplate Cloud Seat Template SeatTableTemplate
seatMaxNumber Max Number of Guest Regular Cloud Seats number
seatVipMaxNumber Max Number of Guest VIP Cloud Seats number
seatCustomTextEnabled Cloud Seat Custom Text Toggle boolean
seatCustomText Cloud Seat Custom Text string
seatGuestCardEnabled Cloud Seat Guest Badge Toggle boolean
lotteryGiftButtonTextCH Lottery Button Chinese Text string
lotteryGiftButtonTextEN Lottery Button English Text string
productHotEffectEnabled Show Hot Selling Effect boolean
productHotEffectTips Hot Selling Word Data ProductHotEffectTips
couponEnabled Coupon Toggle boolean
personalRewardEnabled My Rewards Toggle boolean

Example:

const settingInfo = watchCore.interactReceive.getInteractSetting();
console.log('商品库开关', settingInfo.productEnabled);

3. Get Announcement SDK Singleton Instance

Announcement Feature Development Documentation: Announcement SDK, Announcement Component

API Method: getAnnouncement(): Announcement

Return Value Description: Announcement SDK singleton instance, type Announcement

4. Get Check-in SDK Singleton Instance

Check-in Feature Development Documentation: Check-in SDK, Check-in Component

API Method: getCheckIn(): CheckIn

Return Value Description: Check-in SDK singleton instance, type CheckIn

5. Get Answer Card SDK Singleton Instance

Answer Card Feature Development Documentation: Answer Card SDK, Answer Card Component

API Method: getAnswerCard(): AnswerCard

Return Value Description: Answer Card SDK singleton instance, type AnswerCard

6. Get Questionnaire SDK Singleton Instance

Questionnaire Feature Development Documentation: Questionnaire SDK, Questionnaire Component

API Method: getQuestionnaire(): Questionnaire

Return Value Description: Questionnaire SDK singleton instance, type Questionnaire

7. Get Q&A SDK Singleton Instance

Q&A Feature Development Documentation: Q&A SDK, Q&A Component

API Method: getQuestionAnswer(): QuestionAnswer

Return Value Description: Q&A SDK singleton instance, type QuestionAnswer

8. Get Card Push SDK Singleton Instance

Card Push Feature Development Documentation: Card Push SDK, Card Push Component

API Method: getPushCard(): PushCard

Return Value Description: Card Push SDK singleton instance, type PushCard

9. Get Channel Viewer Page Popup Ad SDK Singleton Instance

API Method: getPopupAd(): PopupAd

Supported from version v2.19.0

Return Value Description: Popup Ad SDK singleton instance, type PopupAd

10. Get Lottery SDK Singleton Instance

Lottery Feature Development Documentation: Lottery SDK, Lottery Component

API Method: getLottery(): Lottery

Return Value Description: Lottery SDK singleton instance, type Lottery

11. Get Conditional Lottery SDK Singleton Instance

Conditional Lottery Feature Development Documentation: Conditional Lottery SDK, Conditional Lottery Component

API Method: getWelfareLottery(): WelfareLottery

Return Value Description: Conditional Lottery SDK singleton instance, type WelfareLottery

12. Get Enrollment Lottery SDK Singleton Instance

Enrollment Lottery Feature Development Documentation: Enrollment Lottery SDK, Enrollment Lottery Component

API Method: getEnrollLottery(): EnrollLottery

Return Value Description: Enrollment Lottery SDK singleton instance, type EnrollLottery

13. Get Red Packet SDK Singleton Instance

Red Packet Feature Development Documentation: Red Packet Component

API Method: getRedpack(): RedEnvelope

Return Value Description: Red Packet SDK singleton instance, type RedEnvelope

14. Get Red Packet Rain SDK Singleton Instance

Currently, Red Packet Rain and Red Packet share the same documentation.

API Method: getRedpackRain(): RedpackRain

Return Value Description: Red Packet Rain SDK singleton instance, type RedpackRain

15. Get Voting SDK Singleton Instance

No related documentation available yet. To be added later...

API Method: getVote(): Vote

Return Value Description: Voting SDK singleton instance, type Vote

16. Get Feedback SDK Singleton Instance

No related documentation available yet. To be added later...

API Method: getFeedBack(): FeedBack

Return Value Description: Feedback SDK singleton instance, type FeedBack

17. Get Product Library SDK Singleton Instance

Product Library Feature Development Documentation: Product Library SDK, Product Library Component

API Method: getProduct(): Product

Return Value Description: Product Library SDK singleton instance, type Product

18. Product Library Replay

API Method: processProductReplay(params: Object): void

Supported from version v0.9.0

Parameter Description:

  • params: Type Object, required. Detailed type description is as follows:
Parameter Name Description Type Required Default Value
currentTime Current playback time, in seconds number Yes -
durationTime Total playback duration, in seconds number Yes -

19. Get Text & Image Live SDK Singleton Instance

Text & Image Live Feature Development Documentation: Text & Image Live SDK, Text & Image Live Component

API Method: getTuwen(): Tuwen

Return Value Description: Text & Image Live SDK singleton instance, type Tuwen

20. Get Cloud Seat SDK Singleton Instance

API Method: getSeatTable(): SeatTable

Return Value Description: Cloud Seat SDK singleton instance, type SeatTable

21. Set Cloud Seat Information

API Method: setupSeatTable(): Promise<void>

Supported from version v0.10.0

22. Get Topic PK SDK Singleton Instance

Topic PK Feature Development Documentation: Topic PK SDK, Topic PK Component

API Method: getTopicPK(): Topic

Return Value Description: Topic PK SDK singleton instance, type Topic

23. Get Rush Answer SDK Singleton Instance

API Method: getRushAnswer(): RushAnswer

Return Value Description: Rush Answer SDK singleton instance, type RushAnswer

24. Get Product Library Button Click Prompt Template Configuration

API Method: getProductLinkJumpTipDetail(): undefined | ProductLinkJumpTipDetail

Supported from version v1.3.0

Return Value Description: Product Library button click prompt template, type undefined | ProductLinkJumpTipDetail

25. Address Management SDK Singleton Instance

API Method: getAddressManagement(): AddressManagement

Supported from version v1.5.0

Return Value Description: Address Management SDK singleton instance, type AddressManagement

26. Order SDK Singleton Instance

API Method: getOrder(): Order

Supported from version v1.5.0

Return Value Description: Order Management SDK singleton instance, type Order

27. Get Lottery Privacy Agreement Data

API Method: getLotteryPrivacyDetail(): LotteryPrivacyDetail

Supported from version v1.4.0

Return Value Description: Type LotteryPrivacyDetail. Detailed type description is as follows:

Property Name Description Type
privacyContent Lottery Privacy Agreement Content undefined | string
lotteryActivityPrivacyEnabled Lottery Activity Privacy Agreement Toggle YN

28. Parse Product Details

API Method: parseProductDetail(productGoodData: ProductGoodData): Promise<ParseProductDetail>

Supported from version v1.11.0

Deprecated from version v2.6.0

Parameter Description:

  • productGoodData: Type ProductGoodData, required. Detailed type description is as follows:
Parameter Name Description Type Required Default Value
name Product Name string Yes -
productId Product ID string Yes -
realPrice Original Price string Yes -
customPrice Custom Price string Yes -
priceType Price Type string Yes -
price Product Price string Yes -
productType Product Type IarProductType Yes -
productDesc Product Prompt string Yes -
logId Push ID string No -
buyType Purchase Method string No -
deliveryType Fulfillment Method string No -
productPushRule Push Rule string No -
features Feature Tag string[] No -
productDetail Product Details string No -
cover Cover Image string Yes -
coverList Cover Image List string[] Yes -
openPriceEnable Is Price Negotiable string No -
ext Extension Info string No -

Return Value Description: Type Promise<ParseProductDetail>. Detailed type description is as follows:

Property Name Description Type
name Product Name string
productId Product ID string
realPrice Original Price
联系客服,在线咨询
在线咨询