Creates a new instance of the driver.
Optional BroadcastChannel name (defaults to 'peerix').
Indicates whether the driver is currently active.
Sets the active state of the driver and emits corresponding events.
Dispatches a signaling message to the specified namespace.
The namespace to dispatch the message to.
The message to dispatch.
Emits an internal event with optional data.
The event name.
The data to pass to event handlers.
Unregisters an event handler for the specified internal event.
The event name.
The event handler function to remove.
Registers an event handler for the specified internal event.
The event name.
The event handler function.
Subscribes to signaling messages for the specified namespace.
The namespace to subscribe to.
The handler function to call when a message is received.
Unsubscribes from signaling messages for the specified namespace.
The namespace to unsubscribe from.
The handler function to remove.
BroadcastChannel-based signaling driver for intra-origin communication.
This driver is useful for testing and debugging purposes, but is not suitable for production use due to its limitations (e.g. same-origin restriction).
Example