Cloud Seat Features
Feature Overview
This module handles logic related to cloud seat features, such as displaying the cloud seat list, following users, and new user seating.
Initialization and Destruction
Before instantiating and using this module, the SDK must be initialized and configured. For details, see the reference documentation.
Online File Import Method
// script 标签引入,根据版本号引入JS版本。
<script src="https://websdk.videocc.net/interactions-receive-sdk/0.24.0/lib/polyv-ir.umd.js"></script>
<script>
const { SeatTable } = window.PolyvIRSDK;
</script>
Import Method (Recommended)
import { SeatTable } from '@polyv/interactions-receive-sdk';
const seatTableSdk = new SeatTable();
// 销毁 SDK 实例,清除逻辑
seatTableSdk.destroy();
Usage Flow
Listening to the "Seating" Event
After a viewer is seated, the announcementSdk.events.ADD_SEATING event is triggered. The event parameters include user information. The integrator can listen to this event and display content accordingly.
announcementSdk.on(announcementSdk.events.ADD_SEATING, function(msg) {
console.log(`入座信息:` + msg);
});
Listening to the "Update Guest Information" Event
When the backend actively pushes guest information, the announcementSdk.events.UPDATE_SETTING event is triggered. The integrator can use this to remove the announcement display.
announcementSdk.on(announcementSdk.events.UPDATE_SETTING, function(msg) {
console.log('嘉宾列表信息:' + msg.list);
});
Note
If the cloud seat SDK is no longer needed, call the destroy method of the SDK instance to destroy it.
