Members
#
(constant) AudioCodec :String
Enum of Wowza supported Audio codecs
Properties
Name |
Type |
Description |
OPUS |
String
|
|
MULTIOPUS |
String
|
|
#
(constant) VideoCodec :String
Enum of Wowza supported Video codecs
Properties
Name |
Type |
Description |
VP8 |
String
|
|
VP9 |
String
|
|
H264 |
String
|
|
AV1 |
String
|
|
H265 |
String
|
Only available in Safari |
Methods
#
addCandidateReport(report, statsObject)
Parse and add incoming candidate-pair report from RTCPeerConnection to final report and
add associated local-candidate data to report.
Parameters:
Name |
Type |
Description |
report |
Object
|
JSON object that represents a report from RTCPeerConnection statistics. |
statsObject |
Object
|
The current statistics object being parsed. |
#
addInboundRtpReport(report, previousStats, statsObject)
Parse and add incoming inbound-rtp report from RTCPeerConnection to final report.
Parameters:
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. |
#
addOutboundRtpReport(report, previousStats, statsObject)
Parse and add incoming outbound-rtp report from RTCPeerConnection to final report.
Parameters:
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. |
#
addPeerEvents(instanceClass, peer)
Parameters:
Name |
Type |
Description |
instanceClass |
PeerConnection
|
A PeerConnection instance. |
peer |
RTCPeerConnection
|
A peer instance. |
#
calculatePacketsLostDelta(actualReport, previousReport) → {Number}
Calculate the delta packets lost.
Parameters:
Name |
Type |
Description |
actualReport |
Object
|
JSON object that represents a parsed report. |
previousReport |
Object
|
JSON object that represents a parsed report. |
#
calculatePacketsLostRatio(actualReport, previousReport) → {Number}
Calculate the ratio packets lost.
Parameters:
Name |
Type |
Description |
actualReport |
Object
|
JSON object that represents a parsed report. |
previousReport |
Object
|
JSON object that represents a parsed report. |
#
getBaseRtpReportData(report, mediaType) → {Object}
Get common information for RTP reports.
Parameters:
Name |
Type |
Description |
report |
Object
|
JSON object that represents a report from RTCPeerConnection statistics. |
mediaType |
String
|
The media type. |
#
getCodecData(codecReportId, rawStats) → {Object}
Get the codec information from statistics.
Parameters:
Name |
Type |
Description |
codecReportId |
String
|
The codec report ID. |
rawStats |
RTCStatsReport
|
The RTCPeerConnection stats. |
Parameters:
Name |
Type |
Description |
report |
Object
|
JSON object that represents a report from RTCPeerConnection statistics. |
Type Definitions
#
ConnectionStats
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. |
#
DirectorPublisherOptions
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. |
#
DirectorSubscriberOptions
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. |
#
InboundStats
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. |
#
LayerInfo
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). |
#
LayerInfo
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.
Parameters:
Name |
Type |
Description |
messages |
Array.<any>
|
Arguments object with the supplied log messages. |
context |
Object
|
Properties
Name |
Type |
Attributes |
Description |
level |
LogLevel
|
|
The current log level. |
name |
String
|
<nullable>
|
The optional current logger name. |
|
#
LogLevel
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.
Parameters:
Name |
Type |
Description |
data |
Object
|
Properties
Name |
Type |
Attributes |
Description |
streamId |
String
|
|
The stream identifier with the following format accountId/streamName . |
count |
Number
|
|
The current amount of viewers of the stream. |
error |
String
|
<optional>
|
An error message. |
|
#
OnUserCountOptions
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. |
#
OutboundStats
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. |
#
SignalingPublishOptions
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"). |
#
SignalingSubscribeOptions
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. |
Callback invoke when a new connection path is needed.
Returns:
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
Properties
Name |
Type |
Description |
inbounds |
Array.<InboundStats>
|
The parsed information of each inbound-rtp. |
outbounds |
Array.<OutboundStats>
|
The parsed information of each outbound-rtp. |
#
WowzaCapability
Properties
Name |
Type |
Description |
codecs |
Array.<Object>
|
Properties
Name |
Type |
Attributes |
Description |
codec |
String
|
|
The audio or video codec name. |
mimeType |
String
|
|
The audio or video codec mime type. |
scalabilityModes |
Array.<String>
|
<optional>
|
In the case of SVC support, a list of scalability modes supported. |
channels |
Number
|
<optional>
|
The number of audio channels supported. |
|
headerExtensions |
Array.<RTCRtpHeaderExtensionCapability>
|
An array specifying the URI of the header extension, as described in RFC 5285. |
#
WowzaDirectorResponse
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. |
#
WowzaDirectorResponse
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. |