Module Events
Updated: 2024-10-10 17:27:10
1. Live Status Change Event
Description: When the host starts/ends a live broadcast, 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 Name | Description | Type |
|---|---|---|
liveStatus |
New live status | LiveStatus |
Example:
watchCore.channel.eventEmitter.on(ChannelEvents.LiveStatusChange, (data) => {
console.log('频道状态改变,新状态:', data.liveStatus);
});
2. Session ID Change Event
Description: Each time the host starts a new live broadcast, a new live session ID is generated. You can monitor live session ID changes through this event in the channel module.
Event: ChannelEvents.SessionIdChange
Callback Parameters: Object object, detailed type description as follows
| Property Name | Description | Type |
|---|---|---|
sessionId |
New session ID | string |
Example:
watchCore.channel.eventEmitter.on(ChannelEvents.LiveStatusChange, (data) => {
console.log('频道状态改变,新状态:', data.liveStatus);
});
