Creating an Event Listener
API Description
This API is used to create an event listener.
Precautions
- The return object of this API can be used to listen to meeting events. Create an event listener in advance and listen to events.
- When the on method is called for listening, the events that can be listened can be obtained by calling the API for Obtaining the Event List.
Method Definition
1
|
createEventListener: EventEmitter |
Parameter Description
None
Return Values
Type |
Description |
---|---|
EventEmitter |
A Node.js event emitter object is returned. The on method of the object can be called to listen to events. For details about the event list, see Table 2. Event Notification Reference describes the parameters of each event. EventEmitter reference: https://github.com/browserify/events#readme |
// Create a listener. let listener = HWMeeting.createEventListener(); // Listen to the notification of the meeting pause event. listener.on('conf_state', function(data){ console.log(data) }); // Listen to all events. HWMeeting.getEventList().forEach(event => { listener.on(event, (eventData) => { console.log(event, JSON.stringify(eventData)); }); });
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot