Constructor
new Debug(player)
Creates an instance of the Debug component.
| Name | Type | Description |
|---|---|---|
player |
Player |
Reference to the VisionPlayer instance. |
Members
private #config :Object
Contains configuration options for this component.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
logMediaEvents
|
boolean | optional | true | Logs media related events, i.e. Event topic starts with |
logPlayerEvents
|
boolean | optional | true | Logs all other events, except for media related events, like |
verboseLogging
|
boolean | optional | false | Enables verbose logging, i.e. Additional 'spammy' events like |
private #player :Player
private #subscriptions :Array<number>
Holds tokens of subscriptions to player events, for later unsubscribe.
Methods
private #logEvent(data, topic)
Logs events coming from the debug mode to the console.
| Name | Type | Description |
|---|---|---|
data |
Object |
Data object from the event. |
topic |
string |
The pubsub event topic (e.g., "media/play", "media/error"). |