Interface: Statistics
Contains internal statistics.
Note that this object will have some undocumented properties, used internally or temporarily, for monitoring and improving the performance of the service.
Properties
audioBitRate?
optionalaudioBitRate:number
Current audio bitrate in bits/second.
audioCodec?
optionalaudioCodec:string
Current audio codec being used.
audioRenditionId?
optionalaudioRenditionId:number
Id of current audio rendition subscribed to.
averageBitRate?
optionalaverageBitRate:number
Average bitrate for the entire session in bits/second.
averageDrift
averageDrift:
number
Average absolute drift in milliseconds over a rolling window. Measures how far off sync the playback typically is, regardless of direction.
averageRenditionIndex
averageRenditionIndex:
number
Weighted average rendition index based on time spent at each level. Lower values indicate higher quality (index 0 is the highest quality). Example: 0.3 means mostly on the best quality with some time on lower qualities.
bufferingEventsCount
bufferingEventsCount:
number
Total number of buffering events since instantiation.
bufferingEventsPerMinute
bufferingEventsPerMinute:
number
Number of buffering events per minute of active playback. Normalizes buffering event count for comparison across sessions of different durations.
bufferingRatio
bufferingRatio:
number
Ratio of time spent buffering to total active time (0-1). Provides a normalized buffering quality metric regardless of session length. A value of 0.05 means 5% of the active session was spent buffering.
bufferingRatioPerMinute
bufferingRatioPerMinute:
number
Buffering ratio for the last minute of playback (0-1). Useful for detecting recent degradation vs overall session quality.
bufferTime
bufferTime:
number
Current target buffer time if using dynamic buffer. Otherwise, this is the statically set buffer time from instantiation.
bufferTimeAdjustmentCount
bufferTimeAdjustmentCount:
number
Number of time buffer time has been adjusted. This will only happen when using dynamic buffer time (different min/max values of bufferTime).
bytesReceived
bytesReceived:
number
Counter of number of bytes received.
channelGroupId?
optionalchannelGroupId:string
Channel group being subscribed to.
channelId
channelId:
string
Current channel ID being subscribed to.
clientId
clientId:
string
Unlike sessionId, clientId will remain the same even after reconnections and represents this unique Vindral instance.
connectCount
connectCount:
number
Total number of connections that have been established since instantiation.
connectionAttemptCount
connectionAttemptCount:
number
Total number of connection attempts since instantiation.
connectionSuccessRatio
connectionSuccessRatio:
number
Ratio of successful connections to total connection attempts (0-1). A value of 1.0 means every connection attempt succeeded.
errorCount
errorCount:
number
The total amount of errors being spawned. Note that some media errors can trigger thousands of errors for a single client in a few seconds before recovering. Therefore, consider the number of viewers with errors, not just the total amount. Also, consider the median instead of the mean for average calculation.
estimatedBandwidth
estimatedBandwidth:
number
A very rough initial estimation of minimum available bandwidth.
expectedAudioBitRate?
optionalexpectedAudioBitRate:number
Currently expected audio bit rate according to metadata in bits/s.
expectedVideoBitRate?
optionalexpectedVideoBitRate:number
Currently expected video bit rate according to metadata in bits/s.
fatalQosCount
fatalQosCount:
number
Number of fatal quality of service events.
frameRate?
optionalframeRate: [number,number]
Frame rate. Example: "frameRate": [24000, 1001].
iosMediaElementEnabled?
optionaliosMediaElementEnabled:boolean
Deprecated
ip?
optionalip:string
IP of the client.
isAbrEnabled
isAbrEnabled:
boolean
True if adaptive bitrate (ABR) is enabled.
language?
optionallanguage:string
Current language. For non-multi language streams, this will often be unset.
reconnectsPerHour
reconnectsPerHour:
number
Number of reconnections per hour of uptime. Measures connection stability over time. Lower is better. Excludes the initial connection, so a stable session will have a value of 0.
renditionChangesPerMinute
renditionChangesPerMinute:
number
Number of rendition level changes (upgrades + downgrades) per minute. Measures ABR stability - lower values indicate a more stable experience.
renditionLevelChangeCount
renditionLevelChangeCount:
number
Total count of rendition level changes (quality downgrades/upgrades).
rtt
rtt:
MinMaxAverage
RTT (round trip time) between client and server(s).
seekAdjustmentsPerMinute
seekAdjustmentsPerMinute:
number
Number of seek adjustments (seeks to catch up) per minute of active playback. High values indicate sync issues or network instability.
sessionId?
optionalsessionId:string
A session is bound to a connection. If the client reconnects for any reason (e.g. coming back from inactivity or a problem with network on client side), a new sessionId will be used.
timePerBufferingEvent
timePerBufferingEvent:
number
Average time in milliseconds spent buffering per buffering event. Helps distinguish many short buffering events from fewer long ones.
timeshiftAdjustmentsPerMinute
timeshiftAdjustmentsPerMinute:
number
Number of timeshift adjustments per minute of active playback. Relevant for timeshift-enabled streams.
timeSpentBuffering
timeSpentBuffering:
number
Time in milliseconds spent in buffering state. Note that this value will increase while in background if buffering when leaving foreground.
timeSpentRatio
timeSpentRatio:
object
Ratio of time being spent on different quality indexes. Index 0 is always the highest quality.
Example: "timeSpentRatio": { "0": 0.8, "1": 0.2 } shows 80% spent on the best level, 20% on the next one.
Index Signature
[qualityIndex: string]: number
timeToConnected?
optionaltimeToConnected:number
Time in milliseconds from the first connect() call to the first successful transport/session connection. Includes failed attempts and edge failover before the connection is established. Does not wait for player bootstrap or media to start.
timeToFirstFrame?
optionaltimeToFirstFrame:number
Time in milliseconds from the first connect() call to playback of video and audio being started.
Note that an actual frame render often happens much quicker, but that is not counted as TTFF.
timeToConnected shares the same anchor, so timeToFirstFrame - timeToConnected is the
post-transport portion (player bootstrap, media flow, decode, buffer fill, render).
totalSeekTime
totalSeekTime:
number
Total time spent seeking in milliseconds for the entire session. High values indicate frequent or slow seeks, which may impact user experience.
transportSelectionReason
transportSelectionReason:
TransportSelectionReason|undefined
When connectionProtocol is "moq_ws", indicates why WebSocket was used instead of WebTransport.
- "unsupported": browser doesn't support WebTransport
- "disabled": webtransportEnabled option is false
- "unavailable": edge did not offer a WebTransport endpoint
- "fallback": WebTransport was attempted but failed or timed out
uptime
uptime:
number
How long in milliseconds since the instance was created.
url
url:
string
URL being used for connecting to the stream.
version
version:
string
Version of the @vindral/web-sdk being used.
videoBitRate?
optionalvideoBitRate:number
Current video bitrate in bits/second.
videoCodec?
optionalvideoCodec:string
Current video codec being used.
videoHeight?
optionalvideoHeight:number
Height of current video rendition (if any).
videoRenditionId?
optionalvideoRenditionId:number
Id of current video rendition subscribed to.
videoWidth?
optionalvideoWidth:number
Width of current video rendition (if any).