Members
# (constant) AudioCodec :String
Enum of Wowza supported Audio codecs
- String
Properties
Name | Type | Description |
---|---|---|
OPUS |
String | |
MULTIOPUS |
String |
- Source:
# (constant) VideoCodec :String
Enum of Wowza supported Video codecs
- String
Properties
Name | Type | Description |
---|---|---|
VP8 |
String | |
VP9 |
String | |
H264 |
String | |
AV1 |
String | |
H265 |
String | Only available in Safari |
- Source:
Methods
# addCandidateReport(report, statsObject)
Parse and add incoming candidate-pair report from RTCPeerConnection to final report and add associated local-candidate data to report.
Name | Type | Description |
---|---|---|
report |
Object | JSON object that represents a report from RTCPeerConnection statistics. |
statsObject |
Object | The current statistics object being parsed. |
- Source:
# addInboundRtpReport(report, previousStats, statsObject)
Parse and add incoming inbound-rtp report from RTCPeerConnection to final report.
Name | Type | Description |
---|---|---|
report |
Object | JSON object that represents a report from RTCPeerConnection statistics. |
previousStats |
ConnectionStats | The previous statistics parsed. |
statsObject |
Object | The current statistics object being parsed. |
- Source:
# addOutboundRtpReport(report, previousStats, statsObject)
Parse and add incoming outbound-rtp report from RTCPeerConnection to final report.
Name | Type | Description |
---|---|---|
report |
Object | JSON object that represents a report from RTCPeerConnection statistics. |
previousStats |
ConnectionStats | The previous statistics parsed. |
statsObject |
Object | The current statistics object being parsed. |
- Source:
# addPeerEvents(instanceClass, peer)
Emit peer events.
Name | Type | Description |
---|---|---|
instanceClass |
PeerConnection | A PeerConnection instance. |
peer |
RTCPeerConnection | A peer instance. |
- Source:
# calculatePacketsLostDelta(actualReport, previousReport) → {Number}
Calculate the delta packets lost.
Name | Type | Description |
---|---|---|
actualReport |
Object | JSON object that represents a parsed report. |
previousReport |
Object | JSON object that represents a parsed report. |
- Source:
The packets lost ratio.
- Type
- Number
# calculatePacketsLostRatio(actualReport, previousReport) → {Number}
Calculate the ratio packets lost.
Name | Type | Description |
---|---|---|
actualReport |
Object | JSON object that represents a parsed report. |
previousReport |
Object | JSON object that represents a parsed report. |
- Source:
The packets lost ratio.
- Type
- Number
# getBaseRtpReportData(report, mediaType) → {Object}
Get common information for RTP reports.
Name | Type | Description |
---|---|---|
report |
Object | JSON object that represents a report from RTCPeerConnection statistics. |
mediaType |
String | The media type. |
- Source:
The common information.
- Type
- Object
# getCodecData(codecReportId, rawStats) → {Object}
Get the codec information from statistics.
Name | Type | Description |
---|---|---|
codecReportId |
String | The codec report ID. |
rawStats |
RTCStatsReport | The RTCPeerConnection stats. |
- Source:
The codec information.
- Type
- Object
# getMediaType(report) → {String}
Get the media type.
Name | Type | Description |
---|---|---|
report |
Object | JSON object that represents a report from RTCPeerConnection statistics. |
- Source:
The media type.
- Type
- String
Type Definitions
# ConnectionStats
- Object
Properties
Name | Type | Description |
---|---|---|
raw |
RTCStatsReport | All RTCPeerConnection statistics without parsing. Reference https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport. |
audio |
TrackReport | The parsed audio information. |
video |
TrackReport | The parsed video information. |
availableOutgoingBitrate |
Number | The available outbound capacity of the network connection in bits per second. The higher the value, the more bandwidth you can assume is available for outgoing data. This value comes from the nominated candidate-pair. |
totalRoundTripTime |
Number | The total time in seconds that has elapsed between sending STUN requests and receiving the responses. This value comes from the nominated candidate-pair. |
currentRoundTripTime |
Number | The number of seconds it takes for data to be sent by this peer to the remote peer and back over the connection described by this pair of ICE candidates. This value comes from the nominated candidate-pair. |
candidateType |
RTCIceCandidateType | Local candidate type from the nominated candidate-pair that indicates the type of ICE candidate the object represents. |
- Source:
# DirectorPublisherOptions
- Object
Properties
Name | Type | Attributes | Description |
---|---|---|---|
token |
String | The publishing token for the Wowza Video real-time stream. |
|
streamName |
String | The name of the Wowza Video real-time stream. |
|
streamType |
"WebRtc" | "Rtmp" |
<optional> |
The source stream protocol. |
- Source:
# DirectorSubscriberOptions
- Object
Properties
Name | Type | Attributes | Description |
---|---|---|---|
streamName |
String | The name of the Wowza Video real-time stream. |
|
streamAccountId |
String | The Wowza Video account ID. |
|
subscriberToken |
String |
<optional> |
The playback token for the Wowza Video real-time stream for subscribing to a secure stream. If you are subscribing to an unsecure stream, you can omit this parameter. |
- Source:
# InboundStats
- Object
Properties
Name | Type | Attributes | Description |
---|---|---|---|
id |
String | The inbound-rtp ID. |
|
jitter |
Number | The current jitter, measured in seconds. |
|
mimeType |
String |
<optional> |
The mime type if the related report had an associated codec report. |
framesPerSecond |
Number |
<optional> |
The current video framerate. |
frameHeight |
Number |
<optional> |
The current video frame height. |
frameWidth |
Number |
<optional> |
The current video frame width. |
timestamp |
Number | The timestamp of report. |
|
totalBytesReceived |
Number | An integer value that indicates the total number of bytes received so far from this synchronization source. |
|
totalPacketsReceived |
Number | The total number of packets of any kind that have been received on the connection described by the pair of candidates. |
|
totalPacketsLost |
Number | The total packets lost. |
|
packetsLostRatioPerSecond |
Number | The total packet lost ratio per second. |
|
packetsLostDeltaPerSecond |
Number | The total packet lost delta per second. |
|
bitrate |
Number | The current bitrate in bits per second. |
- Source:
# LayerInfo
- Object
Properties
Name | Type | Description |
---|---|---|
encodingId |
String | The rid value of the simulcast encoding of the track (default: automatic selection). |
spatialLayerId |
Number | The spatial layer ID to send to the outgoing stream (default: maximum layer available). |
temporalLayerId |
Number | The temporal layer ID to send to the outgoing stream (default: maximum layer available). |
maxSpatialLayerId |
Number | The maximum spatial layer ID (default: unlimited). |
maxTemporalLayerId |
Number | The maximum temporal layer ID (default: unlimited). |
- Source:
# LayerInfo
- Object
Properties
Name | Type | Description |
---|---|---|
encodingId |
String | rid value of the simulcast encoding of the track (default: automatic selection) |
spatialLayerId |
Number | The spatial layer id to send to the outgoing stream (default: max layer available) |
temporalLayerId |
Number | The temporaral layer id to send to the outgoing stream (default: max layer available) |
maxSpatialLayerId |
Number | Max spatial layer id (default: unlimited) |
maxTemporalLayerId |
Number | Max temporal layer id (default: unlimited) |
# loggerHandler(messages, context)
Callback to handle log messages.
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
messages |
Array.<any> | Arguments object with the supplied log messages. |
||||||||||||
context |
Object |
Properties
|
# LogLevel
- Object
Properties
Name | Type | Description |
---|---|---|
value |
Number | The numerical representation of the level. |
name |
String | The name of the log level. |
# onUserCountCallback(data)
Callback invoke when a new user count is received.
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object |
Properties
|
- Source:
# OnUserCountOptions
- Object
Properties
Name | Type | Description |
---|---|---|
accountId |
String | The Wowza Video account ID. |
streamName |
String | The name of the Wowza Video real-time stream. |
callback |
onUserCountCallback | Callback function executed when a new message is available. |
- Source:
# OutboundStats
- Object
Properties
Name | Type | Attributes | Description |
---|---|---|---|
id |
String | The outbound-rtp ID. |
|
mimeType |
String |
<optional> |
The mime type if the related report had an associated codec report. |
framesPerSecond |
Number |
<optional> |
The current video framerate. |
frameHeight |
Number |
<optional> |
The current video frame height. |
frameWidth |
Number |
<optional> |
The current video frame width. |
qualityLimitationReason |
String |
<optional> |
For video reports, the reason why the media quality in the stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed. |
timestamp |
Number | The timestamp of report. |
|
totalBytesSent |
Number | The total number of payload bytes that hve been sent so far on the connection described by the candidate pair. |
|
bitrate |
Number | The current bitrate in bits per second. |
- Source:
# SignalingPublishOptions
- Object
Properties
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
codec |
VideoCodec |
<optional> |
"h264" | The video codec for the published stream. |
record |
Boolean |
<optional> |
Enable stream recording. If this property is not provided, the default token configuration is used. Only available in tokens with recording enabled. |
|
sourceId |
String |
<optional> |
The unique source ID. Only available in tokens with multi-source enabled. |
|
events |
Array.<String> | Override which events will be delivered by the server ("active" | "inactive"). |
- Source:
# SignalingSubscribeOptions
- Object
Properties
Name | Type | Description |
---|---|---|
vad |
String | Enable VAD multiplexing for secondary sources. |
pinnedSourceId |
String | The ID of the main source that will be received by the default MediaStream. |
excludedSourceIds |
Array.<String> | Exclude media from the the specified source IDs. |
events |
Array.<String> | The events to be delivered by the server ("active" | "inactive" | "vad" | "layers"). |
layer |
LayerInfo | The simulcast encoding layer and SVC layers for the main video track. Leave empty for automatic layer selection based on bandwidth estimation. |
- Source:
# tokenGeneratorCallback() → {Promise.<WowzaDirectorResponse>}
Callback invoke when a new connection path is needed.
- Source:
A promise object that represents the result of getting the new connection path.
You can use your own token generator or use the available Director methods.
- Type
- Promise.<WowzaDirectorResponse>
# TrackReport
- Object
Properties
Name | Type | Description |
---|---|---|
inbounds |
Array.<InboundStats> | The parsed information of each inbound-rtp. |
outbounds |
Array.<OutboundStats> | The parsed information of each outbound-rtp. |
- Source:
# WowzaCapability
- Object
Properties
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
codecs |
Array.<Object> |
Properties
|
||||||||||||||||||||
headerExtensions |
Array.<RTCRtpHeaderExtensionCapability> | An array specifying the URI of the header extension, as described in RFC 5285. |
- Source:
# WowzaDirectorResponse
- Object
Properties
Name | Type | Description |
---|---|---|
urls |
Array.<String> | The WebSocket available URLs. |
jwt |
String | The access token for signaling initialization. |
iceServers |
Array.<RTCIceServer> | Object which represents a list of Ice servers. |
- Source:
# WowzaDirectorResponse
- Object
Properties
Name | Type | Description |
---|---|---|
urls |
Array.<String> | WebSocket available URLs. |
jwt |
String | Access token for signaling initialization. |
iceServers |
Array.<RTCIceServer> | Object which represents a list of Ice servers. |
- Source: