Polyv Help Center

Help Center

Module Events

Updated: 2026-01-19 09:16:42

1. Channel Setup Failure

Description: This event is triggered when the channel module fails to install.

Event: ChannelEvents.ChannelSetupFail

Callback Parameters: Object object, detailed type description as follows

Property Description Type
failReason Reason for channel setup failure ChannelSetupFailReason
failMessage Channel setup failure message string

2. Live Status Change Event

Description: When the host starts/stops a live stream, the channel's live status changes. Use this event to monitor live status changes.

Event: ChannelEvents.LiveStatusChange

Callback Parameters: Object object, detailed type description as follows

Property Description Type
liveStatus New live status LiveStatus
newLiveStatus New live status LiveStatus
oldLiveStatus Old live status LiveStatus

Example:

watchCore.channel.eventEmitter.on(ChannelEvents.LiveStatusChange, (data) => {
  console.log('频道状态改变,新状态:', data.liveStatus);
});

3. Session ID Change Event

Description: When the host starts a new live stream, a new session ID is generated. You can monitor session ID changes through this event in the channel module.

Event: ChannelEvents.SessionIdChange

Callback Parameters: Object object, detailed type description as follows

Property Description Type
sessionId New session ID string

Example:

watchCore.channel.eventEmitter.on(ChannelEvents.LiveStatusChange, (data) => {
  console.log('频道状态改变,新状态:', data.liveStatus);
});

4. Seminar Host Joins Breakout Group Event

Event: ChannelEvents.SeminarHostJoinInGroup

5. Seminar Host Leaves Breakout Group Event

Event: ChannelEvents.SeminarHostLeaveGroup

6. Viewer Cumulative Watch Duration

Event: ChannelEvents.ViewerWatchDuration

Callback Parameters: Object object, detailed type description as follows

Property Description Type
duration Cumulative watch duration, in seconds number

Example:

watchCore.channel.eventEmitter.on(ChannelEvents.ViewerWatchDuration, (data) => {
  console.log('观众累计观看时长', data.duration);
});

7. Relay Dual-Teacher Room Switch

Event: ChannelEvents.TransmitDoubleRoomChange

Callback Parameters: Object object, detailed type description as follows

Property Description Type
to Room type switched to: main (main room), child (sub-room) 'main' | 'child'
roomId Room ID string

8. Associated Relay Status Change

Event: ChannelEvents.TransmitChannelSwitch

Callback Parameters: Object object, detailed type description as follows

Property Description Type
enabled Toggle boolean

9. Admin Bulletin Marquee

Event: ChannelEvents.ManagerBulletinMarquee

Callback Parameters: Object object, detailed type description as follows

Property Description Type
enabled Toggle boolean

10. Test Mode Change

Event: ChannelEvents.TestModeChange

Callback Parameters: Object object, detailed type description as follows

Property Description Type
inTestMode Whether currently in test mode boolean

11. Authorization Expired

Event: ChannelEvents.AuthExpired

联系客服,在线咨询