Events handlers

How to recognize that the stream is ready?

VideoInitialized

If the stream is ready and starts rendering to the screen, the VideoInitilized event will be triggered.

This is how you can add a listener:

// Assuming you have your PixelStreaming of ArcwareInit at hand ...
PixelStreaming.videoInitializedHandler.add(() => console.log("Video initialized"));

With this event handler you can remove any custom overlays as you wish.


queueHandler

If your project is configured to use a queue management system when all streaming channels are occupied, then it becomes essential to utilize this event handler. Its purpose is to enable customization of the queue messaging displayed to users, ensuring clarity and efficiency in communication.

This is how you can add a listener:

// Assuming you have your PixelStreaming of ArcwareInit at hand ...
PixelStreaming.queueHandler.add((message) =>
    console.log("queueHandler", message)
);

Last updated