- Version
- 1.0.0
- License
- MIT
- Requires
- DomSmith
- Looper
- Source
- PerformanceMonitor.js, line 13
Constructor
new PerformanceMonitor(player, parent, optionsopt)
Creates an instance of the PerformanceMonitor component.
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
player |
Player |
Reference to the VisionPlayer instance. |
|||||||||
parent |
Player |
Reference to the parent instance. |
|||||||||
options |
Object | optional |
Additional options.
|
Members
private #player :Player
Reference to the VisionPlayer instance.
- Type
- Player
- Source
- PerformanceMonitor.js, line 19
private #apiKey :symbol
Secret key only known to the player instance and initialized components. Used to be able to restrict access to API methods in conjunction with secure mode.
- Type
- symbol
- Source
- PerformanceMonitor.js, line 26
private #qualityInfo :string
Text line with latest dropped frame info.
- Type
- string
- Source
- PerformanceMonitor.js, line 32
private #lastTotal :number
Previously recorded totalVideoFrames value.
- Type
- number
- Source
- PerformanceMonitor.js, line 38
private #lastDropped :number
Previously recorded droppedVideoFrames value.
- Type
- number
- Source
- PerformanceMonitor.js, line 44
private #dom :DomSmith
DomSmith instance holding the floating stats overlay.
- Type
- DomSmith
- Source
- PerformanceMonitor.js, line 50
private #renderLoop :Looper
Render Loop Instance, used for updating the scrubber.
- Type
- Looper
- Source
- PerformanceMonitor.js, line 56
private #statsInterval :number
ID for the stats loop.
- Type
- number
- Source
- PerformanceMonitor.js, line 62
Methods
private #update()
Update loop, runs every 1 second. Updates FPS and video quality stats (if supported).
- Source
- PerformanceMonitor.js, line 107
destroy()
Teardown and cleanup.
- Source
- PerformanceMonitor.js, line 135