diff --git a/ProtobufConverterV3.js b/ProtobufConverterV3.js index f1aebc2f..ce8102a7 100644 --- a/ProtobufConverterV3.js +++ b/ProtobufConverterV3.js @@ -110,7 +110,7 @@ export class ProtobufConverterV3 { return; } let protoType = undefined; - if (this._uuidFields.has(field.name)) { + if (this._uuidFields.has(field.name) || field.name === "appData") { protoType = "bytes"; } else { protoType = this._mapPrimitive(type); diff --git a/README.md b/README.md index e574a432..f8c7ac14 100644 --- a/README.md +++ b/README.md @@ -7,51 +7,13 @@ Schemas describe the communication between services in the ObserveRTC stack. The * [CSV](csv-headers/) when exporting reports in CSV format from the observer, the order of the columns might be important. -# Install - -## NPM -```javascript -npm i @observertc/schemas -``` - - # Versioning Schemas use SemVer version numbers of `MAJOR`.`MINOR`.`PATCH`. Increasing the number of `PATCH`, `MINOR`, or `MAJOR` implies the following: * `PATCH` indicates a change in the related libraries (e.g., bugfix in encoder/decoder). - * `MINOR` the source schema has been altered. + * `MINOR` Represents the day of the WebRTC Stats draft published the schema is based on (e.g.: 20241107) * `MAJOR` implies conceptual changes in the schema. -## Change the schema - -### Schema change requests - -Depending on which minor (or major) version is coming, you can write it in the [discussion](https://github.com/ObserveRTC/schemas/discussions). - - -## Create PR for schema changes - -Discussion is good to request a schema, PR is better. -Step to create a PR (after you cloned the repo): -1. create your branch -2. change the [source of the schemas](/sources), `sources/version.txt`, trace the change in the `sources/CHANGELOG.md`. -3. Generate `npm-lib` typescripts (see below) -4. open the PR - - - - -# Develop - -To run the schema generator for npm-lib: - -```javascript - git clone https://github.com/observertc/schemas && \ - cd schemas && \ - npm i && \ - node index.js -``` - diff --git a/index.js b/index.js index 6346bef1..a99054e5 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,6 @@ const CSV_OUTPUTS_PATH = `./${OUTPUTS_PATH}/csv`; const SQL_OUTPUTS_PATH = `./${OUTPUTS_PATH}/sql`; const NPM_SAMPLES_LIB_PATH = "./npm-samples-lib"; -const NPM_REPORTS_LIB_PATH = "./npm-reports-lib"; const W3C_STATS_IDENTIFIERS = "./sources/w3c/W3cStatsIdentifiers.ts"; async function rmDir(folderPath) { @@ -44,7 +43,7 @@ async function rmDir(folderPath) { } function fetchChunks() { - for (const schemaType of ["reports", "samples"]) { + for (const schemaType of ["samples"]) { const schemaPath = path.join(SOURCE_PATH, schemaType); for (const file of fs.readdirSync(schemaPath)) { if (!file.endsWith(".chunk.avsc")) continue; @@ -60,7 +59,7 @@ function fetchChunks() { function fetchSources() { const sources = new Map(); - for (const schemaType of ["reports", "samples"]) { + for (const schemaType of ["samples"]) { const schemaPath = path.join(SOURCE_PATH, schemaType); for (const file of fs.readdirSync(schemaPath)) { if (!file.endsWith("avsc")) continue; @@ -94,7 +93,6 @@ const main = async () => { const sources = fetchSources(); const w3cStatsIdentifiers = fs.readFileSync(W3C_STATS_IDENTIFIERS, 'utf-8'); const npmSamplesLib = new NpmLib(NPM_SAMPLES_LIB_PATH); - const npmReportsLib = new NpmLib(NPM_REPORTS_LIB_PATH); const npmEncoderLib = new NpmSampleEncoderLib(); const npmDecoderLib = new NpmSamplesDecoderLib(); const version = fs.readFileSync(path.join(SOURCE_PATH, "version.txt"), 'utf-8'); @@ -103,13 +101,9 @@ const main = async () => { const markdownLists = []; const bigQueryTables = []; const redshiftTables = []; - const reportTypes = [ - `/**\n * Schema Version: ${version} \n */` - ]; for (const [fileName, source] of sources) { const avsc = source.getAvsc(); const schemaType = source.getSchemaType(); - const isReport = fileName.includes("report"); let schema; try { schema = JSON.parse(avsc); @@ -133,71 +127,40 @@ const main = async () => { fs.writeFileSync(path.join(TYPESCRIPT_OUTPUTS_PATH, `${schemaName}.ts`), module); - if (isReport) { - const { csvColumnList, createTable } = makeRedshiftSql(schema); - const { createTable: createBigqueryTable } = makeBigQuerySql(schema); - if (csvColumnList) { - fs.writeFileSync(path.join(CSV_OUTPUTS_PATH, `${schemaName}-csv-header.txt`), csvColumnList); - } else { - console.warn(`No csv header txt is generated for ${schemaName}`); - } - - if (createTable) { - redshiftTables.push(createTable); - // fs.writeFileSync(path.join(SQL_OUTPUTS_PATH, `${schemaName}-redshift.sql`), createTable); - } else { - console.warn(`No redshift sql is generated for ${schemaName}`); - } - if (createBigqueryTable) { - bigQueryTables.push(createBigqueryTable); - // fs.writeFileSync(path.join(SQL_OUTPUTS_PATH, `${schemaName}-bigquery.sql`), createBigqueryTable); - } else { - console.warn(`No bigquery sql is generated for ${schemaName}`); - } - reportTypes.push(module); - npmReportsLib.addEntry({ - fileName, - schemaName, - schemaType, - exports, - typescript: module, - markdown: markdownDoc, - }); - } else { + if (fileName === "ClientSample") { npmDecoderLib.addSamplesTsCode(module); npmEncoderLib.addSamplesTsCode(module); - npmSamplesLib.addEntry({ - fileName, - schemaName, - schemaType, - exports, - typescript: module, - markdown: markdownDoc, - }); } + npmSamplesLib.addEntry({ + fileName, + schemaName, + schemaType, + exports, + typescript: module, + markdown: markdownDoc, + }); + fs.writeFileSync(path.join(AVSC_OUTPUTS_PATH, `${schemaName}.avsc`), avsc); } fs.writeFileSync(`schemaList.md`, markdownLists.join(`\n`)) fs.writeFileSync(path.join(SQL_OUTPUTS_PATH, `bigquery.sql`), bigQueryTables.join("\n\n")); fs.writeFileSync(path.join(SQL_OUTPUTS_PATH, `redshift.sql`), redshiftTables.join("\n\n")); - fs.writeFileSync(path.join(TYPESCRIPT_OUTPUTS_PATH, `ReportTypes.ts`), reportTypes.join("\n")); // generate protobuf schema if we can - - const samplesSource = sources.get("samples"); - if (samplesSource) { - const schema = JSON.parse(samplesSource.getAvsc()); + const clientSampleSource = sources.get("ClientSample"); + if (clientSampleSource) { + const schema = JSON.parse(clientSampleSource.getAvsc()); const protobufSchema = protobufUtils.convertToProtobufSchema(schema, version); - fs.writeFileSync(path.join(PROTO_OUTPUTS_PATH, "ProtobufSamples.proto"), protobufSchema); + fs.writeFileSync(path.join(PROTO_OUTPUTS_PATH, "ProtobufClientSample.proto"), protobufSchema); const protobufSchemaV3 = protobufUtils.convertToProtobufSchemaV3(schema, version); - fs.writeFileSync(path.join(PROTO_OUTPUTS_PATH, "ProtobufSamplesV3.proto"), protobufSchemaV3); + fs.writeFileSync(path.join(PROTO_OUTPUTS_PATH, "ProtobufClientSampleV3.proto"), protobufSchemaV3); const protobufSchemaV3Optional = protobufUtils.convertToProtobufSchemaV3(schema, version, true); - const v3schemaOptionalPath = path.join(PROTO_OUTPUTS_PATH, "ProtobufSamplesV3Optional.proto"); + const v3schemaOptionalPath = path.join(PROTO_OUTPUTS_PATH, "ProtobufClientSampleV3Optional.proto"); fs.writeFileSync(v3schemaOptionalPath, protobufSchemaV3Optional); await protobufUtils.createTypescriptModels(v3schemaOptionalPath, path.join(TEMP_PATH)); - const protobufSchemaV3OptionalTs = fs.readFileSync(path.join(TEMP_PATH, "outputs", "proto", "ProtobufSamplesV3Optional_pb.ts"), 'utf-8'); + const protobufSchemaV3OptionalTs = fs.readFileSync(path.join(TEMP_PATH, "outputs", "proto", "ProtobufClientSampleV3Optional_pb.ts"), 'utf-8'); npmEncoderLib.addSamplesProtobufTsCode(protobufSchemaV3OptionalTs); npmDecoderLib.addSamplesProtobufTsCode(protobufSchemaV3OptionalTs); // console.log(protobufSchemaV3OptionalTs); @@ -207,20 +170,16 @@ const main = async () => { const changelog = fs.readFileSync(path.join(SOURCE_PATH, "CHANGELOG.md"), 'utf-8'); npmSamplesLib.version = version; - npmReportsLib.version = version; npmEncoderLib.version = version; npmDecoderLib.version = version; npmSamplesLib.changelog = changelog; - npmReportsLib.changelog = changelog; npmSamplesLib.clear(); - npmReportsLib.clear(); npmEncoderLib.clear(); npmDecoderLib.clear(); npmSamplesLib.make(); - npmReportsLib.make(); npmEncoderLib.make(); npmDecoderLib.make(); diff --git a/makeTsModule.js b/makeTsModule.js index e4967b4d..f115a12f 100644 --- a/makeTsModule.js +++ b/makeTsModule.js @@ -88,6 +88,15 @@ function getTsType(avroType, addDoc = true) { tsObj, tsDependencies, } + +} + +function getAppDataTsType() { + return { + tsType: "Record", + tsObj: undefined, + tsDependencies: undefined, + } } function makeTsObj(avroSchema, addDoc = true) { @@ -103,7 +112,7 @@ function makeTsObj(avroSchema, addDoc = true) { const tsTypes = []; for (const avroType of avroTypes) { if (avroType === "null") continue; - const { tsType, tsObj, tsDependencies } = getTsType(avroType, addDoc); + const { tsType, tsObj, tsDependencies } = field.name === 'appData' ? getAppDataTsType() : getTsType(avroType, addDoc); if (tsObj) { dependencies.push(tsObj); if (tsDependencies) { diff --git a/npm-reports-lib/.gitignore b/npm-reports-lib/.gitignore deleted file mode 100644 index 90a29f33..00000000 --- a/npm-reports-lib/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -lib/ -docs/ diff --git a/npm-reports-lib/.npmrc b/npm-reports-lib/.npmrc deleted file mode 100644 index 43c97e71..00000000 --- a/npm-reports-lib/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/npm-reports-lib/LICENSE b/npm-reports-lib/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/npm-reports-lib/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/npm-reports-lib/README.md b/npm-reports-lib/README.md deleted file mode 100644 index ffb843ae..00000000 --- a/npm-reports-lib/README.md +++ /dev/null @@ -1,891 +0,0 @@ -ObserveRTC Schemas ---- -Javascript bindings for ObserveRTC schemas -- [reports](#reports) - * [CallEventReport](#CallEventReport) - * [CallMetaReport](#CallMetaReport) - * [ClientDataChannelReport](#ClientDataChannelReport) - * [ClientExtensionReport](#ClientExtensionReport) - * [IceCandidatePairReport](#IceCandidatePairReport) - * [InboundAudioTrackReport](#InboundAudioTrackReport) - * [InboundVideoTrackReport](#InboundVideoTrackReport) - * [ObserverEventReport](#ObserverEventReport) - * [OutboundAudioTrackReport](#OutboundAudioTrackReport) - * [OutboundVideoTrackReport](#OutboundVideoTrackReport) - * [PeerConnectionTransportReport](#PeerConnectionTransportReport) - * [Report](#Report) - * [SfuEventReport](#SfuEventReport) - * [SfuExtensionReport](#SfuExtensionReport) - * [SfuInboundRtpPadReport](#SfuInboundRtpPadReport) - * [SfuMetaReport](#SfuMetaReport) - * [SfuOutboundRtpPadReport](#SfuOutboundRtpPadReport) - * [SfuSctpStreamReport](#SfuSctpStreamReport) - * [SFUTransportReport](#SFUTransportReport) -- [Changelog](#Changelog) -## CallEventReport - - -Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -name (**Mandatory**) | The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -callId | The generated unique identifier of the call -roomId | webrtc app provided room id -clientId | The generated unique identifier of the client -userId | webrtc app provided user identifier -peerConnectionId | The unique identifier of the peer connection -mediaTrackId | The unique identifier of the media track -SSRC | The SSRC identifier of the RTP stream a trackId belongs to -sampleTimestamp | The timestamp of the sample the event related to -sampleSeq | The sequence number of the sample the event may related to -message | the human readable message of the event -value | the value of the event -attachments | attachment the event may created with - - -## CallMetaReport - - -Metadata belongs to a call and can be useful - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -callId | The generated unique identifier of the call -roomId | webrtc app provided room id -clientId | The generated unique identifier of the client -userId | webrtc app provided user identifier -peerConnectionId | The unique identifier of the peer connection -sampleTimestamp | The timestamp of the sample the event related to -sampleSeq | The sequence number of the sample the event may related to -type | The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP -payload | The payload for the metadata reported for the peeer connection - - -## ClientDataChannelReport - - -A Report created for PeerConnection Data Channel. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -peerConnectionLabel | The webrtc app provided label for the peer connection -label | The label of the data channel -protocol | The protocol used for the data channel -state | The state of the data channel -messagesSent | Represents the total number of API message events sent -bytesSent | Represents the total number of payload bytes sent on the corresponded data channel -messagesReceived | Represents the total number of API message events received on the corresponded data channel -bytesReceived | Represents the total number of payload bytes received on the corresponded data channel - - -## ClientExtensionReport - - -A Report created for Extended provided arbitrary data. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -extensionType (**Mandatory**) | The name of the event -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -callId | The generated unique identifier of the call -roomId | webrtc app provided room id -clientId | The generated unique identifier of the client -userId | webrtc app provided user identifier -peerConnectionId | The unique identifier of the peer connection -sampleSeq | The sequence number of the sample the event may related to -payload | the human readable message of the event - - -## IceCandidatePairReport - - -A Report created for ICE candidate pairs - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is marked with -candidatePairId | The unique identifier of the peer connection -transportId | The identifier of the transport the ice candidate pair is negotiated on -localCandidateId | The unique identifier of the candidate the negotiated pair is selected at local side -remoteCandidateId | The unique identifier of the candidate the negotiated pair is selected at remote side -state | The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport -nominated | indicate if the ice candidate pair is nominated or not -packetsSent | The total number of packets sent using the last selected candidate pair over the corresponded transport -packetsReceived | The total number of packets received using the last selected candidate pair over the corresponded transport -bytesSent | The total number of bytes sent using the last selected candidate pair over the corresponded transport -bytesReceived | The total number of bytes received using the last selected candidate pair over the corresponded transport -lastPacketSentTimestamp | Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) -totalRoundTripTime | Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport -currentRoundTripTime | Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport -availableOutgoingBitrate | The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport -availableIncomingBitrate | The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport -requestsReceived | Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport -requestsSent | Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport -responsesReceived | Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport -responsesSent | Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport -consentRequestsSent | Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport -packetsDiscardedOnSend | Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport -bytesDiscardedOnSend | Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - - -## InboundAudioTrackReport - - -A Report created for Inbound Audio Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -ssrc (**Mandatory**) | The RTP SSRC field -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is labeled with -trackId | The id of the track -sfuStreamId | The id of the Sfu stream the media from -sfuSinkId | The id of the sink the Sfu streamed the media out -remoteTrackId | The id of the remote track this inbound track is originated from -remoteUserId | The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it -remoteClientId | The observer matched remote client Id -remotePeerConnectionId | The observer matched remote Peer Connection Id -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) -headerBytesReceived | Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) -packetsDiscarded | The total number of packets missed the playout point and therefore discarded by the jitterbuffer -fecPacketsReceived | Total number of FEC packets received over the corresponding synchronization source (ssrc) -fecPacketsDiscarded | Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -bytesReceived | Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) -totalProcessingDelay | The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded -estimatedPlayoutTimestamp | The estimated playout time of the corresponded synchronization source -jitterBufferDelay | The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. -jitterBufferTargetDelay | This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. -jitterBufferEmittedCount | The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) -jitterBufferMinimumDelay | This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it -totalSamplesReceived | The total number of audio samples received on the corresponded RTP stream -concealedSamples | The total number of samples decoded by the media decoder from the corresponded RTP stream -silentConcealedSamples | The total number of samples concealed from the corresponded RTP stream -concealmentEvents | The total number of concealed event emitted to the media codec by the corresponded jitterbuffer -insertedSamplesForDeceleration | The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) -removedSamplesForAcceleration | The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) -audioLevel | The current audio level -totalAudioEnergy | Represents the energy level reported by the media source -totalSamplesDuration | Represents the total duration of the audio samples the media source actually transconverted in seconds -decoderImplementation | Indicate the name of the decoder implementation library -packetsSent | Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source -bytesSent | Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source -remoteTimestamp | The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) -reportsSent | The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to -roundTripTime | Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream -totalRoundTripTime | Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream -roundTripTimeMeasurements | Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream -synthesizedSamplesDuration | This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized -synthesizedSamplesEvents | The number of synthesized samples events. -totalPlayoutDelay | The playout delay includes the delay from being emitted to the actual time of playout on the device -totalSamplesCount | When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - - -## InboundVideoTrackReport - - -A Report created for Inbound Video Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -ssrc (**Mandatory**) | The RTP SSRC field -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is labeled with -trackId | The id of the track -sfuStreamId | The id of the Sfu stream the media from -sfuSinkId | The id of the sink the Sfu streamed the media out -remoteTrackId | The id of the remote track this inbound track is originated from -remoteUserId | The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it -remoteClientId | The observer matched remote client Id -remotePeerConnectionId | The observer matched remote Peer Connection Id -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -framesDropped | The number of frames dropped prior to decode or missing chunks -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) -headerBytesReceived | Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) -packetsDiscarded | The total number of packets missed the playout point and therefore discarded by the jitterbuffer -fecPacketsReceived | Total number of FEC packets received over the corresponding synchronization source (ssrc) -fecPacketsDiscarded | Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -bytesReceived | Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) -totalProcessingDelay | The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded -estimatedPlayoutTimestamp | The estimated playout time of the corresponded synchronization source -jitterBufferDelay | The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. -jitterBufferTargetDelay | This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. -jitterBufferEmittedCount | The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) -jitterBufferMinimumDelay | This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it -decoderImplementation | Indicate the name of the decoder implementation library -framesDecoded | The total number of frames decoded on the corresponded RTP stream -keyFramesDecoded | The total number of keyframes decoded on the corresponded RTP stream -frameWidth | The width of the frame of the video sent by the remote source on the corresponded RTP stream -frameHeight | The height of the frame of the video sent by the remote source on the corresponded RTP stream -framesPerSecond | The frame per seconds of the video sent by the remote source on the corresponded RTP stream -qpSum | The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream -totalDecodeTime | The total tiem spent on decoding video on the corresponded RTP stream -totalInterFrameDelay | The total interframe delay -totalSquaredInterFrameDelay | The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays -firCount | The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream -pliCount | The total number of Picture Loss Indication sent on the corresponded RTP stream -framesReceived | The total number of frames received on the corresponded RTP stream. -packetsSent | Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source -bytesSent | Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source -remoteTimestamp | The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) -reportsSent | The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to -roundTripTime | Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream -totalRoundTripTime | Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream -roundTripTimeMeasurements | Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - - -## ObserverEventReport - - -A report created for observer generated events - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -name (**Mandatory**) | The name of the event -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -clientId | The generated unique identifier of the client -userId | webrtc app provided user identifier -peerConnectionId | The unique identifier of the peer connection -sampleTimestamp | The timestamp of the sample the event related to -sampleSeq | The sequence number of the sample the event may related to -message | the human readable message of the event -value | the value of the event -attachments | attachment the event may created with - - -## OutboundAudioTrackReport - - -A Report created for Outbound Audio Tracks. A combination of Audio source, Codec metadata carrying outbound and remote inbound RTP stat measurements - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -ssrc (**Mandatory**) | The RTP SSRC field -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is labeled with -trackId | The id of the track -sfuStreamId | The id of the Sfu stream corresponds to the outbound track -packetsSent | The total number of packets sent on the corresponded synchronization source -bytesSent | The total number of bytes sent on the corresponded synchronization source -rid | The rid encoding parameter of the corresponded synchronization source -headerBytesSent | Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) -retransmittedPacketsSent | Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). -retransmittedBytesSent | Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). -targetBitrate | Reflects the current encoder target in bits per second. -totalEncodedBytesTarget | The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets -totalPacketSendDelay | The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source -averageRtcpInterval | The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) -encoderImplementation | Indicate the name of the encoder implementation library -active | Indicates whether this RTP stream is configured to be sent or disabled -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -roundTripTime | RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source -totalRoundTripTime | The sum of RTT measurements belongs to the corresponded synchronization source -fractionLost | The receiver reported fractional lost belongs to the corresponded synchronization source -roundTripTimeMeasurements | The total number of calculated RR measurements received on this source -relayedSource | True if the corresponded media source is remote, false otherwise (or null depending on browser and version) -audioLevel | Represents the audio level reported by the media source -totalAudioEnergy | Represents the energy level reported by the media source -totalSamplesDuration | Represents the total duration of the audio samples the media source actually transconverted in seconds -echoReturnLoss | Represents the echo cancellation in decibels corresponded to the media source. -echoReturnLossEnhancement | Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source. -droppedSamplesDuration | . The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source -droppedSamplesEvents | A counter increases every time a sample is dropped after a non-dropped sample -totalCaptureDelay | Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source -totalSamplesCaptured | The total number of captured samples reaching the audio source - - -## OutboundVideoTrackReport - - -A Report created for Outbound Video Tracks. A combination of Video source, Codec metadata carrying outbound and remote inbound RTP stat measurements - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -ssrc (**Mandatory**) | The RTP SSRC field -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is labeled with -trackId | The id of the track -sfuStreamId | The id of the Sfu stream corresponds to the outbound track -packetsSent | The total number of packets sent on the corresponded synchronization source -bytesSent | The total number of bytes sent on the corresponded synchronization source -rid | The rid encoding parameter of the corresponded synchronization source -headerBytesSent | Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) -retransmittedPacketsSent | Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). -retransmittedBytesSent | Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). -targetBitrate | Reflects the current encoder target in bits per second. -totalEncodedBytesTarget | The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets -totalPacketSendDelay | The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source -averageRtcpInterval | The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) -encoderImplementation | Indicate the name of the encoder implementation library -active | Indicates whether this RTP stream is configured to be sent or disabled -frameWidth | The frame width in pixels of the frames targeted by the media encoder -frameHeight | The frame width the media encoder targeted -framesPerSecond | The encoded number of frames in the last second on the corresponded media source -framesSent | TThe total number of frames sent on the corresponded RTP stream -hugeFramesSent | The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream -framesEncoded | The total number of frames encoded by the media source -keyFramesEncoded | The total number of keyframes encoded on the corresponded RTP stream -qpSum | The sum of the QP the media encoder provided on the corresponded RTP stream. -totalEncodeTime | The total time in seconds spent in encoding media frames for the corresponded RTP stream. -qualityLimitationDurationNone | Time elapsed in seconds when the RTC connection has not limited the quality -qualityLimitationDurationCPU | Time elapsed in seconds the RTC connection had a limitation because of CPU -qualityLimitationDurationBandwidth | Time elapsed in seconds the RTC connection had a limitation because of Bandwidth -qualityLimitationDurationOther | Time elapsed in seconds the RTC connection had a limitation because of Other factor -qualityLimitationReason | Indicate a reason for the quality limitation of the corresponded synchronization source -qualityLimitationResolutionChanges | The total number of resolution changes occured ont he corresponded RTP stream due to quality changes -firCount | The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream -pliCount | The total number of Picture Loss Indication sent on the corresponded RTP stream -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -roundTripTime | RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source -totalRoundTripTime | The sum of RTT measurements belongs to the corresponded synchronization source -fractionLost | The receiver reported fractional lost belongs to the corresponded synchronization source -roundTripTimeMeasurements | The total number of calculated RR measurements received on this source -framesDropped | The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream -relayedSource | True if the corresponded media source is remote, false otherwise (or null depending on browser and version) -width | The width, in pixels, of the last frame originating from the media source -height | The height, in pixels, of the last frame originating from the media source -frames | The total number of frames originated from the media source - - -## PeerConnectionTransportReport - - -A Report created for Client PeerConnection Transport. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The unique identifier of the service -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -callId (**Mandatory**) | The generated unique identifier of the call -clientId (**Mandatory**) | The generated unique identifier of the client -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -transportId (**Mandatory**) | The identifier of the transport the ICE candidate pair is negotiated on -sampleSeq (**Mandatory**) | The sequence number of the sample the report is generated from -marker | The marker the originated sample is reported with -roomId | webrtc app provided room id -userId | webrtc app provided user identifier -label | The webrtc app provided label the peer connection is marked with -packetsSent | Represents the total number of packets sent on the corresponded transport -packetsReceived | Represents the total number of packets received on the corresponded transport -bytesSent | Represents the total amount of bytes sent on the corresponded transport -bytesReceived | Represents the total amount of bytes received on the corresponded transport -iceRole | Represent the current role of ICE under DTLS Transport -iceLocalUsernameFragment | Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport -dtlsState | Represents the current state of DTLS for the peer connection transport layer -dtlsRole | The role this host plays in DTLS negotiations -selectedCandidatePairId | The identifier of the candidate pair the transport currently uses -iceState | Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer -localCertificateId | If DTLS negotiated it gives the id of the local certificate -remoteCertificateId | If DTLS negotiated it gives the id of the remote certificate -tlsVersion | Represents the version number of the TLS used in the corresponded transport -dtlsCipher | Represents the name of the DTLS cipher used in the corresponded transport -srtpCipher | Represents the name of the SRTP cipher used in the corresponded transport -tlsGroup | Represents the name of the IANA TLS Supported Groups used in the corresponded transport -selectedCandidatePairChanges | The total number of candidate pair changes over the peer connection - - -## Report - - -A multiplexed Report object wraps an encoded report in bytes format - - -Field | Description ---- | --- -type (**Mandatory**) | The type of the report -payload (**Mandatory**) | The payload of contans the actual report -schemaVersion | The version of the schema the payload holds - - -## SfuEventReport - - -Events happened in calls. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -name (**Mandatory**) | The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -sfuId | The generated unique identifier of the SFU -callId | The callId the event belongs to -transportId | SFU provided transport identifier -mediaStreamId | Unique identifier of the SFU stream id the rtp pad belongs to -mediaSinkId | Unique identifier of the SFU stream id the rtp pad belongs to -sctpStreamId | Unique identifier of the SCTP stream the event is related to -rtpPadId | Unique identifier of the Sfu Pad the event is related to -message | the human readable message of the event -value | the value of the event -attachments | attachment the event may created with - - -## SfuExtensionReport - - -A Report created for Extended provided arbitrary data. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -extensionType (**Mandatory**) | The name of the event -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -sfuId | The generated unique identifier of the SFU -payload | the human readable message of the event - - -## SfuInboundRtpPadReport - - -A Report created for RTP streams going through the SFU - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -sfuId (**Mandatory**) | The provided unique identifier of the SFU -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -transportId (**Mandatory**) | The id of the transport the RTP stream uses. -sfuStreamId (**Mandatory**) | Unique identifier of the Sfu stream the event is related to -rtpPadId (**Mandatory**) | The id of RTP pad. -ssrc (**Mandatory**) | The synchronization source id of the RTP stream -marker | The marker the originated sample is reported with -internal | Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs -remoteSfuId | only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad -remoteTransportId | only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad -remoteSinkId | only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad -remoteRtpPadId | only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad -trackId | The id of the track the RTP stream related to at the client side -clientId | If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to -callId | The callId the event belongs to -mediaType | the type of the media the stream carries ("audio" or "video") -payloadType | The payload type field of the RTP header -mimeType | The negotiated mimeType in the SDP -clockRate | The clock rate of the media source the RTP header carries -sdpFmtpLine | The actual SDP line from the negotiation related to this RTP stream -rid | The rid parameter of the corresponded RTP stream -rtxSsrc | If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. -targetBitrate | he bitrate the corresponded stream targets. -voiceActivityFlag | The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through -firCount | The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams -pliCount | The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams -nackCount | The total number of negative acknowledgement received on the corresponded RTP stream. -sliCount | The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream -packetsLost | The total number of packets lost on the corresponded RTP stream. -packetsReceived | The total number of packets received on the corresponded RTP stream. -packetsDiscarded | The total number of discarded packets on the corresponded RTP stream. -packetsRepaired | The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. -packetsFailedDecryption | The total number of packets failed to be decrypted on the corresponded RTP stream. -packetsDuplicated | The total number of duplicated packets appeared on the corresponded RTP stream. -fecPacketsReceived | The total number of FEC packets received on the corresponded RTP stream. -fecPacketsDiscarded | The total number of FEC packets discarded on the corresponded RTP stream. -bytesReceived | The total amount of payload bytes received on the corresponded RTP stream. -rtcpSrReceived | The total number of SR reports received by the corresponded RTP stream -rtcpRrSent | The total number of RR reports sent on the corresponded RTP stream -rtxPacketsReceived | If rtx packets are sent or received on the same stream then this number indicates how may has been sent -rtxPacketsDiscarded | If rtx packets are received on the same stream then this number indicates how may has been discarded -framesReceived | The number of frames received on the corresponded RTP stream -framesDecoded | Indicate the number of frames the Sfu has been decoded -keyFramesDecoded | Indicate the number of keyframes the Sfu has been decoded -fractionLost | The calculated fractionLost of the stream -jitter | The calculated jitter of the stream -roundTripTime | The calculated RTT of the stream - - -## SfuMetaReport - - -Metadata belongs to SFUs - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -mediaUnitId | The media unit id the report belongs to -marker | The marker the originated sample is reported with -sfuId | The generated unique identifier of the SFU -callId | The callId the event belongs to -transportId | SFU provided transport identifier -mediaStreamId | Unique identifier of the SFU stream id the rtp pad belongs to -mediaSinkId | Unique identifier of the SFU stream id the rtp pad belongs to -sctpStreamId | Unique identifier of the SCTP stream the event is related to -rtpPadId | Unique identifier of the Sfu Pad the event is related to -type | The type of the meta data reported for the peer connection -payload | The payload for the metadata reported for the peeer connection - - -## SfuOutboundRtpPadReport - - -A Report created for RTP streams going through the SFU - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -sfuId (**Mandatory**) | The provided unique identifier of the SFU -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -transportId (**Mandatory**) | The id of the transport the RTP stream uses. -sfuStreamId (**Mandatory**) | Unique identifier of the Sfu stream the event is related to -sfuSinkId (**Mandatory**) | Unique identifier of the Sfu sink the event is related to -rtpPadId (**Mandatory**) | The id of RTP pad. -ssrc (**Mandatory**) | The synchronization source id of the RTP stream -marker | The marker the originated sample is reported with -internal | Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs -callId | The callId the event belongs to -clientId | If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to -trackId | The id of the track the RTP stream related to at the client side -mediaType | the type of the media the stream carries ("audio" or "video") -payloadType | The payload type field of the RTP header -mimeType | The negotiated mimeType in the SDP -clockRate | The clock rate of the media source the RTP header carries -sdpFmtpLine | The actual SDP line from the negotiation related to this RTP stream -rid | The rid parameter of the corresponded RTP stream -rtxSsrc | If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. -targetBitrate | he bitrate the corresponded stream targets. -voiceActivityFlag | The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through -firCount | The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams -pliCount | The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams -nackCount | The total number of negative acknowledgement received on the corresponded RTP stream. -sliCount | The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream -packetsLost | The total number of packets lost on the corresponded RTP stream. -packetsSent | The total number of packets sent on the corresponded RTP stream. -packetsDiscarded | The total number of discarded packets on the corresponded RTP stream. -packetsRetransmitted | The total number of packets retransmitted on the corresponded RTP stream. -packetsFailedEncryption | The total number of packets failed to be encrypted on the corresponded RTP stream. -packetsDuplicated | The total number of duplicated packets appeared on the corresponded RTP stream. -fecPacketsSent | The total number of FEC packets sent on the corresponded RTP stream. -fecPacketsDiscarded | The total number of FEC packets discarded on the corresponded RTP stream. -bytesSent | The total amount of payload bytes sent on the corresponded RTP stream. -rtcpSrSent | The total number of SR reports sent by the corresponded RTP stream -rtcpRrReceived | The total number of RR reports received on the corresponded RTP stream -rtxPacketsSent | If rtx packets sent on the same stream then this number indicates how may has been sent -rtxPacketsDiscarded | If rtx packets are received on the same stream then this number indicates how may has been discarded -framesSent | The number of frames sent on the corresponded RTP stream -framesEncoded | Indicate the number of frames the Sfu has been encoded -keyFramesEncoded | Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream -roundTripTime | The calculated RTT of the stream - - -## SfuSctpStreamReport - - -A Report created for SCTP streams going through the SFU - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -sfuId (**Mandatory**) | The provided unique identifier of the SFU -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -transportId (**Mandatory**) | The id of the transport the RTP stream uses. -streamId (**Mandatory**) | The id of the sctp stream -marker | The marker the originated sample is reported with -internal | Flag indicate if the sctp channel is used as an internal transport between SFUs -callId | The generated unique identifier of the call -roomId | webrtc app provided room id -label | The label of the sctp stream -protocol | The protocol used to establish an sctp stream -sctpSmoothedRoundTripTime | The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. -sctpCongestionWindow | The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. -sctpReceiverWindow | The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. -sctpMtu | The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. -sctpUnackData | The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. -messageReceived | The number of message received on the corresponded SCTP stream. -messageSent | The number of message sent on the corresponded SCTP stream. -bytesReceived | The number of bytes received on the corresponded SCTP stream. -bytesSent | The number of bytes sent on the corresponded SCTP stream. - - -## SFUTransportReport - - -A Report created for SFU Transport layer typically created to transfer RTP/SCTP/RTX streams to another client, SFU, MCU, or processing module. - - -Field | Description ---- | --- -serviceId (**Mandatory**) | The service id the report belongs to -mediaUnitId (**Mandatory**) | The media unit id the report belongs to -sfuId (**Mandatory**) | The provided unique identifier of the SFU -timestamp (**Mandatory**) | The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) -transportId (**Mandatory**) | The generated unique identifier of the transport -marker | The marker the originated sample is reported with -internal | Flag indicate if the sfu transport is used as an internal transport between SFUs -callId | The generated unique identifier of the call -roomId | webrtc app provided room id -dtlsState | Represent the current value of the state attribute of the underlying RTCDtlsTransport. -iceState | Represent the current value of the state attribute of the underlying RTCIceTransport -sctpState | Represents the the current value of the SCTP state of the transport of the SFU -iceRole | Represent the current value of the role SFU takes place in ICE -localAddress | The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) -localPort | The local port number -protocol | The protocol used by the transport -remoteAddress | The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) -remotePort | The remote port number -rtpBytesReceived | The total amount of RTP bytes received on this transport -rtpBytesSent | The total amount of RTP bytes sent on this transport -rtpPacketsReceived | The total amount of RTP packets received on this transport -rtpPacketsSent | The total amount of RTP packets sent on this transport -rtpPacketsLost | The total amount of RTP packets lost on this transport -rtxBytesReceived | The total amount of RTX bytes received on this transport -rtxBytesSent | The total amount of RTX bytes sent on this transport -rtxPacketsReceived | The total amount of RTX packets received on this transport -rtxPacketsSent | The total amount of RTX packets sent on this transport -rtxPacketsLost | The total amount of RTX packets lost on this transport -rtxPacketsDiscarded | The total amount of RTX packets discarded on this transport -sctpBytesReceived | The total amount of SCTP bytes received on this transport -sctpBytesSent | The total amount of SCTP bytes sent on this transport -sctpPacketsReceived | The total amount of SCTP packets received on this transport -sctpPacketsSent | The total amount of SCTP packets sent on this transport - - -## Changelog -## 2.2.2 - * Bugfix for Decoder library decoding IceCandidatePairs - * remove `schemaVersion` from Reports - -## 2.2.1 - * Encoder and Decoder libraries are added - * added `schemaVersion` to each generated Samples anre Reports - -## 2.2.0 - -### Added - * CustomCallEvent to ClientSample resembles a CallEventReport, but possible to report from the client side. - * CustomSfuEvent to SfuSample resembles an SfuEventReport, but possible to report from the SFU side. - - -## 2.1.8 - * change IceCandidatePair Report accordingly to IceCandidatePair sample - -## 2.1.7 - * change csv header lowercase to snake case - -## 2.1.6 - * change type of `framesDropped` in InboundVideoTrack report from `double` to `int` - -## 2.1.5 - * Make `label` field in PeerConnectionTransport optional - -## 2.1.4 - * Add `label` field to PeerConnectionTransport - -## 2.1.3 - * change type of `framesDropped` in InboundVideoTrack from `double` to `int` -## 2.1.2 - -### Renamed - * `DataChannelStats` record to `DataChannel` in ClientSample - * `IceCandidatePairStats` record to `IceCandidatePair` in ClientSample - -## 2.1.1 - -### Restored - * `senderId` field in W3CStats for backward compatibility in client-monitor - * `rtcpTransportStatsId` field in W3CStats for backward compatibility in client-monitor - - -## 2.1.0 - -### Added - * ice candidate pair stats in samples extracted from client transport - * ice candidate pair report - * peer connection transport report - * `mid` field to ClientSamples inbound rtp related stats - * `jitterBufferMinimumDelay` field to ClientSamples inbound rtp related stats - * `playoutId` field to ClientSamples inbound rtp related stats - * `packetsDiscarded` field to ClientSamples inbound rtp related stats - * `jitterBufferTargetDelay` field to ClientSamples inbound rtp related stats - * `active` field to ClientSample outbound rtp related stats - * `droppedSamplesDuration` field to ClientSample audio source related stats - * `droppedSamplesEvents` field to ClientSample audio source related stats - * `totalCaptureDelay` field to ClientSample audio source related stats - * `totalSamplesCaptured` field to ClientSample audio source related stats - * `dtlsRole` to transport stats - * `RTCAudioPlayoutStats` to inbound-rtp related stats - - -### Modified - * pcTransports is changed to contain only peer connection transport fields - -### Removed - * client-transport-report - - * `packetsDiscarded` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `packetsRepaired` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstPacketsLost` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstPacketsDiscarded` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstLossCount` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstDiscardCount` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstLossRate` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `burstDiscardRate` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `gapLossRate` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `gapDiscardRate` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `partialFramesLost` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `fullFramesLost` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `averageRtcpInterval` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `voiceActivityFlag` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `frameBitDepth` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `packetsFailedDecryption` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `packetsDuplicated` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `perDscpPacketsReceived` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `sliCount` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `fullFramesLost` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `totalSamplesDecoded` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `samplesDecodedWithSilk` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `samplesDecodedWithCelt` field from InboundAudioTrack, InboundVideoTrack samples and reports - * `samplesreportsReceived` field from InboundAudioTrack, InboundVideoTrack samples and reports - - * `rtxSsrc` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `senderId` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `lastPacketSentTimestamp` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `packetsDiscardedOnSend` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `bytesDiscardedOnSend` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `fecPacketsSent` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `framesDiscardedOnSend` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `totalSamplesSent` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `samplesEncodedWithSilk` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `samplesEncodedWithCelt` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `voiceActivityFlag` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `sliCount` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `frameBitDepth` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `perDscpPacketsSent` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - * `bitDepth` field from OutboundAudioTrack, OutboundVideoTrack samples and reports - - -## 2.0.4 - -### Added - * csv column list for every report. Generated from the schema, required fields first, and fields are in sorted order - -## 2.0.3 - -### Added - * `remoteSfuId` to SfuInboundRtpPad reports - * `remoteTransportId` to SfuInboundRtpPad reports - * `remoteSinkId` to SfuInboundRtpPad reports - * `remoteRtpPadId` to SfuInboundRtpPad reports - -## 2.0.2 - -### Added - * `roundTripTime` to SfuOutboundRtp report - -## 2.0.1 - -### Added - * `internal` attribute to SfuSctpChannel sample - * `internal` attribute to SfuSctpStream report - * `internal` attribute to SfuTransport report - -## 2.0.0 - -init \ No newline at end of file diff --git a/npm-reports-lib/package.json b/npm-reports-lib/package.json deleted file mode 100644 index 1b81bc1b..00000000 --- a/npm-reports-lib/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@observertc/report-schemas-js", - "version": "2.2.12", - "description": "ObserveRTC Generated Library for Report Schemas", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "engines": { - "node": ">=10" - }, - "scripts": { - "prepare": "npm run build", - "build": "tsc" - }, - "keywords": [ - "webrtc", - "schemas", - "observertc" - ], - "author": "Balazs Kreith, Pallab Gain", - "license": "Apache-2.0", - "devDependencies": { - "typedoc": "^0.22.12", - "typedoc-plugin-markdown": "^3.11.14", - "typescript": "^4.5.5" - }, - "repository": { - "type": "git", - "url": "https://github.com/observertc/schemas" - } -} \ No newline at end of file diff --git a/npm-reports-lib/src/.gitignore b/npm-reports-lib/src/.gitignore deleted file mode 100644 index 90a29f33..00000000 --- a/npm-reports-lib/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -lib/ -docs/ diff --git a/npm-reports-lib/src/index.ts b/npm-reports-lib/src/index.ts deleted file mode 100644 index ed74a0f5..00000000 --- a/npm-reports-lib/src/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export * from "./reports/CallEventReport"; -export * from "./reports/CallMetaReport"; -export * from "./reports/ClientDataChannelReport"; -export * from "./reports/ClientExtensionReport"; -export * from "./reports/IceCandidatePairReport"; -export * from "./reports/InboundAudioTrackReport"; -export * from "./reports/InboundVideoTrackReport"; -export * from "./reports/ObserverEventReport"; -export * from "./reports/OutboundAudioTrackReport"; -export * from "./reports/OutboundVideoTrackReport"; -export * from "./reports/PeerConnectionTransportReport"; -export * from "./reports/Report"; -export * from "./reports/SfuEventReport"; -export * from "./reports/SfuExtensionReport"; -export * from "./reports/SfuInboundRtpPadReport"; -export * from "./reports/SfuMetaReport"; -export * from "./reports/SfuOutboundRtpPadReport"; -export * from "./reports/SfuSctpStreamReport"; -export * from "./reports/SFUTransportReport"; -export const version = "2.2.12"; \ No newline at end of file diff --git a/npm-reports-lib/src/reports/CallEventReport.ts b/npm-reports-lib/src/reports/CallEventReport.ts deleted file mode 100644 index 84c3474a..00000000 --- a/npm-reports-lib/src/reports/CallEventReport.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** -* Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. -*/ -export type CallEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The unique identifier of the media track - */ - mediaTrackId?: string; - - /** - * The SSRC identifier of the RTP stream a trackId belongs to - */ - SSRC?: number; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/npm-reports-lib/src/reports/CallMetaReport.ts b/npm-reports-lib/src/reports/CallMetaReport.ts deleted file mode 100644 index 2a92d2bd..00000000 --- a/npm-reports-lib/src/reports/CallMetaReport.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Metadata belongs to a call and can be useful -*/ -export type CallMetaReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} diff --git a/npm-reports-lib/src/reports/ClientDataChannelReport.ts b/npm-reports-lib/src/reports/ClientDataChannelReport.ts deleted file mode 100644 index b94454a6..00000000 --- a/npm-reports-lib/src/reports/ClientDataChannelReport.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** -* A Report created for PeerConnection Data Channel. -*/ -export type ClientDataChannelReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label for the peer connection - */ - peerConnectionLabel?: string; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol used for the data channel - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; - - /** - * Represents the total number of API message events sent - */ - messagesSent?: number; - - /** - * Represents the total number of payload bytes sent on the corresponded data channel - */ - bytesSent?: number; - - /** - * Represents the total number of API message events received on the corresponded data channel - */ - messagesReceived?: number; - - /** - * Represents the total number of payload bytes received on the corresponded data channel - */ - bytesReceived?: number; - -} diff --git a/npm-reports-lib/src/reports/ClientExtensionReport.ts b/npm-reports-lib/src/reports/ClientExtensionReport.ts deleted file mode 100644 index 402ced10..00000000 --- a/npm-reports-lib/src/reports/ClientExtensionReport.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** -* A Report created for Extended provided arbitrary data. -*/ -export type ClientExtensionReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - payload?: string; - -} diff --git a/npm-reports-lib/src/reports/IceCandidatePairReport.ts b/npm-reports-lib/src/reports/IceCandidatePairReport.ts deleted file mode 100644 index 09bf92e9..00000000 --- a/npm-reports-lib/src/reports/IceCandidatePairReport.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** -* A Report created for ICE candidate pairs -*/ -export type IceCandidatePairReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * The unique identifier of the peer connection - */ - candidatePairId?: string; - - /** - * The identifier of the transport the ice candidate pair is negotiated on - */ - transportId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at local side - */ - localCandidateId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at remote side - */ - remoteCandidateId?: string; - - /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport - */ - state?: string; - - /** - * indicate if the ice candidate pair is nominated or not - */ - nominated?: boolean; - - /** - * The total number of packets sent using the last selected candidate pair over the corresponded transport - */ - packetsSent?: number; - - /** - * The total number of packets received using the last selected candidate pair over the corresponded transport - */ - packetsReceived?: number; - - /** - * The total number of bytes sent using the last selected candidate pair over the corresponded transport - */ - bytesSent?: number; - - /** - * The total number of bytes received using the last selected candidate pair over the corresponded transport - */ - bytesReceived?: number; - - /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport - */ - totalRoundTripTime?: number; - - /** - * Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport - */ - currentRoundTripTime?: number; - - /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport - */ - availableOutgoingBitrate?: number; - - /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport - */ - availableIncomingBitrate?: number; - - /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport - */ - requestsReceived?: number; - - /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport - */ - requestsSent?: number; - - /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport - */ - responsesReceived?: number; - - /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport - */ - responsesSent?: number; - - /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport - */ - consentRequestsSent?: number; - - /** - * Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - packetsDiscardedOnSend?: number; - - /** - * Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - bytesDiscardedOnSend?: number; - -} diff --git a/npm-reports-lib/src/reports/InboundAudioTrackReport.ts b/npm-reports-lib/src/reports/InboundAudioTrackReport.ts deleted file mode 100644 index 29f8dc3b..00000000 --- a/npm-reports-lib/src/reports/InboundAudioTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Inbound Audio Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} diff --git a/npm-reports-lib/src/reports/InboundVideoTrackReport.ts b/npm-reports-lib/src/reports/InboundVideoTrackReport.ts deleted file mode 100644 index a2e712ed..00000000 --- a/npm-reports-lib/src/reports/InboundVideoTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Inbound Video Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponded RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameHeight?: number; - - /** - * The frame per seconds of the video sent by the remote source on the corresponded RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream - */ - qpSum?: number; - - /** - * The total tiem spent on decoding video on the corresponded RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay - */ - totalInterFrameDelay?: number; - - /** - * The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponded RTP stream. - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} diff --git a/npm-reports-lib/src/reports/ObserverEventReport.ts b/npm-reports-lib/src/reports/ObserverEventReport.ts deleted file mode 100644 index 6b005bdc..00000000 --- a/npm-reports-lib/src/reports/ObserverEventReport.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** -* A report created for observer generated events -*/ -export type ObserverEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The name of the event - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/npm-reports-lib/src/reports/OutboundAudioTrackReport.ts b/npm-reports-lib/src/reports/OutboundAudioTrackReport.ts deleted file mode 100644 index c653f70a..00000000 --- a/npm-reports-lib/src/reports/OutboundAudioTrackReport.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** -* A Report created for Outbound Audio Tracks. A combination of Audio source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source. - */ - echoReturnLossEnhancement?: number; - - /** - * . The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} diff --git a/npm-reports-lib/src/reports/OutboundVideoTrackReport.ts b/npm-reports-lib/src/reports/OutboundVideoTrackReport.ts deleted file mode 100644 index 42b9158d..00000000 --- a/npm-reports-lib/src/reports/OutboundVideoTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Outbound Video Tracks. A combination of Video source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame width the media encoder targeted - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponded media source - */ - framesPerSecond?: number; - - /** - * TThe total number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponded RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponded RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occured ont he corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} diff --git a/npm-reports-lib/src/reports/PeerConnectionTransportReport.ts b/npm-reports-lib/src/reports/PeerConnectionTransportReport.ts deleted file mode 100644 index 1969f3f3..00000000 --- a/npm-reports-lib/src/reports/PeerConnectionTransportReport.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** -* A Report created for Client PeerConnection Transport. -*/ -export type PeerConnectionTransportReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The identifier of the transport the ICE candidate pair is negotiated on - */ - transportId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * Represents the total number of packets sent on the corresponded transport - */ - packetsSent?: number; - - /** - * Represents the total number of packets received on the corresponded transport - */ - packetsReceived?: number; - - /** - * Represents the total amount of bytes sent on the corresponded transport - */ - bytesSent?: number; - - /** - * Represents the total amount of bytes received on the corresponded transport - */ - bytesReceived?: number; - - /** - * Represent the current role of ICE under DTLS Transport - */ - iceRole?: string; - - /** - * Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport - */ - iceLocalUsernameFragment?: string; - - /** - * Represents the current state of DTLS for the peer connection transport layer - */ - dtlsState?: string; - - /** - * The role this host plays in DTLS negotiations - */ - dtlsRole?: string; - - /** - * The identifier of the candidate pair the transport currently uses - */ - selectedCandidatePairId?: string; - - /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - */ - iceState?: string; - - /** - * If DTLS negotiated it gives the id of the local certificate - */ - localCertificateId?: string; - - /** - * If DTLS negotiated it gives the id of the remote certificate - */ - remoteCertificateId?: string; - - /** - * Represents the version number of the TLS used in the corresponded transport - */ - tlsVersion?: string; - - /** - * Represents the name of the DTLS cipher used in the corresponded transport - */ - dtlsCipher?: string; - - /** - * Represents the name of the SRTP cipher used in the corresponded transport - */ - srtpCipher?: string; - - /** - * Represents the name of the IANA TLS Supported Groups used in the corresponded transport - */ - tlsGroup?: string; - - /** - * The total number of candidate pair changes over the peer connection - */ - selectedCandidatePairChanges?: number; - -} diff --git a/npm-reports-lib/src/reports/Report.ts b/npm-reports-lib/src/reports/Report.ts deleted file mode 100644 index 2acb639e..00000000 --- a/npm-reports-lib/src/reports/Report.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** -* A multiplexed Report object wraps an encoded report in bytes format -*/ -export type Report = { - /** - * The type of the report - */ - type: string; - - /** - * The payload of contans the actual report - */ - payload: string; - - /** - * The version of the schema the payload holds - */ - schemaVersion?: string; - -} diff --git a/npm-reports-lib/src/reports/SFUTransportReport.ts b/npm-reports-lib/src/reports/SFUTransportReport.ts deleted file mode 100644 index 1678de88..00000000 --- a/npm-reports-lib/src/reports/SFUTransportReport.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** -* A Report created for SFU Transport layer typically created to transfer RTP/SCTP/RTX streams to another client, SFU, MCU, or processing module. -*/ -export type SFUTransportReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the transport - */ - transportId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu transport is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCDtlsTransport. - */ - dtlsState?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCIceTransport - */ - iceState?: string; - - /** - * Represents the the current value of the SCTP state of the transport of the SFU - */ - sctpState?: string; - - /** - * Represent the current value of the role SFU takes place in ICE - */ - iceRole?: string; - - /** - * The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - localAddress?: string; - - /** - * The local port number - */ - localPort?: number; - - /** - * The protocol used by the transport - */ - protocol?: string; - - /** - * The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - remoteAddress?: string; - - /** - * The remote port number - */ - remotePort?: number; - - /** - * The total amount of RTP bytes received on this transport - */ - rtpBytesReceived?: number; - - /** - * The total amount of RTP bytes sent on this transport - */ - rtpBytesSent?: number; - - /** - * The total amount of RTP packets received on this transport - */ - rtpPacketsReceived?: number; - - /** - * The total amount of RTP packets sent on this transport - */ - rtpPacketsSent?: number; - - /** - * The total amount of RTP packets lost on this transport - */ - rtpPacketsLost?: number; - - /** - * The total amount of RTX bytes received on this transport - */ - rtxBytesReceived?: number; - - /** - * The total amount of RTX bytes sent on this transport - */ - rtxBytesSent?: number; - - /** - * The total amount of RTX packets received on this transport - */ - rtxPacketsReceived?: number; - - /** - * The total amount of RTX packets sent on this transport - */ - rtxPacketsSent?: number; - - /** - * The total amount of RTX packets lost on this transport - */ - rtxPacketsLost?: number; - - /** - * The total amount of RTX packets discarded on this transport - */ - rtxPacketsDiscarded?: number; - - /** - * The total amount of SCTP bytes received on this transport - */ - sctpBytesReceived?: number; - - /** - * The total amount of SCTP bytes sent on this transport - */ - sctpBytesSent?: number; - - /** - * The total amount of SCTP packets received on this transport - */ - sctpPacketsReceived?: number; - - /** - * The total amount of SCTP packets sent on this transport - */ - sctpPacketsSent?: number; - -} diff --git a/npm-reports-lib/src/reports/SfuEventReport.ts b/npm-reports-lib/src/reports/SfuEventReport.ts deleted file mode 100644 index 6e444a82..00000000 --- a/npm-reports-lib/src/reports/SfuEventReport.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** -* Events happened in calls. -*/ -export type SfuEventReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/npm-reports-lib/src/reports/SfuExtensionReport.ts b/npm-reports-lib/src/reports/SfuExtensionReport.ts deleted file mode 100644 index 7c5aed0d..00000000 --- a/npm-reports-lib/src/reports/SfuExtensionReport.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** -* A Report created for Extended provided arbitrary data. -*/ -export type SfuExtensionReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * the human readable message of the event - */ - payload?: string; - -} diff --git a/npm-reports-lib/src/reports/SfuInboundRtpPadReport.ts b/npm-reports-lib/src/reports/SfuInboundRtpPadReport.ts deleted file mode 100644 index d258e22f..00000000 --- a/npm-reports-lib/src/reports/SfuInboundRtpPadReport.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuInboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSfuId?: string; - - /** - * only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteTransportId?: string; - - /** - * only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSinkId?: string; - - /** - * only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad - */ - remoteRtpPadId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets received on the corresponded RTP stream. - */ - packetsReceived?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. - */ - packetsRepaired?: number; - - /** - * The total number of packets failed to be decrypted on the corresponded RTP stream. - */ - packetsFailedDecryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets received on the corresponded RTP stream. - */ - fecPacketsReceived?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes received on the corresponded RTP stream. - */ - bytesReceived?: number; - - /** - * The total number of SR reports received by the corresponded RTP stream - */ - rtcpSrReceived?: number; - - /** - * The total number of RR reports sent on the corresponded RTP stream - */ - rtcpRrSent?: number; - - /** - * If rtx packets are sent or received on the same stream then this number indicates how may has been sent - */ - rtxPacketsReceived?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames received on the corresponded RTP stream - */ - framesReceived?: number; - - /** - * Indicate the number of frames the Sfu has been decoded - */ - framesDecoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been decoded - */ - keyFramesDecoded?: number; - - /** - * The calculated fractionLost of the stream - */ - fractionLost?: number; - - /** - * The calculated jitter of the stream - */ - jitter?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} diff --git a/npm-reports-lib/src/reports/SfuMetaReport.ts b/npm-reports-lib/src/reports/SfuMetaReport.ts deleted file mode 100644 index b22e3bed..00000000 --- a/npm-reports-lib/src/reports/SfuMetaReport.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Metadata belongs to SFUs -*/ -export type SfuMetaReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * The type of the meta data reported for the peer connection - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} diff --git a/npm-reports-lib/src/reports/SfuOutboundRtpPadReport.ts b/npm-reports-lib/src/reports/SfuOutboundRtpPadReport.ts deleted file mode 100644 index 7bb83e74..00000000 --- a/npm-reports-lib/src/reports/SfuOutboundRtpPadReport.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuOutboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * Unique identifier of the Sfu sink the event is related to - */ - sfuSinkId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets sent on the corresponded RTP stream. - */ - packetsSent?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets retransmitted on the corresponded RTP stream. - */ - packetsRetransmitted?: number; - - /** - * The total number of packets failed to be encrypted on the corresponded RTP stream. - */ - packetsFailedEncryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets sent on the corresponded RTP stream. - */ - fecPacketsSent?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes sent on the corresponded RTP stream. - */ - bytesSent?: number; - - /** - * The total number of SR reports sent by the corresponded RTP stream - */ - rtcpSrSent?: number; - - /** - * The total number of RR reports received on the corresponded RTP stream - */ - rtcpRrReceived?: number; - - /** - * If rtx packets sent on the same stream then this number indicates how may has been sent - */ - rtxPacketsSent?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * Indicate the number of frames the Sfu has been encoded - */ - framesEncoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} diff --git a/npm-reports-lib/src/reports/SfuSctpStreamReport.ts b/npm-reports-lib/src/reports/SfuSctpStreamReport.ts deleted file mode 100644 index 8e27ced1..00000000 --- a/npm-reports-lib/src/reports/SfuSctpStreamReport.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** -* A Report created for SCTP streams going through the SFU -*/ -export type SfuSctpStreamReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * The id of the sctp stream - */ - streamId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sctp channel is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The label of the sctp stream - */ - label?: string; - - /** - * The protocol used to establish an sctp stream - */ - protocol?: string; - - /** - * The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. - */ - sctpSmoothedRoundTripTime?: number; - - /** - * The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. - */ - sctpCongestionWindow?: number; - - /** - * The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. - */ - sctpReceiverWindow?: number; - - /** - * The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. - */ - sctpMtu?: number; - - /** - * The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. - */ - sctpUnackData?: number; - - /** - * The number of message received on the corresponded SCTP stream. - */ - messageReceived?: number; - - /** - * The number of message sent on the corresponded SCTP stream. - */ - messageSent?: number; - - /** - * The number of bytes received on the corresponded SCTP stream. - */ - bytesReceived?: number; - - /** - * The number of bytes sent on the corresponded SCTP stream. - */ - bytesSent?: number; - -} diff --git a/npm-reports-lib/tsconfig.json b/npm-reports-lib/tsconfig.json deleted file mode 100644 index 2ef0cd7d..00000000 --- a/npm-reports-lib/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compileOnSave": true, - "compilerOptions": - { - "lib": [ "es2018" ], - "target": "es2018", - "module": "CommonJS", - "moduleResolution": "node", - "esModuleInterop": true, - "isolatedModules": true, - "strict": true, - "outDir": "lib", - "declaration": true, - "declarationMap": true - }, - "include": [ "src" ] -} \ No newline at end of file diff --git a/npm-samples-decoder/package.json b/npm-samples-decoder/package.json index b469a533..cda09e4a 100644 --- a/npm-samples-decoder/package.json +++ b/npm-samples-decoder/package.json @@ -1,6 +1,6 @@ { "name": "@observertc/samples-decoder", - "version": "2.2.12", + "version": "3.0.0", "description": "ObserveRTC Library for Decoding Samples", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/npm-samples-decoder/src/InputSamples.ts b/npm-samples-decoder/src/InputSamples.ts index 33156739..dd246789 100644 --- a/npm-samples-decoder/src/InputSamples.ts +++ b/npm-samples-decoder/src/InputSamples.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.0.0 with parameter "target=ts" -// @generated from file outputs/proto/ProtobufSamplesV3Optional.proto (package org.observertc.schemas.protobuf, syntax proto3) +// @generated from file outputs/proto/ProtobufClientSampleV3Optional.proto (package org.observertc.schemas.protobuf, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -8,3821 +8,2002 @@ import { Message, proto3 } from "@bufbuild/protobuf"; /** * * - * Schema Version: 2.2.12 + * Schema Version: 3.0.0 * - * @generated from message org.observertc.schemas.protobuf.Samples + * @generated from message org.observertc.schemas.protobuf.ClientSample */ -export class Samples extends Message { +export class ClientSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample clientSamples = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ClientEvent clientEvents = 1; */ - clientSamples: Samples_ClientSample[] = []; + clientEvents: ClientSample_ClientEvent[] = []; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample sfuSamples = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ClientMetaData clientMetaItems = 2; */ - sfuSamples: Samples_SfuSample[] = []; + clientMetaItems: ClientSample_ClientMetaData[] = []; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample turnSamples = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ExtensionStat extensionStats = 3; */ - turnSamples: Samples_TurnSample[] = []; + extensionStats: ClientSample_ExtensionStat[] = []; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.Controls controls = 4; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample peerConnections = 4; */ - controls?: Samples_Controls; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clientSamples", kind: "message", T: Samples_ClientSample, repeated: true }, - { no: 2, name: "sfuSamples", kind: "message", T: Samples_SfuSample, repeated: true }, - { no: 3, name: "turnSamples", kind: "message", T: Samples_TurnSample, repeated: true }, - { no: 4, name: "controls", kind: "message", T: Samples_Controls, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples { - return new Samples().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples { - return new Samples().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples { - return new Samples().fromJsonString(jsonString, options); - } - - static equals(a: Samples | PlainMessage | undefined, b: Samples | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.Controls - */ -export class Samples_Controls extends Message { - /** - * @generated from field: optional string accessClaim = 1; - */ - accessClaim?: string; - - /** - * @generated from field: optional bool close = 2; - */ - close?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.Controls"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "accessClaim", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "close", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_Controls { - return new Samples_Controls().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_Controls { - return new Samples_Controls().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_Controls { - return new Samples_Controls().fromJsonString(jsonString, options); - } - - static equals(a: Samples_Controls | PlainMessage | undefined, b: Samples_Controls | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_Controls, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample - */ -export class Samples_ClientSample extends Message { - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.Certificate certificates = 1; - */ - certificates: Samples_ClientSample_Certificate[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats codecs = 2; - */ - codecs: Samples_ClientSample_MediaCodecStats[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent customCallEvents = 3; - */ - customCallEvents: Samples_ClientSample_CustomCallEvent[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent customObserverEvents = 4; - */ - customObserverEvents: Samples_ClientSample_CustomObserverEvent[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel dataChannels = 5; - */ - dataChannels: Samples_ClientSample_DataChannel[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat extensionStats = 6; - */ - extensionStats: Samples_ClientSample_ExtensionStat[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair iceCandidatePairs = 7; - */ - iceCandidatePairs: Samples_ClientSample_IceCandidatePair[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate iceLocalCandidates = 8; - */ - iceLocalCandidates: Samples_ClientSample_IceLocalCandidate[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate iceRemoteCandidates = 9; - */ - iceRemoteCandidates: Samples_ClientSample_IceRemoteCandidate[] = []; - - /** - * @generated from field: repeated string iceServers = 10; - */ - iceServers: string[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack inboundAudioTracks = 11; - */ - inboundAudioTracks: Samples_ClientSample_InboundAudioTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack inboundVideoTracks = 12; - */ - inboundVideoTracks: Samples_ClientSample_InboundVideoTrack[] = []; - - /** - * @generated from field: repeated string localSDPs = 13; - */ - localSDPs: string[] = []; - - /** - * @generated from field: repeated string mediaConstraints = 14; - */ - mediaConstraints: string[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice mediaDevices = 15; - */ - mediaDevices: Samples_ClientSample_MediaDevice[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat mediaSources = 16; - */ - mediaSources: Samples_ClientSample_MediaSourceStat[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack outboundAudioTracks = 17; - */ - outboundAudioTracks: Samples_ClientSample_OutboundAudioTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack outboundVideoTracks = 18; - */ - outboundVideoTracks: Samples_ClientSample_OutboundVideoTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport pcTransports = 19; - */ - pcTransports: Samples_ClientSample_PeerConnectionTransport[] = []; - - /** - * @generated from field: repeated string userMediaErrors = 20; - */ - userMediaErrors: string[] = []; + peerConnections: ClientSample_PeerConnectionSample[] = []; /** - * @generated from field: optional bytes clientId = 21; + * @generated from field: optional bytes clientId = 5; */ clientId?: Uint8Array; /** - * @generated from field: optional int64 timestamp = 22; + * @generated from field: optional int64 timestamp = 6; */ timestamp?: bigint; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Browser browser = 23; + * @generated from field: optional bytes appData = 7; */ - browser?: Samples_ClientSample_Browser; + appData?: Uint8Array; /** - * @generated from field: optional bytes callId = 24; + * @generated from field: optional bytes callId = 8; */ callId?: Uint8Array; - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Engine engine = 25; - */ - engine?: Samples_ClientSample_Engine; - - /** - * @generated from field: optional string marker = 26; - */ - marker?: string; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem os = 27; - */ - os?: Samples_ClientSample_OperationSystem; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Platform platform = 28; - */ - platform?: Samples_ClientSample_Platform; - - /** - * @generated from field: optional string roomId = 29; - */ - roomId?: string; - - /** - * @generated from field: optional int32 sampleSeq = 30; - */ - sampleSeq?: number; - - /** - * @generated from field: optional int32 timeZoneOffsetInHours = 31; - */ - timeZoneOffsetInHours?: number; - - /** - * @generated from field: optional string userId = 32; - */ - userId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "certificates", kind: "message", T: Samples_ClientSample_Certificate, repeated: true }, - { no: 2, name: "codecs", kind: "message", T: Samples_ClientSample_MediaCodecStats, repeated: true }, - { no: 3, name: "customCallEvents", kind: "message", T: Samples_ClientSample_CustomCallEvent, repeated: true }, - { no: 4, name: "customObserverEvents", kind: "message", T: Samples_ClientSample_CustomObserverEvent, repeated: true }, - { no: 5, name: "dataChannels", kind: "message", T: Samples_ClientSample_DataChannel, repeated: true }, - { no: 6, name: "extensionStats", kind: "message", T: Samples_ClientSample_ExtensionStat, repeated: true }, - { no: 7, name: "iceCandidatePairs", kind: "message", T: Samples_ClientSample_IceCandidatePair, repeated: true }, - { no: 8, name: "iceLocalCandidates", kind: "message", T: Samples_ClientSample_IceLocalCandidate, repeated: true }, - { no: 9, name: "iceRemoteCandidates", kind: "message", T: Samples_ClientSample_IceRemoteCandidate, repeated: true }, - { no: 10, name: "iceServers", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 11, name: "inboundAudioTracks", kind: "message", T: Samples_ClientSample_InboundAudioTrack, repeated: true }, - { no: 12, name: "inboundVideoTracks", kind: "message", T: Samples_ClientSample_InboundVideoTrack, repeated: true }, - { no: 13, name: "localSDPs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 14, name: "mediaConstraints", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 15, name: "mediaDevices", kind: "message", T: Samples_ClientSample_MediaDevice, repeated: true }, - { no: 16, name: "mediaSources", kind: "message", T: Samples_ClientSample_MediaSourceStat, repeated: true }, - { no: 17, name: "outboundAudioTracks", kind: "message", T: Samples_ClientSample_OutboundAudioTrack, repeated: true }, - { no: 18, name: "outboundVideoTracks", kind: "message", T: Samples_ClientSample_OutboundVideoTrack, repeated: true }, - { no: 19, name: "pcTransports", kind: "message", T: Samples_ClientSample_PeerConnectionTransport, repeated: true }, - { no: 20, name: "userMediaErrors", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 21, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 22, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 23, name: "browser", kind: "message", T: Samples_ClientSample_Browser, opt: true }, - { no: 24, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "engine", kind: "message", T: Samples_ClientSample_Engine, opt: true }, - { no: 26, name: "marker", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 27, name: "os", kind: "message", T: Samples_ClientSample_OperationSystem, opt: true }, - { no: 28, name: "platform", kind: "message", T: Samples_ClientSample_Platform, opt: true }, - { no: 29, name: "roomId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 30, name: "sampleSeq", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "timeZoneOffsetInHours", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 32, name: "userId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample | PlainMessage | undefined, b: Samples_ClientSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Engine - */ -export class Samples_ClientSample_Engine extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string version = 2; - */ - version?: string; - - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Engine"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "clientEvents", kind: "message", T: ClientSample_ClientEvent, repeated: true }, + { no: 2, name: "clientMetaItems", kind: "message", T: ClientSample_ClientMetaData, repeated: true }, + { no: 3, name: "extensionStats", kind: "message", T: ClientSample_ExtensionStat, repeated: true }, + { no: 4, name: "peerConnections", kind: "message", T: ClientSample_PeerConnectionSample, repeated: true }, + { no: 5, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 7, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample { + return new ClientSample().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample { + return new ClientSample().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample { + return new ClientSample().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_Engine | PlainMessage | undefined, b: Samples_ClientSample_Engine | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Engine, a, b); + static equals(a: ClientSample | PlainMessage | undefined, b: ClientSample | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Platform + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample */ -export class Samples_ClientSample_Platform extends Message { +export class ClientSample_PeerConnectionSample extends Message { /** - * @generated from field: optional string model = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats audioPlayouts = 1; */ - model?: string; + audioPlayouts: ClientSample_PeerConnectionSample_AudioPlayoutStats[] = []; /** - * @generated from field: optional string type = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats audioSources = 2; */ - type?: string; + audioSources: ClientSample_PeerConnectionSample_AudioSourceStats[] = []; /** - * @generated from field: optional string vendor = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats certificates = 3; */ - vendor?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Platform"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "model", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "vendor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromBinary(bytes, options); - } + certificates: ClientSample_PeerConnectionSample_CertificateStats[] = []; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Platform | PlainMessage | undefined, b: Samples_ClientSample_Platform | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Platform, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Browser - */ -export class Samples_ClientSample_Browser extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats codecs = 4; */ - name?: string; + codecs: ClientSample_PeerConnectionSample_CodecStats[] = []; /** - * @generated from field: optional string version = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats dataChannels = 5; */ - version?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Browser"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Browser | PlainMessage | undefined, b: Samples_ClientSample_Browser | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Browser, a, b); - } -} + dataChannels: ClientSample_PeerConnectionSample_DataChannelStats[] = []; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem - */ -export class Samples_ClientSample_OperationSystem extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats iceCandidatePairs = 6; */ - name?: string; + iceCandidatePairs: ClientSample_PeerConnectionSample_IceCandidatePairStats[] = []; /** - * @generated from field: optional string version = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats iceCandidates = 7; */ - version?: string; + iceCandidates: ClientSample_PeerConnectionSample_IceCandidateStats[] = []; /** - * @generated from field: optional string versionName = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats iceTransports = 8; */ - versionName?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "versionName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromJson(jsonValue, options); - } + iceTransports: ClientSample_PeerConnectionSample_IceTransportStats[] = []; - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_OperationSystem | PlainMessage | undefined, b: Samples_ClientSample_OperationSystem | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OperationSystem, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice - */ -export class Samples_ClientSample_MediaDevice extends Message { /** - * @generated from field: optional string id = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats inboundRtps = 9; */ - id?: string; + inboundRtps: ClientSample_PeerConnectionSample_InboundRtpStats[] = []; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum kind = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats outboundRtps = 10; */ - kind?: Samples_ClientSample_MediaDevice_MediaDeviceEnum; + outboundRtps: ClientSample_PeerConnectionSample_OutboundRtpStats[] = []; /** - * @generated from field: optional string label = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats peerConnectionTransports = 11; */ - label?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "kind", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum), opt: true }, - { no: 3, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaDevice | PlainMessage | undefined, b: Samples_ClientSample_MediaDevice | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaDevice, a, b); - } -} + peerConnectionTransports: ClientSample_PeerConnectionSample_PeerConnectionTransportStats[] = []; -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum - */ -export enum Samples_ClientSample_MediaDevice_MediaDeviceEnum { /** - * For kind - * - * @generated from enum value: VIDEOINPUT = 0; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats remoteInboundRtps = 12; */ - VIDEOINPUT = 0, + remoteInboundRtps: ClientSample_PeerConnectionSample_RemoteInboundRtpStats[] = []; /** - * @generated from enum value: AUDIOINPUT = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats remoteOutboundRtps = 13; */ - AUDIOINPUT = 1, + remoteOutboundRtps: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats[] = []; /** - * @generated from enum value: AUDIOOUTPUT = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats videoSources = 14; */ - AUDIOOUTPUT = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum", [ - { no: 0, name: "VIDEOINPUT" }, - { no: 1, name: "AUDIOINPUT" }, - { no: 2, name: "AUDIOOUTPUT" }, -]); + videoSources: ClientSample_PeerConnectionSample_VideoSourceStats[] = []; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat - */ -export class Samples_ClientSample_ExtensionStat extends Message { /** - * @generated from field: optional string payload = 1; + * @generated from field: optional bytes peerConnectionId = 15; */ - payload?: string; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional string type = 2; + * @generated from field: optional bytes appData = 16; */ - type?: string; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "audioPlayouts", kind: "message", T: ClientSample_PeerConnectionSample_AudioPlayoutStats, repeated: true }, + { no: 2, name: "audioSources", kind: "message", T: ClientSample_PeerConnectionSample_AudioSourceStats, repeated: true }, + { no: 3, name: "certificates", kind: "message", T: ClientSample_PeerConnectionSample_CertificateStats, repeated: true }, + { no: 4, name: "codecs", kind: "message", T: ClientSample_PeerConnectionSample_CodecStats, repeated: true }, + { no: 5, name: "dataChannels", kind: "message", T: ClientSample_PeerConnectionSample_DataChannelStats, repeated: true }, + { no: 6, name: "iceCandidatePairs", kind: "message", T: ClientSample_PeerConnectionSample_IceCandidatePairStats, repeated: true }, + { no: 7, name: "iceCandidates", kind: "message", T: ClientSample_PeerConnectionSample_IceCandidateStats, repeated: true }, + { no: 8, name: "iceTransports", kind: "message", T: ClientSample_PeerConnectionSample_IceTransportStats, repeated: true }, + { no: 9, name: "inboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_InboundRtpStats, repeated: true }, + { no: 10, name: "outboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_OutboundRtpStats, repeated: true }, + { no: 11, name: "peerConnectionTransports", kind: "message", T: ClientSample_PeerConnectionSample_PeerConnectionTransportStats, repeated: true }, + { no: 12, name: "remoteInboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_RemoteInboundRtpStats, repeated: true }, + { no: 13, name: "remoteOutboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats, repeated: true }, + { no: 14, name: "videoSources", kind: "message", T: ClientSample_PeerConnectionSample_VideoSourceStats, repeated: true }, + { no: 15, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 16, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromJson(jsonValue, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromBinary(bytes, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromJsonString(jsonString, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromJson(jsonValue, options); } - static equals(a: Samples_ClientSample_ExtensionStat | PlainMessage | undefined, b: Samples_ClientSample_ExtensionStat | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_ExtensionStat, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent - */ -export class Samples_ClientSample_CustomCallEvent extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string attachments = 2; - */ - attachments?: string; - - /** - * @generated from field: optional string mediaTrackId = 3; - */ - mediaTrackId?: string; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional bytes peerConnectionId = 5; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int64 timestamp = 6; - */ - timestamp?: bigint; - - /** - * @generated from field: optional string value = 7; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "mediaTrackId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_CustomCallEvent | PlainMessage | undefined, b: Samples_ClientSample_CustomCallEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_CustomCallEvent, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent - */ -export class Samples_ClientSample_CustomObserverEvent extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string attachments = 2; - */ - attachments?: string; - - /** - * @generated from field: optional string mediaTrackId = 3; - */ - mediaTrackId?: string; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional int64 timestamp = 5; - */ - timestamp?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "mediaTrackId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_CustomObserverEvent | PlainMessage | undefined, b: Samples_ClientSample_CustomObserverEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_CustomObserverEvent, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel - */ -export class Samples_ClientSample_DataChannel extends Message { - /** - * @generated from field: optional bytes peerConnectionId = 1; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int64 bytesReceived = 2; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 3; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 dataChannelIdentifier = 4; - */ - dataChannelIdentifier?: number; - - /** - * @generated from field: optional string label = 5; - */ - label?: string; - - /** - * @generated from field: optional int32 messageReceived = 6; - */ - messageReceived?: number; - - /** - * @generated from field: optional int32 messageSent = 7; - */ - messageSent?: number; - - /** - * @generated from field: optional string protocol = 8; - */ - protocol?: string; - - /** - * @generated from field: optional string state = 9; - */ - state?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "dataChannelIdentifier", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "messageReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "messageSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_DataChannel | PlainMessage | undefined, b: Samples_ClientSample_DataChannel | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_DataChannel, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport - */ -export class Samples_ClientSample_PeerConnectionTransport extends Message { - /** - * @generated from field: optional bytes peerConnectionId = 1; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional string transportId = 2; - */ - transportId?: string; - - /** - * @generated from field: optional int64 bytesReceived = 3; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 4; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional string dtlsCipher = 5; - */ - dtlsCipher?: string; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum dtlsRole = 6; - */ - dtlsRole?: Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum; - - /** - * @generated from field: optional string dtlsState = 7; - */ - dtlsState?: string; - - /** - * @generated from field: optional string iceLocalUsernameFragment = 8; - */ - iceLocalUsernameFragment?: string; - - /** - * @generated from field: optional string iceRole = 9; - */ - iceRole?: string; - - /** - * @generated from field: optional string iceState = 10; - */ - iceState?: string; - - /** - * @generated from field: optional string label = 11; - */ - label?: string; - - /** - * @generated from field: optional string localCertificateId = 12; - */ - localCertificateId?: string; - - /** - * @generated from field: optional int32 packetsReceived = 13; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 14; - */ - packetsSent?: number; - - /** - * @generated from field: optional string remoteCertificateId = 15; - */ - remoteCertificateId?: string; - - /** - * @generated from field: optional int32 selectedCandidatePairChanges = 16; - */ - selectedCandidatePairChanges?: number; - - /** - * @generated from field: optional string selectedCandidatePairId = 17; - */ - selectedCandidatePairId?: string; - - /** - * @generated from field: optional string srtpCipher = 18; - */ - srtpCipher?: string; - - /** - * @generated from field: optional string tlsGroup = 19; - */ - tlsGroup?: string; - - /** - * @generated from field: optional string tlsVersion = 20; - */ - tlsVersion?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "dtlsCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "dtlsRole", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum), opt: true }, - { no: 7, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "iceLocalUsernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 12, name: "localCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 13, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 14, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "remoteCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 16, name: "selectedCandidatePairChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "selectedCandidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 18, name: "srtpCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 19, name: "tlsGroup", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 20, name: "tlsVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_PeerConnectionTransport | PlainMessage | undefined, b: Samples_ClientSample_PeerConnectionTransport | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_PeerConnectionTransport, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum - */ -export enum Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum { - /** - * For dtlsRole - * - * @generated from enum value: CLIENT = 0; - */ - CLIENT = 0, - - /** - * @generated from enum value: SERVER = 1; - */ - SERVER = 1, - - /** - * @generated from enum value: UNKNOWN = 2; - */ - UNKNOWN = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum) -proto3.util.setEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum", [ - { no: 0, name: "CLIENT" }, - { no: 1, name: "SERVER" }, - { no: 2, name: "UNKNOWN" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair - */ -export class Samples_ClientSample_IceCandidatePair extends Message { - /** - * @generated from field: optional string candidatePairId = 1; - */ - candidatePairId?: string; - - /** - * @generated from field: optional bytes peerConnectionId = 2; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional double availableIncomingBitrate = 3; - */ - availableIncomingBitrate?: number; - - /** - * @generated from field: optional double availableOutgoingBitrate = 4; - */ - availableOutgoingBitrate?: number; - - /** - * @generated from field: optional int64 bytesDiscardedOnSend = 5; - */ - bytesDiscardedOnSend?: bigint; - - /** - * @generated from field: optional int64 bytesReceived = 6; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 7; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 consentRequestsSent = 8; - */ - consentRequestsSent?: number; - - /** - * @generated from field: optional double currentRoundTripTime = 9; - */ - currentRoundTripTime?: number; - - /** - * @generated from field: optional string label = 10; - */ - label?: string; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 11; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int64 lastPacketSentTimestamp = 12; - */ - lastPacketSentTimestamp?: bigint; - - /** - * @generated from field: optional string localCandidateId = 13; - */ - localCandidateId?: string; - - /** - * @generated from field: optional bool nominated = 14; - */ - nominated?: boolean; - - /** - * @generated from field: optional int32 packetsDiscardedOnSend = 15; - */ - packetsDiscardedOnSend?: number; - - /** - * @generated from field: optional int32 packetsReceived = 16; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 17; - */ - packetsSent?: number; - - /** - * @generated from field: optional string remoteCandidateId = 18; - */ - remoteCandidateId?: string; - - /** - * @generated from field: optional int32 requestsReceived = 19; - */ - requestsReceived?: number; - - /** - * @generated from field: optional int32 requestsSent = 20; - */ - requestsSent?: number; - - /** - * @generated from field: optional int32 responsesReceived = 21; - */ - responsesReceived?: number; - - /** - * @generated from field: optional int32 responsesSent = 22; - */ - responsesSent?: number; - - /** - * @generated from field: optional string state = 23; - */ - state?: string; - - /** - * @generated from field: optional double totalRoundTripTime = 24; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: optional string transportId = 25; - */ - transportId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "candidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "availableIncomingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "availableOutgoingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "bytesDiscardedOnSend", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 8, name: "consentRequestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "currentRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 10, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "lastPacketSentTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "localCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 14, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 15, name: "packetsDiscardedOnSend", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "remoteCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 19, name: "requestsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "requestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "responsesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "responsesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 24, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 25, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_IceCandidatePair | PlainMessage | undefined, b: Samples_ClientSample_IceCandidatePair | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceCandidatePair, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat - */ -export class Samples_ClientSample_MediaSourceStat extends Message { - /** - * @generated from field: optional double audioLevel = 1; - */ - audioLevel?: number; - - /** - * @generated from field: optional double droppedSamplesDuration = 2; - */ - droppedSamplesDuration?: number; - - /** - * @generated from field: optional int32 droppedSamplesEvents = 3; - */ - droppedSamplesEvents?: number; - - /** - * @generated from field: optional double echoReturnLoss = 4; - */ - echoReturnLoss?: number; - - /** - * @generated from field: optional double echoReturnLossEnhancement = 5; - */ - echoReturnLossEnhancement?: number; - - /** - * @generated from field: optional int32 frames = 6; - */ - frames?: number; - - /** - * @generated from field: optional double framesPerSecond = 7; - */ - framesPerSecond?: number; - - /** - * @generated from field: optional int32 height = 8; - */ - height?: number; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum kind = 9; - */ - kind?: Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum; - - /** - * @generated from field: optional bool relayedSource = 10; - */ - relayedSource?: boolean; - - /** - * @generated from field: optional double totalAudioEnergy = 11; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: optional double totalCaptureDelay = 12; - */ - totalCaptureDelay?: number; - - /** - * @generated from field: optional double totalSamplesCaptured = 13; - */ - totalSamplesCaptured?: number; - - /** - * @generated from field: optional double totalSamplesDuration = 14; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: optional bytes trackIdentifier = 15; - */ - trackIdentifier?: Uint8Array; - - /** - * @generated from field: optional int32 width = 16; - */ - width?: number; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 2, name: "droppedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 3, name: "droppedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 6, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 8, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "kind", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum), opt: true }, - { no: 10, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 11, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 12, name: "totalCaptureDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 13, name: "totalSamplesCaptured", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 16, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaSourceStat | PlainMessage | undefined, b: Samples_ClientSample_MediaSourceStat | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaSourceStat, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum - */ -export enum Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum { - /** - * For kind - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats - */ -export class Samples_ClientSample_MediaCodecStats extends Message { - /** - * @generated from field: optional int32 channels = 1; - */ - channels?: number; - - /** - * @generated from field: optional int32 clockRate = 2; - */ - clockRate?: number; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum codecType = 3; - */ - codecType?: Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum; - - /** - * @generated from field: optional string mimeType = 4; - */ - mimeType?: string; - - /** - * @generated from field: optional string payloadType = 5; - */ - payloadType?: string; - - /** - * @generated from field: optional string sdpFmtpLine = 6; - */ - sdpFmtpLine?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "channels", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "codecType", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum), opt: true }, - { no: 4, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "payloadType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaCodecStats | PlainMessage | undefined, b: Samples_ClientSample_MediaCodecStats | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaCodecStats, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum - */ -export enum Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum { - /** - * For codecType - * - * @generated from enum value: ENCODE = 0; - */ - ENCODE = 0, - - /** - * @generated from enum value: DECODE = 1; - */ - DECODE = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum", [ - { no: 0, name: "ENCODE" }, - { no: 1, name: "DECODE" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Certificate - */ -export class Samples_ClientSample_Certificate extends Message { - /** - * @generated from field: optional string base64Certificate = 1; - */ - base64Certificate?: string; - - /** - * @generated from field: optional string fingerprint = 2; - */ - fingerprint?: string; - - /** - * @generated from field: optional string fingerprintAlgorithm = 3; - */ - fingerprintAlgorithm?: string; - - /** - * @generated from field: optional string issuerCertificateId = 4; - */ - issuerCertificateId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Certificate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "base64Certificate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "fingerprintAlgorithm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "issuerCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Certificate | PlainMessage | undefined, b: Samples_ClientSample_Certificate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Certificate, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack - */ -export class Samples_ClientSample_InboundAudioTrack extends Message { - /** - * @generated from field: optional int64 ssrc = 1; - */ - ssrc?: bigint; - - /** - * @generated from field: optional double audioLevel = 2; - */ - audioLevel?: number; - - /** - * @generated from field: optional int64 bytesReceived = 3; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 4; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 concealedSamples = 5; - */ - concealedSamples?: number; - - /** - * @generated from field: optional int32 concealmentEvents = 6; - */ - concealmentEvents?: number; - - /** - * @generated from field: optional string decoderImplementation = 7; - */ - decoderImplementation?: string; - - /** - * @generated from field: optional int64 estimatedPlayoutTimestamp = 8; - */ - estimatedPlayoutTimestamp?: bigint; - - /** - * @generated from field: optional int32 fecPacketsDiscarded = 9; - */ - fecPacketsDiscarded?: number; - - /** - * @generated from field: optional int32 fecPacketsReceived = 10; - */ - fecPacketsReceived?: number; - - /** - * @generated from field: optional int64 headerBytesReceived = 11; - */ - headerBytesReceived?: bigint; - - /** - * @generated from field: optional int32 insertedSamplesForDeceleration = 12; - */ - insertedSamplesForDeceleration?: number; - - /** - * @generated from field: optional double jitter = 13; - */ - jitter?: number; - - /** - * @generated from field: optional double jitterBufferDelay = 14; - */ - jitterBufferDelay?: number; - - /** - * @generated from field: optional int32 jitterBufferEmittedCount = 15; - */ - jitterBufferEmittedCount?: number; - - /** - * @generated from field: optional double jitterBufferMinimumDelay = 16; - */ - jitterBufferMinimumDelay?: number; - - /** - * @generated from field: optional double jitterBufferTargetDelay = 17; - */ - jitterBufferTargetDelay?: number; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 18; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int32 nackCount = 19; - */ - nackCount?: number; - - /** - * @generated from field: optional int32 packetsDiscarded = 20; - */ - packetsDiscarded?: number; - - /** - * @generated from field: optional int32 packetsLost = 21; - */ - packetsLost?: number; - - /** - * @generated from field: optional int32 packetsReceived = 22; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 23; - */ - packetsSent?: number; - - /** - * @generated from field: optional bytes peerConnectionId = 24; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional bytes remoteClientId = 25; - */ - remoteClientId?: Uint8Array; - - /** - * @generated from field: optional int64 remoteTimestamp = 26; - */ - remoteTimestamp?: bigint; - - /** - * @generated from field: optional int32 removedSamplesForAcceleration = 27; - */ - removedSamplesForAcceleration?: number; - - /** - * @generated from field: optional int32 reportsSent = 28; - */ - reportsSent?: number; - - /** - * @generated from field: optional double roundTripTime = 29; - */ - roundTripTime?: number; - - /** - * @generated from field: optional int32 roundTripTimeMeasurements = 30; - */ - roundTripTimeMeasurements?: number; - - /** - * @generated from field: optional bytes sfuSinkId = 31; - */ - sfuSinkId?: Uint8Array; - - /** - * @generated from field: optional bytes sfuStreamId = 32; - */ - sfuStreamId?: Uint8Array; - - /** - * @generated from field: optional int32 silentConcealedSamples = 33; - */ - silentConcealedSamples?: number; - - /** - * @generated from field: optional double synthesizedSamplesDuration = 34; - */ - synthesizedSamplesDuration?: number; - - /** - * @generated from field: optional int32 synthesizedSamplesEvents = 35; - */ - synthesizedSamplesEvents?: number; - - /** - * @generated from field: optional double totalAudioEnergy = 36; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: optional double totalPlayoutDelay = 37; - */ - totalPlayoutDelay?: number; - - /** - * @generated from field: optional double totalProcessingDelay = 38; - */ - totalProcessingDelay?: number; - - /** - * @generated from field: optional double totalRoundTripTime = 39; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: optional int32 totalSamplesCount = 40; - */ - totalSamplesCount?: number; - - /** - * @generated from field: optional double totalSamplesDuration = 41; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: optional int32 totalSamplesReceived = 42; - */ - totalSamplesReceived?: number; - - /** - * @generated from field: optional bytes trackId = 43; - */ - trackId?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 3, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "concealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "concealmentEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "insertedSamplesForDeceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 17, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 19, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "remoteClientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 26, name: "remoteTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 27, name: "removedSamplesForAcceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 29, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 32, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 33, name: "silentConcealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "synthesizedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 35, name: "synthesizedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 37, name: "totalPlayoutDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 38, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 39, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 40, name: "totalSamplesCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalSamplesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 43, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_InboundAudioTrack | PlainMessage | undefined, b: Samples_ClientSample_InboundAudioTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_InboundAudioTrack, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack - */ -export class Samples_ClientSample_InboundVideoTrack extends Message { - /** - * @generated from field: optional int64 ssrc = 1; - */ - ssrc?: bigint; - - /** - * @generated from field: optional int64 bytesReceived = 2; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 3; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional string decoderImplementation = 4; - */ - decoderImplementation?: string; - - /** - * @generated from field: optional int64 estimatedPlayoutTimestamp = 5; - */ - estimatedPlayoutTimestamp?: bigint; - - /** - * @generated from field: optional int32 fecPacketsDiscarded = 6; - */ - fecPacketsDiscarded?: number; - - /** - * @generated from field: optional int32 fecPacketsReceived = 7; - */ - fecPacketsReceived?: number; - - /** - * @generated from field: optional int32 firCount = 8; - */ - firCount?: number; - - /** - * @generated from field: optional int32 frameHeight = 9; - */ - frameHeight?: number; - - /** - * @generated from field: optional int32 frameWidth = 10; - */ - frameWidth?: number; - - /** - * @generated from field: optional int32 framesDecoded = 11; - */ - framesDecoded?: number; - - /** - * @generated from field: optional int32 framesDropped = 12; - */ - framesDropped?: number; - - /** - * @generated from field: optional double framesPerSecond = 13; - */ - framesPerSecond?: number; - - /** - * @generated from field: optional int32 framesReceived = 14; - */ - framesReceived?: number; - - /** - * @generated from field: optional int64 headerBytesReceived = 15; - */ - headerBytesReceived?: bigint; - - /** - * @generated from field: optional double jitter = 16; - */ - jitter?: number; - - /** - * @generated from field: optional double jitterBufferDelay = 17; - */ - jitterBufferDelay?: number; - - /** - * @generated from field: optional int32 jitterBufferEmittedCount = 18; - */ - jitterBufferEmittedCount?: number; - - /** - * @generated from field: optional double jitterBufferMinimumDelay = 19; - */ - jitterBufferMinimumDelay?: number; - - /** - * @generated from field: optional double jitterBufferTargetDelay = 20; - */ - jitterBufferTargetDelay?: number; - - /** - * @generated from field: optional int32 keyFramesDecoded = 21; - */ - keyFramesDecoded?: number; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 22; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int32 nackCount = 23; - */ - nackCount?: number; - - /** - * @generated from field: optional int32 packetsDiscarded = 24; - */ - packetsDiscarded?: number; - - /** - * @generated from field: optional int32 packetsLost = 25; - */ - packetsLost?: number; - - /** - * @generated from field: optional int32 packetsReceived = 26; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 27; - */ - packetsSent?: number; - - /** - * @generated from field: optional bytes peerConnectionId = 28; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int32 pliCount = 29; - */ - pliCount?: number; - - /** - * @generated from field: optional int64 qpSum = 30; - */ - qpSum?: bigint; - - /** - * @generated from field: optional bytes remoteClientId = 31; - */ - remoteClientId?: Uint8Array; - - /** - * @generated from field: optional int64 remoteTimestamp = 32; - */ - remoteTimestamp?: bigint; - - /** - * @generated from field: optional int32 reportsSent = 33; - */ - reportsSent?: number; + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromJsonString(jsonString, options); + } + static equals(a: ClientSample_PeerConnectionSample | PlainMessage | undefined, b: ClientSample_PeerConnectionSample | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats + */ +export class ClientSample_PeerConnectionSample_CodecStats extends Message { /** - * @generated from field: optional double roundTripTime = 34; + * @generated from field: optional string id = 1; */ - roundTripTime?: number; + id?: string; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 35; + * @generated from field: optional string mimeType = 2; */ - roundTripTimeMeasurements?: number; + mimeType?: string; /** - * @generated from field: optional bytes sfuSinkId = 36; + * @generated from field: optional int32 payloadType = 3; */ - sfuSinkId?: Uint8Array; + payloadType?: number; /** - * @generated from field: optional bytes sfuStreamId = 37; + * @generated from field: optional double timestamp = 4; */ - sfuStreamId?: Uint8Array; + timestamp?: number; /** - * @generated from field: optional double totalDecodeTime = 38; + * @generated from field: optional string transportId = 5; */ - totalDecodeTime?: number; + transportId?: string; /** - * @generated from field: optional double totalInterFrameDelay = 39; + * @generated from field: optional string type = 6; */ - totalInterFrameDelay?: number; + type?: string; /** - * @generated from field: optional double totalProcessingDelay = 40; + * @generated from field: optional bytes appData = 7; */ - totalProcessingDelay?: number; + appData?: Uint8Array; /** - * @generated from field: optional double totalRoundTripTime = 41; + * @generated from field: optional int32 channels = 8; */ - totalRoundTripTime?: number; + channels?: number; /** - * @generated from field: optional double totalSquaredInterFrameDelay = 42; + * @generated from field: optional int32 clockRate = 9; */ - totalSquaredInterFrameDelay?: number; + clockRate?: number; /** - * @generated from field: optional bytes trackId = 43; + * @generated from field: optional string sdpFmtpLine = 10; */ - trackId?: Uint8Array; + sdpFmtpLine?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 17, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 20, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 21, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 23, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 29, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 30, name: "qpSum", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 31, name: "remoteClientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 32, name: "remoteTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 33, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 35, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 37, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 38, name: "totalDecodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 39, name: "totalInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 40, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 41, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalSquaredInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 43, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "channels", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 10, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_InboundVideoTrack | PlainMessage | undefined, b: Samples_ClientSample_InboundVideoTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_InboundVideoTrack, a, b); + static equals(a: ClientSample_PeerConnectionSample_CodecStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_CodecStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_CodecStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats */ -export class Samples_ClientSample_OutboundAudioTrack extends Message { +export class ClientSample_PeerConnectionSample_InboundRtpStats extends Message { /** - * @generated from field: optional int64 ssrc = 1; + * @generated from field: optional string id = 1; */ - ssrc?: bigint; + id?: string; /** - * @generated from field: optional bool active = 2; + * @generated from field: optional string kind = 2; */ - active?: boolean; + kind?: string; /** - * @generated from field: optional double audioLevel = 3; + * @generated from field: optional int64 ssrc = 3; */ - audioLevel?: number; + ssrc?: bigint; /** - * @generated from field: optional double averageRtcpInterval = 4; + * @generated from field: optional int64 timestamp = 4; */ - averageRtcpInterval?: number; + timestamp?: bigint; /** - * @generated from field: optional int64 bytesSent = 5; + * @generated from field: optional bytes trackIdentifier = 5; */ - bytesSent?: bigint; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional double droppedSamplesDuration = 6; + * @generated from field: optional bytes appData = 6; */ - droppedSamplesDuration?: number; + appData?: Uint8Array; /** - * @generated from field: optional int32 droppedSamplesEvents = 7; + * @generated from field: optional double audioLevel = 7; */ - droppedSamplesEvents?: number; + audioLevel?: number; /** - * @generated from field: optional double echoReturnLoss = 8; + * @generated from field: optional int64 bytesReceived = 8; */ - echoReturnLoss?: number; + bytesReceived?: bigint; /** - * @generated from field: optional double echoReturnLossEnhancement = 9; + * @generated from field: optional string codecId = 9; */ - echoReturnLossEnhancement?: number; + codecId?: string; /** - * @generated from field: optional string encoderImplementation = 10; + * @generated from field: optional int32 concealedSamples = 10; */ - encoderImplementation?: string; + concealedSamples?: number; /** - * @generated from field: optional double fractionLost = 11; + * @generated from field: optional int32 concealmentEvents = 11; */ - fractionLost?: number; + concealmentEvents?: number; /** - * @generated from field: optional int64 headerBytesSent = 12; + * @generated from field: optional int32 corruptionMeasurements = 12; */ - headerBytesSent?: bigint; + corruptionMeasurements?: number; /** - * @generated from field: optional double jitter = 13; + * @generated from field: optional string decoderImplementation = 13; */ - jitter?: number; + decoderImplementation?: string; /** - * @generated from field: optional int32 nackCount = 14; + * @generated from field: optional double estimatedPlayoutTimestamp = 14; */ - nackCount?: number; + estimatedPlayoutTimestamp?: number; /** - * @generated from field: optional int32 packetsLost = 15; + * @generated from field: optional int64 fecBytesReceived = 15; */ - packetsLost?: number; + fecBytesReceived?: bigint; /** - * @generated from field: optional int32 packetsReceived = 16; + * @generated from field: optional int32 fecPacketsDiscarded = 16; */ - packetsReceived?: number; + fecPacketsDiscarded?: number; /** - * @generated from field: optional int32 packetsSent = 17; + * @generated from field: optional int32 fecPacketsReceived = 17; */ - packetsSent?: number; + fecPacketsReceived?: number; /** - * @generated from field: optional bytes peerConnectionId = 18; + * @generated from field: optional int64 fecSsrc = 18; */ - peerConnectionId?: Uint8Array; + fecSsrc?: bigint; /** - * @generated from field: optional bool relayedSource = 19; + * @generated from field: optional int32 firCount = 19; */ - relayedSource?: boolean; + firCount?: number; /** - * @generated from field: optional int64 retransmittedBytesSent = 20; + * @generated from field: optional int32 frameHeight = 20; */ - retransmittedBytesSent?: bigint; + frameHeight?: number; /** - * @generated from field: optional int32 retransmittedPacketsSent = 21; + * @generated from field: optional int32 frameWidth = 21; */ - retransmittedPacketsSent?: number; + frameWidth?: number; /** - * @generated from field: optional string rid = 22; + * @generated from field: optional int32 framesAssembledFromMultiplePackets = 22; */ - rid?: string; + framesAssembledFromMultiplePackets?: number; /** - * @generated from field: optional double roundTripTime = 23; + * @generated from field: optional int32 framesDecoded = 23; */ - roundTripTime?: number; + framesDecoded?: number; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 24; + * @generated from field: optional int32 framesDropped = 24; */ - roundTripTimeMeasurements?: number; + framesDropped?: number; /** - * @generated from field: optional bytes sfuStreamId = 25; + * @generated from field: optional double framesPerSecond = 25; */ - sfuStreamId?: Uint8Array; + framesPerSecond?: number; /** - * @generated from field: optional int32 targetBitrate = 26; + * @generated from field: optional int32 framesReceived = 26; */ - targetBitrate?: number; + framesReceived?: number; /** - * @generated from field: optional double totalAudioEnergy = 27; + * @generated from field: optional int32 framesRendered = 27; */ - totalAudioEnergy?: number; + framesRendered?: number; /** - * @generated from field: optional double totalCaptureDelay = 28; + * @generated from field: optional int32 freezeCount = 28; */ - totalCaptureDelay?: number; + freezeCount?: number; /** - * @generated from field: optional int64 totalEncodedBytesTarget = 29; + * @generated from field: optional int64 headerBytesReceived = 29; */ - totalEncodedBytesTarget?: bigint; + headerBytesReceived?: bigint; /** - * @generated from field: optional double totalPacketSendDelay = 30; + * @generated from field: optional int32 insertedSamplesForDeceleration = 30; */ - totalPacketSendDelay?: number; + insertedSamplesForDeceleration?: number; /** - * @generated from field: optional double totalRoundTripTime = 31; + * @generated from field: optional double jitter = 31; */ - totalRoundTripTime?: number; + jitter?: number; /** - * @generated from field: optional double totalSamplesCaptured = 32; + * @generated from field: optional double jitterBufferDelay = 32; */ - totalSamplesCaptured?: number; + jitterBufferDelay?: number; /** - * @generated from field: optional double totalSamplesDuration = 33; + * @generated from field: optional int32 jitterBufferEmittedCount = 33; */ - totalSamplesDuration?: number; + jitterBufferEmittedCount?: number; /** - * @generated from field: optional bytes trackId = 34; + * @generated from field: optional double jitterBufferMinimumDelay = 34; */ - trackId?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "averageRtcpInterval", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "droppedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 7, name: "droppedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 9, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 10, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 12, name: "headerBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 19, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 20, name: "retransmittedBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 21, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 23, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 24, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 26, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 28, name: "totalCaptureDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 29, name: "totalEncodedBytesTarget", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 30, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 31, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 32, name: "totalSamplesCaptured", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 33, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 34, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromJsonString(jsonString, options); - } + jitterBufferMinimumDelay?: number; - static equals(a: Samples_ClientSample_OutboundAudioTrack | PlainMessage | undefined, b: Samples_ClientSample_OutboundAudioTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OutboundAudioTrack, a, b); - } -} + /** + * @generated from field: optional double jitterBufferTargetDelay = 35; + */ + jitterBufferTargetDelay?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack - */ -export class Samples_ClientSample_OutboundVideoTrack extends Message { /** - * @generated from field: optional int64 ssrc = 1; + * @generated from field: optional int32 keyFramesDecoded = 36; */ - ssrc?: bigint; + keyFramesDecoded?: number; /** - * @generated from field: optional bool active = 2; + * @generated from field: optional double lastPacketReceivedTimestamp = 37; */ - active?: boolean; + lastPacketReceivedTimestamp?: number; /** - * @generated from field: optional double averageRtcpInterval = 3; + * @generated from field: optional string mid = 38; */ - averageRtcpInterval?: number; + mid?: string; /** - * @generated from field: optional int64 bytesSent = 4; + * @generated from field: optional int32 nackCount = 39; */ - bytesSent?: bigint; + nackCount?: number; /** - * @generated from field: optional string encoderImplementation = 5; + * @generated from field: optional int32 packetsDiscarded = 40; */ - encoderImplementation?: string; + packetsDiscarded?: number; /** - * @generated from field: optional int32 firCount = 6; + * @generated from field: optional int32 packetsLost = 41; */ - firCount?: number; + packetsLost?: number; /** - * @generated from field: optional double fractionLost = 7; + * @generated from field: optional int32 packetsReceived = 42; */ - fractionLost?: number; + packetsReceived?: number; /** - * @generated from field: optional int32 frameHeight = 8; + * @generated from field: optional int32 pauseCount = 43; */ - frameHeight?: number; + pauseCount?: number; /** - * @generated from field: optional int32 frameWidth = 9; + * @generated from field: optional string playoutId = 44; */ - frameWidth?: number; + playoutId?: string; /** - * @generated from field: optional int32 frames = 10; + * @generated from field: optional int32 pliCount = 45; */ - frames?: number; + pliCount?: number; /** - * @generated from field: optional int32 framesDropped = 11; + * @generated from field: optional bool powerEfficientDecoder = 46; */ - framesDropped?: number; + powerEfficientDecoder?: boolean; /** - * @generated from field: optional int32 framesEncoded = 12; + * @generated from field: optional double qpSum = 47; */ - framesEncoded?: number; + qpSum?: number; /** - * @generated from field: optional double framesPerSecond = 13; + * @generated from field: optional string remoteId = 48; */ - framesPerSecond?: number; + remoteId?: string; /** - * @generated from field: optional int32 framesSent = 14; + * @generated from field: optional int32 removedSamplesForAcceleration = 49; */ - framesSent?: number; + removedSamplesForAcceleration?: number; /** - * @generated from field: optional int64 headerBytesSent = 15; + * @generated from field: optional int64 retransmittedBytesReceived = 50; */ - headerBytesSent?: bigint; + retransmittedBytesReceived?: bigint; /** - * @generated from field: optional int32 height = 16; + * @generated from field: optional int32 retransmittedPacketsReceived = 51; */ - height?: number; + retransmittedPacketsReceived?: number; /** - * @generated from field: optional int32 hugeFramesSent = 17; + * @generated from field: optional int64 rtxSsrc = 52; */ - hugeFramesSent?: number; + rtxSsrc?: bigint; /** - * @generated from field: optional double jitter = 18; + * @generated from field: optional int32 silentConcealedSamples = 53; */ - jitter?: number; + silentConcealedSamples?: number; /** - * @generated from field: optional int32 keyFramesEncoded = 19; + * @generated from field: optional double totalAssemblyTime = 54; */ - keyFramesEncoded?: number; + totalAssemblyTime?: number; /** - * @generated from field: optional int32 nackCount = 20; + * @generated from field: optional double totalAudioEnergy = 55; */ - nackCount?: number; + totalAudioEnergy?: number; /** - * @generated from field: optional int32 packetsLost = 21; + * @generated from field: optional double totalCorruptionProbability = 56; */ - packetsLost?: number; + totalCorruptionProbability?: number; /** - * @generated from field: optional int32 packetsReceived = 22; + * @generated from field: optional double totalDecodeTime = 57; */ - packetsReceived?: number; + totalDecodeTime?: number; /** - * @generated from field: optional int32 packetsSent = 23; + * @generated from field: optional double totalFreezesDuration = 58; */ - packetsSent?: number; + totalFreezesDuration?: number; /** - * @generated from field: optional bytes peerConnectionId = 24; + * @generated from field: optional double totalInterFrameDelay = 59; */ - peerConnectionId?: Uint8Array; + totalInterFrameDelay?: number; /** - * @generated from field: optional int32 pliCount = 25; + * @generated from field: optional double totalPausesDuration = 60; */ - pliCount?: number; + totalPausesDuration?: number; /** - * @generated from field: optional int64 qpSum = 26; + * @generated from field: optional double totalProcessingDelay = 61; */ - qpSum?: bigint; + totalProcessingDelay?: number; /** - * @generated from field: optional double qualityLimitationDurationBandwidth = 27; + * @generated from field: optional double totalSamplesDuration = 62; */ - qualityLimitationDurationBandwidth?: number; + totalSamplesDuration?: number; /** - * @generated from field: optional double qualityLimitationDurationCPU = 28; + * @generated from field: optional int32 totalSamplesReceived = 63; */ - qualityLimitationDurationCPU?: number; + totalSamplesReceived?: number; /** - * @generated from field: optional double qualityLimitationDurationNone = 29; + * @generated from field: optional double totalSquaredCorruptionProbability = 64; */ - qualityLimitationDurationNone?: number; + totalSquaredCorruptionProbability?: number; /** - * @generated from field: optional double qualityLimitationDurationOther = 30; + * @generated from field: optional double totalSquaredInterFrameDelay = 65; */ - qualityLimitationDurationOther?: number; + totalSquaredInterFrameDelay?: number; /** - * @generated from field: optional string qualityLimitationReason = 31; + * @generated from field: optional string transportId = 66; */ - qualityLimitationReason?: string; + transportId?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 9, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "concealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "concealmentEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "corruptionMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "fecBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 16, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 17, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "fecSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 19, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 20, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 21, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 22, name: "framesAssembledFromMultiplePackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 23, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 24, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 25, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 26, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 27, name: "framesRendered", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 28, name: "freezeCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 29, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 30, name: "insertedSamplesForDeceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 31, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 32, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 33, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 34, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 35, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 36, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 37, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 38, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 39, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 40, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 41, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 42, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 43, name: "pauseCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 44, name: "playoutId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 45, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 46, name: "powerEfficientDecoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 47, name: "qpSum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 48, name: "remoteId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 49, name: "removedSamplesForAcceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 50, name: "retransmittedBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 51, name: "retransmittedPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 52, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 53, name: "silentConcealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 54, name: "totalAssemblyTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 55, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 56, name: "totalCorruptionProbability", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 57, name: "totalDecodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 58, name: "totalFreezesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 59, name: "totalInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 60, name: "totalPausesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 61, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 62, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 63, name: "totalSamplesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 64, name: "totalSquaredCorruptionProbability", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 65, name: "totalSquaredInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 66, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_InboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_InboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_InboundRtpStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats + */ +export class ClientSample_PeerConnectionSample_RemoteInboundRtpStats extends Message { /** - * @generated from field: optional int32 qualityLimitationResolutionChanges = 32; + * @generated from field: optional string id = 1; */ - qualityLimitationResolutionChanges?: number; + id?: string; /** - * @generated from field: optional bool relayedSource = 33; + * @generated from field: optional string kind = 2; */ - relayedSource?: boolean; + kind?: string; /** - * @generated from field: optional int64 retransmittedBytesSent = 34; + * @generated from field: optional int64 ssrc = 3; */ - retransmittedBytesSent?: bigint; + ssrc?: bigint; /** - * @generated from field: optional int32 retransmittedPacketsSent = 35; + * @generated from field: optional double timestamp = 4; */ - retransmittedPacketsSent?: number; + timestamp?: number; /** - * @generated from field: optional string rid = 36; + * @generated from field: optional bytes appData = 5; */ - rid?: string; + appData?: Uint8Array; /** - * @generated from field: optional double roundTripTime = 37; + * @generated from field: optional string codecId = 6; */ - roundTripTime?: number; + codecId?: string; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 38; + * @generated from field: optional double fractionLost = 7; */ - roundTripTimeMeasurements?: number; + fractionLost?: number; /** - * @generated from field: optional bytes sfuStreamId = 39; + * @generated from field: optional double jitter = 8; */ - sfuStreamId?: Uint8Array; + jitter?: number; /** - * @generated from field: optional int32 targetBitrate = 40; + * @generated from field: optional string localId = 9; */ - targetBitrate?: number; + localId?: string; /** - * @generated from field: optional double totalEncodeTime = 41; + * @generated from field: optional int32 packetsLost = 10; */ - totalEncodeTime?: number; + packetsLost?: number; /** - * @generated from field: optional int64 totalEncodedBytesTarget = 42; + * @generated from field: optional int32 packetsReceived = 11; */ - totalEncodedBytesTarget?: bigint; + packetsReceived?: number; /** - * @generated from field: optional double totalPacketSendDelay = 43; + * @generated from field: optional double roundTripTime = 12; */ - totalPacketSendDelay?: number; + roundTripTime?: number; /** - * @generated from field: optional double totalRoundTripTime = 44; + * @generated from field: optional int32 roundTripTimeMeasurements = 13; */ - totalRoundTripTime?: number; + roundTripTimeMeasurements?: number; /** - * @generated from field: optional bytes trackId = 45; + * @generated from field: optional double totalRoundTripTime = 14; */ - trackId?: Uint8Array; + totalRoundTripTime?: number; /** - * @generated from field: optional int32 width = 46; + * @generated from field: optional string transportId = 15; */ - width?: number; + transportId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "averageRtcpInterval", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 7, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 8, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "headerBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "hugeFramesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 19, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "qpSum", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 27, name: "qualityLimitationDurationBandwidth", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 28, name: "qualityLimitationDurationCPU", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 29, name: "qualityLimitationDurationNone", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "qualityLimitationDurationOther", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 31, name: "qualityLimitationReason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 32, name: "qualityLimitationResolutionChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 33, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 34, name: "retransmittedBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 35, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 37, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 38, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 39, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 40, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "totalEncodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalEncodedBytesTarget", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 43, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 44, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 45, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 46, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "localId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 13, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_OutboundVideoTrack | PlainMessage | undefined, b: Samples_ClientSample_OutboundVideoTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OutboundVideoTrack, a, b); + static equals(a: ClientSample_PeerConnectionSample_RemoteInboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_RemoteInboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_RemoteInboundRtpStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats */ -export class Samples_ClientSample_IceLocalCandidate extends Message { +export class ClientSample_PeerConnectionSample_OutboundRtpStats extends Message { /** - * @generated from field: optional string address = 1; + * @generated from field: optional string id = 1; */ - address?: string; + id?: string; /** - * @generated from field: optional string candidateType = 2; + * @generated from field: optional string kind = 2; */ - candidateType?: string; + kind?: string; /** - * @generated from field: optional string id = 3; + * @generated from field: optional int64 ssrc = 3; */ - id?: string; + ssrc?: bigint; /** - * @generated from field: optional bytes peerConnectionId = 4; + * @generated from field: optional double timestamp = 4; */ - peerConnectionId?: Uint8Array; + timestamp?: number; /** - * @generated from field: optional int32 port = 5; + * @generated from field: optional bool active = 5; */ - port?: number; + active?: boolean; /** - * @generated from field: optional int64 priority = 6; + * @generated from field: optional bytes appData = 6; */ - priority?: bigint; + appData?: Uint8Array; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum protocol = 7; + * @generated from field: optional int32 bytesSent = 7; */ - protocol?: Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum; + bytesSent?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum relayProtocol = 8; + * @generated from field: optional string codecId = 8; */ - relayProtocol?: Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum; + codecId?: string; /** - * @generated from field: optional string url = 9; + * @generated from field: optional string encoderImplementation = 9; */ - url?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + encoderImplementation?: string; - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "protocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum), opt: true }, - { no: 8, name: "relayProtocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum), opt: true }, - { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + /** + * @generated from field: optional int32 firCount = 10; + */ + firCount?: number; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromBinary(bytes, options); - } + /** + * @generated from field: optional int32 frameHeight = 11; + */ + frameHeight?: number; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromJson(jsonValue, options); - } + /** + * @generated from field: optional int32 frameWidth = 12; + */ + frameWidth?: number; - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromJsonString(jsonString, options); - } + /** + * @generated from field: optional int32 framesEncoded = 13; + */ + framesEncoded?: number; - static equals(a: Samples_ClientSample_IceLocalCandidate | PlainMessage | undefined, b: Samples_ClientSample_IceLocalCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceLocalCandidate, a, b); - } -} + /** + * @generated from field: optional double framesPerSecond = 14; + */ + framesPerSecond?: number; -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum - */ -export enum Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum { /** - * For protocol - * - * @generated from enum value: TCP = 0; + * @generated from field: optional int32 framesSent = 15; */ - TCP = 0, + framesSent?: number; /** - * @generated from enum value: UDP = 1; + * @generated from field: optional int32 headerBytesSent = 16; */ - UDP = 1, + headerBytesSent?: number; /** - * For relayProtocol - * - * @generated from enum value: TLS = 2; + * @generated from field: optional int32 hugeFramesSent = 17; */ - TLS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum) -proto3.util.setEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum", [ - { no: 0, name: "TCP" }, - { no: 1, name: "UDP" }, - { no: 2, name: "TLS" }, -]); + hugeFramesSent?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate - */ -export class Samples_ClientSample_IceRemoteCandidate extends Message { /** - * @generated from field: optional string address = 1; + * @generated from field: optional int32 keyFramesEncoded = 18; */ - address?: string; + keyFramesEncoded?: number; /** - * @generated from field: optional string candidateType = 2; + * @generated from field: optional string mediaSourceId = 19; */ - candidateType?: string; + mediaSourceId?: string; /** - * @generated from field: optional string id = 3; + * @generated from field: optional string mid = 20; */ - id?: string; + mid?: string; /** - * @generated from field: optional bytes peerConnectionId = 4; + * @generated from field: optional int32 nackCount = 21; */ - peerConnectionId?: Uint8Array; + nackCount?: number; /** - * @generated from field: optional int32 port = 5; + * @generated from field: optional int32 packetsSent = 22; */ - port?: number; + packetsSent?: number; /** - * @generated from field: optional int64 priority = 6; + * @generated from field: optional int32 pliCount = 23; */ - priority?: bigint; + pliCount?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum protocol = 7; + * @generated from field: optional bool powerEfficientEncoder = 24; */ - protocol?: Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum; + powerEfficientEncoder?: boolean; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum relayProtocol = 8; + * @generated from field: optional double qpSum = 25; */ - relayProtocol?: Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum; + qpSum?: number; /** - * @generated from field: optional string url = 9; + * @generated from field: optional org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations qualityLimitationDurations = 26; */ - url?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "protocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum), opt: true }, - { no: 8, name: "relayProtocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum), opt: true }, - { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + qualityLimitationDurations?: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_IceRemoteCandidate | PlainMessage | undefined, b: Samples_ClientSample_IceRemoteCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceRemoteCandidate, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum - */ -export enum Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum { /** - * For protocol - * - * @generated from enum value: TCP = 0; + * @generated from field: optional string qualityLimitationReason = 27; */ - TCP = 0, + qualityLimitationReason?: string; /** - * @generated from enum value: UDP = 1; + * @generated from field: optional int32 qualityLimitationResolutionChanges = 28; */ - UDP = 1, + qualityLimitationResolutionChanges?: number; /** - * For relayProtocol - * - * @generated from enum value: TLS = 2; + * @generated from field: optional string remoteId = 29; */ - TLS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum) -proto3.util.setEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum", [ - { no: 0, name: "TCP" }, - { no: 1, name: "UDP" }, - { no: 2, name: "TLS" }, -]); + remoteId?: string; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample - */ -export class Samples_SfuSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent customSfuEvents = 1; + * @generated from field: optional int32 retransmittedBytesSent = 30; */ - customSfuEvents: Samples_SfuSample_CustomSfuEvent[] = []; + retransmittedBytesSent?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats extensionStats = 2; + * @generated from field: optional int32 retransmittedPacketsSent = 31; */ - extensionStats: Samples_SfuSample_SfuExtensionStats[] = []; + retransmittedPacketsSent?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad inboundRtpPads = 3; + * @generated from field: optional string rid = 32; */ - inboundRtpPads: Samples_SfuSample_SfuInboundRtpPad[] = []; + rid?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad outboundRtpPads = 4; + * @generated from field: optional int32 rtxSsrc = 33; */ - outboundRtpPads: Samples_SfuSample_SfuOutboundRtpPad[] = []; + rtxSsrc?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel sctpChannels = 5; + * @generated from field: optional string scalabilityMode = 34; */ - sctpChannels: Samples_SfuSample_SfuSctpChannel[] = []; + scalabilityMode?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport transports = 6; + * @generated from field: optional double targetBitrate = 35; */ - transports: Samples_SfuSample_SfuTransport[] = []; + targetBitrate?: number; /** - * @generated from field: optional bytes sfuId = 7; + * @generated from field: optional double totalEncodeTime = 36; */ - sfuId?: Uint8Array; + totalEncodeTime?: number; /** - * @generated from field: optional int64 timestamp = 8; + * @generated from field: optional int32 totalEncodedBytesTarget = 37; */ - timestamp?: bigint; + totalEncodedBytesTarget?: number; /** - * @generated from field: optional string marker = 9; + * @generated from field: optional double totalPacketSendDelay = 38; */ - marker?: string; + totalPacketSendDelay?: number; /** - * @generated from field: optional int32 timeZoneOffsetInHours = 10; + * @generated from field: optional string transportId = 39; */ - timeZoneOffsetInHours?: number; + transportId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "customSfuEvents", kind: "message", T: Samples_SfuSample_CustomSfuEvent, repeated: true }, - { no: 2, name: "extensionStats", kind: "message", T: Samples_SfuSample_SfuExtensionStats, repeated: true }, - { no: 3, name: "inboundRtpPads", kind: "message", T: Samples_SfuSample_SfuInboundRtpPad, repeated: true }, - { no: 4, name: "outboundRtpPads", kind: "message", T: Samples_SfuSample_SfuOutboundRtpPad, repeated: true }, - { no: 5, name: "sctpChannels", kind: "message", T: Samples_SfuSample_SfuSctpChannel, repeated: true }, - { no: 6, name: "transports", kind: "message", T: Samples_SfuSample_SfuTransport, repeated: true }, - { no: 7, name: "sfuId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 8, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "marker", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "timeZoneOffsetInHours", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "bytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 16, name: "headerBytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 17, name: "hugeFramesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 19, name: "mediaSourceId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 20, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 21, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 22, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 23, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 24, name: "powerEfficientEncoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 25, name: "qpSum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 26, name: "qualityLimitationDurations", kind: "message", T: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations, opt: true }, + { no: 27, name: "qualityLimitationReason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 28, name: "qualityLimitationResolutionChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 29, name: "remoteId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 30, name: "retransmittedBytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 31, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 32, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 33, name: "rtxSsrc", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 34, name: "scalabilityMode", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 35, name: "targetBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 36, name: "totalEncodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 37, name: "totalEncodedBytesTarget", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 38, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 39, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample | PlainMessage | undefined, b: Samples_SfuSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample, a, b); + static equals(a: ClientSample_PeerConnectionSample_OutboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_OutboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_OutboundRtpStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations */ -export class Samples_SfuSample_CustomSfuEvent extends Message { +export class ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: optional double bandwidth = 1; */ - name?: string; + bandwidth?: number; /** - * @generated from field: optional string attachments = 2; + * @generated from field: optional double cpu = 2; */ - attachments?: string; + cpu?: number; /** - * @generated from field: optional string message = 3; + * @generated from field: optional double none = 3; */ - message?: string; + none?: number; /** - * @generated from field: optional bytes sfuSinkId = 4; + * @generated from field: optional double other = 4; */ - sfuSinkId?: Uint8Array; + other?: number; - /** - * @generated from field: optional bytes sfuStreamId = 5; - */ - sfuStreamId?: Uint8Array; - - /** - * @generated from field: optional int64 timestamp = 6; - */ - timestamp?: bigint; - - /** - * @generated from field: optional string transportId = 7; - */ - transportId?: string; - - /** - * @generated from field: optional string value = 8; - */ - value?: string; - - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "bandwidth", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 2, name: "cpu", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "none", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "other", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_CustomSfuEvent | PlainMessage | undefined, b: Samples_SfuSample_CustomSfuEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_CustomSfuEvent, a, b); + static equals(a: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats */ -export class Samples_SfuSample_SfuTransport extends Message { +export class ClientSample_PeerConnectionSample_RemoteOutboundRtpStats extends Message { /** - * @generated from field: optional string transportId = 1; + * @generated from field: optional string id = 1; */ - transportId?: string; + id?: string; /** - * @generated from field: optional string dtlsState = 2; + * @generated from field: optional string kind = 2; */ - dtlsState?: string; + kind?: string; /** - * @generated from field: optional string iceRole = 3; + * @generated from field: optional int64 ssrc = 3; */ - iceRole?: string; + ssrc?: bigint; /** - * @generated from field: optional string iceState = 4; + * @generated from field: optional double timestamp = 4; */ - iceState?: string; + timestamp?: number; /** - * @generated from field: optional bool internal = 5; + * @generated from field: optional bytes appData = 5; */ - internal?: boolean; + appData?: Uint8Array; /** - * @generated from field: optional string localAddress = 6; + * @generated from field: optional int64 bytesSent = 6; */ - localAddress?: string; + bytesSent?: bigint; /** - * @generated from field: optional int32 localPort = 7; + * @generated from field: optional string codecId = 7; */ - localPort?: number; + codecId?: string; /** - * @generated from field: optional bool noReport = 8; + * @generated from field: optional string localId = 8; */ - noReport?: boolean; + localId?: string; /** - * @generated from field: optional string protocol = 9; + * @generated from field: optional int32 packetsSent = 9; */ - protocol?: string; + packetsSent?: number; /** - * @generated from field: optional string remoteAddress = 10; + * @generated from field: optional double remoteTimestamp = 10; */ - remoteAddress?: string; + remoteTimestamp?: number; /** - * @generated from field: optional int32 remotePort = 11; + * @generated from field: optional int32 reportsSent = 11; */ - remotePort?: number; + reportsSent?: number; /** - * @generated from field: optional int64 rtpBytesReceived = 12; + * @generated from field: optional double roundTripTime = 12; */ - rtpBytesReceived?: bigint; + roundTripTime?: number; /** - * @generated from field: optional int64 rtpBytesSent = 13; + * @generated from field: optional int32 roundTripTimeMeasurements = 13; */ - rtpBytesSent?: bigint; + roundTripTimeMeasurements?: number; /** - * @generated from field: optional int32 rtpPacketsLost = 14; + * @generated from field: optional double totalRoundTripTime = 14; */ - rtpPacketsLost?: number; + totalRoundTripTime?: number; /** - * @generated from field: optional int32 rtpPacketsReceived = 15; + * @generated from field: optional string transportId = 15; */ - rtpPacketsReceived?: number; + transportId?: string; - /** - * @generated from field: optional int32 rtpPacketsSent = 16; - */ - rtpPacketsSent?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int64 rtxBytesReceived = 17; - */ - rtxBytesReceived?: bigint; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 7, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "localId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 10, name: "remoteTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 13, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromBinary(bytes, options); + } + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_RemoteOutboundRtpStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats + */ +export class ClientSample_PeerConnectionSample_AudioSourceStats extends Message { /** - * @generated from field: optional int64 rtxBytesSent = 18; + * @generated from field: optional string id = 1; */ - rtxBytesSent?: bigint; + id?: string; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 19; + * @generated from field: optional string kind = 2; */ - rtxPacketsDiscarded?: number; + kind?: string; /** - * @generated from field: optional int32 rtxPacketsLost = 20; + * @generated from field: optional double timestamp = 3; */ - rtxPacketsLost?: number; + timestamp?: number; /** - * @generated from field: optional int32 rtxPacketsReceived = 21; + * @generated from field: optional bytes trackIdentifier = 4; */ - rtxPacketsReceived?: number; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional int32 rtxPacketsSent = 22; + * @generated from field: optional bytes appData = 5; */ - rtxPacketsSent?: number; + appData?: Uint8Array; /** - * @generated from field: optional int64 sctpBytesReceived = 23; + * @generated from field: optional double audioLevel = 6; */ - sctpBytesReceived?: bigint; + audioLevel?: number; /** - * @generated from field: optional int64 sctpBytesSent = 24; + * @generated from field: optional double echoReturnLoss = 7; */ - sctpBytesSent?: bigint; + echoReturnLoss?: number; /** - * @generated from field: optional int32 sctpPacketsReceived = 25; + * @generated from field: optional double echoReturnLossEnhancement = 8; */ - sctpPacketsReceived?: number; + echoReturnLossEnhancement?: number; /** - * @generated from field: optional int32 sctpPacketsSent = 26; + * @generated from field: optional double totalAudioEnergy = 9; */ - sctpPacketsSent?: number; + totalAudioEnergy?: number; /** - * @generated from field: optional string sctpState = 27; + * @generated from field: optional double totalSamplesDuration = 10; */ - sctpState?: string; + totalSamplesDuration?: number; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "localAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "localPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 9, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "remoteAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "remotePort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "rtpBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "rtpBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 14, name: "rtpPacketsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "rtpPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "rtpPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "rtxBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 18, name: "rtxBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 19, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "rtxPacketsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "rtxPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "rtxPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "sctpBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 24, name: "sctpBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 25, name: "sctpPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "sctpPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "sctpState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 10, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuTransport | PlainMessage | undefined, b: Samples_SfuSample_SfuTransport | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuTransport, a, b); + static equals(a: ClientSample_PeerConnectionSample_AudioSourceStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_AudioSourceStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_AudioSourceStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats */ -export class Samples_SfuSample_SfuInboundRtpPad extends Message { +export class ClientSample_PeerConnectionSample_VideoSourceStats extends Message { /** - * @generated from field: optional bytes padId = 1; + * @generated from field: optional int32 frames = 1; */ - padId?: Uint8Array; + frames?: number; /** - * @generated from field: optional int64 ssrc = 2; + * @generated from field: optional double framesPerSecond = 2; */ - ssrc?: bigint; + framesPerSecond?: number; /** - * @generated from field: optional bytes streamId = 3; + * @generated from field: optional int32 height = 3; */ - streamId?: Uint8Array; + height?: number; /** - * @generated from field: optional string transportId = 4; + * @generated from field: optional string id = 4; */ - transportId?: string; + id?: string; /** - * @generated from field: optional int64 bytesReceived = 5; + * @generated from field: optional string kind = 5; */ - bytesReceived?: bigint; + kind?: string; /** - * @generated from field: optional int32 clockRate = 6; + * @generated from field: optional double timestamp = 6; */ - clockRate?: number; + timestamp?: number; /** - * @generated from field: optional int32 fecPacketsDiscarded = 7; + * @generated from field: optional bytes trackIdentifier = 7; */ - fecPacketsDiscarded?: number; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional int32 fecPacketsReceived = 8; + * @generated from field: optional int32 width = 8; */ - fecPacketsReceived?: number; + width?: number; /** - * @generated from field: optional int32 firCount = 9; + * @generated from field: optional bytes appData = 9; */ - firCount?: number; + appData?: Uint8Array; - /** - * @generated from field: optional double fractionLost = 10; - */ - fractionLost?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 framesDecoded = 11; - */ - framesDecoded?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 2, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 framesReceived = 12; - */ - framesReceived?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromBinary(bytes, options); + } - /** - * @generated from field: optional bool internal = 13; - */ - internal?: boolean; + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromJsonString(jsonString, options); + } + static equals(a: ClientSample_PeerConnectionSample_VideoSourceStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_VideoSourceStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_VideoSourceStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats + */ +export class ClientSample_PeerConnectionSample_AudioPlayoutStats extends Message { /** - * @generated from field: optional double jitter = 14; + * @generated from field: optional string id = 1; */ - jitter?: number; + id?: string; /** - * @generated from field: optional int32 keyFramesDecoded = 15; + * @generated from field: optional string kind = 2; */ - keyFramesDecoded?: number; + kind?: string; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum mediaType = 16; + * @generated from field: optional double synthesizedSamplesDuration = 3; */ - mediaType?: Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum; + synthesizedSamplesDuration?: number; /** - * @generated from field: optional string mimeType = 17; + * @generated from field: optional int32 synthesizedSamplesEvents = 4; */ - mimeType?: string; + synthesizedSamplesEvents?: number; /** - * @generated from field: optional int32 nackCount = 18; + * @generated from field: optional double timestamp = 5; */ - nackCount?: number; + timestamp?: number; /** - * @generated from field: optional bool noReport = 19; + * @generated from field: optional double totalPlayoutDelay = 6; */ - noReport?: boolean; + totalPlayoutDelay?: number; /** - * @generated from field: optional int32 packetsDiscarded = 20; + * @generated from field: optional int32 totalSamplesCount = 7; */ - packetsDiscarded?: number; + totalSamplesCount?: number; /** - * @generated from field: optional int32 packetsDuplicated = 21; + * @generated from field: optional double totalSamplesDuration = 8; */ - packetsDuplicated?: number; + totalSamplesDuration?: number; /** - * @generated from field: optional int32 packetsFailedDecryption = 22; + * @generated from field: optional bytes appData = 9; */ - packetsFailedDecryption?: number; + appData?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "synthesizedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "synthesizedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 6, name: "totalPlayoutDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "totalSamplesCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromBinary(bytes, options); + } + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_AudioPlayoutStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_AudioPlayoutStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_AudioPlayoutStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats + */ +export class ClientSample_PeerConnectionSample_PeerConnectionTransportStats extends Message { /** - * @generated from field: optional int32 packetsLost = 23; + * @generated from field: optional int32 dataChannelsClosed = 1; */ - packetsLost?: number; + dataChannelsClosed?: number; /** - * @generated from field: optional int32 packetsReceived = 24; + * @generated from field: optional int32 dataChannelsOpened = 2; */ - packetsReceived?: number; + dataChannelsOpened?: number; /** - * @generated from field: optional int32 packetsRepaired = 25; + * @generated from field: optional string id = 3; */ - packetsRepaired?: number; + id?: string; /** - * @generated from field: optional int32 payloadType = 26; + * @generated from field: optional double timestamp = 4; */ - payloadType?: number; + timestamp?: number; /** - * @generated from field: optional int32 pliCount = 27; + * @generated from field: optional bytes appData = 5; */ - pliCount?: number; + appData?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "dataChannelsClosed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 2, name: "dataChannelsOpened", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_PeerConnectionTransportStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_PeerConnectionTransportStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_PeerConnectionTransportStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats + */ +export class ClientSample_PeerConnectionSample_DataChannelStats extends Message { /** - * @generated from field: optional string rid = 28; + * @generated from field: optional int64 bytesReceived = 1; */ - rid?: string; + bytesReceived?: bigint; /** - * @generated from field: optional double roundTripTime = 29; + * @generated from field: optional int64 bytesSent = 2; */ - roundTripTime?: number; + bytesSent?: bigint; /** - * @generated from field: optional int32 rtcpRrSent = 30; + * @generated from field: optional int32 dataChannelIdentifier = 3; */ - rtcpRrSent?: number; + dataChannelIdentifier?: number; /** - * @generated from field: optional int32 rtcpSrReceived = 31; + * @generated from field: optional string id = 4; */ - rtcpSrReceived?: number; + id?: string; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 32; + * @generated from field: optional string label = 5; */ - rtxPacketsDiscarded?: number; + label?: string; /** - * @generated from field: optional int32 rtxPacketsReceived = 33; + * @generated from field: optional int32 messagesReceived = 6; */ - rtxPacketsReceived?: number; + messagesReceived?: number; /** - * @generated from field: optional int64 rtxSsrc = 34; + * @generated from field: optional int32 messagesSent = 7; */ - rtxSsrc?: bigint; + messagesSent?: number; /** - * @generated from field: optional string sdpFmtpLine = 35; + * @generated from field: optional string protocol = 8; */ - sdpFmtpLine?: string; + protocol?: string; /** - * @generated from field: optional int32 sliCount = 36; + * @generated from field: optional string state = 9; */ - sliCount?: number; + state?: string; /** - * @generated from field: optional int32 targetBitrate = 37; + * @generated from field: optional double timestamp = 10; */ - targetBitrate?: number; + timestamp?: number; /** - * @generated from field: optional bool voiceActivityFlag = 38; + * @generated from field: optional bytes appData = 11; */ - voiceActivityFlag?: boolean; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "padId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 4, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 11, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 14, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "mediaType", kind: "enum", T: proto3.getEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum), opt: true }, - { no: 17, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 18, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 20, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsDuplicated", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsFailedDecryption", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsRepaired", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 29, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "rtcpRrSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "rtcpSrReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 32, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 33, name: "rtxPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 35, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 36, name: "sliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 37, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 38, name: "voiceActivityFlag", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 1, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 2, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 3, name: "dataChannelIdentifier", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "messagesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 7, name: "messagesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuInboundRtpPad | PlainMessage | undefined, b: Samples_SfuSample_SfuInboundRtpPad | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuInboundRtpPad, a, b); + static equals(a: ClientSample_PeerConnectionSample_DataChannelStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_DataChannelStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_DataChannelStats, a, b); } } -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum - */ -export enum Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum { - /** - * For mediaType - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum) -proto3.util.setEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum, "org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad - */ -export class Samples_SfuSample_SfuOutboundRtpPad extends Message { - /** - * @generated from field: optional bytes padId = 1; - */ - padId?: Uint8Array; - - /** - * @generated from field: optional bytes sinkId = 2; - */ - sinkId?: Uint8Array; - - /** - * @generated from field: optional int64 ssrc = 3; - */ - ssrc?: bigint; - - /** - * @generated from field: optional bytes streamId = 4; - */ - streamId?: Uint8Array; - +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats + */ +export class ClientSample_PeerConnectionSample_IceTransportStats extends Message { /** - * @generated from field: optional string transportId = 5; + * @generated from field: optional int64 bytesReceived = 1; */ - transportId?: string; + bytesReceived?: bigint; /** - * @generated from field: optional int64 bytesSent = 6; + * @generated from field: optional int64 bytesSent = 2; */ bytesSent?: bigint; /** - * @generated from field: optional bytes callId = 7; + * @generated from field: optional string dtlsCipher = 3; */ - callId?: Uint8Array; + dtlsCipher?: string; /** - * @generated from field: optional bytes clientId = 8; + * @generated from field: optional string dtlsRole = 4; */ - clientId?: Uint8Array; + dtlsRole?: string; /** - * @generated from field: optional int32 clockRate = 9; + * @generated from field: optional string dtlsState = 5; */ - clockRate?: number; + dtlsState?: string; /** - * @generated from field: optional int32 fecPacketsDiscarded = 10; + * @generated from field: optional string iceLocalUsernameFragment = 6; */ - fecPacketsDiscarded?: number; + iceLocalUsernameFragment?: string; /** - * @generated from field: optional int32 fecPacketsSent = 11; + * @generated from field: optional string iceRole = 7; */ - fecPacketsSent?: number; + iceRole?: string; /** - * @generated from field: optional int32 firCount = 12; + * @generated from field: optional string iceState = 8; */ - firCount?: number; + iceState?: string; /** - * @generated from field: optional double fractionLost = 13; + * @generated from field: optional string id = 9; */ - fractionLost?: number; + id?: string; /** - * @generated from field: optional int32 framesEncoded = 14; + * @generated from field: optional string localCertificateId = 10; */ - framesEncoded?: number; + localCertificateId?: string; /** - * @generated from field: optional int32 framesSent = 15; + * @generated from field: optional int32 packetsReceived = 11; */ - framesSent?: number; + packetsReceived?: number; /** - * @generated from field: optional bool internal = 16; + * @generated from field: optional int32 packetsSent = 12; */ - internal?: boolean; + packetsSent?: number; /** - * @generated from field: optional double jitter = 17; + * @generated from field: optional string remoteCertificateId = 13; */ - jitter?: number; + remoteCertificateId?: string; /** - * @generated from field: optional int32 keyFramesEncoded = 18; + * @generated from field: optional int32 selectedCandidatePairChanges = 14; */ - keyFramesEncoded?: number; + selectedCandidatePairChanges?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum mediaType = 19; + * @generated from field: optional string selectedCandidatePairId = 15; */ - mediaType?: Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum; + selectedCandidatePairId?: string; /** - * @generated from field: optional string mimeType = 20; + * @generated from field: optional string srtpCipher = 16; */ - mimeType?: string; + srtpCipher?: string; /** - * @generated from field: optional int32 nackCount = 21; + * @generated from field: optional double timestamp = 17; */ - nackCount?: number; + timestamp?: number; /** - * @generated from field: optional bool noReport = 22; + * @generated from field: optional string tlsVersion = 18; */ - noReport?: boolean; + tlsVersion?: string; /** - * @generated from field: optional int32 packetsDiscarded = 23; + * @generated from field: optional bytes appData = 19; */ - packetsDiscarded?: number; + appData?: Uint8Array; - /** - * @generated from field: optional int32 packetsDuplicated = 24; - */ - packetsDuplicated?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 packetsFailedEncryption = 25; - */ - packetsFailedEncryption?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 2, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 3, name: "dtlsCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "dtlsRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "iceLocalUsernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "localCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 11, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "remoteCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "selectedCandidatePairChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 15, name: "selectedCandidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 16, name: "srtpCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 17, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 18, name: "tlsVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 19, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 packetsLost = 26; - */ - packetsLost?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_IceTransportStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceTransportStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceTransportStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats + */ +export class ClientSample_PeerConnectionSample_IceCandidateStats extends Message { /** - * @generated from field: optional int32 packetsRetransmitted = 27; + * @generated from field: optional string candidateType = 1; */ - packetsRetransmitted?: number; + candidateType?: string; /** - * @generated from field: optional int32 packetsSent = 28; + * @generated from field: optional string foundation = 2; */ - packetsSent?: number; + foundation?: string; /** - * @generated from field: optional int32 payloadType = 29; + * @generated from field: optional string id = 3; */ - payloadType?: number; + id?: string; /** - * @generated from field: optional int32 pliCount = 30; + * @generated from field: optional int32 port = 4; */ - pliCount?: number; + port?: number; /** - * @generated from field: optional string rid = 31; + * @generated from field: optional int64 priority = 5; */ - rid?: string; + priority?: bigint; /** - * @generated from field: optional double roundTripTime = 32; + * @generated from field: optional string protocol = 6; */ - roundTripTime?: number; + protocol?: string; /** - * @generated from field: optional int32 rtcpRrReceived = 33; + * @generated from field: optional string relatedAddress = 7; */ - rtcpRrReceived?: number; + relatedAddress?: string; /** - * @generated from field: optional int32 rtcpSrSent = 34; + * @generated from field: optional int32 relatedPort = 8; */ - rtcpSrSent?: number; + relatedPort?: number; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 35; + * @generated from field: optional string relayProtocol = 9; */ - rtxPacketsDiscarded?: number; + relayProtocol?: string; /** - * @generated from field: optional int32 rtxPacketsSent = 36; + * @generated from field: optional string tcpType = 10; */ - rtxPacketsSent?: number; + tcpType?: string; /** - * @generated from field: optional int64 rtxSsrc = 37; + * @generated from field: optional double timestamp = 11; */ - rtxSsrc?: bigint; + timestamp?: number; /** - * @generated from field: optional string sdpFmtpLine = 38; + * @generated from field: optional string transportId = 12; */ - sdpFmtpLine?: string; + transportId?: string; /** - * @generated from field: optional int32 sliCount = 39; + * @generated from field: optional string url = 13; */ - sliCount?: number; + url?: string; /** - * @generated from field: optional int32 targetBitrate = 40; + * @generated from field: optional string usernameFragment = 14; */ - targetBitrate?: number; + usernameFragment?: string; /** - * @generated from field: optional bytes trackId = 41; + * @generated from field: optional string address = 15; */ - trackId?: Uint8Array; + address?: string; /** - * @generated from field: optional bool voiceActivityFlag = 42; + * @generated from field: optional bytes appData = 16; */ - voiceActivityFlag?: boolean; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "padId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "sinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 8, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 9, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "fecPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 17, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "mediaType", kind: "enum", T: proto3.getEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum), opt: true }, - { no: 20, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 21, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 23, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsDuplicated", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsFailedEncryption", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "packetsRetransmitted", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 29, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 30, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 32, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 33, name: "rtcpRrReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "rtcpSrSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 35, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "rtxPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 37, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 38, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 39, name: "sliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 40, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 42, name: "voiceActivityFlag", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 1, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "foundation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 5, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "relatedAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "relatedPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "relayProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "tcpType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 11, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 12, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 13, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "usernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 15, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 16, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuOutboundRtpPad | PlainMessage | undefined, b: Samples_SfuSample_SfuOutboundRtpPad | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuOutboundRtpPad, a, b); + static equals(a: ClientSample_PeerConnectionSample_IceCandidateStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceCandidateStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceCandidateStats, a, b); } } /** - * @generated from enum org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum - */ -export enum Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum { - /** - * For mediaType - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum) -proto3.util.setEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum, "org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats */ -export class Samples_SfuSample_SfuSctpChannel extends Message { +export class ClientSample_PeerConnectionSample_IceCandidatePairStats extends Message { /** - * @generated from field: optional bytes channelId = 1; + * @generated from field: optional double availableIncomingBitrate = 1; */ - channelId?: Uint8Array; + availableIncomingBitrate?: number; /** - * @generated from field: optional bytes streamId = 2; + * @generated from field: optional double availableOutgoingBitrate = 2; */ - streamId?: Uint8Array; + availableOutgoingBitrate?: number; /** - * @generated from field: optional string transportId = 3; + * @generated from field: optional int64 bytesDiscardedOnSend = 3; */ - transportId?: string; + bytesDiscardedOnSend?: bigint; /** * @generated from field: optional int64 bytesReceived = 4; @@ -3835,434 +2016,438 @@ export class Samples_SfuSample_SfuSctpChannel extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "channelId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 7, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "messageReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "messageSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 11, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 12, name: "sctpCongestionWindow", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 13, name: "sctpMtu", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 14, name: "sctpReceiverWindow", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "sctpSmoothedRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 16, name: "sctpUnackData", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromJsonString(jsonString, options); - } - - static equals(a: Samples_SfuSample_SfuSctpChannel | PlainMessage | undefined, b: Samples_SfuSample_SfuSctpChannel | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuSctpChannel, a, b); - } -} + remoteCandidateId?: string; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats - */ -export class Samples_SfuSample_SfuExtensionStats extends Message { /** - * @generated from field: optional string payload = 1; + * @generated from field: optional int32 requestsReceived = 17; */ - payload?: string; + requestsReceived?: number; /** - * @generated from field: optional string type = 2; + * @generated from field: optional int32 requestsSent = 18; */ - type?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + requestsSent?: number; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromBinary(bytes, options); - } + /** + * @generated from field: optional int32 responsesReceived = 19; + */ + responsesReceived?: number; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromJson(jsonValue, options); - } + /** + * @generated from field: optional int32 responsesSent = 20; + */ + responsesSent?: number; - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: optional double timestamp = 21; + */ + timestamp?: number; - static equals(a: Samples_SfuSample_SfuExtensionStats | PlainMessage | undefined, b: Samples_SfuSample_SfuExtensionStats | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuExtensionStats, a, b); - } -} + /** + * @generated from field: optional double totalRoundTripTime = 22; + */ + totalRoundTripTime?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample - */ -export class Samples_TurnSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation allocations = 1; + * @generated from field: optional string transportId = 23; */ - allocations: Samples_TurnSample_TurnPeerAllocation[] = []; + transportId?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession sessions = 2; + * @generated from field: optional bytes appData = 24; */ - sessions: Samples_TurnSample_TurnSession[] = []; + appData?: Uint8Array; /** - * @generated from field: optional string serverId = 3; + * @generated from field: optional org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum state = 25; */ - serverId?: string; + state?: ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "allocations", kind: "message", T: Samples_TurnSample_TurnPeerAllocation, repeated: true }, - { no: 2, name: "sessions", kind: "message", T: Samples_TurnSample_TurnSession, repeated: true }, - { no: 3, name: "serverId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "availableIncomingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 2, name: "availableOutgoingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "bytesDiscardedOnSend", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "consentRequestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 7, name: "currentRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 10, name: "lastPacketSentTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "localCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 12, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 13, name: "packetsDiscardedOnSend", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 15, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 16, name: "remoteCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 17, name: "requestsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "requestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 19, name: "responsesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 20, name: "responsesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 21, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 22, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 23, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 24, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 25, name: "state", kind: "enum", T: proto3.getEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum), opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample | PlainMessage | undefined, b: Samples_TurnSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample, a, b); + static equals(a: ClientSample_PeerConnectionSample_IceCandidatePairStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceCandidatePairStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceCandidatePairStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation + * @generated from enum org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum */ -export class Samples_TurnSample_TurnPeerAllocation extends Message { - /** - * @generated from field: optional string peerId = 1; - */ - peerId?: string; - - /** - * @generated from field: optional string relayedAddress = 2; - */ - relayedAddress?: string; - +export enum ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum { /** - * @generated from field: optional int32 relayedPort = 3; + * For state + * + * @generated from enum value: NEW = 0; */ - relayedPort?: number; + NEW = 0, /** - * @generated from field: optional string sessionId = 4; + * @generated from enum value: INPROGRESS = 1; */ - sessionId?: string; + INPROGRESS = 1, /** - * @generated from field: optional string transportProtocol = 5; + * @generated from enum value: FAILED = 2; */ - transportProtocol?: string; + FAILED = 2, /** - * @generated from field: optional string peerAddress = 6; + * @generated from enum value: SUCCEEDED = 3; */ - peerAddress?: string; + SUCCEEDED = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum) +proto3.util.setEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum, "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum", [ + { no: 0, name: "NEW" }, + { no: 1, name: "INPROGRESS" }, + { no: 2, name: "FAILED" }, + { no: 3, name: "SUCCEEDED" }, +]); +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats + */ +export class ClientSample_PeerConnectionSample_CertificateStats extends Message { /** - * @generated from field: optional int32 peerPort = 7; + * @generated from field: optional string base64Certificate = 1; */ - peerPort?: number; + base64Certificate?: string; /** - * @generated from field: optional int64 receivedBytes = 8; + * @generated from field: optional string fingerprint = 2; */ - receivedBytes?: bigint; + fingerprint?: string; /** - * @generated from field: optional int32 receivedPackets = 9; + * @generated from field: optional string fingerprintAlgorithm = 3; */ - receivedPackets?: number; + fingerprintAlgorithm?: string; /** - * @generated from field: optional int32 receivingBitrate = 10; + * @generated from field: optional string id = 4; */ - receivingBitrate?: number; + id?: string; /** - * @generated from field: optional int32 sendingBitrate = 11; + * @generated from field: optional double timestamp = 5; */ - sendingBitrate?: number; + timestamp?: number; /** - * @generated from field: optional int64 sentBytes = 12; + * @generated from field: optional bytes appData = 6; */ - sentBytes?: bigint; + appData?: Uint8Array; /** - * @generated from field: optional int32 sentPackets = 13; + * @generated from field: optional string issuerCertificateId = 7; */ - sentPackets?: number; + issuerCertificateId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "relayedAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "relayedPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "transportProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "peerAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "peerPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "receivedBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "receivedPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "receivingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "sendingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "sentBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "sentPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "base64Certificate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "fingerprintAlgorithm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "issuerCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample_TurnPeerAllocation | PlainMessage | undefined, b: Samples_TurnSample_TurnPeerAllocation | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample_TurnPeerAllocation, a, b); + static equals(a: ClientSample_PeerConnectionSample_CertificateStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_CertificateStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_CertificateStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession + * @generated from message org.observertc.schemas.protobuf.ClientSample.ClientEvent */ -export class Samples_TurnSample_TurnSession extends Message { +export class ClientSample_ClientEvent extends Message { /** - * @generated from field: optional string sessionId = 1; + * @generated from field: optional string type = 1; */ - sessionId?: string; + type?: string; /** - * @generated from field: optional string clientAddress = 2; + * @generated from field: optional string payload = 2; */ - clientAddress?: string; + payload?: string; /** - * @generated from field: optional bytes clientId = 3; + * @generated from field: optional bytes peerConnectionId = 3; */ - clientId?: Uint8Array; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional int32 clientPort = 4; + * @generated from field: optional int64 ssrc = 4; */ - clientPort?: number; + ssrc?: bigint; /** - * @generated from field: optional int64 nonceExpirationTime = 5; + * @generated from field: optional int64 timestamp = 5; */ - nonceExpirationTime?: bigint; + timestamp?: bigint; /** - * @generated from field: optional string realm = 6; + * @generated from field: optional bytes trackId = 6; */ - realm?: string; + trackId?: Uint8Array; - /** - * @generated from field: optional int64 receivedBytes = 7; - */ - receivedBytes?: bigint; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 receivedPackets = 8; - */ - receivedPackets?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ClientEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 4, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 receivingBitrate = 9; - */ - receivingBitrate?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromJson(jsonValue, options); + } + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_ClientEvent | PlainMessage | undefined, b: ClientSample_ClientEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ClientEvent, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.ClientMetaData + */ +export class ClientSample_ClientMetaData extends Message { /** - * @generated from field: optional int32 sendingBitrate = 10; + * @generated from field: optional string type = 1; */ - sendingBitrate?: number; + type?: string; /** - * @generated from field: optional int64 sentBytes = 11; + * @generated from field: optional string payload = 2; */ - sentBytes?: bigint; + payload?: string; /** - * @generated from field: optional int32 sentPackets = 12; + * @generated from field: optional bytes peerConnectionId = 3; */ - sentPackets?: number; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional string serverAddress = 13; + * @generated from field: optional int64 ssrc = 4; */ - serverAddress?: string; + ssrc?: bigint; /** - * @generated from field: optional int32 serverPort = 14; + * @generated from field: optional int64 timestamp = 5; */ - serverPort?: number; + timestamp?: bigint; /** - * @generated from field: optional int64 started = 15; + * @generated from field: optional bytes trackId = 6; */ - started?: bigint; + trackId?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ClientMetaData"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 4, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_ClientMetaData | PlainMessage | undefined, b: ClientSample_ClientMetaData | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ClientMetaData, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.ExtensionStat + */ +export class ClientSample_ExtensionStat extends Message { /** - * @generated from field: optional string transportProtocol = 16; + * @generated from field: optional string payload = 1; */ - transportProtocol?: string; + payload?: string; /** - * @generated from field: optional string username = 17; + * @generated from field: optional string type = 2; */ - username?: string; + type?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ExtensionStat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "clientAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 4, name: "clientPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "nonceExpirationTime", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "realm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "receivedBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 8, name: "receivedPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "receivingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "sendingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "sentBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "sentPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "serverAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 14, name: "serverPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "started", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "transportProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 17, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample_TurnSession | PlainMessage | undefined, b: Samples_TurnSample_TurnSession | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample_TurnSession, a, b); + static equals(a: ClientSample_ExtensionStat | PlainMessage | undefined, b: ClientSample_ExtensionStat | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ExtensionStat, a, b); } } diff --git a/npm-samples-decoder/src/OutputSamples.ts b/npm-samples-decoder/src/OutputSamples.ts index 0da37a91..7722bdcc 100644 --- a/npm-samples-decoder/src/OutputSamples.ts +++ b/npm-samples-decoder/src/OutputSamples.ts @@ -1,2518 +1,1563 @@ -export const schemaVersion = "2.2.12"; +export const schemaVersion = "3.0.0"; /** -* Session data +* The WebRTC app provided custom stats payload +*/ +export type ExtensionStat = { + /** + * The type of the extension stats the custom app provides + */ + type: string; + + /** + * The payload of the extension stats the custom app provides + */ + payload: string; + +} + +/** +* A list of additional client events. */ -export type TurnSession = { +export type ClientMetaData = { /** - * Flag indicate to not generate report from this sample + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). */ - sessionId: string; + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; /** - * The Authentication Realm (RFC 8656) + * The identifier of the media track related to the event, if applicable. */ - realm?: string; + trackId?: string; /** - * The username of the used in authentication + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. */ - username?: string; + ssrc?: number; /** - * The id of the client the TURN session belongs to (ClientSample) + * The timestamp in epoch format when the event was generated. */ - clientId?: string; + timestamp?: number; + +} +/** +* A list of additional client events. +*/ +export type ClientEvent = { /** - * The timestamp when the session has been started. Epoch in milliseconds, GMT + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). */ - started?: number; + type: string; /** - * For each Allocate request, the server SHOULD generate a new random nonce when the allocation is first attempted following the randomness recommendations in [RFC4086] and SHOULD expire the nonce at least once every hour during the lifetime of the allocation. Epoch in millis GMT + * The value associated with the event, if applicable. */ - nonceExpirationTime?: number; + payload?: string; /** - * The address of the server the client connected to + * The unique identifier of the peer connection for which the event was generated. */ - serverAddress?: string; + peerConnectionId?: string; /** - * The portnumber the server listens the client requests + * The identifier of the media track related to the event, if applicable. */ - serverPort?: number; + trackId?: string; /** - * the transport protocol betwwen the client and the server (TCP, UDP, TCPTLS, UDPTLS, SCTP, SCTPTLS) + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. */ - transportProtocol?: string; + ssrc?: number; /** - * The address of the client connected from + * The timestamp in epoch format when the event was generated. */ - clientAddress?: string; + timestamp?: number; + +} +/** +* Certificates +*/ +export type CertificateStats = { /** - * The portnumber the client requested from + * The timestamp of the stat. */ - clientPort?: number; + timestamp: number; /** - * the bitrate the TURN server sending to the client + * A unique identifier for the stat. */ - sendingBitrate?: number; + id: string; /** - * the bitrate the TURN server receiving from the client + * The fingerprint of the certificate. */ - receivingBitrate?: number; + fingerprint: string; /** - * the amount of bytes sent to the client + * The algorithm used for the fingerprint (e.g., 'SHA-256'). */ - sentBytes?: number; + fingerprintAlgorithm: string; /** - * the amount of bytes received from the client + * The certificate encoded in base64 format. */ - receivedBytes?: number; + base64Certificate: string; /** - * the amount of packets sent to the client + * The certificate ID of the issuer (nullable). */ - sentPackets?: number; + issuerCertificateId: string; /** - * the amount of packets received from the client + * Additional information attached to this stats */ - receivedPackets?: number; + appData?: Record; } /** -* Peer Alloocation data +* ICE Candidate Pair Stats */ -export type TurnPeerAllocation = { +export type IceCandidatePairStats = { /** - * a unique id for the allocation + * The unique identifier for this RTCStats object. */ - peerId: string; + id: string; /** - * The corresponded session the allocation belongs to + * The timestamp of when the stats were recorded, in seconds. */ - sessionId: string; + timestamp: number; /** - * The allocated address + * The transport id of the connection this candidate pair belongs to. */ - relayedAddress: string; + transportId: string; /** - * The allocated port + * The ID of the local ICE candidate in this pair. */ - relayedPort: number; + localCandidateId: string; /** - * protocol (TCP, UDP) + * The ID of the remote ICE candidate in this pair. */ - transportProtocol: string; + remoteCandidateId: string; /** - * The address of the address the serever connect to + * The number of packets sent using this candidate pair. */ - peerAddress?: string; + packetsSent: number; /** - * The portnumber the server connects to + * The number of packets received using this candidate pair. */ - peerPort?: number; + packetsReceived: number; /** - * the bitrate the TURN server sending to the peer + * The total number of bytes sent using this candidate pair. */ - sendingBitrate?: number; + bytesSent: number; /** - * the bitrate the TURN server receiving from the peer + * The total number of bytes received using this candidate pair. */ - receivingBitrate?: number; + bytesReceived: number; /** - * the amount of bytes sent to the peer + * The timestamp of the last packet sent using this candidate pair. */ - sentBytes?: number; + lastPacketSentTimestamp: number; /** - * the amount of bytes received from the peer + * The timestamp of the last packet received using this candidate pair. */ - receivedBytes?: number; + lastPacketReceivedTimestamp: number; /** - * the amount of packets sent to the peer + * The total round trip time (RTT) for this candidate pair in seconds. */ - sentPackets?: number; + totalRoundTripTime: number; /** - * the amount of packets received from the peer + * The current round trip time (RTT) for this candidate pair in seconds. */ - receivedPackets?: number; + currentRoundTripTime: number; -} + /** + * The available outgoing bitrate (in bits per second) for this candidate pair. + */ + availableOutgoingBitrate: number; -/** -* docs -*/ -export type TurnSample = { /** - * A unique id of the turn server + * The available incoming bitrate (in bits per second) for this candidate pair. */ - serverId: string; + availableIncomingBitrate: number; /** - * Peer Alloocation data + * The number of ICE connection requests received by this candidate pair. */ - allocations?: TurnPeerAllocation[]; + requestsReceived: number; /** - * Session data + * The number of ICE connection requests sent by this candidate pair. */ - sessions?: TurnSession[]; + requestsSent: number; -} + /** + * The number of ICE connection responses received by this candidate pair. + */ + responsesReceived: number; -/** -* The Sfu provided custom stats payload -*/ -export type SfuExtensionStats = { /** - * The type of the extension stats the custom app provides + * The number of ICE connection responses sent by this candidate pair. */ - type: string; + responsesSent: number; /** - * The payload of the extension stats the custom app provides + * The number of ICE connection consent requests sent by this candidate pair. */ - payload: string; + consentRequestsSent: number; + + /** + * The number of packets discarded while attempting to send via this candidate pair. + */ + packetsDiscardedOnSend: number; + + /** + * The total number of bytes discarded while attempting to send via this candidate pair. + */ + bytesDiscardedOnSend: number; + + state?: "new" | "inProgress" | "failed" | "succeeded"; + /** + * Whether this candidate pair has been nominated. + */ + nominated?: boolean; + + /** + * Additional information attached to this stats + */ + appData?: Record; } /** -* The Sfu Outbound Rtp Pad obtained measurements +* ICE Candidate Stats */ -export type SfuSctpChannel = { +export type IceCandidateStats = { /** - * The id of the transport the RTP stream uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the sctp stream + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of the sctp stream + * The transport ID associated with the ICE candidate. */ - channelId: string; + transportId: string; /** - * Flag indicate to not generate report from this sample + * The IP address of the ICE candidate (nullable). */ - noReport?: boolean; + address: string; /** - * Flag to indicate that the SCTP channel is used as an internally between SFU instances + * The port number of the ICE candidate. */ - internal?: boolean; + port: number; /** - * The label of the sctp stream + * The transport protocol used by the candidate (e.g., 'udp', 'tcp'). */ - label?: string; + protocol: string; /** - * The protocol used to establish an sctp stream + * The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). */ - protocol?: string; + candidateType: string; /** - * The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. + * The priority of the ICE candidate. */ - sctpSmoothedRoundTripTime?: number; + priority: number; /** - * The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. + * The URL of the ICE candidate. */ - sctpCongestionWindow?: number; + url: string; /** - * The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. + * The protocol used for the relay (e.g., 'tcp', 'udp'). */ - sctpReceiverWindow?: number; + relayProtocol: string; /** - * The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. + * A string representing the foundation for the ICE candidate. */ - sctpMtu?: number; + foundation: string; /** - * The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. + * The related address for the ICE candidate (if any). */ - sctpUnackData?: number; + relatedAddress: string; /** - * The number of message received on the corresponded SCTP stream. + * The related port for the ICE candidate (if any). */ - messageReceived?: number; + relatedPort: number; /** - * The number of message sent on the corresponded SCTP stream. + * The username fragment for the ICE candidate. */ - messageSent?: number; + usernameFragment: string; /** - * The number of bytes received on the corresponded SCTP stream. + * The TCP type of the ICE candidate (e.g., 'active', 'passive'). */ - bytesReceived?: number; + tcpType: string; /** - * The number of bytes sent on the corresponded SCTP stream. + * Additional information attached to this stats */ - bytesSent?: number; + appData?: Record; } /** -* The Sfu Outbound Rtp Pad obtained measurements +* ICE Transport Stats */ -export type SfuOutboundRtpPad = { +export type IceTransportStats = { /** - * The id of the transport the RTP stream uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the stream this outbound RTP pad sinks the media from + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of a group of RTP pad sinks the media stream out from the SFU. + * The number of packets sent. */ - sinkId: string; + packetsSent: number; /** - * The id of Sfu pad. + * The number of packets received. */ - padId: string; + packetsReceived: number; /** - * The synchronization source id of the RTP stream + * The number of bytes sent. */ - ssrc: number; + bytesSent: number; /** - * Flag indicate to not generate report from this sample + * The number of bytes received. */ - noReport?: boolean; + bytesReceived: number; /** - * Flag to indicate that the rtp pad is used as an internal communication between SFU instances + * The ICE role (e.g., 'controlling', 'controlled'). */ - internal?: boolean; + iceRole: string; /** - * The callId the event belongs to + * The local username fragment for ICE. */ - callId?: string; + iceLocalUsernameFragment: string; /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to + * The DTLS transport state (e.g., 'new', 'connecting', 'connected'). */ - clientId?: string; + dtlsState: string; /** - * The id of the track the RTP stream related to at the client side + * The ICE transport state (e.g., 'new', 'checking', 'connected'). */ - trackId?: string; + iceState: string; /** - * the type of the media the stream carries ("audio" or "video") + * The ID of the selected ICE candidate pair. */ - mediaType?: "audio" | "video"; + selectedCandidatePairId: string; /** - * The payload type field of the RTP header + * The ID of the local certificate. */ - payloadType?: number; + localCertificateId: string; /** - * The negotiated mimeType in the SDP + * The ID of the remote certificate. */ - mimeType?: string; + remoteCertificateId: string; /** - * The clock rate of the media source the RTP header carries + * The TLS version used for encryption. */ - clockRate?: number; + tlsVersion: string; /** - * The actual SDP line from the negotiation related to this RTP stream + * The DTLS cipher suite used. */ - sdpFmtpLine?: string; + dtlsCipher: string; /** - * The rid parameter of the corresponded RTP stream + * The role in the DTLS handshake (e.g., 'client', 'server'). */ - rid?: string; + dtlsRole: string; /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. + * The SRTP cipher used for encryption. */ - rtxSsrc?: number; + srtpCipher: string; /** - * he bitrate the corresponded stream targets. + * The number of changes to the selected ICE candidate pair. */ - targetBitrate?: number; + selectedCandidatePairChanges: number; /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through + * Additional information attached to this stats */ - voiceActivityFlag?: boolean; + appData?: Record; + +} +/** +* Data Channels Stats +*/ +export type DataChannelStats = { /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams + * The timestamp of the stat. */ - firCount?: number; + timestamp: number; /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams + * A unique identifier for the stat. */ - pliCount?: number; + id: string; /** - * The total number of negative acknowledgement received on the corresponded RTP stream. + * The label of the data channel. */ - nackCount?: number; + label: string; /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream + * The protocol of the data channel. */ - sliCount?: number; + protocol: string; /** - * The total number of packets lost on the corresponded RTP stream. + * The identifier for the data channel. */ - packetsLost?: number; + dataChannelIdentifier: number; /** - * The total number of packets sent on the corresponded RTP stream. + * The state of the data channel (e.g., 'open', 'closed'). */ - packetsSent?: number; + state: string; /** - * The total number of discarded packets on the corresponded RTP stream. + * The number of messages sent on the data channel. */ - packetsDiscarded?: number; + messagesSent: number; /** - * The total number of packets retransmitted on the corresponded RTP stream. + * The number of bytes sent on the data channel. */ - packetsRetransmitted?: number; + bytesSent: number; /** - * The total number of packets failed to be encrypted on the corresponded RTP stream. + * The number of messages received on the data channel. */ - packetsFailedEncryption?: number; + messagesReceived: number; /** - * The total number of duplicated packets appeared on the corresponded RTP stream. + * The number of bytes received on the data channel. */ - packetsDuplicated?: number; + bytesReceived: number; /** - * The total number of FEC packets sent on the corresponded RTP stream. + * Additional information attached to this stats */ - fecPacketsSent?: number; + appData?: Record; +} + +/** +* PeerConnection Transport Stats +*/ +export type PeerConnectionTransportStats = { /** - * The total number of FEC packets discarded on the corresponded RTP stream. + * The timestamp of the stat. */ - fecPacketsDiscarded?: number; + timestamp: number; /** - * The total amount of payload bytes sent on the corresponded RTP stream. + * A unique identifier for the stat. */ - bytesSent?: number; + id: string; /** - * The total number of SR reports sent by the corresponded RTP stream + * The number of data channels opened. */ - rtcpSrSent?: number; + dataChannelsOpened: number; /** - * The total number of RR reports received on the corresponded RTP stream + * The number of data channels closed. */ - rtcpRrReceived?: number; + dataChannelsClosed: number; /** - * If rtx packets sent on the same stream then this number indicates how may has been sent + * Additional information attached to this stats */ - rtxPacketsSent?: number; + appData?: Record; + +} +/** +* Audio Playout Stats +*/ +export type AudioPlayoutStats = { /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded + * The timestamp of the stat. */ - rtxPacketsDiscarded?: number; + timestamp: number; /** - * The number of frames sent on the corresponded RTP stream + * A unique identifier for the stat. */ - framesSent?: number; + id: string; /** - * Indicate the number of frames the Sfu has been encoded + * The kind of media (audio/video). */ - framesEncoded?: number; + kind: string; /** - * Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream + * The duration of synthesized audio samples. */ - keyFramesEncoded?: number; + synthesizedSamplesDuration: number; /** - * The calculated fractionLost of the stream + * The number of synthesized audio samples events. */ - fractionLost?: number; + synthesizedSamplesEvents: number; /** - * The calculated jitter of the stream + * The total duration of all audio samples. */ - jitter?: number; + totalSamplesDuration: number; /** - * The calculated RTT of the stream + * The total delay experienced during audio playout. */ - roundTripTime?: number; + totalPlayoutDelay: number; + + /** + * The total count of audio samples. + */ + totalSamplesCount: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; } /** -* The Sfu Inbound Rtp Pad obtained measurements +* Video Source Stats */ -export type SfuInboundRtpPad = { +export type VideoSourceStats = { /** - * The id of the transport the RTP Pad uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the media stream the RTP pad belongs to. This id is to group rtp pads (e.g.: simulcast) carrying payloads to the same media. + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of Sfu pad. + * The identifier of the media track. */ - padId: string; + trackIdentifier: string; /** - * The synchronization source id of the RTP stream + * The kind of media (audio/video). */ - ssrc: number; + kind: string; /** - * Flag indicate to not generate report from this sample + * The width of the video. */ - noReport?: boolean; + width: number; /** - * Flag to indicate that the rtp pad is used as an internal communication between SFU instances + * The height of the video. */ - internal?: boolean; + height: number; /** - * the type of the media the stream carries ("audio" or "video") + * The total number of frames. */ - mediaType?: "audio" | "video"; + frames: number; /** - * The payload type field of the RTP header + * The frames per second of the video. */ - payloadType?: number; + framesPerSecond: number; /** - * The negotiated mimeType in the SDP + * Additional information attached to this stats */ - mimeType?: string; + appData?: Record; + +} +/** +* Audio Source Stats +*/ +export type AudioSourceStats = { /** - * The clock rate of the media source the RTP header carries + * The timestamp of the stat. */ - clockRate?: number; + timestamp: number; /** - * The actual SDP line from the negotiation related to this RTP stream + * A unique identifier for the stat. */ - sdpFmtpLine?: string; + id: string; /** - * The rid parameter of the corresponded RTP stream + * The identifier of the media track. */ - rid?: string; + trackIdentifier: string; /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. + * The kind of media (audio/video). */ - rtxSsrc?: number; + kind: string; /** - * he bitrate the corresponded stream targets. + * The current audio level. */ - targetBitrate?: number; + audioLevel?: number; /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through + * The total audio energy. */ - voiceActivityFlag?: boolean; + totalAudioEnergy?: number; /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams + * The total duration of audio samples. */ - firCount?: number; + totalSamplesDuration?: number; /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams + * The echo return loss. */ - pliCount?: number; + echoReturnLoss?: number; /** - * The total number of negative acknowledgement received on the corresponded RTP stream. + * The enhancement of echo return loss. */ - nackCount?: number; + echoReturnLossEnhancement?: number; /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream + * Additional information attached to this stats */ - sliCount?: number; + appData?: Record; + +} +/** +* Remote Outbound RTPs +*/ +export type RemoteOutboundRtpStats = { /** - * The total number of packets lost on the corresponded RTP stream. + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - packetsLost?: number; + timestamp: number; /** - * The total number of packets received on the corresponded RTP stream. + * The unique identifier for this stats object. */ - packetsReceived?: number; + id: string; /** - * The total number of discarded packets on the corresponded RTP stream. + * The SSRC identifier of the RTP stream. */ - packetsDiscarded?: number; + ssrc: number; /** - * The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. + * The type of media ('audio' or 'video'). */ - packetsRepaired?: number; + kind: string; /** - * The total number of packets failed to be decrypted on the corresponded RTP stream. + * The ID of the transport used for this stream. */ - packetsFailedDecryption?: number; + transportId?: string; /** - * The total number of duplicated packets appeared on the corresponded RTP stream. + * The ID of the codec used for this stream. */ - packetsDuplicated?: number; + codecId?: string; /** - * The total number of FEC packets received on the corresponded RTP stream. + * The total number of packets sent on this stream. */ - fecPacketsReceived?: number; + packetsSent?: number; /** - * The total number of FEC packets discarded on the corresponded RTP stream. + * The total number of bytes sent on this stream. */ - fecPacketsDiscarded?: number; + bytesSent?: number; /** - * The total amount of payload bytes received on the corresponded RTP stream. + * The ID of the local object corresponding to this stream. */ - bytesReceived?: number; + localId?: string; /** - * The total number of SR reports received by the corresponded RTP stream + * The remote timestamp for this stats object in DOMHighResTimeStamp format. */ - rtcpSrReceived?: number; + remoteTimestamp?: number; /** - * The total number of RR reports sent on the corresponded RTP stream + * The total number of reports sent on this stream. */ - rtcpRrSent?: number; + reportsSent?: number; /** - * If rtx packets are sent or received on the same stream then this number indicates how may has been sent + * The current estimated round-trip time for this stream in seconds. */ - rtxPacketsReceived?: number; + roundTripTime?: number; /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded + * The total round-trip time for this stream in seconds. */ - rtxPacketsDiscarded?: number; + totalRoundTripTime?: number; /** - * The number of frames received on the corresponded RTP stream + * The total number of round-trip time measurements for this stream. */ - framesReceived?: number; + roundTripTimeMeasurements?: number; /** - * Indicate the number of frames the Sfu has been decoded + * Additional information attached to this stats */ - framesDecoded?: number; + appData?: Record; + +} +/** +* The duration of quality limitation reasons categorized by type. +*/ +export type QualityLimitationDurations = { /** - * Indicate the number of keyframes the Sfu has been decoded + * Duration of no quality limitation in seconds. */ - keyFramesDecoded?: number; + none: number; /** - * The calculated fractionLost of the stream + * Duration of CPU-based quality limitation in seconds. */ - fractionLost?: number; + cpu: number; /** - * The calculated jitter of the stream + * Duration of bandwidth-based quality limitation in seconds. */ - jitter?: number; + bandwidth: number; /** - * The calculated RTT of the stream + * Duration of other quality limitation reasons in seconds. */ - roundTripTime?: number; + other: number; } /** -* The Sfu Transports obtained measurements +* Outbound RTPs */ -export type SfuTransport = { +export type OutboundRtpStats = { /** - * The generated unique identifier of the transport + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - transportId: string; + timestamp: number; /** - * Flag indicate to not generate report from this sample + * The unique identifier for this stats object. */ - noReport?: boolean; + id: string; /** - * Flag to indicate that the transport is used as an internal transport between SFU instances + * The SSRC identifier of the RTP stream. */ - internal?: boolean; + ssrc: number; /** - * Represent the current value of the state attribute of the underlying RTCDtlsTransport. + * The type of media ('audio' or 'video'). */ - dtlsState?: string; + kind: string; /** - * Represent the current value of the state attribute of the underlying RTCIceTransport + * The duration of quality limitation reasons categorized by type. */ - iceState?: string; + qualityLimitationDurations: QualityLimitationDurations; /** - * Represents the the current value of the SCTP state of the transport of the SFU + * The ID of the transport used for this stream. */ - sctpState?: string; + transportId?: string; /** - * Represent the current value of the role SFU takes place in ICE + * The ID of the codec used for this stream. */ - iceRole?: string; + codecId?: string; /** - * The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) + * The total number of packets sent on this stream. */ - localAddress?: string; + packetsSent?: number; /** - * The local port number + * The total number of bytes sent on this stream. */ - localPort?: number; + bytesSent?: number; /** - * The protocol used by the transport + * The media ID associated with this RTP stream. */ - protocol?: string; + mid?: string; /** - * The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) + * The ID of the media source associated with this stream. */ - remoteAddress?: string; + mediaSourceId?: string; /** - * The remote port number + * The ID of the remote object corresponding to this stream. */ - remotePort?: number; + remoteId?: string; /** - * The total amount of RTP bytes received on this transport + * The RID value of the RTP stream. */ - rtpBytesReceived?: number; + rid?: string; /** - * The total amount of RTP bytes sent on this transport + * The total number of header bytes sent on this stream. */ - rtpBytesSent?: number; + headerBytesSent?: number; /** - * The total amount of RTP packets received on this transport + * The number of retransmitted packets sent on this stream. */ - rtpPacketsReceived?: number; + retransmittedPacketsSent?: number; /** - * The total amount of RTP packets sent on this transport + * The number of retransmitted bytes sent on this stream. */ - rtpPacketsSent?: number; + retransmittedBytesSent?: number; /** - * The total amount of RTP packets lost on this transport + * The SSRC for the RTX stream, if applicable. */ - rtpPacketsLost?: number; + rtxSsrc?: number; /** - * The total amount of RTX bytes received on this transport + * The target bitrate for this RTP stream in bits per second. */ - rtxBytesReceived?: number; + targetBitrate?: number; /** - * The total amount of RTX bytes sent on this transport + * The total target encoded bytes for this stream. */ - rtxBytesSent?: number; + totalEncodedBytesTarget?: number; /** - * The total amount of RTX packets received on this transport + * The width of the frames sent in pixels. */ - rtxPacketsReceived?: number; + frameWidth?: number; /** - * The total amount of RTX packets sent on this transport + * The height of the frames sent in pixels. */ - rtxPacketsSent?: number; + frameHeight?: number; /** - * The total amount of RTX packets lost on this transport + * The number of frames sent per second. */ - rtxPacketsLost?: number; + framesPerSecond?: number; /** - * The total amount of RTX packets discarded on this transport + * The total number of frames sent on this stream. */ - rtxPacketsDiscarded?: number; + framesSent?: number; /** - * The total amount of SCTP bytes received on this transport + * The total number of huge frames sent on this stream. */ - sctpBytesReceived?: number; + hugeFramesSent?: number; /** - * The total amount of SCTP bytes sent on this transport + * The total number of frames encoded on this stream. */ - sctpBytesSent?: number; + framesEncoded?: number; /** - * The total amount of SCTP packets received on this transport + * The total number of key frames encoded on this stream. */ - sctpPacketsReceived?: number; + keyFramesEncoded?: number; /** - * The total amount of SCTP packets sent on this transport + * The sum of QP values for all frames encoded on this stream. */ - sctpPacketsSent?: number; - -} + qpSum?: number; -/** -* User provided custom call events -*/ -export type CustomSfuEvent = { /** - * the name of the event used as identifier. (e.g.: CLIENT_REJOINED, etc..) + * The total time spent encoding frames on this stream in seconds. */ - name: string; + totalEncodeTime?: number; /** - * the value of the event + * The total delay for packets sent on this stream in seconds. */ - value?: string; + totalPacketSendDelay?: number; /** - * The unique identifier of the sfu transport the event is related to + * The reason for any quality limitation on this stream. */ - transportId?: string; + qualityLimitationReason?: string; /** - * The identifier of the sfu stream the event is related to + * The number of resolution changes due to quality limitations. */ - sfuStreamId?: string; + qualityLimitationResolutionChanges?: number; /** - * The identifier of the sfu sink the event is related to + * The total number of NACK packets sent on this stream. */ - sfuSinkId?: string; + nackCount?: number; /** - * the human readable message of the event + * The total number of FIR packets sent on this stream. */ - message?: string; + firCount?: number; /** - * Additional attachment relevant for the event + * The total number of PLI packets sent on this stream. */ - attachments?: string; + pliCount?: number; /** - * The EPOCH timestamp the event is generated + * The implementation of the encoder used for this stream. */ - timestamp?: number; - -} + encoderImplementation?: string; -/** -* docs -*/ -export type SfuSample = { /** - * Unique generated id for the sfu samples are originated from + * Indicates whether the encoder is power efficient. */ - sfuId: string; + powerEfficientEncoder?: boolean; /** - * The timestamp the sample is created in GMT + * Indicates whether this stream is actively sending data. */ - timestamp: number; + active?: boolean; /** - * The offset from GMT in hours + * The scalability mode of the encoder used for this stream. */ - timeZoneOffsetInHours?: number; + scalabilityMode?: string; /** - * Special marker for the samples + * Additional information attached to this stats. */ - marker?: string; + appData?: Record; + +} +/** +* Remote Inbound RTPs +*/ +export type RemoteInboundRtpStats = { /** - * User provided custom call events + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - customSfuEvents?: CustomSfuEvent[]; + timestamp: number; /** - * The Sfu Transports obtained measurements + * The unique identifier for this stats object. */ - transports?: SfuTransport[]; + id: string; /** - * The Sfu Inbound Rtp Pad obtained measurements + * The SSRC identifier of the RTP stream. */ - inboundRtpPads?: SfuInboundRtpPad[]; + ssrc: number; /** - * The Sfu Outbound Rtp Pad obtained measurements + * The type of media ('audio' or 'video'). */ - outboundRtpPads?: SfuOutboundRtpPad[]; + kind: string; /** - * The Sfu Outbound Rtp Pad obtained measurements + * The ID of the transport used for this stream. */ - sctpChannels?: SfuSctpChannel[]; + transportId?: string; /** - * The Sfu provided custom stats payload + * The ID of the codec used for this stream. */ - extensionStats?: SfuExtensionStats[]; - -} + codecId?: string; -/** -* List of remote ICE candidates -*/ -export type IceRemoteCandidate = { /** - * Refers to the peer connection the local candidate belongs to + * The total number of packets received on this stream. */ - peerConnectionId?: string; + packetsReceived?: number; /** - * The unique identifier of the local candidate + * The total number of packets lost on this stream. */ - id?: string; + packetsLost?: number; /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) + * The jitter value for this stream in seconds. */ - address?: string; + jitter?: number; /** - * The port number of the local endpoint the ICE uses + * The ID of the local object corresponding to this remote stream. */ - port?: number; + localId?: string; /** - * The protocol for the ICE + * The most recent RTT measurement for this stream in seconds. */ - protocol?: "tcp" | "udp"; + roundTripTime?: number; /** - * The type of the local candidate + * The cumulative RTT for all packets on this stream in seconds. */ - candidateType?: string; + totalRoundTripTime?: number; /** - * The priority of the local candidate + * The fraction of packets lost on this stream, calculated over a time interval. */ - priority?: number; + fractionLost?: number; /** - * The url of the ICE server + * The total number of RTT measurements for this stream. */ - url?: string; + roundTripTimeMeasurements?: number; /** - * The relay protocol the local candidate uses + * Additional information attached to this stats */ - relayProtocol?: "tcp" | "udp" | "tls"; + appData?: Record; } /** -* List of local ICE candidates +* Inbound RTPs */ -export type IceLocalCandidate = { +export type InboundRtpStats = { /** - * Refers to the peer connection the local candidate belongs to + * The time the stats were collected, in high-resolution time. */ - peerConnectionId?: string; + timestamp: number; /** - * The unique identifier of the local candidate + * Unique identifier of the stats object. */ - id?: string; + id: string; /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) + * Synchronization source identifier of the RTP stream. */ - address?: string; + ssrc: number; /** - * The port number of the local endpoint the ICE uses + * Kind of the media (e.g., 'audio' or 'video'). */ - port?: number; + kind: string; /** - * The protocol for the ICE + * Identifier for the media track associated with the RTP stream. */ - protocol?: "tcp" | "udp"; + trackIdentifier: string; /** - * The type of the local candidate + * ID of the transport associated with the RTP stream. */ - candidateType?: string; + transportId?: string; /** - * The priority of the local candidate + * ID of the codec used for the RTP stream. */ - priority?: number; + codecId?: string; /** - * The url of the ICE server + * Number of packets received on the RTP stream. */ - url?: string; + packetsReceived?: number; /** - * The relay protocol the local candidate uses + * Number of packets lost on the RTP stream. */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} + packetsLost?: number; -/** -* List of compound measurements related to outbound video tracks -*/ -export type OutboundVideoTrack = { /** - * The RTP SSRC field + * Jitter of the RTP stream in seconds. */ - ssrc: number; + jitter?: number; /** - * The id of the track + * The MediaStream ID of the RTP stream. */ - trackId?: string; + mid?: string; /** - * The unique generated identifier of the peer connection the inbound audio track belongs to + * Remote stats object ID associated with the RTP stream. */ - peerConnectionId?: string; + remoteId?: string; /** - * The id of the SFU stream this track is related to + * Number of frames decoded. */ - sfuStreamId?: string; + framesDecoded?: number; /** - * The total number of packets sent on the corresponded synchronization source + * Number of keyframes decoded. */ - packetsSent?: number; + keyFramesDecoded?: number; /** - * The total number of bytes sent on the corresponded synchronization source + * Number of frames rendered. */ - bytesSent?: number; + framesRendered?: number; /** - * The rid encoding parameter of the corresponded synchronization source + * Number of frames dropped. */ - rid?: string; + framesDropped?: number; /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) + * Width of the decoded video frames. */ - headerBytesSent?: number; + frameWidth?: number; /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). + * Height of the decoded video frames. */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame height in pixels of the frames targeted by the media encoder - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponding media source - */ - framesPerSecond?: number; - - /** - * The total number of frames sent on the corresponding RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponding RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponding RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponding RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occurred on the corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} - -/** -* List of compound measurements related to outbound audio tracks -*/ -export type OutboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} - -/** -* List of compound measurements related to inbound video tracks -*/ -export type InboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote clientId the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The id of the SFU stream this track is sinked from - */ - sfuStreamId?: string; - - /** - * The id of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponding RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameHeight?: number; - - /** - * The frame rate of the video sent by the remote source on the corresponding RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream - */ - qpSum?: number; - - /** - * The total time spent on decoding video on the corresponding RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay on the corresponding RTP stream - */ - totalInterFrameDelay?: number; - - /** - * The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponding RTP stream - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} - -/** -* List of compound measurements related to inbound audio tracks -*/ -export type InboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The ID of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote client ID the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The ID of the SFU stream this track is synced from - */ - sfuStreamId?: string; - - /** - * The ID of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponding synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponding synchronization source - */ - packetsLost?: number; - - /** - * The corresponding synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets that missed the playout point and were therefore discarded by the jitter buffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponding synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} - -/** -* List of certificates the client provided -*/ -export type Certificate = { - /** - * The fingerprint of the certificate. - */ - fingerprint?: string; - - /** - * The hash function used to generate the fingerprint. - */ - fingerprintAlgorithm?: string; - - /** - * The DER encoded base-64 representation of the certificate. - */ - base64Certificate?: string; - - /** - * The ID of the next certificate in the certificate chain - */ - issuerCertificateId?: string; - -} - -/** -* List of codec the client has -*/ -export type MediaCodecStats = { - /** - * Payload type used in the RTP encoding/decoding process. - */ - payloadType?: string; - - /** - * Indicates the role of the codec (encode or decode) - */ - codecType?: "encode" | "decode"; - - /** - * The MIME type of the media, e.g., audio/opus. - */ - mimeType?: string; - - /** - * The clock rate used in RTP transport to generate the timestamp for the carried frames - */ - clockRate?: number; - - /** - * Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented - */ - channels?: number; - - /** - * The SDP line determines the codec - */ - sdpFmtpLine?: string; - -} - -/** -* WebRTC App provided information related to the operation system the client uses. -*/ -export type MediaSourceStat = { - /** - * The unique identifier of the corresponding media track - */ - trackIdentifier?: string; - - /** - * The type of the media the MediaSource produces. - */ - kind?: "audio" | "video"; - - /** - * Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. - */ - relayedSource?: boolean; - - /** - * The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. - */ - audioLevel?: number; - - /** - * The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy - */ - totalAudioEnergy?: number; - - /** - * The duration of the audio type media source - */ - totalSamplesDuration?: number; - - /** - * if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLoss?: number; - - /** - * www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; + frameHeight?: number; /** - * The width, in pixels, of the last frame originating from the media source + * Frame rate in frames per second. */ - width?: number; + framesPerSecond?: number; /** - * The height, in pixels, of the last frame originating from the media source + * Sum of the Quantization Parameter values for decoded frames. */ - height?: number; + qpSum?: number; /** - * The total number of frames originating from the media source + * Total time spent decoding in seconds. */ - frames?: number; + totalDecodeTime?: number; /** - * The number of frames originating from the media source in the last second + * Sum of inter-frame delays in seconds. */ - framesPerSecond?: number; - -} + totalInterFrameDelay?: number; -/** -* Candidate pair stats -*/ -export type IceCandidatePair = { /** - * The unique identifier of the peer connection + * Sum of squared inter-frame delays in seconds. */ - candidatePairId: string; + totalSquaredInterFrameDelay?: number; /** - * The unique identifier of the peer connection + * Number of times playback was paused. */ - peerConnectionId: string; + pauseCount?: number; /** - * The label associated with the peer connection + * Total duration of pauses in seconds. */ - label?: string; + totalPausesDuration?: number; /** - * The identifier of the transport the ice candidate pair is negotiated on + * Number of times playback was frozen. */ - transportId?: string; + freezeCount?: number; /** - * The unique identifier of the candidate the negotiated pair is selected on the local side + * Total duration of freezes in seconds. */ - localCandidateId?: string; + totalFreezesDuration?: number; /** - * The unique identifier of the candidate the negotiated pair is selected on the remote side + * Timestamp of the last packet received. */ - remoteCandidateId?: string; + lastPacketReceivedTimestamp?: number; /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport + * Total header bytes received. */ - state?: string; + headerBytesReceived?: number; /** - * Indicates if the ice candidate pair is nominated or not + * Total packets discarded. */ - nominated?: boolean; + packetsDiscarded?: number; /** - * The total number of packets sent using the last selected candidate pair over the corresponding transport + * Total bytes received from FEC. */ - packetsSent?: number; + fecBytesReceived?: number; /** - * The total number of packets received using the last selected candidate pair over the corresponding transport + * Total packets received from FEC. */ - packetsReceived?: number; + fecPacketsReceived?: number; /** - * The total number of bytes sent using the last selected candidate pair over the corresponding transport + * Total FEC packets discarded. */ - bytesSent?: number; + fecPacketsDiscarded?: number; /** - * The total number of bytes received using the last selected candidate pair over the corresponding transport + * Total bytes received on the RTP stream. */ bytesReceived?: number; /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) + * Number of NACKs sent. */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; + nackCount?: number; /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport + * Number of Full Intra Requests sent. */ - totalRoundTripTime?: number; + firCount?: number; /** - * Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport + * Number of Picture Loss Indications sent. */ - currentRoundTripTime?: number; + pliCount?: number; /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport + * Total processing delay in seconds. */ - availableOutgoingBitrate?: number; + totalProcessingDelay?: number; /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport + * Estimated timestamp of playout. */ - availableIncomingBitrate?: number; + estimatedPlayoutTimestamp?: number; /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport + * Total jitter buffer delay in seconds. */ - requestsReceived?: number; + jitterBufferDelay?: number; /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport + * Target delay for the jitter buffer in seconds. */ - requestsSent?: number; + jitterBufferTargetDelay?: number; /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport + * Number of packets emitted from the jitter buffer. */ - responsesReceived?: number; + jitterBufferEmittedCount?: number; /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport + * Minimum delay of the jitter buffer in seconds. */ - responsesSent?: number; + jitterBufferMinimumDelay?: number; /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport + * Total audio samples received. */ - consentRequestsSent?: number; + totalSamplesReceived?: number; /** - * Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport + * Number of concealed audio samples. */ - packetsDiscardedOnSend?: number; + concealedSamples?: number; /** - * Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport + * Number of silent audio samples concealed. */ - bytesDiscardedOnSend?: number; - -} + silentConcealedSamples?: number; -/** -* Transport stats of Peer Connection -*/ -export type PeerConnectionTransport = { /** - * The identifier of the transport the ICE candidate pair is negotiated on + * Number of audio concealment events. */ - transportId: string; + concealmentEvents?: number; /** - * The unique identifier of the peer connection + * Number of audio samples inserted for deceleration. */ - peerConnectionId: string; + insertedSamplesForDeceleration?: number; /** - * The label associated with the peer connection + * Number of audio samples removed for acceleration. */ - label?: string; + removedSamplesForAcceleration?: number; /** - * Represents the total number of packets sent on the corresponding transport + * Audio level in the range [0.0, 1.0]. */ - packetsSent?: number; + audioLevel?: number; /** - * Represents the total number of packets received on the corresponding transport + * Total audio energy in the stream. */ - packetsReceived?: number; + totalAudioEnergy?: number; /** - * Represents the total amount of bytes sent on the corresponding transport + * Total duration of all received audio samples in seconds. */ - bytesSent?: number; + totalSamplesDuration?: number; /** - * Represents the total amount of bytes received on the corresponding transport + * Total number of frames received. */ - bytesReceived?: number; + framesReceived?: number; /** - * Represents the current role of ICE under DTLS Transport + * Decoder implementation used for decoding frames. */ - iceRole?: string; + decoderImplementation?: string; /** - * Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport + * Playout identifier for the RTP stream. */ - iceLocalUsernameFragment?: string; + playoutId?: string; /** - * Represents the current state of DTLS for the peer connection transport layer + * Indicates if the decoder is power-efficient. */ - dtlsState?: string; + powerEfficientDecoder?: boolean; /** - * The identifier of the candidate pair the transport currently uses + * Number of frames assembled from multiple packets. */ - selectedCandidatePairId?: string; + framesAssembledFromMultiplePackets?: number; /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer + * Total assembly time for frames in seconds. */ - iceState?: string; + totalAssemblyTime?: number; /** - * If DTLS negotiated, it gives the ID of the local certificate + * Number of retransmitted packets received. */ - localCertificateId?: string; + retransmittedPacketsReceived?: number; /** - * If DTLS negotiated, it gives the ID of the remote certificate + * Number of retransmitted bytes received. */ - remoteCertificateId?: string; + retransmittedBytesReceived?: number; /** - * Represents the version number of the TLS used in the corresponding transport + * SSRC of the retransmission stream. */ - tlsVersion?: string; + rtxSsrc?: number; /** - * Represents the name of the DTLS cipher used in the corresponding transport + * SSRC of the FEC stream. */ - dtlsCipher?: string; + fecSsrc?: number; /** - * The role this host plays in DTLS negotiations + * Total corruption probability of packets. */ - dtlsRole?: "client" | "server" | "unknown"; + totalCorruptionProbability?: number; /** - * Represents the name of the SRTP cipher used in the corresponding transport + * Total squared corruption probability of packets. */ - srtpCipher?: string; + totalSquaredCorruptionProbability?: number; /** - * Represents the name of the IANA TLS Supported Groups used in the corresponding transport + * Number of corruption measurements. */ - tlsGroup?: string; + corruptionMeasurements?: number; /** - * The total number of candidate pair changes over the peer connection + * Additional information attached to this stats */ - selectedCandidatePairChanges?: number; + appData?: Record; } /** -* Measurements about the data channels currently available on peer connections +* Codec items */ -export type DataChannel = { +export type CodecStats = { /** - * The id of the peer connection the data channel is assigned to + * The timestamp when the stats were generated. */ - peerConnectionId: string; - - /** - * The id of the data channel assigned by the peer connection when it is opened - */ - dataChannelIdentifier?: number; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol the data channel utilizes - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; + timestamp: number; /** - * The total number of messages sent on the data channel + * The type of the stats. */ - messageSent?: number; + type: string; /** - * The total number of bytes sent on the data channel + * The unique identifier for the stats object. */ - bytesSent?: number; + id: string; /** - * The total number of messages received on the data channel + * The payload type of the codec. */ - messageReceived?: number; + payloadType: number; /** - * The total number of bytes received on the data channel + * The identifier of the transport associated with the codec. */ - bytesReceived?: number; - -} + transportId: string; -/** -* User provided custom observer events -*/ -export type CustomObserverEvent = { /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) + * The MIME type of the codec. */ - name: string; + mimeType: string; /** - * The identifier of the media track the event is related to + * The clock rate of the codec in Hz. */ - mediaTrackId?: string; + clockRate?: number; /** - * the human readable message of the event + * The number of audio channels for the codec, if applicable. */ - message?: string; + channels?: number; /** - * Additional attachment relevant for the event + * The SDP format-specific parameters line for the codec. */ - attachments?: string; + sdpFmtpLine?: string; /** - * The EPOCH timestamp the event is generated + * Additional information attached to this stats */ - timestamp?: number; + appData?: Record; } /** -* User provided custom call events +* docs */ -export type CustomCallEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * the value of the event - */ - value?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - +export type PeerConnectionSample = { /** - * the human readable message of the event + * Unique identifier of the stats object. */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} + peerConnectionId: string; -/** -* The WebRTC app provided custom stats payload -*/ -export type ExtensionStat = { /** - * The type of the extension stats the custom app provides + * Additional information attached to this sample */ - type: string; + appData?: Record; /** - * The payload of the extension stats the custom app provides + * Codec items */ - payload: string; - -} + codecs?: CodecStats[]; -/** -* The WebRTC app provided list of the media devices the client has. -*/ -export type MediaDevice = { /** - * the provided id of the media input / output + * Inbound RTPs */ - id?: string; + inboundRtps?: InboundRtpStats[]; /** - * The media kind of the media device + * Remote Inbound RTPs */ - kind?: "videoinput" | "audioinput" | "audiooutput"; + remoteInboundRtps?: RemoteInboundRtpStats[]; /** - * The name of the device + * Outbound RTPs */ - label?: string; - -} + outboundRtps?: OutboundRtpStats[]; -/** -* WebRTC App provided information related to the operating system the client uses. -*/ -export type OperationSystem = { /** - * The name of the operating system (e.g., Linux) the WebRTC app uses + * Remote Outbound RTPs */ - name?: string; + remoteOutboundRtps?: RemoteOutboundRtpStats[]; /** - * The version of the operating system + * Audio Source Stats */ - version?: string; + audioSources?: AudioSourceStats[]; /** - * The name of the version of the operating system + * Video Source Stats */ - versionName?: string; - -} + videoSources?: VideoSourceStats[]; -/** -* WebRTC App provided information related to the browser the client uses. -*/ -export type Browser = { /** - * The name of the operating system (e.g., Linux) the WebRTC app uses + * Audio Playout Stats */ - name?: string; + audioPlayouts?: AudioPlayoutStats[]; /** - * The version of the operating system + * PeerConnection Transport Stats */ - version?: string; - -} + peerConnectionTransports?: PeerConnectionTransportStats[]; -/** -* WebRTC App provided information related to the platform the client uses. -*/ -export type Platform = { /** - * The name of the platform + * Data Channels Stats */ - type?: string; + dataChannels?: DataChannelStats[]; /** - * The name of the vendor + * ICE Transport Stats */ - vendor?: string; + iceTransports?: IceTransportStats[]; /** - * The name of the model + * ICE Candidate Stats */ - model?: string; - -} + iceCandidates?: IceCandidateStats[]; -/** -* WebRTC App provided information related to the engine the client uses. -*/ -export type Engine = { /** - * The name of the Engine + * ICE Candidate Pair Stats */ - name?: string; + iceCandidatePairs?: IceCandidatePairStats[]; /** - * The version of the engine + * Certificates */ - version?: string; + certificates?: CertificateStats[]; } @@ -2521,7 +1566,7 @@ export type Engine = { */ export type ClientSample = { /** - * Unique id of the client providing samples. Must be a valid UUID. + * Unique id of the client providing samples. */ clientId: string; @@ -2531,195 +1576,33 @@ export type ClientSample = { timestamp: number; /** - * If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. + * the unique identifier of the call or session */ callId?: string; /** - * The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. - */ - sampleSeq?: number; - - /** - * The WebRTC app configured room id the client joined for the call. - */ - roomId?: string; - - /** - * The WebRTC app configured human-readable user id the client is joined. - */ - userId?: string; - - /** - * WebRTC App provided information related to the engine the client uses. - */ - engine?: Engine; - - /** - * WebRTC App provided information related to the platform the client uses. - */ - platform?: Platform; - - /** - * WebRTC App provided information related to the browser the client uses. - */ - browser?: Browser; - - /** - * WebRTC App provided information related to the operating system the client uses. + * Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) */ - os?: OperationSystem; + appData?: Record; /** - * The WebRTC app provided list of the media constraints the client has. + * Samples taken PeerConnections */ - mediaConstraints?: string[]; + peerConnections?: PeerConnectionSample[]; /** - * The WebRTC app provided list of the media devices the client has. + * A list of additional client events. */ - mediaDevices?: MediaDevice[]; + clientEvents?: ClientEvent[]; /** - * The WebRTC app provided list of user media errors the client has. + * A list of additional client events. */ - userMediaErrors?: string[]; + clientMetaItems?: ClientMetaData[]; /** * The WebRTC app provided custom stats payload */ extensionStats?: ExtensionStat[]; - /** - * User provided custom call events - */ - customCallEvents?: CustomCallEvent[]; - - /** - * User provided custom observer events - */ - customObserverEvents?: CustomObserverEvent[]; - - /** - * The WebRTC app provided list of ICE servers the client used. - */ - iceServers?: string[]; - - /** - * The local part of the Signal Description Protocol to establish connections - */ - localSDPs?: string[]; - - /** - * Measurements about the data channels currently available on peer connections - */ - dataChannels?: DataChannel[]; - - /** - * Transport stats of Peer Connection - */ - pcTransports?: PeerConnectionTransport[]; - - /** - * Candidate pair stats - */ - iceCandidatePairs?: IceCandidatePair[]; - - /** - * WebRTC App provided information related to the operation system the client uses. - */ - mediaSources?: MediaSourceStat[]; - - /** - * List of codec the client has - */ - codecs?: MediaCodecStats[]; - - /** - * List of certificates the client provided - */ - certificates?: Certificate[]; - - /** - * List of compound measurements related to inbound audio tracks - */ - inboundAudioTracks?: InboundAudioTrack[]; - - /** - * List of compound measurements related to inbound video tracks - */ - inboundVideoTracks?: InboundVideoTrack[]; - - /** - * List of compound measurements related to outbound audio tracks - */ - outboundAudioTracks?: OutboundAudioTrack[]; - - /** - * List of compound measurements related to outbound video tracks - */ - outboundVideoTracks?: OutboundVideoTrack[]; - - /** - * List of local ICE candidates - */ - iceLocalCandidates?: IceLocalCandidate[]; - - /** - * List of remote ICE candidates - */ - iceRemoteCandidates?: IceRemoteCandidate[]; - - /** - * The offset from GMT in hours - */ - timeZoneOffsetInHours?: number; - - /** - * Special marker for the samples - */ - marker?: string; - -} - -/** -* Additional control flags indicate various operation has to be performed -*/ -export type Controls = { - /** - * Indicate that the server should close the connection - */ - close?: boolean; - - /** - * Holds a new claim to process - */ - accessClaim?: string; - -} - -/** -* Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. -*/ -export type Samples = { - /** - * Additional control flags indicate various operation has to be performed - */ - controls?: Controls; - - /** - * Samples taken from the client - */ - clientSamples?: ClientSample[]; - - /** - * Samples taken from an Sfu - */ - sfuSamples?: SfuSample[]; - - /** - * Samples taken from the TURN server - */ - turnSamples?: TurnSample[]; - } diff --git a/npm-samples-encoder/package.json b/npm-samples-encoder/package.json index 0ffd3a23..fee491f9 100644 --- a/npm-samples-encoder/package.json +++ b/npm-samples-encoder/package.json @@ -1,6 +1,6 @@ { "name": "@observertc/samples-encoder", - "version": "2.2.12", + "version": "3.0.0", "description": "ObserveRTC Library for Encoding Samples", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/npm-samples-encoder/src/AudioPlayoutEncoder.ts b/npm-samples-encoder/src/AudioPlayoutEncoder.ts new file mode 100644 index 00000000..25ed8862 --- /dev/null +++ b/npm-samples-encoder/src/AudioPlayoutEncoder.ts @@ -0,0 +1,63 @@ +import { Encoder } from "./utils"; +import { AudioPlayoutStats as InputAudioPlayoutStats } from "./InputSamples"; +import { + AppDataEncoder, + NumberToNumberEncoder, + StringToStringEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_AudioPlayoutStats } from "./OutputSamples"; + +export class AudioPlayoutEncoder implements Encoder { + private _visited = false; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _synthesizedSamplesDurationEncoder: NumberToNumberEncoder; + private readonly _synthesizedSamplesEventsEncoder: NumberToNumberEncoder; + private readonly _totalSamplesDurationEncoder: NumberToNumberEncoder; + private readonly _totalPlayoutDelayEncoder: NumberToNumberEncoder; + private readonly _totalSamplesCountEncoder: NumberToNumberEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._synthesizedSamplesDurationEncoder = new NumberToNumberEncoder(); + this._synthesizedSamplesEventsEncoder = new NumberToNumberEncoder(); + this._totalSamplesDurationEncoder = new NumberToNumberEncoder(); + this._totalPlayoutDelayEncoder = new NumberToNumberEncoder(); + this._totalSamplesCountEncoder = new NumberToNumberEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._kindEncoder.reset(); + this._synthesizedSamplesDurationEncoder.reset(); + this._synthesizedSamplesEventsEncoder.reset(); + this._totalSamplesDurationEncoder.reset(); + this._totalPlayoutDelayEncoder.reset(); + this._totalSamplesCountEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(sample: InputAudioPlayoutStats): ClientSample_PeerConnectionSample_AudioPlayoutStats { + this._visited = true; + return new ClientSample_PeerConnectionSample_AudioPlayoutStats({ + id: sample.id, + timestamp: this._timestampEncoder.encode(sample.timestamp), + kind: this._kindEncoder.encode(sample.kind), + synthesizedSamplesDuration: this._synthesizedSamplesDurationEncoder.encode(sample.synthesizedSamplesDuration), + synthesizedSamplesEvents: this._synthesizedSamplesEventsEncoder.encode(sample.synthesizedSamplesEvents), + totalSamplesDuration: this._totalSamplesDurationEncoder.encode(sample.totalSamplesDuration), + totalPlayoutDelay: this._totalPlayoutDelayEncoder.encode(sample.totalPlayoutDelay), + totalSamplesCount: this._totalSamplesCountEncoder.encode(sample.totalSamplesCount), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/AudioSourceEncoder.ts b/npm-samples-encoder/src/AudioSourceEncoder.ts new file mode 100644 index 00000000..cbf24d92 --- /dev/null +++ b/npm-samples-encoder/src/AudioSourceEncoder.ts @@ -0,0 +1,68 @@ +import { AudioSourceStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_AudioSourceStats } from "./OutputSamples"; +import { Encoder, StringToUint8ArrayEncoder } from "./utils"; +import { + StringToStringEncoder, + NumberToNumberEncoder, + AppDataEncoder, +} from "./utils"; + +export class AudioSourceEncoder implements Encoder { + private _visited = false; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _trackIdentifierEncoder: StringToUint8ArrayEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _audioLevelEncoder: NumberToNumberEncoder; + private readonly _totalAudioEnergyEncoder: NumberToNumberEncoder; + private readonly _totalSamplesDurationEncoder: NumberToNumberEncoder; + private readonly _echoReturnLossEncoder: NumberToNumberEncoder; + private readonly _echoReturnLossEnhancementEncoder: NumberToNumberEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._trackIdentifierEncoder = new StringToUint8ArrayEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._audioLevelEncoder = new NumberToNumberEncoder(); + this._totalAudioEnergyEncoder = new NumberToNumberEncoder(); + this._totalSamplesDurationEncoder = new NumberToNumberEncoder(); + this._echoReturnLossEncoder = new NumberToNumberEncoder(); + this._echoReturnLossEnhancementEncoder = new NumberToNumberEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._trackIdentifierEncoder.reset(); + this._kindEncoder.reset(); + this._audioLevelEncoder.reset(); + this._totalAudioEnergyEncoder.reset(); + this._totalSamplesDurationEncoder.reset(); + this._echoReturnLossEncoder.reset(); + this._echoReturnLossEnhancementEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(stats: AudioSourceStats): ClientSample_PeerConnectionSample_AudioSourceStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_AudioSourceStats({ + id: stats.id, + timestamp: this._timestampEncoder.encode(stats.timestamp), + trackIdentifier: this._trackIdentifierEncoder.encode(stats.trackIdentifier), + kind: this._kindEncoder.encode(stats.kind), + audioLevel: this._audioLevelEncoder.encode(stats.audioLevel ?? 0), + totalAudioEnergy: this._totalAudioEnergyEncoder.encode(stats.totalAudioEnergy ?? 0), + totalSamplesDuration: this._totalSamplesDurationEncoder.encode(stats.totalSamplesDuration ?? 0), + echoReturnLoss: this._echoReturnLossEncoder.encode(stats.echoReturnLoss ?? 0), + echoReturnLossEnhancement: this._echoReturnLossEnhancementEncoder.encode(stats.echoReturnLossEnhancement ?? 0), + appData: this._appDataEncoder.encode(stats.appData ?? {}), + }); + } +} diff --git a/npm-samples-encoder/src/CertificateEncoder.ts b/npm-samples-encoder/src/CertificateEncoder.ts new file mode 100644 index 00000000..1905df38 --- /dev/null +++ b/npm-samples-encoder/src/CertificateEncoder.ts @@ -0,0 +1,57 @@ +import { Encoder } from "./utils"; +import { CertificateStats as InputCertificateStats } from "./InputSamples"; +import { + NumberToNumberEncoder, + StringToStringEncoder, + AppDataEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_CertificateStats } from "./OutputSamples"; + +export class CertificateEncoder implements Encoder { + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _fingerprintEncoder: StringToStringEncoder; + private readonly _fingerprintAlgorithmEncoder: StringToStringEncoder; + private readonly _base64CertificateEncoder: StringToStringEncoder; + private readonly _issuerCertificateIdEncoder: StringToStringEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._fingerprintEncoder = new StringToStringEncoder(); + this._fingerprintAlgorithmEncoder = new StringToStringEncoder(); + this._base64CertificateEncoder = new StringToStringEncoder(); + this._issuerCertificateIdEncoder = new StringToStringEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._fingerprintEncoder.reset(); + this._fingerprintAlgorithmEncoder.reset(); + this._base64CertificateEncoder.reset(); + this._issuerCertificateIdEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(sample: InputCertificateStats): ClientSample_PeerConnectionSample_CertificateStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_CertificateStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: sample.id, + fingerprint: this._fingerprintEncoder.encode(sample.fingerprint), + fingerprintAlgorithm: this._fingerprintAlgorithmEncoder.encode(sample.fingerprintAlgorithm), + base64Certificate: this._base64CertificateEncoder.encode(sample.base64Certificate), + issuerCertificateId: this._issuerCertificateIdEncoder.encode(sample.issuerCertificateId) , + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/ClientEventEncoder.ts b/npm-samples-encoder/src/ClientEventEncoder.ts new file mode 100644 index 00000000..2b23c3a4 --- /dev/null +++ b/npm-samples-encoder/src/ClientEventEncoder.ts @@ -0,0 +1,27 @@ +import { Encoder, NumberToBigIntEncoder, stringToBytesArray, StringToUint8ArrayEncoder } from "./utils"; +import { ClientEvent as InputClientEvent } from "./InputSamples"; +import { + StringToStringEncoder, +} from "./utils"; +import { ClientSample_ClientEvent } from "./OutputSamples"; + +export interface ClientEventEncoder extends Encoder { + // no additional methods +} + +export class DefaultClientEventEncoder implements ClientEventEncoder { + + public reset(): void { + // no-op + } + + public encode(sample: InputClientEvent): ClientSample_ClientEvent { + return new ClientSample_ClientEvent({ + type: sample.type, + payload: sample.payload, + peerConnectionId: sample.peerConnectionId ? stringToBytesArray(sample.peerConnectionId) : undefined, + trackId: sample.trackId ? stringToBytesArray(sample.trackId) : undefined, + ssrc: sample.ssrc ? BigInt(sample.ssrc) : undefined, + }); + } +} diff --git a/npm-samples-encoder/src/ClientMetaDataEncoder.ts b/npm-samples-encoder/src/ClientMetaDataEncoder.ts new file mode 100644 index 00000000..7e55d9c4 --- /dev/null +++ b/npm-samples-encoder/src/ClientMetaDataEncoder.ts @@ -0,0 +1,24 @@ +import { Encoder, stringToBytesArray } from "./utils"; +import { ClientMetaData as InputClientMetaData } from "./InputSamples"; +import { ClientSample_ClientMetaData } from "./OutputSamples"; + +export interface ClientMetaDataEncoder extends Encoder { + // no additional methods +} + +export class DefaultClientMetaDataEncoder implements Encoder { + + public reset(): void { + // no-op + } + + public encode(sample: InputClientMetaData): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData({ + type: sample.type, + payload: sample.payload, + peerConnectionId: sample.peerConnectionId ? stringToBytesArray(sample.peerConnectionId) : undefined, + trackId: sample.trackId ? stringToBytesArray(sample.trackId) : undefined, + ssrc: sample.ssrc ? BigInt(sample.ssrc) : undefined, + }); + } +} diff --git a/npm-samples-encoder/src/ClientSampleEncoder.ts b/npm-samples-encoder/src/ClientSampleEncoder.ts index 3d57fae1..95d72183 100644 --- a/npm-samples-encoder/src/ClientSampleEncoder.ts +++ b/npm-samples-encoder/src/ClientSampleEncoder.ts @@ -1,82 +1,46 @@ -import { ClientSample, IceLocalCandidate, IceRemoteCandidate, MediaDevice } from "./InputSamples"; -import { DataChannelEncoder } from "./DataChannelEncoder"; -import { convertUint8ToBase64, stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { IceCandidatePairEncoder } from "./IceCandidatePairEncoder"; -import { InboundAudioTrackEncoder } from "./InboundAudioTrackEncoder"; -import { InboundVideoTrackEncoder } from "./InboundVideoTrackEncoder"; -import { MediaSourceStatsEncoder } from "./MediaSourceStatsEncoder"; -import { OutboundAudioTrackEncoder } from "./OutboundAudioTrackEncoder"; -import { OutboundVideoTrackEncoder } from "./OutboundVideoTrackEncoder"; -import { PeerConnectionTransportEncoder } from "./PeerConnectionTransportEncoder"; import { - Samples_ClientSample, - Samples_ClientSample_Browser, - Samples_ClientSample_Certificate, - Samples_ClientSample_CustomCallEvent, - Samples_ClientSample_DataChannel, - Samples_ClientSample_Engine, - Samples_ClientSample_ExtensionStat, - Samples_ClientSample_IceCandidatePair, - Samples_ClientSample_IceLocalCandidate, - Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum, - Samples_ClientSample_IceRemoteCandidate, - Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum, - Samples_ClientSample_InboundAudioTrack, - Samples_ClientSample_InboundVideoTrack, - Samples_ClientSample_MediaCodecStats, - Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum, - Samples_ClientSample_MediaDevice, - Samples_ClientSample_MediaDevice_MediaDeviceEnum, - Samples_ClientSample_MediaSourceStat, - Samples_ClientSample_OperationSystem, - Samples_ClientSample_OutboundAudioTrack, - Samples_ClientSample_OutboundVideoTrack, - Samples_ClientSample_PeerConnectionTransport, - Samples_ClientSample_Platform + ClientSample as InputClientSample, +} from "./InputSamples"; +import { + ClientSample_ClientEvent, + ClientSample_ClientMetaData, + ClientSample_ExtensionStat, + ClientSample as OutputClientSample, } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; +import { AppDataEncoder, AppDataEncoderFactory, ClientSampleEncoderSettings, convertUint8ToBase64, DefaultAppDataEncoderFactory, Encoder, OneTimePassStringToUint8ArrayEncoder, OneTimePassUuidToByteArrayEncoder, stringToBytesArray, uuidToByteArray } from "./utils"; +import { PeerConnectionSampleEncoder } from "./PeerConnectionSampleEncoder"; +import { ClientEventEncoder, DefaultClientEventEncoder } from "./ClientEventEncoder"; +import { ClientMetaDataEncoder, DefaultClientMetaDataEncoder } from "./ClientMetaDataEncoder"; +import { DefaultExtensionStatsEncoder, ExtensionStatsEncoder } from "./ExtensionStatsEncoder"; -export class ClientSampleEncoder { - public readonly options: ClientSampleEncodingOptions; - private _callId?: string; - private _roomId?: string; - private _userId?: string; +export class ClientSampleEncoder { + public readonly settings: ClientSampleEncoderSettings; + + public readonly appDataEncoderFactory:AppDataEncoderFactory = new DefaultAppDataEncoderFactory(); + public clientEventEncoder: ClientEventEncoder = new DefaultClientEventEncoder(); + public clientMetaDataEncoder: ClientMetaDataEncoder = new DefaultClientMetaDataEncoder(); + public extensionStatsEncoder: ExtensionStatsEncoder = new DefaultExtensionStatsEncoder(); + + private _clientId: Uint8Array; + private readonly _callIdEncoder: Encoder; + private _appDataEncoder: AppDataEncoder; private _visited = false; - private _mediaConstraints = new Set(); - private _iceServers = new Set(); - private _localSDPs = new Set(); - private _userMediaErrors = new Set(); - private _mediaDevices = new Map(); - private _engine: ClientSample['engine']; - private _platform: ClientSample['platform']; - private _browser: ClientSample['browser']; - private _os: ClientSample['os']; - private _codecs: ClientSample['codecs'] = []; - private _certificates: ClientSample['certificates'] = [] - private _timeZoneOffsetInHours?: number; - private _mediaSources = new Map(); - private _inboundAudioTracks = new Map(); - private _inboundVideoTracks = new Map(); - private _outboundAudioTracks = new Map(); - private _outboundVideoTracks = new Map(); - private _dataChannels = new Map(); - private _iceCandidatePairs = new Map(); - private _peerConnectionTransports = new Map(); - private _iceLocalCandidates = new Map(); - private _iceRemoteCandidates = new Map(); + private _peerConnectionSampleEncoders = new Map(); - - public constructor(options?: Partial) { - this.options = Object.assign({ - callIdIsUuid: false, - sfuStreamIdIsUuid: false, - sfuSinkIdIsUuid: false, + public constructor(clientId: string, settings?: Partial) { + this.settings = { clientIdIsUuid: false, peerConnectionIdIsUuid: false, + callIdIsUuid: false, trackIdIsUuid: false, - }, options ?? {}); + ...(settings ?? {}), + } + + this._clientId = this.settings.clientIdIsUuid ? uuidToByteArray(clientId) : stringToBytesArray(clientId); + this._callIdEncoder = this.settings.callIdIsUuid ? new OneTimePassUuidToByteArrayEncoder() : new OneTimePassStringToUint8ArrayEncoder(); + this._appDataEncoder = this.appDataEncoderFactory.createClientSampleAppDataEncoder(); } public get visited(): boolean { @@ -85,605 +49,80 @@ export class ClientSampleEncoder { return result; } - public encodeToBytes(clientSample: ClientSample): Uint8Array { + public encodeToBytes(clientSample: InputClientSample): Uint8Array { return this.encodeToProtobufSamples(clientSample).toBinary() } - public encodeToBase64(clientSample: ClientSample): string { + public encodeToBase64(clientSample: InputClientSample): string { const bytes = this.encodeToProtobufSamples(clientSample).toBinary(); return convertUint8ToBase64(bytes); } - public encodeToProtobufSamples(clientSample: ClientSample): Samples_ClientSample { - + public encodeToProtobufSamples(clientSample: InputClientSample): OutputClientSample { this._visited = true; + const clientEvents: ClientSample_ClientEvent[] | undefined = clientSample + .clientEvents + ?.map(this.clientEventEncoder.encode.bind(this.clientEventEncoder)) + ?.filter((event) => event !== undefined); + + const clientMetaItems: ClientSample_ClientMetaData[] | undefined = clientSample + .clientMetaItems + ?.map(this.clientMetaDataEncoder.encode.bind(this.clientMetaDataEncoder)) + ?.filter((metaItem) => metaItem !== undefined); + + const extensionStats: ClientSample_ExtensionStat[] | undefined = clientSample + .extensionStats + ?.map(this.extensionStatsEncoder.encode.bind(this.extensionStatsEncoder)) + ?.filter((extensionStat) => extensionStat !== undefined); - const result = new Samples_ClientSample({ - clientId: clientSample.clientId ? this.options.clientIdIsUuid ? uuidToByteArray(clientSample.clientId) : stringToBytesArray(clientSample.clientId) : undefined, + const result = new OutputClientSample({ + clientId: this._clientId, timestamp: BigInt(clientSample.timestamp), - sampleSeq: clientSample.sampleSeq, - marker: clientSample.marker, - - callId: this._encodeCallId(clientSample.callId), - userId: this._encodeUserId(clientSample.userId), - roomId: this._encodeRoomId(clientSample.roomId), - browser: this._encodeBrowser(clientSample.browser), - engine: this._encodeEngine(clientSample.engine), - platform: this._encodePlatform(clientSample.platform), - os: this._encodeOs(clientSample.os), - localSDPs: this._encodeLocalSDPs(clientSample.localSDPs), - userMediaErrors: this._encodeUserMediaErrors(clientSample.userMediaErrors), - iceServers: this._encodeIceServers(clientSample.iceServers), - mediaConstraints: this._encodeMediaConstraints(clientSample.mediaConstraints), - mediaDevices: this._encodeMediaDevices(clientSample.mediaDevices), - - dataChannels: this._encodeDataChannels(clientSample.dataChannels), - iceCandidatePairs: this._encodeIceCandidatePairs(clientSample.iceCandidatePairs), - pcTransports: this._encodePeerConnectionTransports(clientSample.pcTransports), - inboundAudioTracks: this._encodeInboundAudioTracks(clientSample.inboundAudioTracks), - inboundVideoTracks: this._encodeInboundVideoTracks(clientSample.inboundVideoTracks), - outboundAudioTracks: this._encodeOutboundAudioTracks(clientSample.outboundAudioTracks), - outboundVideoTracks: this._encodeOutboundVideoTracks(clientSample.outboundVideoTracks), - mediaSources: this._encodeMediaSources(clientSample.mediaSources), - - codecs: this._encodeCodecs(clientSample.codecs), - certificates: this._encodeCertificates(clientSample.certificates), - extensionStats: this._encodeExtensionStats(clientSample.extensionStats), - customCallEvents: this._encodeCustomCallEvents(clientSample.customCallEvents), - - iceLocalCandidates: this._encodeIceLocalCandidates(clientSample.iceLocalCandidates), - iceRemoteCandidates: this._encodeIceRemoteCandidates(clientSample.iceRemoteCandidates), - timeZoneOffsetInHours: this._encodeTimeZoneOffsetInHours(clientSample.timeZoneOffsetInHours), - - }); - return result; - } - - public reset() { - this._callId = undefined; - this._roomId = undefined; - this._userId = undefined; - this._visited = false; - this._mediaConstraints.clear(); - this._iceServers.clear(); - this._localSDPs.clear(); - this._userMediaErrors.clear(); - this._mediaDevices.clear(); - this._engine = undefined; - this._platform = undefined; - this._browser = undefined; - this._os = undefined; - this._codecs = []; - this._certificates = []; - this._timeZoneOffsetInHours = undefined; - - this._mediaSources.clear(); - this._inboundAudioTracks.clear(); - this._inboundVideoTracks.clear(); - this._outboundAudioTracks.clear(); - this._outboundVideoTracks.clear(); - this._dataChannels.clear(); - this._iceCandidatePairs.clear(); - this._peerConnectionTransports.clear(); - this._iceLocalCandidates.clear(); - this._iceRemoteCandidates.clear(); - } - - - private _encodeCallId( - callId?: string, - ): Uint8Array | undefined { - if (!callId) return; - if (this._callId === callId) return; - this._callId = callId; - - return this.options.callIdIsUuid - ? uuidToByteArray(callId) - : stringToBytesArray(callId); - } - - private _encodeRoomId( - roomId?: string, - ): string | undefined { - if (!roomId) return; - if (this._roomId === roomId) return; - this._roomId = roomId; - return roomId; - } - - private _encodeUserId( - userId?: string, - ): string | undefined { - if (!userId) return; - if (this._userId === userId) return; - this._userId = userId; - return userId; - } - - private _encodeTimeZoneOffsetInHours( - timeZoneOffsetInHours?: number, - ): number | undefined { - if (!timeZoneOffsetInHours) return; - if (this._timeZoneOffsetInHours === timeZoneOffsetInHours) return; - this._timeZoneOffsetInHours = timeZoneOffsetInHours; - return timeZoneOffsetInHours; - } - - private _encodeMediaConstraints( - mediaConstraints?: string[] - ): string[] { - if (!mediaConstraints) return []; - if (this._mediaConstraints.size === mediaConstraints.length) { - if (mediaConstraints.every(item => this._mediaConstraints.has(item))) { - return []; - } - } - this._mediaConstraints = new Set(mediaConstraints); - return mediaConstraints; - } - - private _encodeUserMediaErrors( - userMediaErrors?: string[] - ): string[] { - if (!userMediaErrors) return []; - if (this._userMediaErrors.size === userMediaErrors.length) { - if (userMediaErrors.every(item => this._userMediaErrors.has(item))) { - return []; - } - } - this._userMediaErrors = new Set(userMediaErrors); - return userMediaErrors; - } - - private _encodeIceServers( - iceServers?: string[] - ): string[] { - if (!iceServers) return []; - if (this._iceServers.size === iceServers.length) { - if (iceServers.every(item => this._iceServers.has(item))) { - return []; - } - } - this._iceServers = new Set(iceServers); - return iceServers; - } - - private _encodeLocalSDPs( - localSDPs?: string[] - ): string[] { - if (!localSDPs) return []; - if (this._localSDPs.size === localSDPs.length) { - if (localSDPs.every(item => this._localSDPs.has(item))) { - return []; - } - } - this._localSDPs = new Set(localSDPs); - return localSDPs; - } - - private _encodeMediaDevices( - mediaDevices?: ClientSample['mediaDevices'] - ): Samples_ClientSample_MediaDevice[] { - if (!mediaDevices) return []; - const sampledIds = new Set(); - const result: Samples_ClientSample_MediaDevice[] = []; - for (const mediaDevice of mediaDevices) { - if (!mediaDevice.id) continue; - if (this._mediaDevices.has(mediaDevice.id)) continue; - - sampledIds.add(mediaDevice.id); - result.push(new Samples_ClientSample_MediaDevice({ - ...mediaDevice, - kind: mediaDevice.kind === 'audioinput' ? Samples_ClientSample_MediaDevice_MediaDeviceEnum.AUDIOINPUT : - mediaDevice.kind === 'audiooutput' ? Samples_ClientSample_MediaDevice_MediaDeviceEnum.AUDIOOUTPUT : - mediaDevice.kind === 'videoinput' ? Samples_ClientSample_MediaDevice_MediaDeviceEnum.VIDEOINPUT : - undefined - })) - this._mediaDevices.set(mediaDevice.id, mediaDevice); - } - for (const savedMediaDevice of Array.from(this._mediaDevices.values())) { - if (savedMediaDevice.id && !sampledIds.has(savedMediaDevice.id)) { - this._mediaDevices.delete(savedMediaDevice.id); - } - } - return result; - } - - private _encodeIceLocalCandidates( - iceLocalCandidates?: IceLocalCandidate[] - ): Samples_ClientSample_IceLocalCandidate[] { - if (!iceLocalCandidates) return []; - if (this._iceLocalCandidates.size === iceLocalCandidates.length) { - if (iceLocalCandidates.every(item => this._iceLocalCandidates.has(item.id ? item.id : 'id'))) { - return []; - } - } - this._iceLocalCandidates.clear(); - iceLocalCandidates.forEach(item => this._iceLocalCandidates.set(item.id ? item.id : 'id', item)); - return Array.from(this._iceLocalCandidates.values()).filter(item => !!item.peerConnectionId).map(item => { - const peerConnectionId = this.options.peerConnectionIdIsUuid ? uuidToByteArray(item.peerConnectionId!) : stringToBytesArray(item.peerConnectionId!); - return new Samples_ClientSample_IceLocalCandidate({ - ...item, - peerConnectionId, - priority: BigInt(item.priority ? item.priority : -1), - protocol: item.protocol === 'tcp' ? Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum.TCP : - item.protocol === 'udp' ? Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum.UDP : - undefined, - relayProtocol: item.relayProtocol === 'tcp' ? Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum.TCP : - item.relayProtocol === 'udp' ? Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum.UDP : - item.relayProtocol === 'tls' ? Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum.TLS : - undefined, - }) + callId: this._callIdEncoder.encode(clientSample.callId), + peerConnections: clientSample.peerConnections?.map(this._encodePeerConnectionSample.bind(this)), + clientEvents, + clientMetaItems, + extensionStats, + appData: this._appDataEncoder.encode(clientSample.appData), }); - } - private _encodeIceRemoteCandidates( - iceRemoteCandidates?: IceRemoteCandidate[] - ): Samples_ClientSample_IceRemoteCandidate[] { - if (!iceRemoteCandidates) return []; - if (this._iceRemoteCandidates.size === iceRemoteCandidates.length) { - if (iceRemoteCandidates.every(item => this._iceRemoteCandidates.has(item.id ? item.id : 'id'))) { - return []; - } - } - this._iceRemoteCandidates.clear(); - iceRemoteCandidates.forEach(item => this._iceRemoteCandidates.set(item.id ? item.id : 'id', item)); - return Array.from(this._iceRemoteCandidates.values()).filter(item => !!item.peerConnectionId).map(item => { - const peerConnectionId = this.options.peerConnectionIdIsUuid ? uuidToByteArray(item.peerConnectionId!) : stringToBytesArray(item.peerConnectionId!); - return new Samples_ClientSample_IceRemoteCandidate({ - ...item, - peerConnectionId, - priority: BigInt(item.priority ? item.priority : -1), - protocol: item.protocol === 'tcp' ? Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum.TCP : - item.protocol === 'udp' ? Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum.UDP : - undefined, - relayProtocol: item.relayProtocol === 'tcp' ? Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum.TCP : - item.relayProtocol === 'udp' ? Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum.UDP : - item.relayProtocol === 'tls' ? Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum.TLS : - undefined, - }); - }); - } + this._checkVisitsAndClean(); - private _encodeCodecs( - codecs?: ClientSample['codecs'] - ): Samples_ClientSample_MediaCodecStats[] { - if (!codecs) return []; - - const sampledMimeTypes = new Set(); - const result: Samples_ClientSample_MediaCodecStats[] = []; - - for (const codec of codecs) { - if (!codec.mimeType) continue; - if (!this._codecs) continue; - if (this._codecs.some((c) => c.mimeType === codec.mimeType)) continue; - - sampledMimeTypes.add(codec.mimeType); - result.push(new Samples_ClientSample_MediaCodecStats({ - ...codec, - codecType: - codec.codecType === 'encode' - ? Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum.ENCODE - : codec.codecType === 'decode' - ? Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum.DECODE - : undefined - })); - } - - this._codecs = [...(this._codecs || []), ...codecs]; - - this._codecs = this._codecs.filter((codec) => sampledMimeTypes.has(codec.mimeType ? codec.mimeType : "no")); - return result; } - private _encodeExtensionStats( - extensionStats?: ClientSample['extensionStats'], - ): Samples_ClientSample_ExtensionStat[] { - if (!extensionStats) return []; - return extensionStats.map(extensionStats => new Samples_ClientSample_ExtensionStat({ - ...extensionStats - })); - } - - private _encodeCustomCallEvents( - customCallEvents?: ClientSample['customCallEvents'], - ): Samples_ClientSample_CustomCallEvent[] { - if (!customCallEvents) return []; - return customCallEvents.map(customCallEvent => new Samples_ClientSample_CustomCallEvent({ - ...customCallEvent, - peerConnectionId: customCallEvent.peerConnectionId ? this.options.peerConnectionIdIsUuid ? uuidToByteArray(customCallEvent.peerConnectionId!) : stringToBytesArray(customCallEvent.peerConnectionId!) : undefined, - timestamp: customCallEvent.timestamp ? BigInt(customCallEvent.timestamp) : undefined, - })); + public reset() { + this._peerConnectionSampleEncoders.forEach((encoder) => encoder.reset()); + this._callIdEncoder.reset(); + this.clientEventEncoder.reset(); + this.clientMetaDataEncoder.reset(); + this.extensionStatsEncoder.reset(); + this._appDataEncoder = this.appDataEncoderFactory.createClientSampleAppDataEncoder(); } - - private _encodeCertificates( - certificates?: ClientSample['certificates'] - ): Samples_ClientSample_Certificate[] { - if (!certificates) return []; - const sampledFingerprints = new Set(); - const result: Samples_ClientSample_Certificate[] = []; - - for (const certificate of certificates) { - if (!certificate.fingerprint) continue; - if (!this._certificates) continue; - if (this._certificates.some((c) => c.fingerprint === certificate.fingerprint)) continue; - - sampledFingerprints.add(certificate.fingerprint); - result.push(new Samples_ClientSample_Certificate({ - ...certificate - })); - } - - this._certificates = [...(this._certificates || []), ...certificates]; - - this._certificates = this._certificates.filter((certificate) => sampledFingerprints.has(certificate.fingerprint ? certificate.fingerprint : "nope")); - - return result; - } - - private _encodeBrowser( - browser?: ClientSample['browser'], - ): Samples_ClientSample_Browser | undefined { - if (!browser) { - return; - } - const [source, actual] = [this._browser, browser].map(item => `${item? item.name : undefined}:${item? item.version : undefined}`); - if (source === actual) { - return; - } - this._browser = browser; - - return new Samples_ClientSample_Browser({ - ...browser - }); - } - - - private _encodeEngine( - engine?: ClientSample['engine'], - ): Samples_ClientSample_Engine | undefined { - if (!engine) { - return; - } - const [source, actual] = [this._engine, engine].map(item => `${item? item.name : undefined}:${item? item.version : undefined}`); - if (source === actual) { - return; - } - this._engine = engine; - - return new Samples_ClientSample_Engine({ - ...engine - }); - } - - private _encodePlatform( - platform?: ClientSample['platform'], - ): Samples_ClientSample_Platform | undefined { - if (!platform) { - return; - } - const [source, actual] = [this._platform, platform] - .map(item => `${item ? item.model : undefined}:${item? item.type : undefined}:${item? item.vendor : undefined}`); - if (source === actual) { - return; - } - this._platform = platform; - - return new Samples_ClientSample_Platform({ - ...platform - }); - } - - private _encodeOs( - os?: ClientSample['os'], - ): Samples_ClientSample_OperationSystem | undefined { - if (!os) { - return; - } - const [source, actual] = [this._os, os] - .map(item => `${item? item.versionName : undefined}:${item? item.version : undefined}:${item? item.name : undefined}`); - if (source === actual) { - return; - } - this._os = os; - - return new Samples_ClientSample_OperationSystem({ - ...os - }); - } - - private _encodeInboundAudioTracks( - inboundAudioTracks?: ClientSample['inboundAudioTracks'], - ): Samples_ClientSample_InboundAudioTrack[] { - const result: Samples_ClientSample_InboundAudioTrack[] = []; - for (const sample of (inboundAudioTracks ? inboundAudioTracks : [])) { - if (!sample.trackId) continue; - const key = `${sample.trackId}:${sample.ssrc}`; - let encoder = this._inboundAudioTracks.get(key); - if (!encoder) { - encoder = new InboundAudioTrackEncoder(sample.trackId, sample.ssrc, this.options); - this._inboundAudioTracks.set(key, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const [key, encoder] of Array.from(this._inboundAudioTracks.entries())) { - if (!encoder.visited) { - this._inboundAudioTracks.delete(key); - } - } - return result; - } - - private _encodeInboundVideoTracks( - inboundVideoTracks?: ClientSample['inboundVideoTracks'], - ): Samples_ClientSample_InboundVideoTrack[] { - const result: Samples_ClientSample_InboundVideoTrack[] = []; - for (const sample of (inboundVideoTracks ? inboundVideoTracks : [])) { - if (!sample.trackId) continue; - const key = `${sample.trackId}:${sample.ssrc}`; - let encoder = this._inboundVideoTracks.get(key); - if (!encoder) { - encoder = new InboundVideoTrackEncoder(sample.trackId, sample.ssrc, this.options); - this._inboundVideoTracks.set(key, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const [key, encoder] of Array.from(this._inboundVideoTracks.entries())) { - if (!encoder.visited) { - this._inboundVideoTracks.delete(key); - } - } - return result; - } - - - private _encodeOutboundAudioTracks( - outboundAudioTracks?: ClientSample['outboundAudioTracks'], - ): Samples_ClientSample_OutboundAudioTrack[] { - const result: Samples_ClientSample_OutboundAudioTrack[] = []; - for (const sample of (outboundAudioTracks ? outboundAudioTracks : [])) { - if (!sample.trackId) continue; - const key = `${sample.trackId}:${sample.ssrc}`; - let encoder = this._outboundAudioTracks.get(key); - if (!encoder) { - encoder = new OutboundAudioTrackEncoder(sample.trackId, sample.ssrc, this.options); - this._outboundAudioTracks.set(key, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const [key, encoder] of Array.from(this._outboundAudioTracks.entries())) { - if (!encoder.visited) { - this._outboundAudioTracks.delete(key); - } - } - return result; - } - - private _encodeOutboundVideoTracks( - outboundVideoTracks?: ClientSample['outboundVideoTracks'], - ): Samples_ClientSample_OutboundVideoTrack[] { - const result: Samples_ClientSample_OutboundVideoTrack[] = []; - for (const sample of (outboundVideoTracks ? outboundVideoTracks : [])) { - if (!sample.trackId) continue; - const key = `${sample.trackId}:${sample.ssrc}`; - let encoder = this._outboundVideoTracks.get(key); - if (!encoder) { - encoder = new OutboundVideoTrackEncoder(sample.trackId, sample.ssrc, this.options); - this._outboundVideoTracks.set(key, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const [key, encoder] of Array.from(this._outboundVideoTracks.entries())) { - if (!encoder.visited) { - this._outboundVideoTracks.delete(key); - } - } - return result; - } - - private _encodeMediaSources( - mediaSources?: ClientSample['mediaSources'], - ): Samples_ClientSample_MediaSourceStat[] { - const result: Samples_ClientSample_MediaSourceStat[] = []; - for (const sample of (mediaSources ? mediaSources : [])) { - if (!sample.trackIdentifier) continue; - let encoder = this._mediaSources.get(sample.trackIdentifier); - if (!encoder) { - encoder = new MediaSourceStatsEncoder(sample.trackIdentifier, this.options); - this._mediaSources.set(sample.trackIdentifier, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const encoder of Array.from(this._mediaSources.values())) { - if (!encoder.visited) { - this._mediaSources.delete(encoder.trackIdentifier); - } - } - - return result; - } - - private _encodeIceCandidatePairs( - candidatePairs: ClientSample['iceCandidatePairs'], - ): Samples_ClientSample_IceCandidatePair[] { - const result: Samples_ClientSample_IceCandidatePair[] = []; - for (const sample of (candidatePairs ? candidatePairs : [])) { - if (!sample.candidatePairId) continue; - let encoder = this._iceCandidatePairs.get(sample.candidatePairId); - if (!encoder) { - encoder = new IceCandidatePairEncoder(sample.candidatePairId, this.options); - this._iceCandidatePairs.set(sample.candidatePairId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - for (const encoder of Array.from(this._iceCandidatePairs.values())) { - if (!encoder.visited) { - this._iceCandidatePairs.delete(encoder.candidatePairId); - } + private _encodePeerConnectionSample( + input: Required['peerConnections'][number], + ): OutputClientSample['peerConnections'][number] { + let encoder = this._peerConnectionSampleEncoders.get(input.peerConnectionId); + if (!encoder) { + encoder = new PeerConnectionSampleEncoder(input.peerConnectionId, this); + this._peerConnectionSampleEncoders.set(input.peerConnectionId, encoder); } - - return result; + return encoder.encode(input); } - private _encodePeerConnectionTransports( - pcTransports?: ClientSample['pcTransports'], - ): Samples_ClientSample_PeerConnectionTransport[] { - const result: Samples_ClientSample_PeerConnectionTransport[] = []; - for (const sample of (pcTransports ? pcTransports : [])) { - if (!sample.peerConnectionId) continue; - let encoder = this._peerConnectionTransports.get(sample.peerConnectionId); - if (!encoder) { - encoder = new PeerConnectionTransportEncoder(sample.peerConnectionId, this.options); - this._peerConnectionTransports.set(sample.peerConnectionId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - for (const encoder of Array.from(this._peerConnectionTransports.values())) { - if (!encoder.visited) { - this._peerConnectionTransports.delete(encoder.peerConnectionId); - } - } - - return result; - } - - private _encodeDataChannels( - dataChannels?: ClientSample['dataChannels'] - ): Samples_ClientSample_DataChannel[] { - const result: Samples_ClientSample_DataChannel[] = []; - for (const sample of (dataChannels ? dataChannels : [])) { - if (!sample.dataChannelIdentifier) continue; - let encoder = this._dataChannels.get(sample.dataChannelIdentifier); - if (!encoder) { - encoder = new DataChannelEncoder(sample.dataChannelIdentifier); - this._dataChannels.set(sample.dataChannelIdentifier, encoder); + private _checkVisitsAndClean() { + let visited = false; + for (const [peerConnectionId, encoder] of Array.from(this._peerConnectionSampleEncoders.entries())) { + const visited = encoder.checkVisitsAndClean(); + + if (!visited) { + this._peerConnectionSampleEncoders.delete(peerConnectionId); } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); } - for (const encoder of Array.from(this._dataChannels.values())) { - if (!encoder.visited) { - this._dataChannels.delete(encoder.dataChannelIdentifier); - } - } - - return result; + return visited; } } diff --git a/npm-samples-encoder/src/CodecStatsEncoder.ts b/npm-samples-encoder/src/CodecStatsEncoder.ts new file mode 100644 index 00000000..f5a95f92 --- /dev/null +++ b/npm-samples-encoder/src/CodecStatsEncoder.ts @@ -0,0 +1,69 @@ +import { Encoder } from "./utils"; +import { CodecStats as InputCodecStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_CodecStats } from "./OutputSamples"; +import { + AppDataEncoder, + NumberToNumberEncoder, + StringToStringEncoder, +} from "./utils"; + +export class CodecStatsEncoder + implements Encoder +{ + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _typeEncoder: StringToStringEncoder; + private readonly _payloadTypeEncoder: NumberToNumberEncoder; + private readonly _transportIdEncoder: StringToStringEncoder; + private readonly _mimeTypeEncoder: StringToStringEncoder; + private readonly _clockRateEncoder: NumberToNumberEncoder; + private readonly _channelsEncoder: NumberToNumberEncoder; + private readonly _sdpFmtpLineEncoder: StringToStringEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._typeEncoder = new StringToStringEncoder(); + this._payloadTypeEncoder = new NumberToNumberEncoder(); + this._transportIdEncoder = new StringToStringEncoder(); + this._mimeTypeEncoder = new StringToStringEncoder(); + this._clockRateEncoder = new NumberToNumberEncoder(); + this._channelsEncoder = new NumberToNumberEncoder(); + this._sdpFmtpLineEncoder = new StringToStringEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._appDataEncoder.reset(); + this._channelsEncoder.reset(); + this._clockRateEncoder.reset(); + this._mimeTypeEncoder.reset(); + this._payloadTypeEncoder.reset(); + this._sdpFmtpLineEncoder.reset(); + this._timestampEncoder.reset(); + this._transportIdEncoder.reset(); + this._typeEncoder.reset(); + } + + public encode(sample: InputCodecStats): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + type: this._typeEncoder.encode(sample.type), + id: sample.id, + payloadType: this._payloadTypeEncoder.encode(sample.payloadType), + transportId: this._transportIdEncoder.encode(sample.transportId), + mimeType: this._mimeTypeEncoder.encode(sample.mimeType), + clockRate: this._clockRateEncoder.encode(sample.clockRate), + channels: this._channelsEncoder.encode(sample.channels), + sdpFmtpLine: this._sdpFmtpLineEncoder.encode(sample.sdpFmtpLine), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/DataChannelEncoder.ts b/npm-samples-encoder/src/DataChannelEncoder.ts index 947fb806..66d80c22 100644 --- a/npm-samples-encoder/src/DataChannelEncoder.ts +++ b/npm-samples-encoder/src/DataChannelEncoder.ts @@ -1,92 +1,73 @@ -import { DataChannel } from "./InputSamples"; -import { Samples_ClientSample_DataChannel } from './OutputSamples'; +import { Encoder, NumberToBigIntEncoder } from "./utils"; +import { DataChannelStats as InputDataChannelStats } from "./InputSamples"; // Assuming this is the input sample type +import { + NumberToNumberEncoder, + StringToStringEncoder, + AppDataEncoder +} from "./utils"; // Assuming these are utility encoders for the various types +import { ClientSample_PeerConnectionSample_DataChannelStats } from "./OutputSamples"; // Assuming this is the output sample type -export class DataChannelEncoder { - private _peerConnectionId?: Uint8Array; - private _bytesReceived?: number; - private _bytesSent?: number; - private _label?: string; - private _messageReceived?: number; - private _messageSent?: number; - private _protocol?: string; - private _state?: string; +export class DataChannelEncoder implements Encoder { + private _visited = false; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _labelEncoder: StringToStringEncoder; + private readonly _protocolEncoder: StringToStringEncoder; + private readonly _dataChannelIdentifierEncoder: NumberToNumberEncoder; + private readonly _stateEncoder: StringToStringEncoder; + private readonly _messagesSentEncoder: NumberToNumberEncoder; + private readonly _bytesSentEncoder: NumberToBigIntEncoder; + private readonly _messagesReceivedEncoder: NumberToNumberEncoder; + private readonly _bytesReceivedEncoder: NumberToBigIntEncoder; - private _visited = false; - - public constructor( - public readonly dataChannelIdentifier: number + constructor( + private readonly _appDataEncoder: AppDataEncoder ) { + // Initialize encoders for each field based on their type + this._timestampEncoder = new NumberToNumberEncoder(); + this._labelEncoder = new StringToStringEncoder(); + this._protocolEncoder = new StringToStringEncoder(); + this._dataChannelIdentifierEncoder = new NumberToNumberEncoder(); + this._stateEncoder = new StringToStringEncoder(); + this._messagesSentEncoder = new NumberToNumberEncoder(); + this._bytesSentEncoder = new NumberToBigIntEncoder(); + this._messagesReceivedEncoder = new NumberToNumberEncoder(); + this._bytesReceivedEncoder = new NumberToBigIntEncoder(); + } - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: DataChannel): Samples_ClientSample_DataChannel { - this._visited = true; + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } - const result = new Samples_ClientSample_DataChannel({ - dataChannelIdentifier: this.dataChannelIdentifier, - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - bytesSent: this._encodeBytesSent(sample.bytesSent), - label: this._encodeLabel(sample.label), - messageReceived: this._encodeMessageReceived(sample.messageReceived), - messageSent: this._encodeMessageSent(sample.messageSent), - protocol: this._encodeProtocol(sample.protocol), - state: this._encodeState(sample.state), - }); - return result; - } + public reset(): void { + // Reset all encoders + this._timestampEncoder.reset(); + this._labelEncoder.reset(); + this._protocolEncoder.reset(); + this._dataChannelIdentifierEncoder.reset(); + this._stateEncoder.reset(); + this._messagesSentEncoder.reset(); + this._bytesSentEncoder.reset(); + this._messagesReceivedEncoder.reset(); + this._bytesReceivedEncoder.reset(); + } - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (!bytesReceived) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeLabel(label?: string): string | undefined { - if (!label) return; - if (label === this._label) return; - this._label = label; - return this._label; - } - - private _encodeMessageReceived(messageReceived?: number): number | undefined { - if (!messageReceived) return; - if (messageReceived === this._messageReceived) return; - this._messageReceived = messageReceived; - return this._messageReceived; - } - - private _encodeMessageSent(messageSent?: number): number | undefined { - if (!messageSent) return; - if (messageSent === this._messageSent) return; - this._messageSent = messageSent; - return this._messageSent; - } - - private _encodeProtocol(protocol?: string): string | undefined { - if (!protocol) return; - if (protocol === this._protocol) return; - this._protocol = protocol; - return this._protocol; - } - - private _encodeState(state?: string): string | undefined { - if (!state) return; - if (state === this._state) return; - this._state = state; - return this._state; - } + public encode(sample: InputDataChannelStats): ClientSample_PeerConnectionSample_DataChannelStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_DataChannelStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: sample.id, + label: this._labelEncoder.encode(sample.label), + protocol: this._protocolEncoder.encode(sample.protocol), + dataChannelIdentifier: this._dataChannelIdentifierEncoder.encode(sample.dataChannelIdentifier), + state: this._stateEncoder.encode(sample.state), + messagesSent: this._messagesSentEncoder.encode(sample.messagesSent), + bytesSent: this._bytesSentEncoder.encode(sample.bytesSent), + messagesReceived: this._messagesReceivedEncoder.encode(sample.messagesReceived), + bytesReceived: this._bytesReceivedEncoder.encode(sample.bytesReceived), + appData: this._appDataEncoder.encode(sample.appData), + }); + } } diff --git a/npm-samples-encoder/src/EncodingOptions.ts b/npm-samples-encoder/src/EncodingOptions.ts deleted file mode 100644 index c3311b99..00000000 --- a/npm-samples-encoder/src/EncodingOptions.ts +++ /dev/null @@ -1,23 +0,0 @@ - -export type ClientSampleEncodingOptions = { - callIdIsUuid: boolean; - sfuStreamIdIsUuid: boolean; - sfuSinkIdIsUuid: boolean; - clientIdIsUuid: boolean; - peerConnectionIdIsUuid: boolean; - trackIdIsUuid: boolean; -} - -export type SfuSampleEncodingOptions = { - sfuIdIsUuid: boolean; - sfuStreamIdIsUuid: boolean; - sfuSinkIdIsUuid: boolean; - sfuPadIdIsUuid: boolean; - dataChannelIdIsUuid: boolean; - dataStreamIdIsUuid: boolean; - callIdIsUuid: boolean; - clientIdIsUuid: boolean; - trackIdIsUuid: boolean; -} - -export type SampleEncodingOptions = ClientSampleEncodingOptions & SfuSampleEncodingOptions; \ No newline at end of file diff --git a/npm-samples-encoder/src/ExtensionStatsEncoder.ts b/npm-samples-encoder/src/ExtensionStatsEncoder.ts new file mode 100644 index 00000000..4c474fe6 --- /dev/null +++ b/npm-samples-encoder/src/ExtensionStatsEncoder.ts @@ -0,0 +1,22 @@ +import { Encoder } from "./utils"; +import { ExtensionStat as InputExtensionStats } from "./InputSamples"; +import { StringToStringEncoder } from "./utils"; +import { ClientSample_ExtensionStat } from "./OutputSamples"; + +export interface ExtensionStatsEncoder extends Encoder { + // no additional methods +} + +export class DefaultExtensionStatsEncoder implements ExtensionStatsEncoder { + + public reset(): void { + // no-op + } + + public encode(sample: InputExtensionStats): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat({ + type: sample.type, + payload: sample.payload, + }); + } +} diff --git a/npm-samples-encoder/src/IceCandidateEncoder.ts b/npm-samples-encoder/src/IceCandidateEncoder.ts new file mode 100644 index 00000000..fce5fdbc --- /dev/null +++ b/npm-samples-encoder/src/IceCandidateEncoder.ts @@ -0,0 +1,96 @@ +import { Encoder, NumberToBigIntEncoder } from "./utils"; +import { IceCandidateStats as InputIceCandidateStats } from "./InputSamples"; +import { + NumberToNumberEncoder, + StringToStringEncoder, + AppDataEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_IceCandidateStats } from "./OutputSamples"; + +export class IceCandidateEncoder implements Encoder { + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _idEncoder: StringToStringEncoder; + private readonly _transportIdEncoder: StringToStringEncoder; + private readonly _addressEncoder: StringToStringEncoder; + private readonly _portEncoder: NumberToNumberEncoder; + private readonly _protocolEncoder: StringToStringEncoder; + private readonly _candidateTypeEncoder: StringToStringEncoder; + private readonly _priorityEncoder: NumberToBigIntEncoder; + private readonly _urlEncoder: StringToStringEncoder; + private readonly _relayProtocolEncoder: StringToStringEncoder; + private readonly _foundationEncoder: StringToStringEncoder; + private readonly _relatedAddressEncoder: StringToStringEncoder; + private readonly _relatedPortEncoder: NumberToNumberEncoder; + private readonly _usernameFragmentEncoder: StringToStringEncoder; + private readonly _tcpTypeEncoder: StringToStringEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._idEncoder = new StringToStringEncoder(); + this._transportIdEncoder = new StringToStringEncoder(); + this._addressEncoder = new StringToStringEncoder(); + this._portEncoder = new NumberToNumberEncoder(); + this._protocolEncoder = new StringToStringEncoder(); + this._candidateTypeEncoder = new StringToStringEncoder(); + this._priorityEncoder = new NumberToBigIntEncoder(); + this._urlEncoder = new StringToStringEncoder(); + this._relayProtocolEncoder = new StringToStringEncoder(); + this._foundationEncoder = new StringToStringEncoder(); + this._relatedAddressEncoder = new StringToStringEncoder(); + this._relatedPortEncoder = new NumberToNumberEncoder(); + this._usernameFragmentEncoder = new StringToStringEncoder(); + this._tcpTypeEncoder = new StringToStringEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset() { + this._timestampEncoder.reset(); + this._idEncoder.reset(); + this._transportIdEncoder.reset(); + this._addressEncoder.reset(); + this._portEncoder.reset(); + this._protocolEncoder.reset(); + this._candidateTypeEncoder.reset(); + this._priorityEncoder.reset(); + this._urlEncoder.reset(); + this._relayProtocolEncoder.reset(); + this._foundationEncoder.reset(); + this._relatedAddressEncoder.reset(); + this._relatedPortEncoder.reset(); + this._usernameFragmentEncoder.reset(); + this._tcpTypeEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(sample: InputIceCandidateStats): ClientSample_PeerConnectionSample_IceCandidateStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_IceCandidateStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: this._idEncoder.encode(sample.id), + transportId: this._transportIdEncoder.encode(sample.transportId), + address: this._addressEncoder.encode(sample.address), + port: this._portEncoder.encode(sample.port), + protocol: this._protocolEncoder.encode(sample.protocol), + candidateType: this._candidateTypeEncoder.encode(sample.candidateType), + priority: this._priorityEncoder.encode(sample.priority), + url: this._urlEncoder.encode(sample.url), + relayProtocol: this._relayProtocolEncoder.encode(sample.relayProtocol), + foundation: this._foundationEncoder.encode(sample.foundation), + relatedAddress: this._relatedAddressEncoder.encode(sample.relatedAddress), + relatedPort: this._relatedPortEncoder.encode(sample.relatedPort), + usernameFragment: this._usernameFragmentEncoder.encode(sample.usernameFragment), + tcpType: this._tcpTypeEncoder.encode(sample.tcpType), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/IceCandidatePairEncoder.ts b/npm-samples-encoder/src/IceCandidatePairEncoder.ts deleted file mode 100644 index 90e55f61..00000000 --- a/npm-samples-encoder/src/IceCandidatePairEncoder.ts +++ /dev/null @@ -1,252 +0,0 @@ -import { IceCandidatePair } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_IceCandidatePair } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class IceCandidatePairEncoder { - private _peerConnectionId?: string; - private _availableIncomingBitrate?: number; - private _availableOutgoingBitrate?: number; - private _bytesDiscardedOnSend?: number; - private _bytesReceived?: number; - private _bytesSent?: number; - private _consentRequestsSent?: number; - private _currentRoundTripTime?: number; - private _label?: string; - private _lastPacketReceivedTimestamp?: number; - private _lastPacketSentTimestamp?: number; - private _localCandidateId?: string; - private _nominated?: boolean; - private _packetsDiscardedOnSend?: number; - private _packetsReceived?: number; - private _packetsSent?: number; - private _remoteCandidateId?: string; - private _requestsReceived?: number; - private _requestsSent?: number; - private _responsesReceived?: number; - private _responsesSent?: number; - private _state?: string; - private _totalRoundTripTime?: number; - private _transportId?: string; - - private _visited = false; - - public constructor( - public readonly candidatePairId: string, - private readonly _options: ClientSampleEncodingOptions, - ) { - // empty - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: IceCandidatePair): Samples_ClientSample_IceCandidatePair { - this._visited = true; - - const result = new Samples_ClientSample_IceCandidatePair({ - candidatePairId: this.candidatePairId, - peerConnectionId: this._encodePeerConnectionId(sample.peerConnectionId), - availableIncomingBitrate: this._encodeAvailableIncomingBitrate(sample.availableIncomingBitrate), - availableOutgoingBitrate: this._encodeAvailableOutgoingBitrate(sample.availableOutgoingBitrate), - bytesDiscardedOnSend: this._encodeBytesDiscardedOnSend(sample.bytesDiscardedOnSend), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - bytesSent: this._encodeBytesSent(sample.bytesSent), - consentRequestsSent: this._encodeConsentRequestsSent(sample.consentRequestsSent), - currentRoundTripTime: this._encodeCurrentRoundTripTime(sample.currentRoundTripTime), - label: this._encodeLabel(sample.label), - lastPacketReceivedTimestamp: this._encodeLastPacketReceivedTimestamp(sample.lastPacketReceivedTimestamp), - lastPacketSentTimestamp: this._encodeLastPacketSentTimestamp(sample.lastPacketSentTimestamp), - localCandidateId: this._encodeLocalCandidateId(sample.localCandidateId), - nominated: this._encodeNominated(sample.nominated), - packetsDiscardedOnSend: this._encodePacketsDiscardedOnSend(sample.packetsDiscardedOnSend), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - remoteCandidateId: this._encodeRemoteCandidateId(sample.remoteCandidateId), - requestsReceived: this._encodeRequestsReceived(sample.requestsReceived), - requestsSent: this._encodeRequestsSent(sample.requestsSent), - responsesReceived: this._encodeResponsesReceived(sample.responsesReceived), - responsesSent: this._encodeResponsesSent(sample.responsesSent), - state: this._encodeState(sample.state), - totalRoundTripTime: this._encodeTotalRoundTripTime(sample.totalRoundTripTime), - transportId: this._encodeTransportId(sample.transportId), - }); - return result; -} - - private _encodePeerConnectionId(peerConnectionId?: string): Uint8Array | undefined { - if (!peerConnectionId) return; - if (peerConnectionId === this._peerConnectionId) return; - this._peerConnectionId = peerConnectionId; - return this._options.peerConnectionIdIsUuid - ? uuidToByteArray(this._peerConnectionId) - : stringToBytesArray(this._peerConnectionId) - ; - } - - private _encodeAvailableIncomingBitrate(availableIncomingBitrate?: number): number | undefined { - if (availableIncomingBitrate === undefined) return; - if (availableIncomingBitrate === this._availableIncomingBitrate) return; - this._availableIncomingBitrate = availableIncomingBitrate; - return this._availableIncomingBitrate; - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (!bytesReceived) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (!packetsReceived) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (!packetsSent) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - - private _encodeRemoteCandidateId(remoteCandidateId?: string): string | undefined { - if (!remoteCandidateId) return; - if (remoteCandidateId === this._remoteCandidateId) return; - this._remoteCandidateId = remoteCandidateId; - return this._remoteCandidateId; - } - - private _encodeRequestsReceived(requestsReceived?: number): number | undefined { - if (!requestsReceived) return; - if (requestsReceived === this._requestsReceived) return; - this._requestsReceived = requestsReceived; - return this._requestsReceived; - } - - private _encodeRequestsSent(requestsSent?: number): number | undefined { - if (!requestsSent) return; - if (requestsSent === this._requestsSent) return; - this._requestsSent = requestsSent; - return this._requestsSent; - } - - private _encodeResponsesReceived(responsesReceived?: number): number | undefined { - if (!responsesReceived) return; - if (responsesReceived === this._responsesReceived) return; - this._responsesReceived = responsesReceived; - return this._responsesReceived; - } - - private _encodeResponsesSent(responsesSent?: number): number | undefined { - if (!responsesSent) return; - if (responsesSent === this._responsesSent) return; - this._responsesSent = responsesSent; - return this._responsesSent; - } - - - private _encodeState(state?: string): string | undefined { - if (!state) return; - if (state === this._state) return; - this._state = state; - return this._state; - } - - private _encodeTotalRoundTripTime(totalRoundTripTime?: number): number | undefined { - if (totalRoundTripTime === undefined) return; - if (totalRoundTripTime === this._totalRoundTripTime) return; - this._totalRoundTripTime = totalRoundTripTime; - return this._totalRoundTripTime; - } - - private _encodeTransportId(transportId?: string): string | undefined { - if (!transportId) return; - if (transportId === this._transportId) return; - this._transportId = transportId; - return this._transportId; - } - - private _encodeAvailableOutgoingBitrate(availableOutgoingBitrate?: number): number | undefined { - if (availableOutgoingBitrate === undefined) return; - if (availableOutgoingBitrate === this._availableOutgoingBitrate) return; - this._availableOutgoingBitrate = availableOutgoingBitrate; - return this._availableOutgoingBitrate; - } - - private _encodeBytesDiscardedOnSend(bytesDiscardedOnSend?: number): bigint | undefined { - if (!bytesDiscardedOnSend) return; - if (bytesDiscardedOnSend === this._bytesDiscardedOnSend) return; - this._bytesDiscardedOnSend = bytesDiscardedOnSend; - return BigInt(this._bytesDiscardedOnSend); - } - - private _encodeConsentRequestsSent(consentRequestsSent?: number): number | undefined { - if (!consentRequestsSent) return; - if (consentRequestsSent === this._consentRequestsSent) return; - this._consentRequestsSent = consentRequestsSent; - return this._consentRequestsSent; - } - - private _encodeCurrentRoundTripTime(currentRoundTripTime?: number): number | undefined { - if (currentRoundTripTime === undefined) return; - if (currentRoundTripTime === this._currentRoundTripTime) return; - this._currentRoundTripTime = currentRoundTripTime; - return this._currentRoundTripTime; - } - - private _encodeLabel(label?: string): string | undefined { - if (!label) return; - if (label === this._label) return; - this._label = label; - return this._label; - } - - private _encodeLastPacketReceivedTimestamp(lastPacketReceivedTimestamp?: number): bigint | undefined { - if (lastPacketReceivedTimestamp === undefined) return; - if (lastPacketReceivedTimestamp === this._lastPacketReceivedTimestamp) return; - this._lastPacketReceivedTimestamp = lastPacketReceivedTimestamp; - return BigInt(this._lastPacketReceivedTimestamp); - } - - private _encodeLastPacketSentTimestamp(lastPacketSentTimestamp?: number): bigint | undefined { - if (lastPacketSentTimestamp === undefined) return; - if (lastPacketSentTimestamp === this._lastPacketSentTimestamp) return; - this._lastPacketSentTimestamp = lastPacketSentTimestamp; - return BigInt(this._lastPacketSentTimestamp); - } - - private _encodeLocalCandidateId(localCandidateId?: string): string | undefined { - if (!localCandidateId) return; - if (localCandidateId === this._localCandidateId) return; - this._localCandidateId = localCandidateId; - return this._localCandidateId; - } - - private _encodeNominated(nominated?: boolean): boolean | undefined { - if (nominated === undefined) return; - if (nominated === this._nominated) return; - this._nominated = nominated; - return this._nominated; - } - - private _encodePacketsDiscardedOnSend(packetsDiscardedOnSend?: number): number | undefined { - if (!packetsDiscardedOnSend) return; - if (packetsDiscardedOnSend === this._packetsDiscardedOnSend) return; - this._packetsDiscardedOnSend = packetsDiscardedOnSend; - return this._packetsDiscardedOnSend; - } -} diff --git a/npm-samples-encoder/src/IceCandidatePairStatsEncoder.ts b/npm-samples-encoder/src/IceCandidatePairStatsEncoder.ts new file mode 100644 index 00000000..b5e5d7e5 --- /dev/null +++ b/npm-samples-encoder/src/IceCandidatePairStatsEncoder.ts @@ -0,0 +1,157 @@ +import { BooleanToBooleanEncoder, Encoder, NumberToBigIntEncoder } from "./utils"; +import { IceCandidatePairStats, IceCandidatePairStats as InputIceCandidatePairStats } from "./InputSamples"; +import { + NumberToNumberEncoder, + StringToStringEncoder, + AppDataEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_IceCandidatePairStats } from "./OutputSamples"; +import { ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum } from "./OutputSamples"; + +export class IceCandidatePairEncoder implements Encoder { + private _visited = false; + + private readonly _availableIncomingBitrateEncoder: NumberToNumberEncoder; + private readonly _availableOutgoingBitrateEncoder: NumberToNumberEncoder; + private readonly _bytesDiscardedOnSendEncoder: NumberToBigIntEncoder; + private readonly _bytesReceivedEncoder: NumberToBigIntEncoder; + private readonly _bytesSentEncoder: NumberToBigIntEncoder; + private readonly _consentRequestsSentEncoder: NumberToNumberEncoder; + private readonly _currentRoundTripTimeEncoder: NumberToNumberEncoder; + private readonly _lastPacketReceivedTimestampEncoder: NumberToNumberEncoder; + private readonly _lastPacketSentTimestampEncoder: NumberToNumberEncoder; + private readonly _localCandidateIdEncoder: StringToStringEncoder; + private readonly _nominatedEncoder: BooleanToBooleanEncoder; + private readonly _packetsDiscardedOnSendEncoder: NumberToNumberEncoder; + private readonly _packetsReceivedEncoder: NumberToNumberEncoder; + private readonly _packetsSentEncoder: NumberToNumberEncoder; + private readonly _remoteCandidateIdEncoder: StringToStringEncoder; + private readonly _requestsReceivedEncoder: NumberToNumberEncoder; + private readonly _requestsSentEncoder: NumberToNumberEncoder; + private readonly _responsesReceivedEncoder: NumberToNumberEncoder; + private readonly _responsesSentEncoder: NumberToNumberEncoder; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _totalRoundTripTimeEncoder: NumberToNumberEncoder; + private readonly _transportIdEncoder: StringToStringEncoder; + private readonly _appDataEncoder: AppDataEncoder; + private readonly _stateEncoder: IceCandidatePairStatsEnumEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._availableIncomingBitrateEncoder = new NumberToNumberEncoder(); + this._availableOutgoingBitrateEncoder = new NumberToNumberEncoder(); + this._bytesDiscardedOnSendEncoder = new NumberToBigIntEncoder(); + this._bytesReceivedEncoder = new NumberToBigIntEncoder(); + this._bytesSentEncoder = new NumberToBigIntEncoder(); + this._consentRequestsSentEncoder = new NumberToNumberEncoder(); + this._currentRoundTripTimeEncoder = new NumberToNumberEncoder(); + this._lastPacketReceivedTimestampEncoder = new NumberToNumberEncoder(); + this._lastPacketSentTimestampEncoder = new NumberToNumberEncoder(); + this._localCandidateIdEncoder = new StringToStringEncoder(); + this._nominatedEncoder = new BooleanToBooleanEncoder(); + this._packetsDiscardedOnSendEncoder = new NumberToNumberEncoder(); + this._packetsReceivedEncoder = new NumberToNumberEncoder(); + this._packetsSentEncoder = new NumberToNumberEncoder(); + this._remoteCandidateIdEncoder = new StringToStringEncoder(); + this._requestsReceivedEncoder = new NumberToNumberEncoder(); + this._requestsSentEncoder = new NumberToNumberEncoder(); + this._responsesReceivedEncoder = new NumberToNumberEncoder(); + this._responsesSentEncoder = new NumberToNumberEncoder(); + this._timestampEncoder = new NumberToNumberEncoder(); + this._totalRoundTripTimeEncoder = new NumberToNumberEncoder(); + this._transportIdEncoder = new StringToStringEncoder(); + this._appDataEncoder = appDataEncoder; + this._stateEncoder = new IceCandidatePairStatsEnumEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._availableIncomingBitrateEncoder.reset(); + this._availableOutgoingBitrateEncoder.reset(); + this._bytesDiscardedOnSendEncoder.reset(); + this._bytesReceivedEncoder.reset(); + this._bytesSentEncoder.reset(); + this._consentRequestsSentEncoder.reset(); + this._currentRoundTripTimeEncoder.reset(); + this._lastPacketReceivedTimestampEncoder.reset(); + this._lastPacketSentTimestampEncoder.reset(); + this._localCandidateIdEncoder.reset(); + this._nominatedEncoder.reset(); + this._packetsDiscardedOnSendEncoder.reset(); + this._packetsReceivedEncoder.reset(); + this._packetsSentEncoder.reset(); + this._remoteCandidateIdEncoder.reset(); + this._requestsReceivedEncoder.reset(); + this._requestsSentEncoder.reset(); + this._responsesReceivedEncoder.reset(); + this._responsesSentEncoder.reset(); + this._timestampEncoder.reset(); + this._totalRoundTripTimeEncoder.reset(); + this._transportIdEncoder.reset(); + this._appDataEncoder.reset(); + this._stateEncoder.reset(); + } + + public encode(sample: InputIceCandidatePairStats): ClientSample_PeerConnectionSample_IceCandidatePairStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_IceCandidatePairStats({ + id: sample.id, + availableIncomingBitrate: this._availableIncomingBitrateEncoder.encode(sample.availableIncomingBitrate), + availableOutgoingBitrate: this._availableOutgoingBitrateEncoder.encode(sample.availableOutgoingBitrate), + bytesDiscardedOnSend: this._bytesDiscardedOnSendEncoder.encode(sample.bytesDiscardedOnSend), + bytesReceived: this._bytesReceivedEncoder.encode(sample.bytesReceived), + bytesSent: this._bytesSentEncoder.encode(sample.bytesSent), + consentRequestsSent: this._consentRequestsSentEncoder.encode(sample.consentRequestsSent), + currentRoundTripTime: this._currentRoundTripTimeEncoder.encode(sample.currentRoundTripTime), + lastPacketReceivedTimestamp: this._lastPacketReceivedTimestampEncoder.encode(sample.lastPacketReceivedTimestamp), + lastPacketSentTimestamp: this._lastPacketSentTimestampEncoder.encode(sample.lastPacketSentTimestamp), + localCandidateId: this._localCandidateIdEncoder.encode(sample.localCandidateId), + nominated: this._nominatedEncoder.encode(sample.nominated), + packetsDiscardedOnSend: this._packetsDiscardedOnSendEncoder.encode(sample.packetsDiscardedOnSend), + packetsReceived: this._packetsReceivedEncoder.encode(sample.packetsReceived), + packetsSent: this._packetsSentEncoder.encode(sample.packetsSent), + remoteCandidateId: this._remoteCandidateIdEncoder.encode(sample.remoteCandidateId), + requestsReceived: this._requestsReceivedEncoder.encode(sample.requestsReceived), + requestsSent: this._requestsSentEncoder.encode(sample.requestsSent), + responsesReceived: this._responsesReceivedEncoder.encode(sample.responsesReceived), + responsesSent: this._responsesSentEncoder.encode(sample.responsesSent), + timestamp: this._timestampEncoder.encode(sample.timestamp), + totalRoundTripTime: this._totalRoundTripTimeEncoder.encode(sample.totalRoundTripTime), + transportId: this._transportIdEncoder.encode(sample.transportId), + appData: this._appDataEncoder.encode(sample.appData), + state: this._stateEncoder.encode(sample.state), + }); + } +} + +export class IceCandidatePairStatsEnumEncoder implements Encoder['state'], ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum> { + + private _actualValue?: Required['state']; + + public reset() { + this._actualValue = undefined; + } + + public encode(state: IceCandidatePairStats['state']): ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum | undefined { + if (this._actualValue === state) return; + this._actualValue = state; + + switch (state) { + case 'new': + return ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum.NEW; + case 'inProgress': + return ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum.INPROGRESS; + case 'failed': + return ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum.FAILED; + case 'succeeded': + return ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum.SUCCEEDED; + default: + throw new Error(`Unknown IceCandidatePairStats state: ${state}`); + } + } +} \ No newline at end of file diff --git a/npm-samples-encoder/src/IceTransportEncoder.ts b/npm-samples-encoder/src/IceTransportEncoder.ts new file mode 100644 index 00000000..8224ab3b --- /dev/null +++ b/npm-samples-encoder/src/IceTransportEncoder.ts @@ -0,0 +1,105 @@ +import { Encoder, NumberToBigIntEncoder } from "./utils"; +import { IceTransportStats as InputIceTransportStats } from "./InputSamples"; +import { + NumberToNumberEncoder, + StringToStringEncoder, + AppDataEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_IceTransportStats } from "./OutputSamples"; + +export class IceTransportEncoder implements Encoder { + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _packetsSentEncoder: NumberToNumberEncoder; + private readonly _packetsReceivedEncoder: NumberToNumberEncoder; + private readonly _bytesSentEncoder: NumberToBigIntEncoder; + private readonly _bytesReceivedEncoder: NumberToBigIntEncoder; + private readonly _iceRoleEncoder: StringToStringEncoder; + private readonly _iceLocalUsernameFragmentEncoder: StringToStringEncoder; + private readonly _dtlsStateEncoder: StringToStringEncoder; + private readonly _iceStateEncoder: StringToStringEncoder; + private readonly _selectedCandidatePairIdEncoder: StringToStringEncoder; + private readonly _localCertificateIdEncoder: StringToStringEncoder; + private readonly _remoteCertificateIdEncoder: StringToStringEncoder; + private readonly _tlsVersionEncoder: StringToStringEncoder; + private readonly _dtlsCipherEncoder: StringToStringEncoder; + private readonly _dtlsRoleEncoder: StringToStringEncoder; + private readonly _srtpCipherEncoder: StringToStringEncoder; + private readonly _selectedCandidatePairChangesEncoder: NumberToNumberEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._packetsSentEncoder = new NumberToNumberEncoder(); + this._packetsReceivedEncoder = new NumberToNumberEncoder(); + this._bytesSentEncoder = new NumberToBigIntEncoder(); + this._bytesReceivedEncoder = new NumberToBigIntEncoder(); + this._iceRoleEncoder = new StringToStringEncoder(); + this._iceLocalUsernameFragmentEncoder = new StringToStringEncoder(); + this._dtlsStateEncoder = new StringToStringEncoder(); + this._iceStateEncoder = new StringToStringEncoder(); + this._selectedCandidatePairIdEncoder = new StringToStringEncoder(); + this._localCertificateIdEncoder = new StringToStringEncoder(); + this._remoteCertificateIdEncoder = new StringToStringEncoder(); + this._tlsVersionEncoder = new StringToStringEncoder(); + this._dtlsCipherEncoder = new StringToStringEncoder(); + this._dtlsRoleEncoder = new StringToStringEncoder(); + this._srtpCipherEncoder = new StringToStringEncoder(); + this._selectedCandidatePairChangesEncoder = new NumberToNumberEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset() { + this._timestampEncoder.reset(); + this._packetsSentEncoder.reset(); + this._packetsReceivedEncoder.reset(); + this._bytesSentEncoder.reset(); + this._bytesReceivedEncoder.reset(); + this._iceRoleEncoder.reset(); + this._iceLocalUsernameFragmentEncoder.reset(); + this._dtlsStateEncoder.reset(); + this._iceStateEncoder.reset(); + this._selectedCandidatePairIdEncoder.reset(); + this._localCertificateIdEncoder.reset(); + this._remoteCertificateIdEncoder.reset(); + this._tlsVersionEncoder.reset(); + this._dtlsCipherEncoder.reset(); + this._dtlsRoleEncoder.reset(); + this._srtpCipherEncoder.reset(); + this._selectedCandidatePairChangesEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(sample: InputIceTransportStats): ClientSample_PeerConnectionSample_IceTransportStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_IceTransportStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: sample.id, + packetsSent: this._packetsSentEncoder.encode(sample.packetsSent), + packetsReceived: this._packetsReceivedEncoder.encode(sample.packetsReceived), + bytesSent: this._bytesSentEncoder.encode(sample.bytesSent), + bytesReceived: this._bytesReceivedEncoder.encode(sample.bytesReceived), + iceRole: this._iceRoleEncoder.encode(sample.iceRole), + iceLocalUsernameFragment: this._iceLocalUsernameFragmentEncoder.encode(sample.iceLocalUsernameFragment), + dtlsState: this._dtlsStateEncoder.encode(sample.dtlsState), + iceState: this._iceStateEncoder.encode(sample.iceState), + selectedCandidatePairId: this._selectedCandidatePairIdEncoder.encode(sample.selectedCandidatePairId), + localCertificateId: this._localCertificateIdEncoder.encode(sample.localCertificateId), + remoteCertificateId: this._remoteCertificateIdEncoder.encode(sample.remoteCertificateId), + tlsVersion: this._tlsVersionEncoder.encode(sample.tlsVersion), + dtlsCipher: this._dtlsCipherEncoder.encode(sample.dtlsCipher), + dtlsRole: this._dtlsRoleEncoder.encode(sample.dtlsRole), + srtpCipher: this._srtpCipherEncoder.encode(sample.srtpCipher), + selectedCandidatePairChanges: this._selectedCandidatePairChangesEncoder.encode(sample.selectedCandidatePairChanges), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/InboundAudioTrackEncoder.ts b/npm-samples-encoder/src/InboundAudioTrackEncoder.ts deleted file mode 100644 index b4b544de..00000000 --- a/npm-samples-encoder/src/InboundAudioTrackEncoder.ts +++ /dev/null @@ -1,410 +0,0 @@ -import { InboundAudioTrack } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_InboundAudioTrack } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class InboundAudioTrackEncoder { - private readonly _ssrc?: bigint; - private readonly _trackId: Uint8Array; - private _peerConnectionId?: string; - private _remoteClientId?: string; - private _sfuStreamId?: string; - private _sfuSinkId?: string; - private _packetsReceived?: number; - private _packetsLost?: number; - private _jitter?: number; - private _lastPacketReceivedTimestamp?: number; - private _headerBytesReceived?: number; - private _packetsDiscarded?: number; - private _fecPacketsReceived?: number; - private _fecPacketsDiscarded?: number; - private _bytesReceived?: number; - private _nackCount?: number; - private _totalProcessingDelay?: number; - private _estimatedPlayoutTimestamp?: number; - private _jitterBufferDelay?: number; - private _jitterBufferTargetDelay?: number; - private _jitterBufferEmittedCount?: number; - private _jitterBufferMinimumDelay?: number; - private _totalSamplesReceived?: number; - private _concealedSamples?: number; - private _silentConcealedSamples?: number; - private _concealmentEvents?: number; - private _insertedSamplesForDeceleration?: number; - private _removedSamplesForAcceleration?: number; - private _audioLevel?: number; - private _totalAudioEnergy?: number; - private _totalSamplesDuration?: number; - private _decoderImplementation?: string; - private _packetsSent?: number; - private _bytesSent?: number; - private _remoteTimestamp?: number; - private _reportsSent?: number; - private _roundTripTime?: number; - private _totalRoundTripTime?: number; - private _roundTripTimeMeasurements?: number; - private _synthesizedSamplesDuration?: number; - private _synthesizedSamplesEvents?: number; - private _totalPlayoutDelay?: number; - private _totalSamplesCount?: number; - private _visited = false; - - public constructor( - public readonly trackId: string, - public readonly ssrc: number, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._trackId = this._options.trackIdIsUuid ? uuidToByteArray(trackId) : stringToBytesArray(trackId); - this._ssrc = BigInt(ssrc); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: InboundAudioTrack): Samples_ClientSample_InboundAudioTrack { - this._visited = true; - - const result = new Samples_ClientSample_InboundAudioTrack({ - trackId: this._trackId, - ssrc: this._ssrc, - audioLevel: this._encodeAudioLevel(sample.audioLevel), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - bytesSent: this._encodeBytesSent(sample.bytesSent), - concealedSamples: this._encodeConcealedSamples(sample.concealedSamples), - concealmentEvents: this._encodeConcealmentEvents(sample.concealmentEvents), - decoderImplementation: this._encodeDecoderImplementation(sample.decoderImplementation), - estimatedPlayoutTimestamp: this._encodeEstimatedPlayoutTimestamp(sample.estimatedPlayoutTimestamp), - fecPacketsDiscarded: this._encodeFecPacketsDiscarded(sample.fecPacketsDiscarded), - fecPacketsReceived: this._encodeFecPacketsReceived(sample.fecPacketsReceived), - headerBytesReceived: this._encodeHeaderBytesReceived(sample.headerBytesReceived), - insertedSamplesForDeceleration: this._encodeInsertedSamplesForDeceleration(sample.insertedSamplesForDeceleration), - jitter: this._encodeJitter(sample.jitter), - jitterBufferDelay: this._encodeJitterBufferDelay(sample.jitterBufferDelay), - jitterBufferEmittedCount: this._encodeJitterBufferEmittedCount(sample.jitterBufferEmittedCount), - jitterBufferMinimumDelay: this._encodeJitterBufferMinimumDelay(sample.jitterBufferMinimumDelay), - jitterBufferTargetDelay: this._encodeJitterBufferTargetDelay(sample.jitterBufferTargetDelay), - lastPacketReceivedTimestamp: this._encodeLastPacketReceivedTimestamp(sample.lastPacketReceivedTimestamp), - nackCount: this._encodeNackCount(sample.nackCount), - totalProcessingDelay: this._encodeTotalProcessingDelay(sample.totalProcessingDelay), - packetsDiscarded: this._encodePacketsDiscarded(sample.packetsDiscarded), - packetsLost: this._encodePacketsLost(sample.packetsLost), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - peerConnectionId: this._encodePeerConnectionId(sample.peerConnectionId), - remoteClientId: this._encodeRemoteClientId(sample.remoteClientId), - remoteTimestamp: this._encodeRemoteTimestamp(sample.remoteTimestamp), - removedSamplesForAcceleration: this._encodeRemovedSamplesForAcceleration(sample.removedSamplesForAcceleration), - reportsSent: this._encodeReportsSent(sample.reportsSent), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime), - roundTripTimeMeasurements: this._encodeRoundTripTimeMeasurements(sample.roundTripTimeMeasurements), - sfuSinkId: this._encodeSfuSinkId(sample.sfuSinkId), - sfuStreamId: this._encodeSfuStreamId(sample.sfuStreamId), - silentConcealedSamples: this._encodeSilentConcealedSamples(sample.silentConcealedSamples), - synthesizedSamplesDuration: this._encodeSynthesizedSamplesDuration(sample.synthesizedSamplesDuration), - synthesizedSamplesEvents: this._encodeSynthesizedSamplesEvents(sample.synthesizedSamplesEvents), - totalAudioEnergy: this._encodeTotalAudioEnergy(sample.totalAudioEnergy), - totalPlayoutDelay: this._encodeTotalPlayoutDelay(sample.totalPlayoutDelay), - totalRoundTripTime: this._encodeTotalRoundTripTime(sample.totalRoundTripTime), - totalSamplesCount: this._encodeTotalSamplesCount(sample.totalSamplesCount), - totalSamplesDuration: this._encodeTotalSamplesDuration(sample.totalSamplesDuration), - totalSamplesReceived: this._encodeTotalSamplesReceived(sample.totalSamplesReceived), - }); - return result; - } - - private _encodeAudioLevel(audioLevel?: number): number | undefined { - if (!audioLevel) return; - if (audioLevel === this._audioLevel) return; - this._audioLevel = audioLevel; - return this._audioLevel; - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (bytesReceived === undefined) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeFecPacketsDiscarded(fecPacketsDiscarded?: number): number | undefined { - if (fecPacketsDiscarded === undefined) return; - if (fecPacketsDiscarded === this._fecPacketsDiscarded) return; - this._fecPacketsDiscarded = fecPacketsDiscarded; - return this._fecPacketsDiscarded; - } - - private _encodeFecPacketsReceived(fecPacketsReceived?: number): number | undefined { - if (fecPacketsReceived === undefined) return; - if (fecPacketsReceived === this._fecPacketsReceived) return; - this._fecPacketsReceived = fecPacketsReceived; - return this._fecPacketsReceived; - } - - private _encodeHeaderBytesReceived(headerBytesReceived?: number): bigint | undefined { - if (headerBytesReceived === undefined) return; - if (headerBytesReceived === this._headerBytesReceived) return; - this._headerBytesReceived = headerBytesReceived; - return BigInt(this._headerBytesReceived); - } - - private _encodeInsertedSamplesForDeceleration(insertedSamplesForDeceleration?: number): number | undefined { - if (insertedSamplesForDeceleration === undefined) return; - if (insertedSamplesForDeceleration === this._insertedSamplesForDeceleration) return; - this._insertedSamplesForDeceleration = insertedSamplesForDeceleration; - return this._insertedSamplesForDeceleration; - } - - private _encodeJitter(jitter?: number): number | undefined { - if (jitter === undefined) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodeJitterBufferDelay(jitterBufferDelay?: number): number | undefined { - if (jitterBufferDelay === undefined) return; - if (jitterBufferDelay === this._jitterBufferDelay) return; - this._jitterBufferDelay = jitterBufferDelay; - return this._jitterBufferDelay; - } - - private _encodeJitterBufferEmittedCount(jitterBufferEmittedCount?: number): number | undefined { - if (jitterBufferEmittedCount === undefined) return; - if (jitterBufferEmittedCount === this._jitterBufferEmittedCount) return; - this._jitterBufferEmittedCount = jitterBufferEmittedCount; - return this._jitterBufferEmittedCount; - } - - private _encodeJitterBufferMinimumDelay(jitterBufferMinimumDelay?: number): number | undefined { - if (jitterBufferMinimumDelay === undefined) return; - if (jitterBufferMinimumDelay === this._jitterBufferMinimumDelay) return; - this._jitterBufferMinimumDelay = jitterBufferMinimumDelay; - return this._jitterBufferMinimumDelay; - } - - private _encodeJitterBufferTargetDelay(jitterBufferTargetDelay?: number): number | undefined { - if (jitterBufferTargetDelay === undefined) return; - if (jitterBufferTargetDelay === this._jitterBufferTargetDelay) return; - this._jitterBufferTargetDelay = jitterBufferTargetDelay; - return this._jitterBufferTargetDelay; - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (bytesSent === undefined) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeConcealedSamples(concealedSamples?: number): number | undefined { - if (concealedSamples === undefined) return; - if (concealedSamples === this._concealedSamples) return; - this._concealedSamples = concealedSamples; - return this._concealedSamples; - } - - private _encodeConcealmentEvents(concealmentEvents?: number): number | undefined { - if (concealmentEvents === undefined) return; - if (concealmentEvents === this._concealmentEvents) return; - this._concealmentEvents = concealmentEvents; - return this._concealmentEvents; - } - - private _encodeDecoderImplementation(decoderImplementation?: string): string | undefined { - if (!decoderImplementation) return; - if (decoderImplementation === this._decoderImplementation) return; - this._decoderImplementation = decoderImplementation; - return this._decoderImplementation; - } - - private _encodeEstimatedPlayoutTimestamp(estimatedPlayoutTimestamp?: number): bigint | undefined { - if (estimatedPlayoutTimestamp === undefined) return; - if (estimatedPlayoutTimestamp === this._estimatedPlayoutTimestamp) return; - this._estimatedPlayoutTimestamp = estimatedPlayoutTimestamp; - return BigInt(this._estimatedPlayoutTimestamp); - } - - private _encodeLastPacketReceivedTimestamp(lastPacketReceivedTimestamp?: number): bigint | undefined { - if (lastPacketReceivedTimestamp === undefined) return; - if (lastPacketReceivedTimestamp === this._lastPacketReceivedTimestamp) return; - this._lastPacketReceivedTimestamp = lastPacketReceivedTimestamp; - return BigInt(this._lastPacketReceivedTimestamp); - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (nackCount === undefined) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodeTotalProcessingDelay(totalProcessingDelay?: number): number | undefined { - if (totalProcessingDelay === undefined) return; - if (totalProcessingDelay === this._totalProcessingDelay) return; - this._totalProcessingDelay = totalProcessingDelay; - return this._totalProcessingDelay; - } - - private _encodePacketsDiscarded(packetsDiscarded?: number): number | undefined { - if (packetsDiscarded === undefined) return; - if (packetsDiscarded === this._packetsDiscarded) return; - this._packetsDiscarded = packetsDiscarded; - return this._packetsDiscarded; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (packetsLost === undefined) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (packetsReceived === undefined) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (packetsSent === undefined) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodePeerConnectionId(peerConnectionId?: string): Uint8Array | undefined { - if (!peerConnectionId) return; - if (peerConnectionId === this._peerConnectionId) return; - this._peerConnectionId = peerConnectionId; - return this._options.peerConnectionIdIsUuid ? uuidToByteArray(this._peerConnectionId) : stringToBytesArray(this._peerConnectionId); - } - - private _encodeRemoteClientId(remoteClientId?: string): Uint8Array | undefined { - if (!remoteClientId) return; - if (remoteClientId === this._remoteClientId) return; - this._remoteClientId = remoteClientId; - return this._options.clientIdIsUuid ? uuidToByteArray(this._remoteClientId) : stringToBytesArray(this._remoteClientId); - } - - private _encodeRemoteTimestamp(remoteTimestamp?: number): bigint | undefined { - if (remoteTimestamp === undefined) return; - if (remoteTimestamp === this._remoteTimestamp) return; - this._remoteTimestamp = remoteTimestamp; - return BigInt(this._remoteTimestamp); - } - - private _encodeRemovedSamplesForAcceleration(removedSamplesForAcceleration?: number): number | undefined { - if (removedSamplesForAcceleration === undefined) return; - if (removedSamplesForAcceleration === this._removedSamplesForAcceleration) return; - this._removedSamplesForAcceleration = removedSamplesForAcceleration; - return this._removedSamplesForAcceleration; - } - - private _encodeReportsSent(reportsSent?: number): number | undefined { - if (reportsSent === undefined) return; - if (reportsSent === this._reportsSent) return; - this._reportsSent = reportsSent; - return this._reportsSent; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (roundTripTime === undefined) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodeRoundTripTimeMeasurements(roundTripTimeMeasurements?: number): number | undefined { - if (roundTripTimeMeasurements === undefined) return; - if (roundTripTimeMeasurements === this._roundTripTimeMeasurements) return; - this._roundTripTimeMeasurements = roundTripTimeMeasurements; - return this._roundTripTimeMeasurements; - } - - private _encodeSfuSinkId(sfuSinkId?: string): Uint8Array | undefined { - if (!sfuSinkId) return; - if (sfuSinkId === this._sfuSinkId) return; - this._sfuSinkId = sfuSinkId; - return this._options.sfuSinkIdIsUuid - ? uuidToByteArray(this._sfuSinkId) - : stringToBytesArray(this._sfuSinkId) - ; - } - - private _encodeSfuStreamId(sfuStreamId?: string): Uint8Array | undefined { - if (!sfuStreamId) return; - if (sfuStreamId === this._sfuStreamId) return; - this._sfuStreamId = sfuStreamId; - return this._options.sfuStreamIdIsUuid - ? uuidToByteArray(this._sfuStreamId) - : stringToBytesArray(this._sfuStreamId) - ; - } - - private _encodeSilentConcealedSamples(silentConcealedSamples?: number): number | undefined { - if (silentConcealedSamples === undefined) return; - if (silentConcealedSamples === this._silentConcealedSamples) return; - this._silentConcealedSamples = silentConcealedSamples; - return this._silentConcealedSamples; - } - - private _encodeSynthesizedSamplesDuration(synthesizedSamplesDuration?: number): number | undefined { - if (synthesizedSamplesDuration === undefined) return; - if (synthesizedSamplesDuration === this._synthesizedSamplesDuration) return; - this._synthesizedSamplesDuration = synthesizedSamplesDuration; - return this._synthesizedSamplesDuration; - } - - private _encodeTotalAudioEnergy(totalAudioEnergy?: number): number | undefined { - if (totalAudioEnergy === undefined) return; - if (totalAudioEnergy === this._totalAudioEnergy) return; - this._totalAudioEnergy = totalAudioEnergy; - return this._totalAudioEnergy; - } - - private _encodeTotalPlayoutDelay(totalPlayoutDelay?: number): number | undefined { - if (totalPlayoutDelay === undefined) return; - if (totalPlayoutDelay === this._totalPlayoutDelay) return; - this._totalPlayoutDelay = totalPlayoutDelay; - return this._totalPlayoutDelay; - } - - private _encodeSynthesizedSamplesEvents(synthesizedSamplesEvents?: number): number | undefined { - if (synthesizedSamplesEvents === undefined) return; - if (synthesizedSamplesEvents === this._synthesizedSamplesEvents) return; - this._synthesizedSamplesEvents = synthesizedSamplesEvents; - return this._synthesizedSamplesEvents; - } - - private _encodeTotalRoundTripTime(totalRoundTripTime?: number): number | undefined { - if (totalRoundTripTime === undefined) return; - if (totalRoundTripTime === this._totalRoundTripTime) return; - this._totalRoundTripTime = totalRoundTripTime; - return this._totalRoundTripTime; - } - - private _encodeTotalSamplesCount(totalSamplesCount?: number): number | undefined { - if (totalSamplesCount === undefined) return; - if (totalSamplesCount === this._totalSamplesCount) return; - this._totalSamplesCount = totalSamplesCount; - return this._totalSamplesCount; - } - - private _encodeTotalSamplesDuration(totalSamplesDuration?: number): number | undefined { - if (totalSamplesDuration === undefined) return; - if (totalSamplesDuration === this._totalSamplesDuration) return; - this._totalSamplesDuration = totalSamplesDuration; - return this._totalSamplesDuration; - } - - private _encodeTotalSamplesReceived(totalSamplesReceived?: number): number | undefined { - if (totalSamplesReceived === undefined) return; - if (totalSamplesReceived === this._totalSamplesReceived) return; - this._totalSamplesReceived = totalSamplesReceived; - return this._totalSamplesReceived; - } -} diff --git a/npm-samples-encoder/src/InboundRtpEncoder.ts b/npm-samples-encoder/src/InboundRtpEncoder.ts new file mode 100644 index 00000000..420a8778 --- /dev/null +++ b/npm-samples-encoder/src/InboundRtpEncoder.ts @@ -0,0 +1,302 @@ +import { + AppDataEncoder, + BooleanToBooleanEncoder, + NumberToBigIntEncoder, + NumberToNumberEncoder, + OneTimePassEncoder, + StringToStringEncoder +} from "./utils"; +import { ClientSample_PeerConnectionSample_InboundRtpStats } from './OutputSamples'; +import { Encoder } from "./utils"; +import { InboundRtpStats } from "./InputSamples"; + +export class InboundRtpEncoder implements Encoder { + private readonly _ssrc: bigint; + private _visited = false; + + private readonly _idEncoder: StringToStringEncoder; + private readonly _kindEncoder: StringToStringEncoder; + // private readonly _peerConnectionIdEncoder: Encoder; + private readonly _timestampEncoder: Encoder; + // private readonly _trackIdentifierEncoder: Encoder; + // private readonly _appDataEncoder: Encoder; + private readonly _audioLevelEncoder: NumberToNumberEncoder; + private readonly _bytesReceivedEncoder: Encoder; + private readonly _codecIdEncoder: OneTimePassEncoder; + private readonly _concealedSamplesEncoder: NumberToNumberEncoder; + private readonly _concealmentEventsEncoder: NumberToNumberEncoder; + private readonly _corruptionMeasurementsEncoder: NumberToNumberEncoder; + private readonly _decoderImplementationEncoder: StringToStringEncoder; + private readonly _estimatedPlayoutTimestampEncoder: NumberToNumberEncoder; + private readonly _fecBytesReceivedEncoder: Encoder; + private readonly _fecPacketsDiscardedEncoder: NumberToNumberEncoder; + private readonly _fecPacketsReceivedEncoder: NumberToNumberEncoder; + private readonly _fecSsrcEncoder: Encoder; + private readonly _firCountEncoder: NumberToNumberEncoder; + private readonly _frameHeightEncoder: NumberToNumberEncoder; + private readonly _frameWidthEncoder: NumberToNumberEncoder; + private readonly _framesAssembledFromMultiplePacketsEncoder: NumberToNumberEncoder; + private readonly _framesDecodedEncoder: NumberToNumberEncoder; + private readonly _framesDroppedEncoder: NumberToNumberEncoder; + private readonly _framesPerSecondEncoder: NumberToNumberEncoder; + private readonly _framesReceivedEncoder: NumberToNumberEncoder; + private readonly _framesRenderedEncoder: NumberToNumberEncoder; + private readonly _freezeCountEncoder: NumberToNumberEncoder; + private readonly _headerBytesReceivedEncoder: Encoder; + private readonly _insertedSamplesForDecelerationEncoder: NumberToNumberEncoder; + private readonly _jitterEncoder: NumberToNumberEncoder; + private readonly _jitterBufferDelayEncoder: NumberToNumberEncoder; + private readonly _jitterBufferEmittedCountEncoder: NumberToNumberEncoder; + private readonly _jitterBufferMinimumDelayEncoder: NumberToNumberEncoder; + private readonly _jitterBufferTargetDelayEncoder: NumberToNumberEncoder; + private readonly _keyFramesDecodedEncoder: NumberToNumberEncoder; + private readonly _lastPacketReceivedTimestampEncoder: NumberToNumberEncoder; + private readonly _midEncoder: OneTimePassEncoder; + private readonly _nackCountEncoder: NumberToNumberEncoder; + private readonly _packetsDiscardedEncoder: NumberToNumberEncoder; + private readonly _packetsLostEncoder: NumberToNumberEncoder; + private readonly _packetsReceivedEncoder: NumberToNumberEncoder; + private readonly _pauseCountEncoder: NumberToNumberEncoder; + private readonly _pliCountEncoder: NumberToNumberEncoder; + private readonly _playoutIdEncoder: StringToStringEncoder; + private readonly _powerEfficientDecoderEncoder: BooleanToBooleanEncoder; + private readonly _qpSumEncoder: NumberToNumberEncoder; + private readonly _remoteIdEncoder: StringToStringEncoder; + private readonly _removedSamplesForAccelerationEncoder: NumberToNumberEncoder; + private readonly _retransmittedBytesReceivedEncoder: NumberToBigIntEncoder; + private readonly _retransmittedPacketsReceivedEncoder: NumberToNumberEncoder; + private readonly _rtxSsrcEncoder: NumberToBigIntEncoder; + private readonly _silentConcealedSamplesEncoder: NumberToNumberEncoder; + private readonly _totalAssemblyTimeEncoder: NumberToNumberEncoder; + private readonly _totalAudioEnergyEncoder: NumberToNumberEncoder; + private readonly _totalCorruptionProbabilityEncoder: NumberToNumberEncoder; + private readonly _totalDecodeTimeEncoder: NumberToNumberEncoder; + private readonly _totalFreezesDurationEncoder: NumberToNumberEncoder; + private readonly _totalInterFrameDelayEncoder: NumberToNumberEncoder; + private readonly _totalPausesDurationEncoder: NumberToNumberEncoder; + private readonly _totalProcessingDelayEncoder: NumberToNumberEncoder; + private readonly _totalSamplesDurationEncoder: NumberToNumberEncoder; + private readonly _totalSamplesReceivedEncoder: NumberToNumberEncoder; + private readonly _totalSquaredCorruptionProbabilityEncoder: NumberToNumberEncoder; + private readonly _totalSquaredInterFrameDelayEncoder: NumberToNumberEncoder; + private readonly _transportIdEncoder: OneTimePassEncoder; + + constructor( + ssrc: number, + private readonly _trackIdentifierEncoder: Encoder, + private _appDataEncoder: AppDataEncoder, + ) { + this._ssrc = BigInt(ssrc); + this._idEncoder = new StringToStringEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._timestampEncoder = new NumberToBigIntEncoder(); + this._audioLevelEncoder = new NumberToNumberEncoder(); + this._bytesReceivedEncoder = new NumberToBigIntEncoder(); + this._codecIdEncoder = new OneTimePassEncoder(); + this._concealedSamplesEncoder = new NumberToNumberEncoder(); + this._concealmentEventsEncoder = new NumberToNumberEncoder(); + this._corruptionMeasurementsEncoder = new NumberToNumberEncoder(); + this._decoderImplementationEncoder = new StringToStringEncoder(); + this._estimatedPlayoutTimestampEncoder = new NumberToNumberEncoder(); + this._fecBytesReceivedEncoder = new NumberToBigIntEncoder(); + this._fecPacketsDiscardedEncoder = new NumberToNumberEncoder(); + this._fecPacketsReceivedEncoder = new NumberToNumberEncoder(); + this._fecSsrcEncoder = new NumberToBigIntEncoder(); + this._firCountEncoder = new NumberToNumberEncoder(); + this._frameHeightEncoder = new NumberToNumberEncoder(); + this._frameWidthEncoder = new NumberToNumberEncoder(); + this._framesAssembledFromMultiplePacketsEncoder = new NumberToNumberEncoder(); + this._framesDecodedEncoder = new NumberToNumberEncoder(); + this._framesDroppedEncoder = new NumberToNumberEncoder(); + this._framesPerSecondEncoder = new NumberToNumberEncoder(); + this._framesReceivedEncoder = new NumberToNumberEncoder(); + this._framesRenderedEncoder = new NumberToNumberEncoder(); + this._freezeCountEncoder = new NumberToNumberEncoder(); + this._headerBytesReceivedEncoder = new NumberToBigIntEncoder(); + this._insertedSamplesForDecelerationEncoder = new NumberToNumberEncoder(); + this._jitterEncoder = new NumberToNumberEncoder(); + this._jitterBufferDelayEncoder = new NumberToNumberEncoder(); + this._jitterBufferEmittedCountEncoder = new NumberToNumberEncoder(); + this._jitterBufferMinimumDelayEncoder = new NumberToNumberEncoder(); + this._jitterBufferTargetDelayEncoder = new NumberToNumberEncoder(); + this._keyFramesDecodedEncoder = new NumberToNumberEncoder(); + this._lastPacketReceivedTimestampEncoder = new NumberToNumberEncoder(); + this._midEncoder = new OneTimePassEncoder(); + this._nackCountEncoder = new NumberToNumberEncoder(); + this._packetsDiscardedEncoder = new NumberToNumberEncoder(); + this._packetsLostEncoder = new NumberToNumberEncoder(); + this._packetsReceivedEncoder = new NumberToNumberEncoder(); + this._pauseCountEncoder = new NumberToNumberEncoder(); + this._pliCountEncoder = new NumberToNumberEncoder(); + this._playoutIdEncoder = new StringToStringEncoder(); + this._powerEfficientDecoderEncoder = new BooleanToBooleanEncoder(); + this._qpSumEncoder = new NumberToNumberEncoder(); + this._remoteIdEncoder = new StringToStringEncoder(); + this._removedSamplesForAccelerationEncoder = new NumberToNumberEncoder(); + this._retransmittedBytesReceivedEncoder = new NumberToBigIntEncoder(); + this._retransmittedPacketsReceivedEncoder = new NumberToNumberEncoder(); + this._rtxSsrcEncoder = new NumberToBigIntEncoder(); + this._silentConcealedSamplesEncoder = new NumberToNumberEncoder(); + this._totalAssemblyTimeEncoder = new NumberToNumberEncoder(); + this._totalAudioEnergyEncoder = new NumberToNumberEncoder(); + this._totalCorruptionProbabilityEncoder = new NumberToNumberEncoder(); + this._totalDecodeTimeEncoder = new NumberToNumberEncoder(); + this._totalFreezesDurationEncoder = new NumberToNumberEncoder(); + this._totalInterFrameDelayEncoder = new NumberToNumberEncoder(); + this._totalPausesDurationEncoder = new NumberToNumberEncoder(); + this._totalProcessingDelayEncoder = new NumberToNumberEncoder(); + this._totalSamplesDurationEncoder = new NumberToNumberEncoder(); + this._totalSamplesReceivedEncoder = new NumberToNumberEncoder(); + this._totalSquaredCorruptionProbabilityEncoder = new NumberToNumberEncoder(); + this._totalSquaredInterFrameDelayEncoder = new NumberToNumberEncoder(); + this._transportIdEncoder = new OneTimePassEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset() { + this._idEncoder.reset(); + this._kindEncoder.reset(); + this._timestampEncoder.reset(); + this._audioLevelEncoder.reset(); + this._bytesReceivedEncoder.reset(); + this._codecIdEncoder.reset(); + this._concealedSamplesEncoder.reset(); + this._concealmentEventsEncoder.reset(); + this._corruptionMeasurementsEncoder.reset(); + this._decoderImplementationEncoder.reset(); + this._estimatedPlayoutTimestampEncoder.reset(); + this._fecBytesReceivedEncoder.reset(); + this._fecPacketsDiscardedEncoder.reset(); + this._fecPacketsReceivedEncoder.reset(); + this._fecSsrcEncoder.reset(); + this._firCountEncoder.reset(); + this._frameHeightEncoder.reset(); + this._frameWidthEncoder.reset(); + this._framesAssembledFromMultiplePacketsEncoder.reset(); + this._framesDecodedEncoder.reset(); + this._framesDroppedEncoder.reset(); + this._framesPerSecondEncoder.reset(); + this._framesReceivedEncoder.reset(); + this._framesRenderedEncoder.reset(); + this._freezeCountEncoder.reset(); + this._headerBytesReceivedEncoder.reset(); + this._insertedSamplesForDecelerationEncoder.reset(); + this._jitterEncoder.reset(); + this._jitterBufferDelayEncoder.reset(); + this._jitterBufferEmittedCountEncoder.reset(); + this._jitterBufferMinimumDelayEncoder.reset(); + this._jitterBufferTargetDelayEncoder.reset(); + this._keyFramesDecodedEncoder.reset(); + this._lastPacketReceivedTimestampEncoder.reset(); + this._midEncoder.reset(); + this._nackCountEncoder.reset(); + this._packetsDiscardedEncoder.reset(); + this._packetsLostEncoder.reset(); + this._packetsReceivedEncoder.reset(); + this._pauseCountEncoder.reset(); + this._pliCountEncoder.reset(); + this._playoutIdEncoder.reset(); + this._powerEfficientDecoderEncoder.reset(); + this._qpSumEncoder.reset(); + this._remoteIdEncoder.reset(); + this._removedSamplesForAccelerationEncoder.reset(); + this._retransmittedBytesReceivedEncoder.reset(); + this._retransmittedPacketsReceivedEncoder.reset(); + this._rtxSsrcEncoder.reset(); + this._silentConcealedSamplesEncoder.reset(); + this._totalAssemblyTimeEncoder.reset(); + this._totalAudioEnergyEncoder.reset(); + this._totalCorruptionProbabilityEncoder.reset(); + this._totalDecodeTimeEncoder.reset(); + this._totalFreezesDurationEncoder.reset(); + this._totalInterFrameDelayEncoder.reset(); + this._totalPausesDurationEncoder.reset(); + this._totalProcessingDelayEncoder.reset(); + this._totalSamplesDurationEncoder.reset(); + this._totalSamplesReceivedEncoder.reset(); + this._totalSquaredCorruptionProbabilityEncoder.reset(); + this._totalSquaredInterFrameDelayEncoder.reset(); + this._transportIdEncoder.reset(); + } + + public encode(sample: InboundRtpStats): ClientSample_PeerConnectionSample_InboundRtpStats { + this._visited = true; + + const result = new ClientSample_PeerConnectionSample_InboundRtpStats({ + ssrc: this._ssrc, + trackIdentifier: this._trackIdentifierEncoder.encode(sample.trackIdentifier), + + appData: this._appDataEncoder.encode(sample.appData), + id: this._idEncoder.encode(sample.id), + kind: this._kindEncoder.encode(sample.kind), + timestamp: this._timestampEncoder.encode(sample.timestamp), + audioLevel: this._audioLevelEncoder.encode(sample.audioLevel), + bytesReceived: this._bytesReceivedEncoder.encode(sample.bytesReceived), + codecId: this._codecIdEncoder.encode(sample.codecId), + concealedSamples: this._concealedSamplesEncoder.encode(sample.concealedSamples), + concealmentEvents: this._concealmentEventsEncoder.encode(sample.concealmentEvents), + corruptionMeasurements: this._corruptionMeasurementsEncoder.encode(sample.corruptionMeasurements), + decoderImplementation: this._decoderImplementationEncoder.encode(sample.decoderImplementation), + estimatedPlayoutTimestamp: this._estimatedPlayoutTimestampEncoder.encode(sample.estimatedPlayoutTimestamp), + fecBytesReceived: this._fecBytesReceivedEncoder.encode(sample.fecBytesReceived), + fecPacketsDiscarded: this._fecPacketsDiscardedEncoder.encode(sample.fecPacketsDiscarded), + fecPacketsReceived: this._fecPacketsReceivedEncoder.encode(sample.fecPacketsReceived), + fecSsrc: this._fecSsrcEncoder.encode(sample.fecSsrc), + firCount: this._firCountEncoder.encode(sample.firCount), + frameHeight: this._frameHeightEncoder.encode(sample.frameHeight), + frameWidth: this._frameWidthEncoder.encode(sample.frameWidth), + framesAssembledFromMultiplePackets: this._framesAssembledFromMultiplePacketsEncoder.encode(sample.framesAssembledFromMultiplePackets), + framesDecoded: this._framesDecodedEncoder.encode(sample.framesDecoded), + framesDropped: this._framesDroppedEncoder.encode(sample.framesDropped), + framesPerSecond: this._framesPerSecondEncoder.encode(sample.framesPerSecond), + framesReceived: this._framesReceivedEncoder.encode(sample.framesReceived), + framesRendered: this._framesRenderedEncoder.encode(sample.framesRendered), + freezeCount: this._freezeCountEncoder.encode(sample.freezeCount), + headerBytesReceived: this._headerBytesReceivedEncoder.encode(sample.headerBytesReceived), + insertedSamplesForDeceleration: this._insertedSamplesForDecelerationEncoder.encode(sample.insertedSamplesForDeceleration), + jitter: this._jitterEncoder.encode(sample.jitter), + jitterBufferDelay: this._jitterBufferDelayEncoder.encode(sample.jitterBufferDelay), + jitterBufferEmittedCount: this._jitterBufferEmittedCountEncoder.encode(sample.jitterBufferEmittedCount), + jitterBufferMinimumDelay: this._jitterBufferMinimumDelayEncoder.encode(sample.jitterBufferMinimumDelay), + jitterBufferTargetDelay: this._jitterBufferTargetDelayEncoder.encode(sample.jitterBufferTargetDelay), + keyFramesDecoded: this._keyFramesDecodedEncoder.encode(sample.keyFramesDecoded), + lastPacketReceivedTimestamp: this._lastPacketReceivedTimestampEncoder.encode(sample.lastPacketReceivedTimestamp), + mid: this._midEncoder.encode(sample.mid), + nackCount: this._nackCountEncoder.encode(sample.nackCount), + packetsDiscarded: this._packetsDiscardedEncoder.encode(sample.packetsDiscarded), + packetsLost: this._packetsLostEncoder.encode(sample.packetsLost), + packetsReceived: this._packetsReceivedEncoder.encode(sample.packetsReceived), + pauseCount: this._pauseCountEncoder.encode(sample.pauseCount), + pliCount: this._pliCountEncoder.encode(sample.pliCount), + playoutId: this._playoutIdEncoder.encode(sample.playoutId), + powerEfficientDecoder: this._powerEfficientDecoderEncoder.encode(sample.powerEfficientDecoder), + qpSum: this._qpSumEncoder.encode(sample.qpSum), + remoteId: this._remoteIdEncoder.encode(sample.remoteId), + removedSamplesForAcceleration: this._removedSamplesForAccelerationEncoder.encode(sample.removedSamplesForAcceleration), + retransmittedBytesReceived: this._retransmittedBytesReceivedEncoder.encode(sample.retransmittedBytesReceived), + retransmittedPacketsReceived: this._retransmittedPacketsReceivedEncoder.encode(sample.retransmittedPacketsReceived), + rtxSsrc: this._rtxSsrcEncoder.encode(sample.rtxSsrc), + silentConcealedSamples: this._silentConcealedSamplesEncoder.encode(sample.silentConcealedSamples), + totalAssemblyTime: this._totalAssemblyTimeEncoder.encode(sample.totalAssemblyTime), + totalAudioEnergy: this._totalAudioEnergyEncoder.encode(sample.totalAudioEnergy), + totalCorruptionProbability: this._totalCorruptionProbabilityEncoder.encode(sample.totalCorruptionProbability), + totalDecodeTime: this._totalDecodeTimeEncoder.encode(sample.totalDecodeTime), + totalFreezesDuration: this._totalFreezesDurationEncoder.encode(sample.totalFreezesDuration), + totalInterFrameDelay: this._totalInterFrameDelayEncoder.encode(sample.totalInterFrameDelay), + totalPausesDuration: this._totalPausesDurationEncoder.encode(sample.totalPausesDuration), + totalProcessingDelay: this._totalProcessingDelayEncoder.encode(sample.totalProcessingDelay), + totalSamplesDuration: this._totalSamplesDurationEncoder.encode(sample.totalSamplesDuration), + totalSamplesReceived: this._totalSamplesReceivedEncoder.encode(sample.totalSamplesReceived), + totalSquaredCorruptionProbability: this._totalSquaredCorruptionProbabilityEncoder.encode(sample.totalSquaredCorruptionProbability), + totalSquaredInterFrameDelay: this._totalSquaredInterFrameDelayEncoder.encode(sample.totalSquaredInterFrameDelay), + transportId: this._transportIdEncoder.encode(sample.transportId), + }); + + return result; + } +} diff --git a/npm-samples-encoder/src/InboundVideoTrackEncoder.ts b/npm-samples-encoder/src/InboundVideoTrackEncoder.ts deleted file mode 100644 index 597e1bca..00000000 --- a/npm-samples-encoder/src/InboundVideoTrackEncoder.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { InboundVideoTrack } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_InboundVideoTrack } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class InboundVideoTrackEncoder { - private readonly _ssrc?: bigint; - private readonly _trackId: Uint8Array; - private _bytesReceived?: number; - private _bytesSent?: number; - private _decoderImplementation?: string; - private _estimatedPlayoutTimestamp?: number; - private _fecPacketsDiscarded?: number; - private _fecPacketsReceived?: number; - private _firCount?: number; - private _frameHeight?: number; - private _frameWidth?: number; - private _framesDecoded?: number; - private _framesDropped?: number; - private _framesPerSecond?: number; - private _framesReceived?: number; - private _headerBytesReceived?: number; - private _jitter?: number; - private _jitterBufferDelay?: number; - private _jitterBufferEmittedCount?: number; - private _jitterBufferMinimumDelay?: number; - private _jitterBufferTargetDelay?: number; - private _keyFramesDecoded?: number; - private _lastPacketReceivedTimestamp?: number; - private _nackCount?: number; - private _packetsDiscarded?: number; - private _packetsLost?: number; - private _packetsReceived?: number; - private _packetsSent?: number; - private _peerConnectionId?: string; - private _pliCount?: number; - private _qpSum?: number; - private _remoteClientId?: string; - private _remoteTimestamp?: number; - private _reportsSent?: number; - private _roundTripTime?: number; - private _roundTripTimeMeasurements?: number; - private _sfuSinkId?: string; - private _sfuStreamId?: string; - private _totalDecodeTime?: number; - private _totalInterFrameDelay?: number; - private _totalProcessingDelay?: number; - private _totalRoundTripTime?: number; - private _totalSquaredInterFrameDelay?: number; - private _visited = false; - - public constructor( - public readonly trackId: string, - public readonly ssrc: number, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._trackId = this._options.trackIdIsUuid ? uuidToByteArray(trackId) : stringToBytesArray(trackId); - this._ssrc = BigInt(ssrc); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: InboundVideoTrack): Samples_ClientSample_InboundVideoTrack { - this._visited = true; - - const result = new Samples_ClientSample_InboundVideoTrack({ - trackId: this._trackId, - ssrc: this._ssrc, - peerConnectionId: this._encodePeerConnectionId(sample.peerConnectionId), - remoteClientId: this._encodeRemoteClientId(sample.remoteClientId), - sfuStreamId: this._encodeSfuStreamId(sample.sfuStreamId), - sfuSinkId: this._encodeSfuSinkId(sample.sfuSinkId), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsLost: this._encodePacketsLost(sample.packetsLost), - jitter: this._encodeJitter(sample.jitter), - framesDropped: this._encodeFramesDropped(sample.framesDropped), - lastPacketReceivedTimestamp: this._encodeLastPacketReceivedTimestamp(sample.lastPacketReceivedTimestamp), - headerBytesReceived: this._encodeHeaderBytesReceived(sample.headerBytesReceived), - packetsDiscarded: this._encodePacketsDiscarded(sample.packetsDiscarded), - fecPacketsReceived: this._encodeFecPacketsReceived(sample.fecPacketsReceived), - fecPacketsDiscarded: this._encodeFecPacketsDiscarded(sample.fecPacketsDiscarded), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - nackCount: this._encodeNackCount(sample.nackCount), - totalProcessingDelay: this._encodeTotalProcessingDelay(sample.totalProcessingDelay), - estimatedPlayoutTimestamp: this._encodeEstimatedPlayoutTimestamp(sample.estimatedPlayoutTimestamp), - jitterBufferDelay: this._encodeJitterBufferDelay(sample.jitterBufferDelay), - jitterBufferTargetDelay: this._encodeJitterBufferTargetDelay(sample.jitterBufferTargetDelay), - jitterBufferEmittedCount: this._encodeJitterBufferEmittedCount(sample.jitterBufferEmittedCount), - jitterBufferMinimumDelay: this._encodeJitterBufferMinimumDelay(sample.jitterBufferMinimumDelay), - decoderImplementation: this._encodeDecoderImplementation(sample.decoderImplementation), - framesDecoded: this._encodeFramesDecoded(sample.framesDecoded), - keyFramesDecoded: this._encodeKeyFramesDecoded(sample.keyFramesDecoded), - frameWidth: this._encodeFrameWidth(sample.frameWidth), - frameHeight: this._encodeFrameHeight(sample.frameHeight), - framesPerSecond: this._encodeFramesPerSecond(sample.framesPerSecond), - qpSum: this._encodeQpSum(sample.qpSum), - totalDecodeTime: this._encodeTotalDecodeTime(sample.totalDecodeTime), - totalInterFrameDelay: this._encodeTotalInterFrameDelay(sample.totalInterFrameDelay), - totalSquaredInterFrameDelay: this._encodeTotalSquaredInterFrameDelay(sample.totalSquaredInterFrameDelay), - firCount: this._encodeFirCount(sample.firCount), - pliCount: this._encodePliCount(sample.pliCount), - framesReceived: this._encodeFramesReceived(sample.framesReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - bytesSent: this._encodeBytesSent(sample.bytesSent), - remoteTimestamp: this._encodeRemoteTimestamp(sample.remoteTimestamp), - reportsSent: this._encodeReportsSent(sample.reportsSent), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime), - totalRoundTripTime: this._encodeTotalRoundTripTime(sample.totalRoundTripTime), - roundTripTimeMeasurements: this._encodeRoundTripTimeMeasurements(sample.roundTripTimeMeasurements), - }); - return result; - } - - private _encodePeerConnectionId(peerConnectionId?: string): Uint8Array | undefined { - if (!peerConnectionId) return; - if (peerConnectionId === this._peerConnectionId) return; - this._peerConnectionId = peerConnectionId; - return this._options.peerConnectionIdIsUuid ? uuidToByteArray(this._peerConnectionId) : stringToBytesArray(this._peerConnectionId); - } - - private _encodeRemoteClientId(remoteClientId?: string): Uint8Array | undefined { - if (!remoteClientId) return; - if (remoteClientId === this._remoteClientId) return; - this._remoteClientId = remoteClientId; - return this._options.clientIdIsUuid ? uuidToByteArray(this._remoteClientId) : stringToBytesArray(this._remoteClientId); - } - - private _encodeJitterBufferTargetDelay(jitterBufferTargetDelay?: number): number | undefined{ - if (!jitterBufferTargetDelay) return; - if (jitterBufferTargetDelay === this._jitterBufferTargetDelay) return; - this._jitterBufferTargetDelay = jitterBufferTargetDelay; - return this._jitterBufferTargetDelay; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (!roundTripTime) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodeTotalRoundTripTime(totalRoundTripTime?: number): number | undefined { - if (!totalRoundTripTime) return; - if (totalRoundTripTime === this._totalRoundTripTime) return; - this._totalRoundTripTime = totalRoundTripTime; - return this._totalRoundTripTime; - } - - private _encodeRoundTripTimeMeasurements(roundTripTimeMeasurements?: number): number | undefined { - if (!roundTripTimeMeasurements) return; - if (roundTripTimeMeasurements === this._roundTripTimeMeasurements) return; - this._roundTripTimeMeasurements = roundTripTimeMeasurements; - return this._roundTripTimeMeasurements; - } - - private _encodeSfuStreamId(sfuStreamId?: string): Uint8Array | undefined { - if (!sfuStreamId) return; - if (sfuStreamId === this._sfuStreamId) return; - this._sfuStreamId = sfuStreamId; - return this._options.sfuStreamIdIsUuid - ? uuidToByteArray(this._sfuStreamId) - : stringToBytesArray(this._sfuStreamId) - ; - } - - private _encodeSfuSinkId(sfuSinkId?: string): Uint8Array | undefined { - if (!sfuSinkId) return; - if (sfuSinkId === this._sfuSinkId) return; - this._sfuSinkId = sfuSinkId; - return this._options.sfuSinkIdIsUuid - ? uuidToByteArray(this._sfuSinkId) - : stringToBytesArray(this._sfuSinkId) - ; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (!packetsReceived) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (!packetsLost) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodeJitter(jitter?: number): number | undefined { - if (!jitter) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodeFramesDropped(framesDropped?: number): number | undefined { - if (!framesDropped) return; - if (framesDropped === this._framesDropped) return; - this._framesDropped = framesDropped; - return this._framesDropped; - } - - private _encodeLastPacketReceivedTimestamp(lastPacketReceivedTimestamp?: number): bigint | undefined { - if (!lastPacketReceivedTimestamp) return; - if (lastPacketReceivedTimestamp === this._lastPacketReceivedTimestamp) return; - this._lastPacketReceivedTimestamp = lastPacketReceivedTimestamp; - return BigInt(this._lastPacketReceivedTimestamp); - } - - private _encodeHeaderBytesReceived(headerBytesReceived?: number): bigint | undefined { - if (!headerBytesReceived) return; - if (headerBytesReceived === this._headerBytesReceived) return; - this._headerBytesReceived = headerBytesReceived; - return BigInt(this._headerBytesReceived); - } - - private _encodePacketsDiscarded(packetsDiscarded?: number): number | undefined { - if (!packetsDiscarded) return; - if (packetsDiscarded === this._packetsDiscarded) return; - this._packetsDiscarded = packetsDiscarded; - return this._packetsDiscarded; - } - - private _encodeFecPacketsReceived(fecPacketsReceived?: number): number | undefined { - if (!fecPacketsReceived) return; - if (fecPacketsReceived === this._fecPacketsReceived) return; - this._fecPacketsReceived = fecPacketsReceived; - return this._fecPacketsReceived; - } - - private _encodeFecPacketsDiscarded(fecPacketsDiscarded?: number): number | undefined { - if (!fecPacketsDiscarded) return; - if (fecPacketsDiscarded === this._fecPacketsDiscarded) return; - this._fecPacketsDiscarded = fecPacketsDiscarded; - return this._fecPacketsDiscarded; - } - - private _encodeTotalProcessingDelay(totalProcessingDelay?: number): number | undefined { - if (!totalProcessingDelay) return; - if (totalProcessingDelay === this._totalProcessingDelay) return; - this._totalProcessingDelay = totalProcessingDelay; - return this._totalProcessingDelay; - } - - private _encodeEstimatedPlayoutTimestamp(estimatedPlayoutTimestamp?: number): bigint | undefined { - if (!estimatedPlayoutTimestamp) return; - if (estimatedPlayoutTimestamp === this._estimatedPlayoutTimestamp) return; - this._estimatedPlayoutTimestamp = estimatedPlayoutTimestamp; - return BigInt(this._estimatedPlayoutTimestamp); - } - - private _encodeJitterBufferDelay(jitterBufferDelay?: number): number | undefined { - if (!jitterBufferDelay) return; - if (jitterBufferDelay === this._jitterBufferDelay) return; - this._jitterBufferDelay = jitterBufferDelay; - return this._jitterBufferDelay; - } - - private _encodeJitterBufferEmittedCount(jitterBufferEmittedCount?: number): number | undefined { - if (!jitterBufferEmittedCount) return; - if (jitterBufferEmittedCount === this._jitterBufferEmittedCount) return; - this._jitterBufferEmittedCount = jitterBufferEmittedCount; - return this._jitterBufferEmittedCount; - } - - private _encodeJitterBufferMinimumDelay(jitterBufferMinimumDelay?: number): number | undefined { - if (!jitterBufferMinimumDelay) return; - if (jitterBufferMinimumDelay === this._jitterBufferMinimumDelay) return; - this._jitterBufferMinimumDelay = jitterBufferMinimumDelay; - return this._jitterBufferMinimumDelay; - } - - private _encodeDecoderImplementation(decoderImplementation?: string): string | undefined { - if (!decoderImplementation) return; - if (decoderImplementation === this._decoderImplementation) return; - this._decoderImplementation = decoderImplementation; - return this._decoderImplementation; - } - - private _encodeFramesDecoded(framesDecoded?: number): number | undefined { - if (!framesDecoded) return; - if (framesDecoded === this._framesDecoded) return; - this._framesDecoded = framesDecoded; - return this._framesDecoded; - } - - private _encodeKeyFramesDecoded(keyFramesDecoded?: number): number | undefined { - if (!keyFramesDecoded) return; - if (keyFramesDecoded === this._keyFramesDecoded) return; - this._keyFramesDecoded = keyFramesDecoded; - return this._keyFramesDecoded; - } - - private _encodeFrameWidth(frameWidth?: number): number | undefined { - if (!frameWidth) return; - if (frameWidth === this._frameWidth) return; - this._frameWidth = frameWidth; - return this._frameWidth; - } - - private _encodeFrameHeight(frameHeight?: number): number | undefined { - if (!frameHeight) return; - if (frameHeight === this._frameHeight) return; - this._frameHeight = frameHeight; - return this._frameHeight; - } - - private _encodeFramesPerSecond(framesPerSecond?: number): number | undefined { - if (!framesPerSecond) return; - if (framesPerSecond === this._framesPerSecond) return; - this._framesPerSecond = framesPerSecond; - return this._framesPerSecond; - } - - private _encodeQpSum(qpSum?: number): bigint | undefined { - if (!qpSum) return; - if (qpSum === this._qpSum) return; - this._qpSum = qpSum; - return BigInt(this._qpSum); - } - - private _encodeTotalDecodeTime(totalDecodeTime?: number): number | undefined { - if (!totalDecodeTime) return; - if (totalDecodeTime === this._totalDecodeTime) return; - this._totalDecodeTime = totalDecodeTime; - return this._totalDecodeTime; - } - - private _encodeTotalInterFrameDelay(totalInterFrameDelay?: number): number | undefined { - if (!totalInterFrameDelay) return; - if (totalInterFrameDelay === this._totalInterFrameDelay) return; - this._totalInterFrameDelay = totalInterFrameDelay; - return this._totalInterFrameDelay; - } - - private _encodeTotalSquaredInterFrameDelay(totalSquaredInterFrameDelay?: number): number | undefined { - if (!totalSquaredInterFrameDelay) return; - if (totalSquaredInterFrameDelay === this._totalSquaredInterFrameDelay) return; - this._totalSquaredInterFrameDelay = totalSquaredInterFrameDelay; - return this._totalSquaredInterFrameDelay; - } - - private _encodeFirCount(firCount?: number): number | undefined { - if (!firCount) return; - if (firCount === this._firCount) return; - this._firCount = firCount; - return this._firCount; - } - - private _encodePliCount(pliCount?: number): number | undefined { - if (!pliCount) return; - if (pliCount === this._pliCount) return; - this._pliCount = pliCount; - return this._pliCount; - } - - private _encodeFramesReceived(framesReceived?: number): number | undefined { - if (!framesReceived) return; - if (framesReceived === this._framesReceived) return; - this._framesReceived = framesReceived; - return this._framesReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (!packetsSent) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeRemoteTimestamp(remoteTimestamp?: number): bigint | undefined { - if (!remoteTimestamp) return; - if (remoteTimestamp === this._remoteTimestamp) return; - this._remoteTimestamp = remoteTimestamp; - return BigInt(this._remoteTimestamp); - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (!bytesReceived) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (!nackCount) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodeReportsSent(reportsSent?: number): number | undefined { - if (!reportsSent) return; - if (reportsSent === this._reportsSent) return; - this._reportsSent = reportsSent; - return this._reportsSent; - } - -} diff --git a/npm-samples-encoder/src/InputSamples.ts b/npm-samples-encoder/src/InputSamples.ts index 0da37a91..7722bdcc 100644 --- a/npm-samples-encoder/src/InputSamples.ts +++ b/npm-samples-encoder/src/InputSamples.ts @@ -1,2518 +1,1563 @@ -export const schemaVersion = "2.2.12"; +export const schemaVersion = "3.0.0"; /** -* Session data +* The WebRTC app provided custom stats payload +*/ +export type ExtensionStat = { + /** + * The type of the extension stats the custom app provides + */ + type: string; + + /** + * The payload of the extension stats the custom app provides + */ + payload: string; + +} + +/** +* A list of additional client events. */ -export type TurnSession = { +export type ClientMetaData = { /** - * Flag indicate to not generate report from this sample + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). */ - sessionId: string; + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; /** - * The Authentication Realm (RFC 8656) + * The identifier of the media track related to the event, if applicable. */ - realm?: string; + trackId?: string; /** - * The username of the used in authentication + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. */ - username?: string; + ssrc?: number; /** - * The id of the client the TURN session belongs to (ClientSample) + * The timestamp in epoch format when the event was generated. */ - clientId?: string; + timestamp?: number; + +} +/** +* A list of additional client events. +*/ +export type ClientEvent = { /** - * The timestamp when the session has been started. Epoch in milliseconds, GMT + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). */ - started?: number; + type: string; /** - * For each Allocate request, the server SHOULD generate a new random nonce when the allocation is first attempted following the randomness recommendations in [RFC4086] and SHOULD expire the nonce at least once every hour during the lifetime of the allocation. Epoch in millis GMT + * The value associated with the event, if applicable. */ - nonceExpirationTime?: number; + payload?: string; /** - * The address of the server the client connected to + * The unique identifier of the peer connection for which the event was generated. */ - serverAddress?: string; + peerConnectionId?: string; /** - * The portnumber the server listens the client requests + * The identifier of the media track related to the event, if applicable. */ - serverPort?: number; + trackId?: string; /** - * the transport protocol betwwen the client and the server (TCP, UDP, TCPTLS, UDPTLS, SCTP, SCTPTLS) + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. */ - transportProtocol?: string; + ssrc?: number; /** - * The address of the client connected from + * The timestamp in epoch format when the event was generated. */ - clientAddress?: string; + timestamp?: number; + +} +/** +* Certificates +*/ +export type CertificateStats = { /** - * The portnumber the client requested from + * The timestamp of the stat. */ - clientPort?: number; + timestamp: number; /** - * the bitrate the TURN server sending to the client + * A unique identifier for the stat. */ - sendingBitrate?: number; + id: string; /** - * the bitrate the TURN server receiving from the client + * The fingerprint of the certificate. */ - receivingBitrate?: number; + fingerprint: string; /** - * the amount of bytes sent to the client + * The algorithm used for the fingerprint (e.g., 'SHA-256'). */ - sentBytes?: number; + fingerprintAlgorithm: string; /** - * the amount of bytes received from the client + * The certificate encoded in base64 format. */ - receivedBytes?: number; + base64Certificate: string; /** - * the amount of packets sent to the client + * The certificate ID of the issuer (nullable). */ - sentPackets?: number; + issuerCertificateId: string; /** - * the amount of packets received from the client + * Additional information attached to this stats */ - receivedPackets?: number; + appData?: Record; } /** -* Peer Alloocation data +* ICE Candidate Pair Stats */ -export type TurnPeerAllocation = { +export type IceCandidatePairStats = { /** - * a unique id for the allocation + * The unique identifier for this RTCStats object. */ - peerId: string; + id: string; /** - * The corresponded session the allocation belongs to + * The timestamp of when the stats were recorded, in seconds. */ - sessionId: string; + timestamp: number; /** - * The allocated address + * The transport id of the connection this candidate pair belongs to. */ - relayedAddress: string; + transportId: string; /** - * The allocated port + * The ID of the local ICE candidate in this pair. */ - relayedPort: number; + localCandidateId: string; /** - * protocol (TCP, UDP) + * The ID of the remote ICE candidate in this pair. */ - transportProtocol: string; + remoteCandidateId: string; /** - * The address of the address the serever connect to + * The number of packets sent using this candidate pair. */ - peerAddress?: string; + packetsSent: number; /** - * The portnumber the server connects to + * The number of packets received using this candidate pair. */ - peerPort?: number; + packetsReceived: number; /** - * the bitrate the TURN server sending to the peer + * The total number of bytes sent using this candidate pair. */ - sendingBitrate?: number; + bytesSent: number; /** - * the bitrate the TURN server receiving from the peer + * The total number of bytes received using this candidate pair. */ - receivingBitrate?: number; + bytesReceived: number; /** - * the amount of bytes sent to the peer + * The timestamp of the last packet sent using this candidate pair. */ - sentBytes?: number; + lastPacketSentTimestamp: number; /** - * the amount of bytes received from the peer + * The timestamp of the last packet received using this candidate pair. */ - receivedBytes?: number; + lastPacketReceivedTimestamp: number; /** - * the amount of packets sent to the peer + * The total round trip time (RTT) for this candidate pair in seconds. */ - sentPackets?: number; + totalRoundTripTime: number; /** - * the amount of packets received from the peer + * The current round trip time (RTT) for this candidate pair in seconds. */ - receivedPackets?: number; + currentRoundTripTime: number; -} + /** + * The available outgoing bitrate (in bits per second) for this candidate pair. + */ + availableOutgoingBitrate: number; -/** -* docs -*/ -export type TurnSample = { /** - * A unique id of the turn server + * The available incoming bitrate (in bits per second) for this candidate pair. */ - serverId: string; + availableIncomingBitrate: number; /** - * Peer Alloocation data + * The number of ICE connection requests received by this candidate pair. */ - allocations?: TurnPeerAllocation[]; + requestsReceived: number; /** - * Session data + * The number of ICE connection requests sent by this candidate pair. */ - sessions?: TurnSession[]; + requestsSent: number; -} + /** + * The number of ICE connection responses received by this candidate pair. + */ + responsesReceived: number; -/** -* The Sfu provided custom stats payload -*/ -export type SfuExtensionStats = { /** - * The type of the extension stats the custom app provides + * The number of ICE connection responses sent by this candidate pair. */ - type: string; + responsesSent: number; /** - * The payload of the extension stats the custom app provides + * The number of ICE connection consent requests sent by this candidate pair. */ - payload: string; + consentRequestsSent: number; + + /** + * The number of packets discarded while attempting to send via this candidate pair. + */ + packetsDiscardedOnSend: number; + + /** + * The total number of bytes discarded while attempting to send via this candidate pair. + */ + bytesDiscardedOnSend: number; + + state?: "new" | "inProgress" | "failed" | "succeeded"; + /** + * Whether this candidate pair has been nominated. + */ + nominated?: boolean; + + /** + * Additional information attached to this stats + */ + appData?: Record; } /** -* The Sfu Outbound Rtp Pad obtained measurements +* ICE Candidate Stats */ -export type SfuSctpChannel = { +export type IceCandidateStats = { /** - * The id of the transport the RTP stream uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the sctp stream + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of the sctp stream + * The transport ID associated with the ICE candidate. */ - channelId: string; + transportId: string; /** - * Flag indicate to not generate report from this sample + * The IP address of the ICE candidate (nullable). */ - noReport?: boolean; + address: string; /** - * Flag to indicate that the SCTP channel is used as an internally between SFU instances + * The port number of the ICE candidate. */ - internal?: boolean; + port: number; /** - * The label of the sctp stream + * The transport protocol used by the candidate (e.g., 'udp', 'tcp'). */ - label?: string; + protocol: string; /** - * The protocol used to establish an sctp stream + * The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). */ - protocol?: string; + candidateType: string; /** - * The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. + * The priority of the ICE candidate. */ - sctpSmoothedRoundTripTime?: number; + priority: number; /** - * The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. + * The URL of the ICE candidate. */ - sctpCongestionWindow?: number; + url: string; /** - * The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. + * The protocol used for the relay (e.g., 'tcp', 'udp'). */ - sctpReceiverWindow?: number; + relayProtocol: string; /** - * The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. + * A string representing the foundation for the ICE candidate. */ - sctpMtu?: number; + foundation: string; /** - * The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. + * The related address for the ICE candidate (if any). */ - sctpUnackData?: number; + relatedAddress: string; /** - * The number of message received on the corresponded SCTP stream. + * The related port for the ICE candidate (if any). */ - messageReceived?: number; + relatedPort: number; /** - * The number of message sent on the corresponded SCTP stream. + * The username fragment for the ICE candidate. */ - messageSent?: number; + usernameFragment: string; /** - * The number of bytes received on the corresponded SCTP stream. + * The TCP type of the ICE candidate (e.g., 'active', 'passive'). */ - bytesReceived?: number; + tcpType: string; /** - * The number of bytes sent on the corresponded SCTP stream. + * Additional information attached to this stats */ - bytesSent?: number; + appData?: Record; } /** -* The Sfu Outbound Rtp Pad obtained measurements +* ICE Transport Stats */ -export type SfuOutboundRtpPad = { +export type IceTransportStats = { /** - * The id of the transport the RTP stream uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the stream this outbound RTP pad sinks the media from + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of a group of RTP pad sinks the media stream out from the SFU. + * The number of packets sent. */ - sinkId: string; + packetsSent: number; /** - * The id of Sfu pad. + * The number of packets received. */ - padId: string; + packetsReceived: number; /** - * The synchronization source id of the RTP stream + * The number of bytes sent. */ - ssrc: number; + bytesSent: number; /** - * Flag indicate to not generate report from this sample + * The number of bytes received. */ - noReport?: boolean; + bytesReceived: number; /** - * Flag to indicate that the rtp pad is used as an internal communication between SFU instances + * The ICE role (e.g., 'controlling', 'controlled'). */ - internal?: boolean; + iceRole: string; /** - * The callId the event belongs to + * The local username fragment for ICE. */ - callId?: string; + iceLocalUsernameFragment: string; /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to + * The DTLS transport state (e.g., 'new', 'connecting', 'connected'). */ - clientId?: string; + dtlsState: string; /** - * The id of the track the RTP stream related to at the client side + * The ICE transport state (e.g., 'new', 'checking', 'connected'). */ - trackId?: string; + iceState: string; /** - * the type of the media the stream carries ("audio" or "video") + * The ID of the selected ICE candidate pair. */ - mediaType?: "audio" | "video"; + selectedCandidatePairId: string; /** - * The payload type field of the RTP header + * The ID of the local certificate. */ - payloadType?: number; + localCertificateId: string; /** - * The negotiated mimeType in the SDP + * The ID of the remote certificate. */ - mimeType?: string; + remoteCertificateId: string; /** - * The clock rate of the media source the RTP header carries + * The TLS version used for encryption. */ - clockRate?: number; + tlsVersion: string; /** - * The actual SDP line from the negotiation related to this RTP stream + * The DTLS cipher suite used. */ - sdpFmtpLine?: string; + dtlsCipher: string; /** - * The rid parameter of the corresponded RTP stream + * The role in the DTLS handshake (e.g., 'client', 'server'). */ - rid?: string; + dtlsRole: string; /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. + * The SRTP cipher used for encryption. */ - rtxSsrc?: number; + srtpCipher: string; /** - * he bitrate the corresponded stream targets. + * The number of changes to the selected ICE candidate pair. */ - targetBitrate?: number; + selectedCandidatePairChanges: number; /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through + * Additional information attached to this stats */ - voiceActivityFlag?: boolean; + appData?: Record; + +} +/** +* Data Channels Stats +*/ +export type DataChannelStats = { /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams + * The timestamp of the stat. */ - firCount?: number; + timestamp: number; /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams + * A unique identifier for the stat. */ - pliCount?: number; + id: string; /** - * The total number of negative acknowledgement received on the corresponded RTP stream. + * The label of the data channel. */ - nackCount?: number; + label: string; /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream + * The protocol of the data channel. */ - sliCount?: number; + protocol: string; /** - * The total number of packets lost on the corresponded RTP stream. + * The identifier for the data channel. */ - packetsLost?: number; + dataChannelIdentifier: number; /** - * The total number of packets sent on the corresponded RTP stream. + * The state of the data channel (e.g., 'open', 'closed'). */ - packetsSent?: number; + state: string; /** - * The total number of discarded packets on the corresponded RTP stream. + * The number of messages sent on the data channel. */ - packetsDiscarded?: number; + messagesSent: number; /** - * The total number of packets retransmitted on the corresponded RTP stream. + * The number of bytes sent on the data channel. */ - packetsRetransmitted?: number; + bytesSent: number; /** - * The total number of packets failed to be encrypted on the corresponded RTP stream. + * The number of messages received on the data channel. */ - packetsFailedEncryption?: number; + messagesReceived: number; /** - * The total number of duplicated packets appeared on the corresponded RTP stream. + * The number of bytes received on the data channel. */ - packetsDuplicated?: number; + bytesReceived: number; /** - * The total number of FEC packets sent on the corresponded RTP stream. + * Additional information attached to this stats */ - fecPacketsSent?: number; + appData?: Record; +} + +/** +* PeerConnection Transport Stats +*/ +export type PeerConnectionTransportStats = { /** - * The total number of FEC packets discarded on the corresponded RTP stream. + * The timestamp of the stat. */ - fecPacketsDiscarded?: number; + timestamp: number; /** - * The total amount of payload bytes sent on the corresponded RTP stream. + * A unique identifier for the stat. */ - bytesSent?: number; + id: string; /** - * The total number of SR reports sent by the corresponded RTP stream + * The number of data channels opened. */ - rtcpSrSent?: number; + dataChannelsOpened: number; /** - * The total number of RR reports received on the corresponded RTP stream + * The number of data channels closed. */ - rtcpRrReceived?: number; + dataChannelsClosed: number; /** - * If rtx packets sent on the same stream then this number indicates how may has been sent + * Additional information attached to this stats */ - rtxPacketsSent?: number; + appData?: Record; + +} +/** +* Audio Playout Stats +*/ +export type AudioPlayoutStats = { /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded + * The timestamp of the stat. */ - rtxPacketsDiscarded?: number; + timestamp: number; /** - * The number of frames sent on the corresponded RTP stream + * A unique identifier for the stat. */ - framesSent?: number; + id: string; /** - * Indicate the number of frames the Sfu has been encoded + * The kind of media (audio/video). */ - framesEncoded?: number; + kind: string; /** - * Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream + * The duration of synthesized audio samples. */ - keyFramesEncoded?: number; + synthesizedSamplesDuration: number; /** - * The calculated fractionLost of the stream + * The number of synthesized audio samples events. */ - fractionLost?: number; + synthesizedSamplesEvents: number; /** - * The calculated jitter of the stream + * The total duration of all audio samples. */ - jitter?: number; + totalSamplesDuration: number; /** - * The calculated RTT of the stream + * The total delay experienced during audio playout. */ - roundTripTime?: number; + totalPlayoutDelay: number; + + /** + * The total count of audio samples. + */ + totalSamplesCount: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; } /** -* The Sfu Inbound Rtp Pad obtained measurements +* Video Source Stats */ -export type SfuInboundRtpPad = { +export type VideoSourceStats = { /** - * The id of the transport the RTP Pad uses. + * The timestamp of the stat. */ - transportId: string; + timestamp: number; /** - * The id of the media stream the RTP pad belongs to. This id is to group rtp pads (e.g.: simulcast) carrying payloads to the same media. + * A unique identifier for the stat. */ - streamId: string; + id: string; /** - * The id of Sfu pad. + * The identifier of the media track. */ - padId: string; + trackIdentifier: string; /** - * The synchronization source id of the RTP stream + * The kind of media (audio/video). */ - ssrc: number; + kind: string; /** - * Flag indicate to not generate report from this sample + * The width of the video. */ - noReport?: boolean; + width: number; /** - * Flag to indicate that the rtp pad is used as an internal communication between SFU instances + * The height of the video. */ - internal?: boolean; + height: number; /** - * the type of the media the stream carries ("audio" or "video") + * The total number of frames. */ - mediaType?: "audio" | "video"; + frames: number; /** - * The payload type field of the RTP header + * The frames per second of the video. */ - payloadType?: number; + framesPerSecond: number; /** - * The negotiated mimeType in the SDP + * Additional information attached to this stats */ - mimeType?: string; + appData?: Record; + +} +/** +* Audio Source Stats +*/ +export type AudioSourceStats = { /** - * The clock rate of the media source the RTP header carries + * The timestamp of the stat. */ - clockRate?: number; + timestamp: number; /** - * The actual SDP line from the negotiation related to this RTP stream + * A unique identifier for the stat. */ - sdpFmtpLine?: string; + id: string; /** - * The rid parameter of the corresponded RTP stream + * The identifier of the media track. */ - rid?: string; + trackIdentifier: string; /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. + * The kind of media (audio/video). */ - rtxSsrc?: number; + kind: string; /** - * he bitrate the corresponded stream targets. + * The current audio level. */ - targetBitrate?: number; + audioLevel?: number; /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through + * The total audio energy. */ - voiceActivityFlag?: boolean; + totalAudioEnergy?: number; /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams + * The total duration of audio samples. */ - firCount?: number; + totalSamplesDuration?: number; /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams + * The echo return loss. */ - pliCount?: number; + echoReturnLoss?: number; /** - * The total number of negative acknowledgement received on the corresponded RTP stream. + * The enhancement of echo return loss. */ - nackCount?: number; + echoReturnLossEnhancement?: number; /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream + * Additional information attached to this stats */ - sliCount?: number; + appData?: Record; + +} +/** +* Remote Outbound RTPs +*/ +export type RemoteOutboundRtpStats = { /** - * The total number of packets lost on the corresponded RTP stream. + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - packetsLost?: number; + timestamp: number; /** - * The total number of packets received on the corresponded RTP stream. + * The unique identifier for this stats object. */ - packetsReceived?: number; + id: string; /** - * The total number of discarded packets on the corresponded RTP stream. + * The SSRC identifier of the RTP stream. */ - packetsDiscarded?: number; + ssrc: number; /** - * The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. + * The type of media ('audio' or 'video'). */ - packetsRepaired?: number; + kind: string; /** - * The total number of packets failed to be decrypted on the corresponded RTP stream. + * The ID of the transport used for this stream. */ - packetsFailedDecryption?: number; + transportId?: string; /** - * The total number of duplicated packets appeared on the corresponded RTP stream. + * The ID of the codec used for this stream. */ - packetsDuplicated?: number; + codecId?: string; /** - * The total number of FEC packets received on the corresponded RTP stream. + * The total number of packets sent on this stream. */ - fecPacketsReceived?: number; + packetsSent?: number; /** - * The total number of FEC packets discarded on the corresponded RTP stream. + * The total number of bytes sent on this stream. */ - fecPacketsDiscarded?: number; + bytesSent?: number; /** - * The total amount of payload bytes received on the corresponded RTP stream. + * The ID of the local object corresponding to this stream. */ - bytesReceived?: number; + localId?: string; /** - * The total number of SR reports received by the corresponded RTP stream + * The remote timestamp for this stats object in DOMHighResTimeStamp format. */ - rtcpSrReceived?: number; + remoteTimestamp?: number; /** - * The total number of RR reports sent on the corresponded RTP stream + * The total number of reports sent on this stream. */ - rtcpRrSent?: number; + reportsSent?: number; /** - * If rtx packets are sent or received on the same stream then this number indicates how may has been sent + * The current estimated round-trip time for this stream in seconds. */ - rtxPacketsReceived?: number; + roundTripTime?: number; /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded + * The total round-trip time for this stream in seconds. */ - rtxPacketsDiscarded?: number; + totalRoundTripTime?: number; /** - * The number of frames received on the corresponded RTP stream + * The total number of round-trip time measurements for this stream. */ - framesReceived?: number; + roundTripTimeMeasurements?: number; /** - * Indicate the number of frames the Sfu has been decoded + * Additional information attached to this stats */ - framesDecoded?: number; + appData?: Record; + +} +/** +* The duration of quality limitation reasons categorized by type. +*/ +export type QualityLimitationDurations = { /** - * Indicate the number of keyframes the Sfu has been decoded + * Duration of no quality limitation in seconds. */ - keyFramesDecoded?: number; + none: number; /** - * The calculated fractionLost of the stream + * Duration of CPU-based quality limitation in seconds. */ - fractionLost?: number; + cpu: number; /** - * The calculated jitter of the stream + * Duration of bandwidth-based quality limitation in seconds. */ - jitter?: number; + bandwidth: number; /** - * The calculated RTT of the stream + * Duration of other quality limitation reasons in seconds. */ - roundTripTime?: number; + other: number; } /** -* The Sfu Transports obtained measurements +* Outbound RTPs */ -export type SfuTransport = { +export type OutboundRtpStats = { /** - * The generated unique identifier of the transport + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - transportId: string; + timestamp: number; /** - * Flag indicate to not generate report from this sample + * The unique identifier for this stats object. */ - noReport?: boolean; + id: string; /** - * Flag to indicate that the transport is used as an internal transport between SFU instances + * The SSRC identifier of the RTP stream. */ - internal?: boolean; + ssrc: number; /** - * Represent the current value of the state attribute of the underlying RTCDtlsTransport. + * The type of media ('audio' or 'video'). */ - dtlsState?: string; + kind: string; /** - * Represent the current value of the state attribute of the underlying RTCIceTransport + * The duration of quality limitation reasons categorized by type. */ - iceState?: string; + qualityLimitationDurations: QualityLimitationDurations; /** - * Represents the the current value of the SCTP state of the transport of the SFU + * The ID of the transport used for this stream. */ - sctpState?: string; + transportId?: string; /** - * Represent the current value of the role SFU takes place in ICE + * The ID of the codec used for this stream. */ - iceRole?: string; + codecId?: string; /** - * The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) + * The total number of packets sent on this stream. */ - localAddress?: string; + packetsSent?: number; /** - * The local port number + * The total number of bytes sent on this stream. */ - localPort?: number; + bytesSent?: number; /** - * The protocol used by the transport + * The media ID associated with this RTP stream. */ - protocol?: string; + mid?: string; /** - * The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) + * The ID of the media source associated with this stream. */ - remoteAddress?: string; + mediaSourceId?: string; /** - * The remote port number + * The ID of the remote object corresponding to this stream. */ - remotePort?: number; + remoteId?: string; /** - * The total amount of RTP bytes received on this transport + * The RID value of the RTP stream. */ - rtpBytesReceived?: number; + rid?: string; /** - * The total amount of RTP bytes sent on this transport + * The total number of header bytes sent on this stream. */ - rtpBytesSent?: number; + headerBytesSent?: number; /** - * The total amount of RTP packets received on this transport + * The number of retransmitted packets sent on this stream. */ - rtpPacketsReceived?: number; + retransmittedPacketsSent?: number; /** - * The total amount of RTP packets sent on this transport + * The number of retransmitted bytes sent on this stream. */ - rtpPacketsSent?: number; + retransmittedBytesSent?: number; /** - * The total amount of RTP packets lost on this transport + * The SSRC for the RTX stream, if applicable. */ - rtpPacketsLost?: number; + rtxSsrc?: number; /** - * The total amount of RTX bytes received on this transport + * The target bitrate for this RTP stream in bits per second. */ - rtxBytesReceived?: number; + targetBitrate?: number; /** - * The total amount of RTX bytes sent on this transport + * The total target encoded bytes for this stream. */ - rtxBytesSent?: number; + totalEncodedBytesTarget?: number; /** - * The total amount of RTX packets received on this transport + * The width of the frames sent in pixels. */ - rtxPacketsReceived?: number; + frameWidth?: number; /** - * The total amount of RTX packets sent on this transport + * The height of the frames sent in pixels. */ - rtxPacketsSent?: number; + frameHeight?: number; /** - * The total amount of RTX packets lost on this transport + * The number of frames sent per second. */ - rtxPacketsLost?: number; + framesPerSecond?: number; /** - * The total amount of RTX packets discarded on this transport + * The total number of frames sent on this stream. */ - rtxPacketsDiscarded?: number; + framesSent?: number; /** - * The total amount of SCTP bytes received on this transport + * The total number of huge frames sent on this stream. */ - sctpBytesReceived?: number; + hugeFramesSent?: number; /** - * The total amount of SCTP bytes sent on this transport + * The total number of frames encoded on this stream. */ - sctpBytesSent?: number; + framesEncoded?: number; /** - * The total amount of SCTP packets received on this transport + * The total number of key frames encoded on this stream. */ - sctpPacketsReceived?: number; + keyFramesEncoded?: number; /** - * The total amount of SCTP packets sent on this transport + * The sum of QP values for all frames encoded on this stream. */ - sctpPacketsSent?: number; - -} + qpSum?: number; -/** -* User provided custom call events -*/ -export type CustomSfuEvent = { /** - * the name of the event used as identifier. (e.g.: CLIENT_REJOINED, etc..) + * The total time spent encoding frames on this stream in seconds. */ - name: string; + totalEncodeTime?: number; /** - * the value of the event + * The total delay for packets sent on this stream in seconds. */ - value?: string; + totalPacketSendDelay?: number; /** - * The unique identifier of the sfu transport the event is related to + * The reason for any quality limitation on this stream. */ - transportId?: string; + qualityLimitationReason?: string; /** - * The identifier of the sfu stream the event is related to + * The number of resolution changes due to quality limitations. */ - sfuStreamId?: string; + qualityLimitationResolutionChanges?: number; /** - * The identifier of the sfu sink the event is related to + * The total number of NACK packets sent on this stream. */ - sfuSinkId?: string; + nackCount?: number; /** - * the human readable message of the event + * The total number of FIR packets sent on this stream. */ - message?: string; + firCount?: number; /** - * Additional attachment relevant for the event + * The total number of PLI packets sent on this stream. */ - attachments?: string; + pliCount?: number; /** - * The EPOCH timestamp the event is generated + * The implementation of the encoder used for this stream. */ - timestamp?: number; - -} + encoderImplementation?: string; -/** -* docs -*/ -export type SfuSample = { /** - * Unique generated id for the sfu samples are originated from + * Indicates whether the encoder is power efficient. */ - sfuId: string; + powerEfficientEncoder?: boolean; /** - * The timestamp the sample is created in GMT + * Indicates whether this stream is actively sending data. */ - timestamp: number; + active?: boolean; /** - * The offset from GMT in hours + * The scalability mode of the encoder used for this stream. */ - timeZoneOffsetInHours?: number; + scalabilityMode?: string; /** - * Special marker for the samples + * Additional information attached to this stats. */ - marker?: string; + appData?: Record; + +} +/** +* Remote Inbound RTPs +*/ +export type RemoteInboundRtpStats = { /** - * User provided custom call events + * The timestamp for this stats object in DOMHighResTimeStamp format. */ - customSfuEvents?: CustomSfuEvent[]; + timestamp: number; /** - * The Sfu Transports obtained measurements + * The unique identifier for this stats object. */ - transports?: SfuTransport[]; + id: string; /** - * The Sfu Inbound Rtp Pad obtained measurements + * The SSRC identifier of the RTP stream. */ - inboundRtpPads?: SfuInboundRtpPad[]; + ssrc: number; /** - * The Sfu Outbound Rtp Pad obtained measurements + * The type of media ('audio' or 'video'). */ - outboundRtpPads?: SfuOutboundRtpPad[]; + kind: string; /** - * The Sfu Outbound Rtp Pad obtained measurements + * The ID of the transport used for this stream. */ - sctpChannels?: SfuSctpChannel[]; + transportId?: string; /** - * The Sfu provided custom stats payload + * The ID of the codec used for this stream. */ - extensionStats?: SfuExtensionStats[]; - -} + codecId?: string; -/** -* List of remote ICE candidates -*/ -export type IceRemoteCandidate = { /** - * Refers to the peer connection the local candidate belongs to + * The total number of packets received on this stream. */ - peerConnectionId?: string; + packetsReceived?: number; /** - * The unique identifier of the local candidate + * The total number of packets lost on this stream. */ - id?: string; + packetsLost?: number; /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) + * The jitter value for this stream in seconds. */ - address?: string; + jitter?: number; /** - * The port number of the local endpoint the ICE uses + * The ID of the local object corresponding to this remote stream. */ - port?: number; + localId?: string; /** - * The protocol for the ICE + * The most recent RTT measurement for this stream in seconds. */ - protocol?: "tcp" | "udp"; + roundTripTime?: number; /** - * The type of the local candidate + * The cumulative RTT for all packets on this stream in seconds. */ - candidateType?: string; + totalRoundTripTime?: number; /** - * The priority of the local candidate + * The fraction of packets lost on this stream, calculated over a time interval. */ - priority?: number; + fractionLost?: number; /** - * The url of the ICE server + * The total number of RTT measurements for this stream. */ - url?: string; + roundTripTimeMeasurements?: number; /** - * The relay protocol the local candidate uses + * Additional information attached to this stats */ - relayProtocol?: "tcp" | "udp" | "tls"; + appData?: Record; } /** -* List of local ICE candidates +* Inbound RTPs */ -export type IceLocalCandidate = { +export type InboundRtpStats = { /** - * Refers to the peer connection the local candidate belongs to + * The time the stats were collected, in high-resolution time. */ - peerConnectionId?: string; + timestamp: number; /** - * The unique identifier of the local candidate + * Unique identifier of the stats object. */ - id?: string; + id: string; /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) + * Synchronization source identifier of the RTP stream. */ - address?: string; + ssrc: number; /** - * The port number of the local endpoint the ICE uses + * Kind of the media (e.g., 'audio' or 'video'). */ - port?: number; + kind: string; /** - * The protocol for the ICE + * Identifier for the media track associated with the RTP stream. */ - protocol?: "tcp" | "udp"; + trackIdentifier: string; /** - * The type of the local candidate + * ID of the transport associated with the RTP stream. */ - candidateType?: string; + transportId?: string; /** - * The priority of the local candidate + * ID of the codec used for the RTP stream. */ - priority?: number; + codecId?: string; /** - * The url of the ICE server + * Number of packets received on the RTP stream. */ - url?: string; + packetsReceived?: number; /** - * The relay protocol the local candidate uses + * Number of packets lost on the RTP stream. */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} + packetsLost?: number; -/** -* List of compound measurements related to outbound video tracks -*/ -export type OutboundVideoTrack = { /** - * The RTP SSRC field + * Jitter of the RTP stream in seconds. */ - ssrc: number; + jitter?: number; /** - * The id of the track + * The MediaStream ID of the RTP stream. */ - trackId?: string; + mid?: string; /** - * The unique generated identifier of the peer connection the inbound audio track belongs to + * Remote stats object ID associated with the RTP stream. */ - peerConnectionId?: string; + remoteId?: string; /** - * The id of the SFU stream this track is related to + * Number of frames decoded. */ - sfuStreamId?: string; + framesDecoded?: number; /** - * The total number of packets sent on the corresponded synchronization source + * Number of keyframes decoded. */ - packetsSent?: number; + keyFramesDecoded?: number; /** - * The total number of bytes sent on the corresponded synchronization source + * Number of frames rendered. */ - bytesSent?: number; + framesRendered?: number; /** - * The rid encoding parameter of the corresponded synchronization source + * Number of frames dropped. */ - rid?: string; + framesDropped?: number; /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) + * Width of the decoded video frames. */ - headerBytesSent?: number; + frameWidth?: number; /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). + * Height of the decoded video frames. */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame height in pixels of the frames targeted by the media encoder - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponding media source - */ - framesPerSecond?: number; - - /** - * The total number of frames sent on the corresponding RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponding RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponding RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponding RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occurred on the corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} - -/** -* List of compound measurements related to outbound audio tracks -*/ -export type OutboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} - -/** -* List of compound measurements related to inbound video tracks -*/ -export type InboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote clientId the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The id of the SFU stream this track is sinked from - */ - sfuStreamId?: string; - - /** - * The id of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponding RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameHeight?: number; - - /** - * The frame rate of the video sent by the remote source on the corresponding RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream - */ - qpSum?: number; - - /** - * The total time spent on decoding video on the corresponding RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay on the corresponding RTP stream - */ - totalInterFrameDelay?: number; - - /** - * The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponding RTP stream - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} - -/** -* List of compound measurements related to inbound audio tracks -*/ -export type InboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The ID of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote client ID the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The ID of the SFU stream this track is synced from - */ - sfuStreamId?: string; - - /** - * The ID of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponding synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponding synchronization source - */ - packetsLost?: number; - - /** - * The corresponding synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets that missed the playout point and were therefore discarded by the jitter buffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponding synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} - -/** -* List of certificates the client provided -*/ -export type Certificate = { - /** - * The fingerprint of the certificate. - */ - fingerprint?: string; - - /** - * The hash function used to generate the fingerprint. - */ - fingerprintAlgorithm?: string; - - /** - * The DER encoded base-64 representation of the certificate. - */ - base64Certificate?: string; - - /** - * The ID of the next certificate in the certificate chain - */ - issuerCertificateId?: string; - -} - -/** -* List of codec the client has -*/ -export type MediaCodecStats = { - /** - * Payload type used in the RTP encoding/decoding process. - */ - payloadType?: string; - - /** - * Indicates the role of the codec (encode or decode) - */ - codecType?: "encode" | "decode"; - - /** - * The MIME type of the media, e.g., audio/opus. - */ - mimeType?: string; - - /** - * The clock rate used in RTP transport to generate the timestamp for the carried frames - */ - clockRate?: number; - - /** - * Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented - */ - channels?: number; - - /** - * The SDP line determines the codec - */ - sdpFmtpLine?: string; - -} - -/** -* WebRTC App provided information related to the operation system the client uses. -*/ -export type MediaSourceStat = { - /** - * The unique identifier of the corresponding media track - */ - trackIdentifier?: string; - - /** - * The type of the media the MediaSource produces. - */ - kind?: "audio" | "video"; - - /** - * Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. - */ - relayedSource?: boolean; - - /** - * The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. - */ - audioLevel?: number; - - /** - * The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy - */ - totalAudioEnergy?: number; - - /** - * The duration of the audio type media source - */ - totalSamplesDuration?: number; - - /** - * if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLoss?: number; - - /** - * www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; + frameHeight?: number; /** - * The width, in pixels, of the last frame originating from the media source + * Frame rate in frames per second. */ - width?: number; + framesPerSecond?: number; /** - * The height, in pixels, of the last frame originating from the media source + * Sum of the Quantization Parameter values for decoded frames. */ - height?: number; + qpSum?: number; /** - * The total number of frames originating from the media source + * Total time spent decoding in seconds. */ - frames?: number; + totalDecodeTime?: number; /** - * The number of frames originating from the media source in the last second + * Sum of inter-frame delays in seconds. */ - framesPerSecond?: number; - -} + totalInterFrameDelay?: number; -/** -* Candidate pair stats -*/ -export type IceCandidatePair = { /** - * The unique identifier of the peer connection + * Sum of squared inter-frame delays in seconds. */ - candidatePairId: string; + totalSquaredInterFrameDelay?: number; /** - * The unique identifier of the peer connection + * Number of times playback was paused. */ - peerConnectionId: string; + pauseCount?: number; /** - * The label associated with the peer connection + * Total duration of pauses in seconds. */ - label?: string; + totalPausesDuration?: number; /** - * The identifier of the transport the ice candidate pair is negotiated on + * Number of times playback was frozen. */ - transportId?: string; + freezeCount?: number; /** - * The unique identifier of the candidate the negotiated pair is selected on the local side + * Total duration of freezes in seconds. */ - localCandidateId?: string; + totalFreezesDuration?: number; /** - * The unique identifier of the candidate the negotiated pair is selected on the remote side + * Timestamp of the last packet received. */ - remoteCandidateId?: string; + lastPacketReceivedTimestamp?: number; /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport + * Total header bytes received. */ - state?: string; + headerBytesReceived?: number; /** - * Indicates if the ice candidate pair is nominated or not + * Total packets discarded. */ - nominated?: boolean; + packetsDiscarded?: number; /** - * The total number of packets sent using the last selected candidate pair over the corresponding transport + * Total bytes received from FEC. */ - packetsSent?: number; + fecBytesReceived?: number; /** - * The total number of packets received using the last selected candidate pair over the corresponding transport + * Total packets received from FEC. */ - packetsReceived?: number; + fecPacketsReceived?: number; /** - * The total number of bytes sent using the last selected candidate pair over the corresponding transport + * Total FEC packets discarded. */ - bytesSent?: number; + fecPacketsDiscarded?: number; /** - * The total number of bytes received using the last selected candidate pair over the corresponding transport + * Total bytes received on the RTP stream. */ bytesReceived?: number; /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) + * Number of NACKs sent. */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; + nackCount?: number; /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport + * Number of Full Intra Requests sent. */ - totalRoundTripTime?: number; + firCount?: number; /** - * Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport + * Number of Picture Loss Indications sent. */ - currentRoundTripTime?: number; + pliCount?: number; /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport + * Total processing delay in seconds. */ - availableOutgoingBitrate?: number; + totalProcessingDelay?: number; /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport + * Estimated timestamp of playout. */ - availableIncomingBitrate?: number; + estimatedPlayoutTimestamp?: number; /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport + * Total jitter buffer delay in seconds. */ - requestsReceived?: number; + jitterBufferDelay?: number; /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport + * Target delay for the jitter buffer in seconds. */ - requestsSent?: number; + jitterBufferTargetDelay?: number; /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport + * Number of packets emitted from the jitter buffer. */ - responsesReceived?: number; + jitterBufferEmittedCount?: number; /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport + * Minimum delay of the jitter buffer in seconds. */ - responsesSent?: number; + jitterBufferMinimumDelay?: number; /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport + * Total audio samples received. */ - consentRequestsSent?: number; + totalSamplesReceived?: number; /** - * Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport + * Number of concealed audio samples. */ - packetsDiscardedOnSend?: number; + concealedSamples?: number; /** - * Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport + * Number of silent audio samples concealed. */ - bytesDiscardedOnSend?: number; - -} + silentConcealedSamples?: number; -/** -* Transport stats of Peer Connection -*/ -export type PeerConnectionTransport = { /** - * The identifier of the transport the ICE candidate pair is negotiated on + * Number of audio concealment events. */ - transportId: string; + concealmentEvents?: number; /** - * The unique identifier of the peer connection + * Number of audio samples inserted for deceleration. */ - peerConnectionId: string; + insertedSamplesForDeceleration?: number; /** - * The label associated with the peer connection + * Number of audio samples removed for acceleration. */ - label?: string; + removedSamplesForAcceleration?: number; /** - * Represents the total number of packets sent on the corresponding transport + * Audio level in the range [0.0, 1.0]. */ - packetsSent?: number; + audioLevel?: number; /** - * Represents the total number of packets received on the corresponding transport + * Total audio energy in the stream. */ - packetsReceived?: number; + totalAudioEnergy?: number; /** - * Represents the total amount of bytes sent on the corresponding transport + * Total duration of all received audio samples in seconds. */ - bytesSent?: number; + totalSamplesDuration?: number; /** - * Represents the total amount of bytes received on the corresponding transport + * Total number of frames received. */ - bytesReceived?: number; + framesReceived?: number; /** - * Represents the current role of ICE under DTLS Transport + * Decoder implementation used for decoding frames. */ - iceRole?: string; + decoderImplementation?: string; /** - * Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport + * Playout identifier for the RTP stream. */ - iceLocalUsernameFragment?: string; + playoutId?: string; /** - * Represents the current state of DTLS for the peer connection transport layer + * Indicates if the decoder is power-efficient. */ - dtlsState?: string; + powerEfficientDecoder?: boolean; /** - * The identifier of the candidate pair the transport currently uses + * Number of frames assembled from multiple packets. */ - selectedCandidatePairId?: string; + framesAssembledFromMultiplePackets?: number; /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer + * Total assembly time for frames in seconds. */ - iceState?: string; + totalAssemblyTime?: number; /** - * If DTLS negotiated, it gives the ID of the local certificate + * Number of retransmitted packets received. */ - localCertificateId?: string; + retransmittedPacketsReceived?: number; /** - * If DTLS negotiated, it gives the ID of the remote certificate + * Number of retransmitted bytes received. */ - remoteCertificateId?: string; + retransmittedBytesReceived?: number; /** - * Represents the version number of the TLS used in the corresponding transport + * SSRC of the retransmission stream. */ - tlsVersion?: string; + rtxSsrc?: number; /** - * Represents the name of the DTLS cipher used in the corresponding transport + * SSRC of the FEC stream. */ - dtlsCipher?: string; + fecSsrc?: number; /** - * The role this host plays in DTLS negotiations + * Total corruption probability of packets. */ - dtlsRole?: "client" | "server" | "unknown"; + totalCorruptionProbability?: number; /** - * Represents the name of the SRTP cipher used in the corresponding transport + * Total squared corruption probability of packets. */ - srtpCipher?: string; + totalSquaredCorruptionProbability?: number; /** - * Represents the name of the IANA TLS Supported Groups used in the corresponding transport + * Number of corruption measurements. */ - tlsGroup?: string; + corruptionMeasurements?: number; /** - * The total number of candidate pair changes over the peer connection + * Additional information attached to this stats */ - selectedCandidatePairChanges?: number; + appData?: Record; } /** -* Measurements about the data channels currently available on peer connections +* Codec items */ -export type DataChannel = { +export type CodecStats = { /** - * The id of the peer connection the data channel is assigned to + * The timestamp when the stats were generated. */ - peerConnectionId: string; - - /** - * The id of the data channel assigned by the peer connection when it is opened - */ - dataChannelIdentifier?: number; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol the data channel utilizes - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; + timestamp: number; /** - * The total number of messages sent on the data channel + * The type of the stats. */ - messageSent?: number; + type: string; /** - * The total number of bytes sent on the data channel + * The unique identifier for the stats object. */ - bytesSent?: number; + id: string; /** - * The total number of messages received on the data channel + * The payload type of the codec. */ - messageReceived?: number; + payloadType: number; /** - * The total number of bytes received on the data channel + * The identifier of the transport associated with the codec. */ - bytesReceived?: number; - -} + transportId: string; -/** -* User provided custom observer events -*/ -export type CustomObserverEvent = { /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) + * The MIME type of the codec. */ - name: string; + mimeType: string; /** - * The identifier of the media track the event is related to + * The clock rate of the codec in Hz. */ - mediaTrackId?: string; + clockRate?: number; /** - * the human readable message of the event + * The number of audio channels for the codec, if applicable. */ - message?: string; + channels?: number; /** - * Additional attachment relevant for the event + * The SDP format-specific parameters line for the codec. */ - attachments?: string; + sdpFmtpLine?: string; /** - * The EPOCH timestamp the event is generated + * Additional information attached to this stats */ - timestamp?: number; + appData?: Record; } /** -* User provided custom call events +* docs */ -export type CustomCallEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * the value of the event - */ - value?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - +export type PeerConnectionSample = { /** - * the human readable message of the event + * Unique identifier of the stats object. */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} + peerConnectionId: string; -/** -* The WebRTC app provided custom stats payload -*/ -export type ExtensionStat = { /** - * The type of the extension stats the custom app provides + * Additional information attached to this sample */ - type: string; + appData?: Record; /** - * The payload of the extension stats the custom app provides + * Codec items */ - payload: string; - -} + codecs?: CodecStats[]; -/** -* The WebRTC app provided list of the media devices the client has. -*/ -export type MediaDevice = { /** - * the provided id of the media input / output + * Inbound RTPs */ - id?: string; + inboundRtps?: InboundRtpStats[]; /** - * The media kind of the media device + * Remote Inbound RTPs */ - kind?: "videoinput" | "audioinput" | "audiooutput"; + remoteInboundRtps?: RemoteInboundRtpStats[]; /** - * The name of the device + * Outbound RTPs */ - label?: string; - -} + outboundRtps?: OutboundRtpStats[]; -/** -* WebRTC App provided information related to the operating system the client uses. -*/ -export type OperationSystem = { /** - * The name of the operating system (e.g., Linux) the WebRTC app uses + * Remote Outbound RTPs */ - name?: string; + remoteOutboundRtps?: RemoteOutboundRtpStats[]; /** - * The version of the operating system + * Audio Source Stats */ - version?: string; + audioSources?: AudioSourceStats[]; /** - * The name of the version of the operating system + * Video Source Stats */ - versionName?: string; - -} + videoSources?: VideoSourceStats[]; -/** -* WebRTC App provided information related to the browser the client uses. -*/ -export type Browser = { /** - * The name of the operating system (e.g., Linux) the WebRTC app uses + * Audio Playout Stats */ - name?: string; + audioPlayouts?: AudioPlayoutStats[]; /** - * The version of the operating system + * PeerConnection Transport Stats */ - version?: string; - -} + peerConnectionTransports?: PeerConnectionTransportStats[]; -/** -* WebRTC App provided information related to the platform the client uses. -*/ -export type Platform = { /** - * The name of the platform + * Data Channels Stats */ - type?: string; + dataChannels?: DataChannelStats[]; /** - * The name of the vendor + * ICE Transport Stats */ - vendor?: string; + iceTransports?: IceTransportStats[]; /** - * The name of the model + * ICE Candidate Stats */ - model?: string; - -} + iceCandidates?: IceCandidateStats[]; -/** -* WebRTC App provided information related to the engine the client uses. -*/ -export type Engine = { /** - * The name of the Engine + * ICE Candidate Pair Stats */ - name?: string; + iceCandidatePairs?: IceCandidatePairStats[]; /** - * The version of the engine + * Certificates */ - version?: string; + certificates?: CertificateStats[]; } @@ -2521,7 +1566,7 @@ export type Engine = { */ export type ClientSample = { /** - * Unique id of the client providing samples. Must be a valid UUID. + * Unique id of the client providing samples. */ clientId: string; @@ -2531,195 +1576,33 @@ export type ClientSample = { timestamp: number; /** - * If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. + * the unique identifier of the call or session */ callId?: string; /** - * The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. - */ - sampleSeq?: number; - - /** - * The WebRTC app configured room id the client joined for the call. - */ - roomId?: string; - - /** - * The WebRTC app configured human-readable user id the client is joined. - */ - userId?: string; - - /** - * WebRTC App provided information related to the engine the client uses. - */ - engine?: Engine; - - /** - * WebRTC App provided information related to the platform the client uses. - */ - platform?: Platform; - - /** - * WebRTC App provided information related to the browser the client uses. - */ - browser?: Browser; - - /** - * WebRTC App provided information related to the operating system the client uses. + * Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) */ - os?: OperationSystem; + appData?: Record; /** - * The WebRTC app provided list of the media constraints the client has. + * Samples taken PeerConnections */ - mediaConstraints?: string[]; + peerConnections?: PeerConnectionSample[]; /** - * The WebRTC app provided list of the media devices the client has. + * A list of additional client events. */ - mediaDevices?: MediaDevice[]; + clientEvents?: ClientEvent[]; /** - * The WebRTC app provided list of user media errors the client has. + * A list of additional client events. */ - userMediaErrors?: string[]; + clientMetaItems?: ClientMetaData[]; /** * The WebRTC app provided custom stats payload */ extensionStats?: ExtensionStat[]; - /** - * User provided custom call events - */ - customCallEvents?: CustomCallEvent[]; - - /** - * User provided custom observer events - */ - customObserverEvents?: CustomObserverEvent[]; - - /** - * The WebRTC app provided list of ICE servers the client used. - */ - iceServers?: string[]; - - /** - * The local part of the Signal Description Protocol to establish connections - */ - localSDPs?: string[]; - - /** - * Measurements about the data channels currently available on peer connections - */ - dataChannels?: DataChannel[]; - - /** - * Transport stats of Peer Connection - */ - pcTransports?: PeerConnectionTransport[]; - - /** - * Candidate pair stats - */ - iceCandidatePairs?: IceCandidatePair[]; - - /** - * WebRTC App provided information related to the operation system the client uses. - */ - mediaSources?: MediaSourceStat[]; - - /** - * List of codec the client has - */ - codecs?: MediaCodecStats[]; - - /** - * List of certificates the client provided - */ - certificates?: Certificate[]; - - /** - * List of compound measurements related to inbound audio tracks - */ - inboundAudioTracks?: InboundAudioTrack[]; - - /** - * List of compound measurements related to inbound video tracks - */ - inboundVideoTracks?: InboundVideoTrack[]; - - /** - * List of compound measurements related to outbound audio tracks - */ - outboundAudioTracks?: OutboundAudioTrack[]; - - /** - * List of compound measurements related to outbound video tracks - */ - outboundVideoTracks?: OutboundVideoTrack[]; - - /** - * List of local ICE candidates - */ - iceLocalCandidates?: IceLocalCandidate[]; - - /** - * List of remote ICE candidates - */ - iceRemoteCandidates?: IceRemoteCandidate[]; - - /** - * The offset from GMT in hours - */ - timeZoneOffsetInHours?: number; - - /** - * Special marker for the samples - */ - marker?: string; - -} - -/** -* Additional control flags indicate various operation has to be performed -*/ -export type Controls = { - /** - * Indicate that the server should close the connection - */ - close?: boolean; - - /** - * Holds a new claim to process - */ - accessClaim?: string; - -} - -/** -* Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. -*/ -export type Samples = { - /** - * Additional control flags indicate various operation has to be performed - */ - controls?: Controls; - - /** - * Samples taken from the client - */ - clientSamples?: ClientSample[]; - - /** - * Samples taken from an Sfu - */ - sfuSamples?: SfuSample[]; - - /** - * Samples taken from the TURN server - */ - turnSamples?: TurnSample[]; - } diff --git a/npm-samples-encoder/src/MediaSourceStatsEncoder.ts b/npm-samples-encoder/src/MediaSourceStatsEncoder.ts deleted file mode 100644 index 856492f0..00000000 --- a/npm-samples-encoder/src/MediaSourceStatsEncoder.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { MediaSourceStat } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_MediaSourceStat, - Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum -} from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class MediaSourceStatsEncoder { - private _audioLevel?: number; - private _droppedSamplesDuration?: number; - private _droppedSamplesEvents?: number; - private _echoReturnLoss?: number; - private _echoReturnLossEnhancement?: number; - private _frames?: number; - private _framesPerSecond?: number; - private _height?: number; - private _kind?: Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum; - private _relayedSource?: boolean; - private _totalAudioEnergy?: number; - private _totalCaptureDelay?: number; - private _totalSamplesCaptured?: number; - private _totalSamplesDuration?: number; - private _trackIdentifier?: Uint8Array; - private _width?: number; - private _visited = false; - - public constructor( - public readonly trackIdentifier: string, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._trackIdentifier = this._options.trackIdIsUuid ? uuidToByteArray(trackIdentifier) : stringToBytesArray(trackIdentifier); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: MediaSourceStat): Samples_ClientSample_MediaSourceStat { - this._visited = true; - - const result = new Samples_ClientSample_MediaSourceStat({ - trackIdentifier: this._trackIdentifier, - kind: this._encodeKind(sample.kind), - relayedSource: this._encodeRelayedSource(sample.relayedSource), - audioLevel: this._encodeAudioLevel(sample.audioLevel), - totalAudioEnergy: this._encodeTotalAudioEnergy(sample.totalAudioEnergy), - totalSamplesDuration: this._encodeTotalSamplesDuration(sample.totalSamplesDuration), - echoReturnLoss: this._encodeEchoReturnLoss(sample.echoReturnLoss), - echoReturnLossEnhancement: this._encodeEchoReturnLossEnhancement(sample.echoReturnLossEnhancement), - droppedSamplesDuration: this._encodeDroppedSamplesDuration(sample.droppedSamplesDuration), - droppedSamplesEvents: this._encodeDroppedSamplesEvents(sample.droppedSamplesEvents), - totalCaptureDelay: this._encodeTotalCaptureDelay(sample.totalCaptureDelay), - totalSamplesCaptured: this._encodeTotalSamplesCaptured(sample.totalSamplesCaptured), - width: this._encodeWidth(sample.width), - height: this._encodeHeight(sample.height), - frames: this._encodeFrames(sample.frames), - framesPerSecond: this._encodeFramesPerSecond(sample.framesPerSecond), - }); - return result; - } - - private _encodeKind(kind?: MediaSourceStat['kind']): Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum | undefined { - if (!kind) return; - if (kind === 'audio' && this._kind !== Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum.AUDIO) { - this._kind = Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum.AUDIO; - return this._kind; - } - if (kind === 'video' && this._kind !== Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum.VIDEO) { - this._kind = Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum.VIDEO; - return this._kind; - } - } - - private _encodeRelayedSource(relayedSource?: MediaSourceStat['relayedSource']): boolean | undefined { - if (!relayedSource) return; - if (relayedSource === this._relayedSource) return; - this._relayedSource = relayedSource; - return this._relayedSource; - } - - private _encodeAudioLevel(audioLevel?: number): number | undefined { - if (!audioLevel) return; - if (audioLevel === this._audioLevel) return; - this._audioLevel = audioLevel; - return this._audioLevel; - } - - private _encodeTotalAudioEnergy(totalAudioEnergy?: number): number | undefined { - if (!totalAudioEnergy) return; - if (totalAudioEnergy === this._totalAudioEnergy) return; - this._totalAudioEnergy = totalAudioEnergy; - return this._totalAudioEnergy; - } - - private _encodeTotalSamplesDuration(totalSamplesDuration?: number): number | undefined { - if (!totalSamplesDuration) return; - if (totalSamplesDuration === this._totalSamplesDuration) return; - this._totalSamplesDuration = totalSamplesDuration; - return this._totalSamplesDuration; - } - - private _encodeEchoReturnLoss(echoReturnLoss?: number): number | undefined { - if (!echoReturnLoss) return; - if (echoReturnLoss === this._echoReturnLoss) return; - this._echoReturnLoss = echoReturnLoss; - return this._echoReturnLoss; - } - - private _encodeEchoReturnLossEnhancement(echoReturnLossEnhancement?: number): number | undefined { - if (!echoReturnLossEnhancement) return; - if (echoReturnLossEnhancement === this._echoReturnLossEnhancement) return; - this._echoReturnLossEnhancement = echoReturnLossEnhancement; - return this._echoReturnLossEnhancement; - } - - private _encodeDroppedSamplesDuration(droppedSamplesDuration?: number): number | undefined { - if (!droppedSamplesDuration) return; - if (droppedSamplesDuration === this._droppedSamplesDuration) return; - this._droppedSamplesDuration = droppedSamplesDuration; - return this._droppedSamplesDuration; - } - - private _encodeDroppedSamplesEvents(droppedSamplesEvents?: number): number | undefined { - if (!droppedSamplesEvents) return; - if (droppedSamplesEvents === this._droppedSamplesEvents) return; - this._droppedSamplesEvents = droppedSamplesEvents; - return this._droppedSamplesEvents; - } - - private _encodeTotalCaptureDelay(totalCaptureDelay?: number): number | undefined { - if (!totalCaptureDelay) return; - if (totalCaptureDelay === this._totalCaptureDelay) return; - this._totalCaptureDelay = totalCaptureDelay; - return this._totalCaptureDelay; - } - - private _encodeTotalSamplesCaptured(totalSamplesCaptured?: number): number | undefined { - if (!totalSamplesCaptured) return; - if (totalSamplesCaptured === this._totalSamplesCaptured) return; - this._totalSamplesCaptured = totalSamplesCaptured; - return this._totalSamplesCaptured; - } - - private _encodeWidth(width?: number): number | undefined { - if (!width) return; - if (width === this._width) return; - this._width = width; - return this._width; - } - - private _encodeHeight(height?: number): number | undefined { - if (!height) return; - if (height === this._height) return; - this._height = height; - return this._height; - } - - private _encodeFrames(frames?: number): number | undefined { - if (!frames) return; - if (frames === this._frames) return; - this._frames = frames; - return this._frames; - } - - private _encodeFramesPerSecond(framesPerSecond?: number): number | undefined { - if (!framesPerSecond) return; - if (framesPerSecond === this._framesPerSecond) return; - this._framesPerSecond = framesPerSecond; - return this._framesPerSecond; - } -} diff --git a/npm-samples-encoder/src/OutboundAudioTrackEncoder.ts b/npm-samples-encoder/src/OutboundAudioTrackEncoder.ts deleted file mode 100644 index 9dae58c4..00000000 --- a/npm-samples-encoder/src/OutboundAudioTrackEncoder.ts +++ /dev/null @@ -1,326 +0,0 @@ -import { OutboundAudioTrack } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_OutboundAudioTrack } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class OutboundAudioTrackEncoder { - private readonly _ssrc?: bigint; - private readonly _trackId: Uint8Array; - private _active?: boolean; - private _audioLevel?: number; - private _averageRtcpInterval?: number; - private _bytesSent?: number; - private _droppedSamplesDuration?: number; - private _droppedSamplesEvents?: number; - private _echoReturnLoss?: number; - private _echoReturnLossEnhancement?: number; - private _encoderImplementation?: string; - private _fractionLost?: number; - private _headerBytesSent?: number; - private _jitter?: number; - private _nackCount?: number; - private _packetsLost?: number; - private _packetsReceived?: number; - private _packetsSent?: number; - private _peerConnectionId?: string; - private _relayedSource?: boolean; - private _retransmittedBytesSent?: number; - private _retransmittedPacketsSent?: number; - private _rid?: string; - private _roundTripTime?: number; - private _roundTripTimeMeasurements?: number; - private _sfuStreamId?: string; - private _targetBitrate?: number; - private _totalAudioEnergy?: number; - private _totalCaptureDelay?: number; - private _totalEncodedBytesTarget?: number; - private _totalPacketSendDelay?: number; - private _totalRoundTripTime?: number; - private _totalSamplesCaptured?: number; - private _totalSamplesDuration?: number; - private _visited = false; - - public constructor( - public readonly trackId: string, - public readonly ssrc: number, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._trackId = this._options.trackIdIsUuid ? uuidToByteArray(trackId) : stringToBytesArray(trackId); - this._ssrc = BigInt(ssrc); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: OutboundAudioTrack): Samples_ClientSample_OutboundAudioTrack { - this._visited = true; - - const result = new Samples_ClientSample_OutboundAudioTrack({ - trackId: this._trackId, - ssrc: this._ssrc, - active: this._encodeActive(sample.active), - audioLevel: this._encodeAudioLevel(sample.audioLevel), - averageRtcpInterval: this._encodeAverageRtcpInterval(sample.averageRtcpInterval), - bytesSent: this._encodeBytesSent(sample.bytesSent), - droppedSamplesDuration: this._encodeDroppedSamplesDuration(sample.droppedSamplesDuration), - droppedSamplesEvents: this._encodeDroppedSamplesEvents(sample.droppedSamplesEvents), - echoReturnLoss: this._encodeEchoReturnLoss(sample.echoReturnLoss), - echoReturnLossEnhancement: this._encodeEchoReturnLossEnhancement(sample.echoReturnLossEnhancement), - encoderImplementation: this._encodeEncoderImplementation(sample.encoderImplementation), - fractionLost: this._encodeFractionLost(sample.fractionLost), - headerBytesSent: this._encodeHeaderBytesSent(sample.headerBytesSent), - jitter: this._encodeJitter(sample.jitter), - nackCount: this._encodeNackCount(sample.nackCount), - packetsLost: this._encodePacketsLost(sample.packetsLost), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - peerConnectionId: this._encodePeerConnectionId(sample.peerConnectionId), - relayedSource: this._encodeRelayedSource(sample.relayedSource), - retransmittedBytesSent: this._encodeRetransmittedBytesSent(sample.retransmittedBytesSent), - retransmittedPacketsSent: this._encodeRetransmittedPacketsSent(sample.retransmittedPacketsSent), - rid: this._encodeRid(sample.rid), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime), - roundTripTimeMeasurements: this._encodeRoundTripTimeMeasurements(sample.roundTripTimeMeasurements), - sfuStreamId: this._encodeSfuStreamId(sample.sfuStreamId), - targetBitrate: this._encodeTargetBitrate(sample.targetBitrate), - totalAudioEnergy: this._encodeTotalAudioEnergy(sample.totalAudioEnergy), - totalCaptureDelay: this._encodeTotalCaptureDelay(sample.totalCaptureDelay), - totalEncodedBytesTarget: this._encodeTotalEncodedBytesTarget(sample.totalEncodedBytesTarget), - totalPacketSendDelay: this._encodeTotalPacketSendDelay(sample.totalPacketSendDelay), - totalRoundTripTime: this._encodeTotalRoundTripTime(sample.totalRoundTripTime), - totalSamplesCaptured: this._encodeTotalSamplesCaptured(sample.totalSamplesCaptured), - totalSamplesDuration: this._encodeTotalSamplesDuration(sample.totalSamplesDuration), - }); - return result; - } - - private _encodeAudioLevel(audioLevel?: number): number | undefined { - if (!audioLevel) return; - if (audioLevel === this._audioLevel) return; - this._audioLevel = audioLevel; - return this._audioLevel; - } - - private _encodeActive(active?: boolean): boolean | undefined { - if (active === undefined) return; - if (active === this._active) return; - this._active = active; - return this._active; - } - - private _encodeAverageRtcpInterval(averageRtcpInterval?: number): number | undefined { - if (!averageRtcpInterval) return; - if (averageRtcpInterval === this._averageRtcpInterval) return; - this._averageRtcpInterval = averageRtcpInterval; - return this._averageRtcpInterval; - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeDroppedSamplesDuration(droppedSamplesDuration?: number): number | undefined { - if (!droppedSamplesDuration) return; - if (droppedSamplesDuration === this._droppedSamplesDuration) return; - this._droppedSamplesDuration = droppedSamplesDuration; - return this._droppedSamplesDuration; - } - - private _encodeDroppedSamplesEvents(droppedSamplesEvents?: number): number | undefined { - if (!droppedSamplesEvents) return; - if (droppedSamplesEvents === this._droppedSamplesEvents) return; - this._droppedSamplesEvents = droppedSamplesEvents; - return this._droppedSamplesEvents; - } - - private _encodeEchoReturnLoss(echoReturnLoss?: number): number | undefined { - if (!echoReturnLoss) return; - if (echoReturnLoss === this._echoReturnLoss) return; - this._echoReturnLoss = echoReturnLoss; - return this._echoReturnLoss; - } - - private _encodeEchoReturnLossEnhancement(echoReturnLossEnhancement?: number): number | undefined { - if (!echoReturnLossEnhancement) return; - if (echoReturnLossEnhancement === this._echoReturnLossEnhancement) return; - this._echoReturnLossEnhancement = echoReturnLossEnhancement; - return this._echoReturnLossEnhancement; - } - - private _encodeEncoderImplementation(encoderImplementation?: string): string | undefined { - if (!encoderImplementation) return; - if (encoderImplementation === this._encoderImplementation) return; - this._encoderImplementation = encoderImplementation; - return this._encoderImplementation; - } - - private _encodeFractionLost(fractionLost?: number): number | undefined { - if (!fractionLost) return; - if (fractionLost === this._fractionLost) return; - this._fractionLost = fractionLost; - return this._fractionLost; - } - - private _encodeHeaderBytesSent(headerBytesSent?: number): bigint | undefined { - if (!headerBytesSent) return; - if (headerBytesSent === this._headerBytesSent) return; - this._headerBytesSent = headerBytesSent; - return BigInt(this._headerBytesSent); - } - - private _encodeJitter(jitter?: number): number | undefined { - if (!jitter) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (!nackCount) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (!packetsLost) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (!packetsReceived) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (!packetsSent) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodePeerConnectionId(peerConnectionId?: string): Uint8Array | undefined { - if (!peerConnectionId) return; - if (peerConnectionId === this._peerConnectionId) return; - this._peerConnectionId = peerConnectionId; - return this._options.peerConnectionIdIsUuid ? uuidToByteArray(this._peerConnectionId) : stringToBytesArray(this._peerConnectionId); - } - - private _encodeRelayedSource(relayedSource?: boolean): boolean | undefined { - if (relayedSource === undefined) return; - if (relayedSource === this._relayedSource) return; - this._relayedSource = relayedSource; - return this._relayedSource; - } - - private _encodeRetransmittedBytesSent(retransmittedBytesSent?: number): bigint | undefined { - if (!retransmittedBytesSent) return; - if (retransmittedBytesSent === this._retransmittedBytesSent) return; - this._retransmittedBytesSent = retransmittedBytesSent; - return BigInt(this._retransmittedBytesSent); - } - - private _encodeRetransmittedPacketsSent(retransmittedPacketsSent?: number): number | undefined { - if (!retransmittedPacketsSent) return; - if (retransmittedPacketsSent === this._retransmittedPacketsSent) return; - this._retransmittedPacketsSent = retransmittedPacketsSent; - return this._retransmittedPacketsSent; - } - - private _encodeRid(rid?: string): string | undefined { - if (!rid) return; - if (rid === this._rid) return; - this._rid = rid; - return this._rid; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (!roundTripTime) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodeRoundTripTimeMeasurements(roundTripTimeMeasurements?: number): number | undefined { - if (!roundTripTimeMeasurements) return; - if (roundTripTimeMeasurements === this._roundTripTimeMeasurements) return; - this._roundTripTimeMeasurements = roundTripTimeMeasurements; - return this._roundTripTimeMeasurements; - } - - private _encodeSfuStreamId(sfuStreamId?: string): Uint8Array | undefined { - if (!sfuStreamId) return; - if (sfuStreamId === this._sfuStreamId) return; - this._sfuStreamId = sfuStreamId; - return this._options.sfuStreamIdIsUuid - ? uuidToByteArray(this._sfuStreamId) - : stringToBytesArray(this._sfuStreamId) - ; - } - - private _encodeTargetBitrate(targetBitrate?: number): number | undefined { - if (!targetBitrate) return; - if (targetBitrate === this._targetBitrate) return; - this._targetBitrate = targetBitrate; - return this._targetBitrate; - } - - private _encodeTotalAudioEnergy(totalAudioEnergy?: number): number | undefined { - if (!totalAudioEnergy) return; - if (totalAudioEnergy === this._totalAudioEnergy) return; - this._totalAudioEnergy = totalAudioEnergy; - return this._totalAudioEnergy; - } - - private _encodeTotalCaptureDelay(totalCaptureDelay?: number): number | undefined { - if (!totalCaptureDelay) return; - if (totalCaptureDelay === this._totalCaptureDelay) return; - this._totalCaptureDelay = totalCaptureDelay; - return this._totalCaptureDelay; - } - - private _encodeTotalEncodedBytesTarget(totalEncodedBytesTarget?: number): bigint | undefined { - if (!totalEncodedBytesTarget) return; - if (totalEncodedBytesTarget === this._totalEncodedBytesTarget) return; - this._totalEncodedBytesTarget = totalEncodedBytesTarget; - return BigInt(this._totalEncodedBytesTarget); - } - - private _encodeTotalPacketSendDelay(totalPacketSendDelay?: number): number | undefined { - if (!totalPacketSendDelay) return; - if (totalPacketSendDelay === this._totalPacketSendDelay) return; - this._totalPacketSendDelay = totalPacketSendDelay; - return this._totalPacketSendDelay; - } - - private _encodeTotalRoundTripTime(totalRoundTripTime?: number): number | undefined { - if (!totalRoundTripTime) return; - if (totalRoundTripTime === this._totalRoundTripTime) return; - this._totalRoundTripTime = totalRoundTripTime; - return this._totalRoundTripTime; - } - - private _encodeTotalSamplesCaptured(totalSamplesCaptured?: number): number | undefined { - if (!totalSamplesCaptured) return; - if (totalSamplesCaptured === this._totalSamplesCaptured) return; - this._totalSamplesCaptured = totalSamplesCaptured; - return this._totalSamplesCaptured; - } - - private _encodeTotalSamplesDuration(totalSamplesDuration?: number): number | undefined { - if (!totalSamplesDuration) return; - if (totalSamplesDuration === this._totalSamplesDuration) return; - this._totalSamplesDuration = totalSamplesDuration; - return this._totalSamplesDuration; - } -} diff --git a/npm-samples-encoder/src/OutboundRtpEncoder.ts b/npm-samples-encoder/src/OutboundRtpEncoder.ts new file mode 100644 index 00000000..eb95acae --- /dev/null +++ b/npm-samples-encoder/src/OutboundRtpEncoder.ts @@ -0,0 +1,223 @@ +import { + AppDataEncoder, + BooleanToBooleanEncoder, + NumberToNumberEncoder, + OneTimePassEncoder, + StringToStringEncoder, +} from "./utils"; +import { ClientSample_PeerConnectionSample_OutboundRtpStats, ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations } from "./OutputSamples"; +import { Encoder } from "./utils"; +import { OutboundRtpStats } from "./InputSamples"; + +export class QualityLimitationDurationsEncoder implements Encoder { + private _value: OutboundRtpStats['qualityLimitationDurations'] | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: OutboundRtpStats['qualityLimitationDurations']) { + if (newValue === undefined) return; + if (newValue.bandwidth === this._value?.bandwidth && + newValue.cpu === this._value?.cpu && + newValue.none === this._value?.none && + newValue.other === this._value?.other + ) { + return; + } + this._value = newValue; + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations({ + bandwidth: newValue.bandwidth, + cpu: newValue.cpu, + none: newValue.none, + other: newValue.other, + }); + } +} + + +export class OutboundRtpEncoder implements Encoder { + private readonly _ssrc: bigint; + private _visited = false; + + private readonly _idEncoder: StringToStringEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _activeEncoder: BooleanToBooleanEncoder; + private readonly _bytesSentEncoder: NumberToNumberEncoder; + private readonly _codecIdEncoder: OneTimePassEncoder; + private readonly _encoderImplementationEncoder: OneTimePassEncoder; + private readonly _firCountEncoder: NumberToNumberEncoder; + private readonly _frameHeightEncoder: NumberToNumberEncoder; + private readonly _frameWidthEncoder: NumberToNumberEncoder; + private readonly _framesEncodedEncoder: NumberToNumberEncoder; + private readonly _framesPerSecondEncoder: NumberToNumberEncoder; + private readonly _framesSentEncoder: NumberToNumberEncoder; + private readonly _headerBytesSentEncoder: NumberToNumberEncoder; + private readonly _hugeFramesSentEncoder: NumberToNumberEncoder; + private readonly _keyFramesEncodedEncoder: NumberToNumberEncoder; + private readonly _mediaSourceIdEncoder: OneTimePassEncoder; + private readonly _midEncoder: OneTimePassEncoder; + private readonly _nackCountEncoder: NumberToNumberEncoder; + private readonly _packetsSentEncoder: NumberToNumberEncoder; + private readonly _pliCountEncoder: NumberToNumberEncoder; + private readonly _powerEfficientEncoderEncoder: BooleanToBooleanEncoder; + private readonly _qpSumEncoder: NumberToNumberEncoder; + private readonly _qualityLimitationDurationsEncoder: QualityLimitationDurationsEncoder; + private readonly _qualityLimitationReasonEncoder: StringToStringEncoder; + private readonly _qualityLimitationResolutionChangesEncoder: NumberToNumberEncoder; + private readonly _remoteIdEncoder: StringToStringEncoder; + private readonly _retransmittedBytesSentEncoder: NumberToNumberEncoder; + private readonly _retransmittedPacketsSentEncoder: NumberToNumberEncoder; + private readonly _ridEncoder: StringToStringEncoder; + private readonly _rtxSsrcEncoder: NumberToNumberEncoder; + private readonly _scalabilityModeEncoder: StringToStringEncoder; + private readonly _targetBitrateEncoder: NumberToNumberEncoder; + private readonly _totalEncodeTimeEncoder: NumberToNumberEncoder; + private readonly _totalEncodedBytesTargetEncoder: NumberToNumberEncoder; + private readonly _totalPacketSendDelayEncoder: NumberToNumberEncoder; + private readonly _transportIdEncoder: OneTimePassEncoder; + + constructor( + ssrc: number, + private readonly _appDataEncoder: AppDataEncoder + ) { + this._ssrc = BigInt(ssrc); + + this._idEncoder = new StringToStringEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._timestampEncoder = new NumberToNumberEncoder(); + this._activeEncoder = new BooleanToBooleanEncoder(); + this._bytesSentEncoder = new NumberToNumberEncoder(); + this._codecIdEncoder = new OneTimePassEncoder(); + this._encoderImplementationEncoder = new OneTimePassEncoder(); + this._firCountEncoder = new NumberToNumberEncoder(); + this._frameHeightEncoder = new NumberToNumberEncoder(); + this._frameWidthEncoder = new NumberToNumberEncoder(); + this._framesEncodedEncoder = new NumberToNumberEncoder(); + this._framesPerSecondEncoder = new NumberToNumberEncoder(); + this._framesSentEncoder = new NumberToNumberEncoder(); + this._headerBytesSentEncoder = new NumberToNumberEncoder(); + this._hugeFramesSentEncoder = new NumberToNumberEncoder(); + this._keyFramesEncodedEncoder = new NumberToNumberEncoder(); + this._mediaSourceIdEncoder = new OneTimePassEncoder(); + this._midEncoder = new OneTimePassEncoder(); + this._nackCountEncoder = new NumberToNumberEncoder(); + this._packetsSentEncoder = new NumberToNumberEncoder(); + this._pliCountEncoder = new NumberToNumberEncoder(); + this._powerEfficientEncoderEncoder = new BooleanToBooleanEncoder(); + this._qpSumEncoder = new NumberToNumberEncoder(); + this._qualityLimitationDurationsEncoder = new QualityLimitationDurationsEncoder(); + this._qualityLimitationReasonEncoder = new StringToStringEncoder(); + this._qualityLimitationResolutionChangesEncoder = new NumberToNumberEncoder(); + this._remoteIdEncoder = new StringToStringEncoder(); + this._retransmittedBytesSentEncoder = new NumberToNumberEncoder(); + this._retransmittedPacketsSentEncoder = new NumberToNumberEncoder(); + this._ridEncoder = new StringToStringEncoder(); + this._rtxSsrcEncoder = new NumberToNumberEncoder(); + this._scalabilityModeEncoder = new StringToStringEncoder(); + this._targetBitrateEncoder = new NumberToNumberEncoder(); + this._totalEncodeTimeEncoder = new NumberToNumberEncoder(); + this._totalEncodedBytesTargetEncoder = new NumberToNumberEncoder(); + this._totalPacketSendDelayEncoder = new NumberToNumberEncoder(); + this._transportIdEncoder = new OneTimePassEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset() { + this._idEncoder.reset(); + this._kindEncoder.reset(); + this._timestampEncoder.reset(); + this._activeEncoder.reset(); + this._bytesSentEncoder.reset(); + this._codecIdEncoder.reset(); + this._encoderImplementationEncoder.reset(); + this._firCountEncoder.reset(); + this._frameHeightEncoder.reset(); + this._frameWidthEncoder.reset(); + this._framesEncodedEncoder.reset(); + this._framesPerSecondEncoder.reset(); + this._framesSentEncoder.reset(); + this._headerBytesSentEncoder.reset(); + this._hugeFramesSentEncoder.reset(); + this._keyFramesEncodedEncoder.reset(); + this._mediaSourceIdEncoder.reset(); + this._midEncoder.reset(); + this._nackCountEncoder.reset(); + this._packetsSentEncoder.reset(); + this._pliCountEncoder.reset(); + this._powerEfficientEncoderEncoder.reset(); + this._qpSumEncoder.reset(); + this._qualityLimitationDurationsEncoder.reset(); + this._qualityLimitationReasonEncoder.reset(); + this._qualityLimitationResolutionChangesEncoder.reset(); + this._remoteIdEncoder.reset(); + this._retransmittedBytesSentEncoder.reset(); + this._retransmittedPacketsSentEncoder.reset(); + this._ridEncoder.reset(); + this._rtxSsrcEncoder.reset(); + this._scalabilityModeEncoder.reset(); + this._targetBitrateEncoder.reset(); + this._totalEncodeTimeEncoder.reset(); + this._totalEncodedBytesTargetEncoder.reset(); + this._totalPacketSendDelayEncoder.reset(); + this._transportIdEncoder.reset(); + } + + public encode(sample: OutboundRtpStats): ClientSample_PeerConnectionSample_OutboundRtpStats { + this._visited = true; + + const result = new ClientSample_PeerConnectionSample_OutboundRtpStats({ + ssrc: this._ssrc, + id: this._idEncoder.encode(sample.id), + kind: this._kindEncoder.encode(sample.kind), + timestamp: this._timestampEncoder.encode(sample.timestamp), + active: this._activeEncoder.encode(sample.active), + appData: this._appDataEncoder.encode(sample.appData), + bytesSent: this._bytesSentEncoder.encode(sample.bytesSent), + codecId: this._codecIdEncoder.encode(sample.codecId), + encoderImplementation: this._encoderImplementationEncoder.encode(sample.encoderImplementation), + firCount: this._firCountEncoder.encode(sample.firCount), + frameHeight: this._frameHeightEncoder.encode(sample.frameHeight), + frameWidth: this._frameWidthEncoder.encode(sample.frameWidth), + framesEncoded: this._framesEncodedEncoder.encode(sample.framesEncoded), + framesPerSecond: this._framesPerSecondEncoder.encode(sample.framesPerSecond), + framesSent: this._framesSentEncoder.encode(sample.framesSent), + headerBytesSent: this._headerBytesSentEncoder.encode(sample.headerBytesSent), + hugeFramesSent: this._hugeFramesSentEncoder.encode(sample.hugeFramesSent), + keyFramesEncoded: this._keyFramesEncodedEncoder.encode(sample.keyFramesEncoded), + mediaSourceId: this._mediaSourceIdEncoder.encode(sample.mediaSourceId), + mid: this._midEncoder.encode(sample.mid), + nackCount: this._nackCountEncoder.encode(sample.nackCount), + packetsSent: this._packetsSentEncoder.encode(sample.packetsSent), + pliCount: this._pliCountEncoder.encode(sample.pliCount), + powerEfficientEncoder: this._powerEfficientEncoderEncoder.encode(sample.powerEfficientEncoder), + qpSum: this._qpSumEncoder.encode(sample.qpSum), + qualityLimitationDurations: this._qualityLimitationDurationsEncoder.encode(sample.qualityLimitationDurations), + qualityLimitationReason: this._qualityLimitationReasonEncoder.encode(sample.qualityLimitationReason), + qualityLimitationResolutionChanges: this._qualityLimitationResolutionChangesEncoder.encode(sample.qualityLimitationResolutionChanges), + remoteId: this._remoteIdEncoder.encode(sample.remoteId), + retransmittedBytesSent: this._retransmittedBytesSentEncoder.encode(sample.retransmittedBytesSent), + retransmittedPacketsSent: this._retransmittedPacketsSentEncoder.encode(sample.retransmittedPacketsSent), + rid: this._ridEncoder.encode(sample.rid), + rtxSsrc: this._rtxSsrcEncoder.encode(sample.rtxSsrc), + scalabilityMode: this._scalabilityModeEncoder.encode(sample.scalabilityMode), + targetBitrate: this._targetBitrateEncoder.encode(sample.targetBitrate), + totalEncodeTime: this._totalEncodeTimeEncoder.encode(sample.totalEncodeTime), + totalEncodedBytesTarget: this._totalEncodedBytesTargetEncoder.encode(sample.totalEncodedBytesTarget), + totalPacketSendDelay: this._totalPacketSendDelayEncoder.encode(sample.totalPacketSendDelay), + transportId: this._transportIdEncoder.encode(sample.transportId), + }); + + return result; + } +} \ No newline at end of file diff --git a/npm-samples-encoder/src/OutboundVideoTrackEncoder.ts b/npm-samples-encoder/src/OutboundVideoTrackEncoder.ts deleted file mode 100644 index a900a642..00000000 --- a/npm-samples-encoder/src/OutboundVideoTrackEncoder.ts +++ /dev/null @@ -1,435 +0,0 @@ -import { OutboundVideoTrack } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_ClientSample_OutboundVideoTrack } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class OutboundVideoTrackEncoder { - private readonly _ssrc?: bigint; - private readonly _trackId: Uint8Array; - private _active?: boolean; - private _averageRtcpInterval?: number; - private _bytesSent?: number; - private _encoderImplementation?: string; - private _firCount?: number; - private _fractionLost?: number; - private _frameHeight?: number; - private _frameWidth?: number; - private _frames?: number; - private _framesDropped?: number; - private _framesEncoded?: number; - private _framesPerSecond?: number; - private _framesSent?: number; - private _headerBytesSent?: number; - private _height?: number; - private _hugeFramesSent?: number; - private _jitter?: number; - private _keyFramesEncoded?: number; - private _nackCount?: number; - private _packetsLost?: number; - private _packetsReceived?: number; - private _packetsSent?: number; - private _peerConnectionId?: string; - private _pliCount?: number; - private _qpSum?: number; - private _qualityLimitationDurationBandwidth?: number; - private _qualityLimitationDurationCPU?: number; - private _qualityLimitationDurationNone?: number; - private _qualityLimitationDurationOther?: number; - private _qualityLimitationReason?: string; - private _qualityLimitationResolutionChanges?: number; - private _relayedSource?: boolean; - private _retransmittedBytesSent?: number; - private _retransmittedPacketsSent?: number; - private _rid?: string; - private _roundTripTime?: number; - private _roundTripTimeMeasurements?: number; - private _sfuStreamId?: string; - private _targetBitrate?: number; - private _totalEncodeTime?: number; - private _totalEncodedBytesTarget?: number; - private _totalPacketSendDelay?: number; - private _totalRoundTripTime?: number; - private _width?: number; - private _visited = false; - - public constructor( - public readonly trackId: string, - public readonly ssrc: number, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._trackId = this._options.trackIdIsUuid ? uuidToByteArray(trackId) : stringToBytesArray(trackId); - this._ssrc = BigInt(ssrc); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: OutboundVideoTrack): Samples_ClientSample_OutboundVideoTrack { - this._visited = true; - - const result = new Samples_ClientSample_OutboundVideoTrack({ - trackId: this._trackId, - ssrc: this._ssrc, - active: this._encodeActive(sample.active), - bytesSent: this._encodeBytesSent(sample.bytesSent), - averageRtcpInterval: this._encodeAverageRtcpInterval(sample.averageRtcpInterval), - encoderImplementation: this._encodeEncoderImplementation(sample.encoderImplementation), - firCount: this._encodeFirCount(sample.firCount), - fractionLost: this._encodeFractionLost(sample.fractionLost), - frameHeight: this._encodeFrameHeight(sample.frameHeight), - frameWidth: this._encodeFrameWidth(sample.frameWidth), - frames: this._encodeFrames(sample.frames), - framesDropped: this._encodeFramesDropped(sample.framesDropped), - framesEncoded: this._encodeFramesEncoded(sample.framesEncoded), - framesPerSecond: this._encodeFramesPerSecond(sample.framesPerSecond), - framesSent: this._encodeFramesSent(sample.framesSent), - headerBytesSent: this._encodeHeaderBytesSent(sample.headerBytesSent), - height: this._encodeHeight(sample.height), - hugeFramesSent: this._encodeHugeFramesSent(sample.hugeFramesSent), - jitter: this._encodeJitter(sample.jitter), - keyFramesEncoded: this._encodeKeyFramesEncoded(sample.keyFramesEncoded), - nackCount: this._encodeNackCount(sample.nackCount), - packetsLost: this._encodePacketsLost(sample.packetsLost), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - peerConnectionId: this._encodePeerConnectionId(sample.peerConnectionId), - pliCount: this._encodePliCount(sample.pliCount), - qpSum: this._encodeQpSum(sample.qpSum), - qualityLimitationDurationBandwidth: this._encodeQualityLimitationDurationBandwidth(sample.qualityLimitationDurationBandwidth), - qualityLimitationDurationCPU: this._encodeQualityLimitationDurationCPU(sample.qualityLimitationDurationCPU), - qualityLimitationDurationNone: this._encodeQualityLimitationDurationNone(sample.qualityLimitationDurationNone), - qualityLimitationDurationOther: this._encodeQualityLimitationDurationOther(sample.qualityLimitationDurationOther), - qualityLimitationReason: this._encodeQualityLimitationReason(sample.qualityLimitationReason), - qualityLimitationResolutionChanges: this._encodeQualityLimitationResolutionChanges(sample.qualityLimitationResolutionChanges), - relayedSource: this._encodeRelayedSource(sample.relayedSource), - retransmittedBytesSent: this._encodeRetransmittedBytesSent(sample.retransmittedBytesSent), - retransmittedPacketsSent: this._encodeRetransmittedPacketsSent(sample.retransmittedPacketsSent), - rid: this._encodeRid(sample.rid), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime), - roundTripTimeMeasurements: this._encodeRoundTripTimeMeasurements(sample.roundTripTimeMeasurements), - sfuStreamId: this._encodeSfuStreamId(sample.sfuStreamId), - targetBitrate: this._encodeTargetBitrate(sample.targetBitrate), - totalEncodeTime: this._encodeTotalEncodeTime(sample.totalEncodeTime), - totalEncodedBytesTarget: this._encodeTotalEncodedBytesTarget(sample.totalEncodedBytesTarget), - totalPacketSendDelay: this._encodeTotalPacketSendDelay(sample.totalPacketSendDelay), - totalRoundTripTime: this._encodeTotalRoundTripTime(sample.totalRoundTripTime), - width: this._encodeWidth(sample.width), - - }); - return result; - } - - private _encodeActive(active?: boolean): boolean | undefined { - if (active === undefined) return; - if (active === this._active) return; - this._active = active; - return this._active; - } - - private _encodeAverageRtcpInterval(averageRtcpInterval?: number): number | undefined { - if (!averageRtcpInterval) return; - if (averageRtcpInterval === this._averageRtcpInterval) return; - this._averageRtcpInterval = averageRtcpInterval; - return this._averageRtcpInterval; - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeEncoderImplementation(encoderImplementation?: string): string | undefined { - if (!encoderImplementation) return; - if (encoderImplementation === this._encoderImplementation) return; - this._encoderImplementation = encoderImplementation; - return this._encoderImplementation; - } - - private _encodeFractionLost(fractionLost?: number): number | undefined { - if (!fractionLost) return; - if (fractionLost === this._fractionLost) return; - this._fractionLost = fractionLost; - return this._fractionLost; - } - - private _encodeHeaderBytesSent(headerBytesSent?: number): bigint | undefined { - if (!headerBytesSent) return; - if (headerBytesSent === this._headerBytesSent) return; - this._headerBytesSent = headerBytesSent; - return BigInt(this._headerBytesSent); - } - - private _encodeJitter(jitter?: number): number | undefined { - if (!jitter) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (!nackCount) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (!packetsLost) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (!packetsReceived) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (!packetsSent) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodePeerConnectionId(peerConnectionId?: string): Uint8Array | undefined { - if (!peerConnectionId) return; - if (peerConnectionId === this._peerConnectionId) return; - this._peerConnectionId = peerConnectionId; - return this._options.peerConnectionIdIsUuid ? uuidToByteArray(this._peerConnectionId) : stringToBytesArray(this._peerConnectionId); - } - - private _encodeRelayedSource(relayedSource?: boolean): boolean | undefined { - if (relayedSource === undefined) return; - if (relayedSource === this._relayedSource) return; - this._relayedSource = relayedSource; - return this._relayedSource; - } - - private _encodeRetransmittedBytesSent(retransmittedBytesSent?: number): bigint | undefined { - if (!retransmittedBytesSent) return; - if (retransmittedBytesSent === this._retransmittedBytesSent) return; - this._retransmittedBytesSent = retransmittedBytesSent; - return BigInt(this._retransmittedBytesSent); - } - - private _encodeRetransmittedPacketsSent(retransmittedPacketsSent?: number): number | undefined { - if (!retransmittedPacketsSent) return; - if (retransmittedPacketsSent === this._retransmittedPacketsSent) return; - this._retransmittedPacketsSent = retransmittedPacketsSent; - return this._retransmittedPacketsSent; - } - - private _encodeRid(rid?: string): string | undefined { - if (!rid) return; - if (rid === this._rid) return; - this._rid = rid; - return this._rid; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (!roundTripTime) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodeRoundTripTimeMeasurements(roundTripTimeMeasurements?: number): number | undefined { - if (!roundTripTimeMeasurements) return; - if (roundTripTimeMeasurements === this._roundTripTimeMeasurements) return; - this._roundTripTimeMeasurements = roundTripTimeMeasurements; - return this._roundTripTimeMeasurements; - } - - private _encodeSfuStreamId(sfuStreamId?: string): Uint8Array | undefined { - if (!sfuStreamId) return; - if (sfuStreamId === this._sfuStreamId) return; - this._sfuStreamId = sfuStreamId; - return this._options.sfuStreamIdIsUuid - ? uuidToByteArray(this._sfuStreamId) - : stringToBytesArray(this._sfuStreamId) - ; - } - - private _encodeTargetBitrate(targetBitrate?: number): number | undefined { - if (!targetBitrate) return; - if (targetBitrate === this._targetBitrate) return; - this._targetBitrate = targetBitrate; - return this._targetBitrate; - } - - private _encodeTotalEncodedBytesTarget(totalEncodedBytesTarget?: number): bigint | undefined { - if (!totalEncodedBytesTarget) return; - if (totalEncodedBytesTarget === this._totalEncodedBytesTarget) return; - this._totalEncodedBytesTarget = totalEncodedBytesTarget; - return BigInt(this._totalEncodedBytesTarget); - } - - private _encodeTotalPacketSendDelay(totalPacketSendDelay?: number): number | undefined { - if (!totalPacketSendDelay) return; - if (totalPacketSendDelay === this._totalPacketSendDelay) return; - this._totalPacketSendDelay = totalPacketSendDelay; - return this._totalPacketSendDelay; - } - - private _encodeTotalRoundTripTime(totalRoundTripTime?: number): number | undefined { - if (!totalRoundTripTime) return; - if (totalRoundTripTime === this._totalRoundTripTime) return; - this._totalRoundTripTime = totalRoundTripTime; - return this._totalRoundTripTime; - } - - private _encodeFirCount(firCount?: number): number | undefined { - if (!firCount) return; - if (firCount === this._firCount) return; - this._firCount = firCount; - return this._firCount; - } - - private _encodeFrameHeight(frameHeight?: number): number | undefined { - if (!frameHeight) return; - if (frameHeight === this._frameHeight) return; - this._frameHeight = frameHeight; - return this._frameHeight; - } - - private _encodeFrameWidth(frameWidth?: number): number | undefined { - if (!frameWidth) return; - if (frameWidth === this._frameWidth) return; - this._frameWidth = frameWidth; - return this._frameWidth; - } - - private _encodeFrames(frames?: number): number | undefined { - if (!frames) return; - if (frames === this._frames) return; - this._frames = frames; - return this._frames; - } - - private _encodeFramesDropped(framesDropped?: number): number | undefined { - if (!framesDropped) return; - if (framesDropped === this._framesDropped) return; - this._framesDropped = framesDropped; - return this._framesDropped; - } - - private _encodeFramesEncoded(framesEncoded?: number): number | undefined { - if (!framesEncoded) return; - if (framesEncoded === this._framesEncoded) return; - this._framesEncoded = framesEncoded; - return this._framesEncoded; - } - - private _encodeFramesPerSecond(framesPerSecond?: number): number | undefined { - if (!framesPerSecond) return; - if (framesPerSecond === this._framesPerSecond) return; - this._framesPerSecond = framesPerSecond; - return this._framesPerSecond; - } - - private _encodeFramesSent(framesSent?: number): number | undefined { - if (!framesSent) return; - if (framesSent === this._framesSent) return; - this._framesSent = framesSent; - return this._framesSent; - } - - private _encodeHeight(height?: number): number | undefined { - if (!height) return; - if (height === this._height) return; - this._height = height; - return this._height; - } - - private _encodeHugeFramesSent(hugeFramesSent?: number): number | undefined { - if (!hugeFramesSent) return; - if (hugeFramesSent === this._hugeFramesSent) return; - this._hugeFramesSent = hugeFramesSent; - return this._hugeFramesSent; - } - - private _encodeKeyFramesEncoded(keyFramesEncoded?: number): number | undefined { - if (!keyFramesEncoded) return; - if (keyFramesEncoded === this._keyFramesEncoded) return; - this._keyFramesEncoded = keyFramesEncoded; - return this._keyFramesEncoded; - } - - private _encodePliCount(pliCount?: number): number | undefined { - if (!pliCount) return; - if (pliCount === this._pliCount) return; - this._pliCount = pliCount; - return this._pliCount; - } - - private _encodeQpSum(qpSum?: number): bigint | undefined { - if (!qpSum) return; - if (qpSum === this._qpSum) return; - this._qpSum = qpSum; - return BigInt(this._qpSum); - } - - private _encodeQualityLimitationDurationBandwidth(duration?: number): number | undefined { - if (!duration) return; - if (duration === this._qualityLimitationDurationBandwidth) return; - this._qualityLimitationDurationBandwidth = duration; - return this._qualityLimitationDurationBandwidth; - } - - private _encodeQualityLimitationDurationCPU(duration?: number): number | undefined { - if (!duration) return; - if (duration === this._qualityLimitationDurationCPU) return; - this._qualityLimitationDurationCPU = duration; - return this._qualityLimitationDurationCPU; - } - - private _encodeQualityLimitationDurationNone(duration?: number): number | undefined { - if (!duration) return; - if (duration === this._qualityLimitationDurationNone) return; - this._qualityLimitationDurationNone = duration; - return this._qualityLimitationDurationNone; - } - - private _encodeQualityLimitationDurationOther(duration?: number): number | undefined { - if (!duration) return; - if (duration === this._qualityLimitationDurationOther) return; - this._qualityLimitationDurationOther = duration; - return this._qualityLimitationDurationOther; - } - - private _encodeQualityLimitationReason(reason?: string): string | undefined { - if (!reason) return; - if (reason === this._qualityLimitationReason) return; - this._qualityLimitationReason = reason; - return this._qualityLimitationReason; - } - - private _encodeQualityLimitationResolutionChanges(changes?: number): number | undefined { - if (!changes) return; - if (changes === this._qualityLimitationResolutionChanges) return; - this._qualityLimitationResolutionChanges = changes; - return this._qualityLimitationResolutionChanges; - } - - private _encodeTotalEncodeTime(totalEncodeTime?: number): number | undefined { - if (!totalEncodeTime) return; - if (totalEncodeTime === this._totalEncodeTime) return; - this._totalEncodeTime = totalEncodeTime; - return this._totalEncodeTime; - } - - private _encodeWidth(width?: number): number | undefined { - if (!width) return; - if (width === this._width) return; - this._width = width; - return this._width; - } -} diff --git a/npm-samples-encoder/src/OutputSamples.ts b/npm-samples-encoder/src/OutputSamples.ts index 33156739..dd246789 100644 --- a/npm-samples-encoder/src/OutputSamples.ts +++ b/npm-samples-encoder/src/OutputSamples.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.0.0 with parameter "target=ts" -// @generated from file outputs/proto/ProtobufSamplesV3Optional.proto (package org.observertc.schemas.protobuf, syntax proto3) +// @generated from file outputs/proto/ProtobufClientSampleV3Optional.proto (package org.observertc.schemas.protobuf, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -8,3821 +8,2002 @@ import { Message, proto3 } from "@bufbuild/protobuf"; /** * * - * Schema Version: 2.2.12 + * Schema Version: 3.0.0 * - * @generated from message org.observertc.schemas.protobuf.Samples + * @generated from message org.observertc.schemas.protobuf.ClientSample */ -export class Samples extends Message { +export class ClientSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample clientSamples = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ClientEvent clientEvents = 1; */ - clientSamples: Samples_ClientSample[] = []; + clientEvents: ClientSample_ClientEvent[] = []; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample sfuSamples = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ClientMetaData clientMetaItems = 2; */ - sfuSamples: Samples_SfuSample[] = []; + clientMetaItems: ClientSample_ClientMetaData[] = []; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample turnSamples = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.ExtensionStat extensionStats = 3; */ - turnSamples: Samples_TurnSample[] = []; + extensionStats: ClientSample_ExtensionStat[] = []; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.Controls controls = 4; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample peerConnections = 4; */ - controls?: Samples_Controls; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "clientSamples", kind: "message", T: Samples_ClientSample, repeated: true }, - { no: 2, name: "sfuSamples", kind: "message", T: Samples_SfuSample, repeated: true }, - { no: 3, name: "turnSamples", kind: "message", T: Samples_TurnSample, repeated: true }, - { no: 4, name: "controls", kind: "message", T: Samples_Controls, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples { - return new Samples().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples { - return new Samples().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples { - return new Samples().fromJsonString(jsonString, options); - } - - static equals(a: Samples | PlainMessage | undefined, b: Samples | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.Controls - */ -export class Samples_Controls extends Message { - /** - * @generated from field: optional string accessClaim = 1; - */ - accessClaim?: string; - - /** - * @generated from field: optional bool close = 2; - */ - close?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.Controls"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "accessClaim", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "close", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_Controls { - return new Samples_Controls().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_Controls { - return new Samples_Controls().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_Controls { - return new Samples_Controls().fromJsonString(jsonString, options); - } - - static equals(a: Samples_Controls | PlainMessage | undefined, b: Samples_Controls | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_Controls, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample - */ -export class Samples_ClientSample extends Message { - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.Certificate certificates = 1; - */ - certificates: Samples_ClientSample_Certificate[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats codecs = 2; - */ - codecs: Samples_ClientSample_MediaCodecStats[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent customCallEvents = 3; - */ - customCallEvents: Samples_ClientSample_CustomCallEvent[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent customObserverEvents = 4; - */ - customObserverEvents: Samples_ClientSample_CustomObserverEvent[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel dataChannels = 5; - */ - dataChannels: Samples_ClientSample_DataChannel[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat extensionStats = 6; - */ - extensionStats: Samples_ClientSample_ExtensionStat[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair iceCandidatePairs = 7; - */ - iceCandidatePairs: Samples_ClientSample_IceCandidatePair[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate iceLocalCandidates = 8; - */ - iceLocalCandidates: Samples_ClientSample_IceLocalCandidate[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate iceRemoteCandidates = 9; - */ - iceRemoteCandidates: Samples_ClientSample_IceRemoteCandidate[] = []; - - /** - * @generated from field: repeated string iceServers = 10; - */ - iceServers: string[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack inboundAudioTracks = 11; - */ - inboundAudioTracks: Samples_ClientSample_InboundAudioTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack inboundVideoTracks = 12; - */ - inboundVideoTracks: Samples_ClientSample_InboundVideoTrack[] = []; - - /** - * @generated from field: repeated string localSDPs = 13; - */ - localSDPs: string[] = []; - - /** - * @generated from field: repeated string mediaConstraints = 14; - */ - mediaConstraints: string[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice mediaDevices = 15; - */ - mediaDevices: Samples_ClientSample_MediaDevice[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat mediaSources = 16; - */ - mediaSources: Samples_ClientSample_MediaSourceStat[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack outboundAudioTracks = 17; - */ - outboundAudioTracks: Samples_ClientSample_OutboundAudioTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack outboundVideoTracks = 18; - */ - outboundVideoTracks: Samples_ClientSample_OutboundVideoTrack[] = []; - - /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport pcTransports = 19; - */ - pcTransports: Samples_ClientSample_PeerConnectionTransport[] = []; - - /** - * @generated from field: repeated string userMediaErrors = 20; - */ - userMediaErrors: string[] = []; + peerConnections: ClientSample_PeerConnectionSample[] = []; /** - * @generated from field: optional bytes clientId = 21; + * @generated from field: optional bytes clientId = 5; */ clientId?: Uint8Array; /** - * @generated from field: optional int64 timestamp = 22; + * @generated from field: optional int64 timestamp = 6; */ timestamp?: bigint; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Browser browser = 23; + * @generated from field: optional bytes appData = 7; */ - browser?: Samples_ClientSample_Browser; + appData?: Uint8Array; /** - * @generated from field: optional bytes callId = 24; + * @generated from field: optional bytes callId = 8; */ callId?: Uint8Array; - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Engine engine = 25; - */ - engine?: Samples_ClientSample_Engine; - - /** - * @generated from field: optional string marker = 26; - */ - marker?: string; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem os = 27; - */ - os?: Samples_ClientSample_OperationSystem; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.Platform platform = 28; - */ - platform?: Samples_ClientSample_Platform; - - /** - * @generated from field: optional string roomId = 29; - */ - roomId?: string; - - /** - * @generated from field: optional int32 sampleSeq = 30; - */ - sampleSeq?: number; - - /** - * @generated from field: optional int32 timeZoneOffsetInHours = 31; - */ - timeZoneOffsetInHours?: number; - - /** - * @generated from field: optional string userId = 32; - */ - userId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "certificates", kind: "message", T: Samples_ClientSample_Certificate, repeated: true }, - { no: 2, name: "codecs", kind: "message", T: Samples_ClientSample_MediaCodecStats, repeated: true }, - { no: 3, name: "customCallEvents", kind: "message", T: Samples_ClientSample_CustomCallEvent, repeated: true }, - { no: 4, name: "customObserverEvents", kind: "message", T: Samples_ClientSample_CustomObserverEvent, repeated: true }, - { no: 5, name: "dataChannels", kind: "message", T: Samples_ClientSample_DataChannel, repeated: true }, - { no: 6, name: "extensionStats", kind: "message", T: Samples_ClientSample_ExtensionStat, repeated: true }, - { no: 7, name: "iceCandidatePairs", kind: "message", T: Samples_ClientSample_IceCandidatePair, repeated: true }, - { no: 8, name: "iceLocalCandidates", kind: "message", T: Samples_ClientSample_IceLocalCandidate, repeated: true }, - { no: 9, name: "iceRemoteCandidates", kind: "message", T: Samples_ClientSample_IceRemoteCandidate, repeated: true }, - { no: 10, name: "iceServers", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 11, name: "inboundAudioTracks", kind: "message", T: Samples_ClientSample_InboundAudioTrack, repeated: true }, - { no: 12, name: "inboundVideoTracks", kind: "message", T: Samples_ClientSample_InboundVideoTrack, repeated: true }, - { no: 13, name: "localSDPs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 14, name: "mediaConstraints", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 15, name: "mediaDevices", kind: "message", T: Samples_ClientSample_MediaDevice, repeated: true }, - { no: 16, name: "mediaSources", kind: "message", T: Samples_ClientSample_MediaSourceStat, repeated: true }, - { no: 17, name: "outboundAudioTracks", kind: "message", T: Samples_ClientSample_OutboundAudioTrack, repeated: true }, - { no: 18, name: "outboundVideoTracks", kind: "message", T: Samples_ClientSample_OutboundVideoTrack, repeated: true }, - { no: 19, name: "pcTransports", kind: "message", T: Samples_ClientSample_PeerConnectionTransport, repeated: true }, - { no: 20, name: "userMediaErrors", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 21, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 22, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 23, name: "browser", kind: "message", T: Samples_ClientSample_Browser, opt: true }, - { no: 24, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "engine", kind: "message", T: Samples_ClientSample_Engine, opt: true }, - { no: 26, name: "marker", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 27, name: "os", kind: "message", T: Samples_ClientSample_OperationSystem, opt: true }, - { no: 28, name: "platform", kind: "message", T: Samples_ClientSample_Platform, opt: true }, - { no: 29, name: "roomId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 30, name: "sampleSeq", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "timeZoneOffsetInHours", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 32, name: "userId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample { - return new Samples_ClientSample().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample | PlainMessage | undefined, b: Samples_ClientSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Engine - */ -export class Samples_ClientSample_Engine extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string version = 2; - */ - version?: string; - - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Engine"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "clientEvents", kind: "message", T: ClientSample_ClientEvent, repeated: true }, + { no: 2, name: "clientMetaItems", kind: "message", T: ClientSample_ClientMetaData, repeated: true }, + { no: 3, name: "extensionStats", kind: "message", T: ClientSample_ExtensionStat, repeated: true }, + { no: 4, name: "peerConnections", kind: "message", T: ClientSample_PeerConnectionSample, repeated: true }, + { no: 5, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 7, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample { + return new ClientSample().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample { + return new ClientSample().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Engine { - return new Samples_ClientSample_Engine().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample { + return new ClientSample().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_Engine | PlainMessage | undefined, b: Samples_ClientSample_Engine | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Engine, a, b); + static equals(a: ClientSample | PlainMessage | undefined, b: ClientSample | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Platform + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample */ -export class Samples_ClientSample_Platform extends Message { +export class ClientSample_PeerConnectionSample extends Message { /** - * @generated from field: optional string model = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats audioPlayouts = 1; */ - model?: string; + audioPlayouts: ClientSample_PeerConnectionSample_AudioPlayoutStats[] = []; /** - * @generated from field: optional string type = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats audioSources = 2; */ - type?: string; + audioSources: ClientSample_PeerConnectionSample_AudioSourceStats[] = []; /** - * @generated from field: optional string vendor = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats certificates = 3; */ - vendor?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Platform"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "model", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "vendor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromBinary(bytes, options); - } + certificates: ClientSample_PeerConnectionSample_CertificateStats[] = []; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Platform { - return new Samples_ClientSample_Platform().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Platform | PlainMessage | undefined, b: Samples_ClientSample_Platform | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Platform, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Browser - */ -export class Samples_ClientSample_Browser extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats codecs = 4; */ - name?: string; + codecs: ClientSample_PeerConnectionSample_CodecStats[] = []; /** - * @generated from field: optional string version = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats dataChannels = 5; */ - version?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Browser"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Browser { - return new Samples_ClientSample_Browser().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Browser | PlainMessage | undefined, b: Samples_ClientSample_Browser | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Browser, a, b); - } -} + dataChannels: ClientSample_PeerConnectionSample_DataChannelStats[] = []; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem - */ -export class Samples_ClientSample_OperationSystem extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats iceCandidatePairs = 6; */ - name?: string; + iceCandidatePairs: ClientSample_PeerConnectionSample_IceCandidatePairStats[] = []; /** - * @generated from field: optional string version = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats iceCandidates = 7; */ - version?: string; + iceCandidates: ClientSample_PeerConnectionSample_IceCandidateStats[] = []; /** - * @generated from field: optional string versionName = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats iceTransports = 8; */ - versionName?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OperationSystem"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "versionName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromJson(jsonValue, options); - } + iceTransports: ClientSample_PeerConnectionSample_IceTransportStats[] = []; - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OperationSystem { - return new Samples_ClientSample_OperationSystem().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_OperationSystem | PlainMessage | undefined, b: Samples_ClientSample_OperationSystem | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OperationSystem, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice - */ -export class Samples_ClientSample_MediaDevice extends Message { /** - * @generated from field: optional string id = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats inboundRtps = 9; */ - id?: string; + inboundRtps: ClientSample_PeerConnectionSample_InboundRtpStats[] = []; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum kind = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats outboundRtps = 10; */ - kind?: Samples_ClientSample_MediaDevice_MediaDeviceEnum; + outboundRtps: ClientSample_PeerConnectionSample_OutboundRtpStats[] = []; /** - * @generated from field: optional string label = 3; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats peerConnectionTransports = 11; */ - label?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "kind", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum), opt: true }, - { no: 3, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaDevice { - return new Samples_ClientSample_MediaDevice().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaDevice | PlainMessage | undefined, b: Samples_ClientSample_MediaDevice | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaDevice, a, b); - } -} + peerConnectionTransports: ClientSample_PeerConnectionSample_PeerConnectionTransportStats[] = []; -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum - */ -export enum Samples_ClientSample_MediaDevice_MediaDeviceEnum { /** - * For kind - * - * @generated from enum value: VIDEOINPUT = 0; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats remoteInboundRtps = 12; */ - VIDEOINPUT = 0, + remoteInboundRtps: ClientSample_PeerConnectionSample_RemoteInboundRtpStats[] = []; /** - * @generated from enum value: AUDIOINPUT = 1; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats remoteOutboundRtps = 13; */ - AUDIOINPUT = 1, + remoteOutboundRtps: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats[] = []; /** - * @generated from enum value: AUDIOOUTPUT = 2; + * @generated from field: repeated org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats videoSources = 14; */ - AUDIOOUTPUT = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaDevice_MediaDeviceEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaDevice.MediaDeviceEnum", [ - { no: 0, name: "VIDEOINPUT" }, - { no: 1, name: "AUDIOINPUT" }, - { no: 2, name: "AUDIOOUTPUT" }, -]); + videoSources: ClientSample_PeerConnectionSample_VideoSourceStats[] = []; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat - */ -export class Samples_ClientSample_ExtensionStat extends Message { /** - * @generated from field: optional string payload = 1; + * @generated from field: optional bytes peerConnectionId = 15; */ - payload?: string; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional string type = 2; + * @generated from field: optional bytes appData = 16; */ - type?: string; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.ExtensionStat"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "audioPlayouts", kind: "message", T: ClientSample_PeerConnectionSample_AudioPlayoutStats, repeated: true }, + { no: 2, name: "audioSources", kind: "message", T: ClientSample_PeerConnectionSample_AudioSourceStats, repeated: true }, + { no: 3, name: "certificates", kind: "message", T: ClientSample_PeerConnectionSample_CertificateStats, repeated: true }, + { no: 4, name: "codecs", kind: "message", T: ClientSample_PeerConnectionSample_CodecStats, repeated: true }, + { no: 5, name: "dataChannels", kind: "message", T: ClientSample_PeerConnectionSample_DataChannelStats, repeated: true }, + { no: 6, name: "iceCandidatePairs", kind: "message", T: ClientSample_PeerConnectionSample_IceCandidatePairStats, repeated: true }, + { no: 7, name: "iceCandidates", kind: "message", T: ClientSample_PeerConnectionSample_IceCandidateStats, repeated: true }, + { no: 8, name: "iceTransports", kind: "message", T: ClientSample_PeerConnectionSample_IceTransportStats, repeated: true }, + { no: 9, name: "inboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_InboundRtpStats, repeated: true }, + { no: 10, name: "outboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_OutboundRtpStats, repeated: true }, + { no: 11, name: "peerConnectionTransports", kind: "message", T: ClientSample_PeerConnectionSample_PeerConnectionTransportStats, repeated: true }, + { no: 12, name: "remoteInboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_RemoteInboundRtpStats, repeated: true }, + { no: 13, name: "remoteOutboundRtps", kind: "message", T: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats, repeated: true }, + { no: 14, name: "videoSources", kind: "message", T: ClientSample_PeerConnectionSample_VideoSourceStats, repeated: true }, + { no: 15, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 16, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromJson(jsonValue, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromBinary(bytes, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_ExtensionStat { - return new Samples_ClientSample_ExtensionStat().fromJsonString(jsonString, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromJson(jsonValue, options); } - static equals(a: Samples_ClientSample_ExtensionStat | PlainMessage | undefined, b: Samples_ClientSample_ExtensionStat | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_ExtensionStat, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent - */ -export class Samples_ClientSample_CustomCallEvent extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string attachments = 2; - */ - attachments?: string; - - /** - * @generated from field: optional string mediaTrackId = 3; - */ - mediaTrackId?: string; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional bytes peerConnectionId = 5; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int64 timestamp = 6; - */ - timestamp?: bigint; - - /** - * @generated from field: optional string value = 7; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.CustomCallEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "mediaTrackId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_CustomCallEvent { - return new Samples_ClientSample_CustomCallEvent().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_CustomCallEvent | PlainMessage | undefined, b: Samples_ClientSample_CustomCallEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_CustomCallEvent, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent - */ -export class Samples_ClientSample_CustomObserverEvent extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string attachments = 2; - */ - attachments?: string; - - /** - * @generated from field: optional string mediaTrackId = 3; - */ - mediaTrackId?: string; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional int64 timestamp = 5; - */ - timestamp?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.CustomObserverEvent"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "mediaTrackId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_CustomObserverEvent { - return new Samples_ClientSample_CustomObserverEvent().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_CustomObserverEvent | PlainMessage | undefined, b: Samples_ClientSample_CustomObserverEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_CustomObserverEvent, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel - */ -export class Samples_ClientSample_DataChannel extends Message { - /** - * @generated from field: optional bytes peerConnectionId = 1; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int64 bytesReceived = 2; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 3; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 dataChannelIdentifier = 4; - */ - dataChannelIdentifier?: number; - - /** - * @generated from field: optional string label = 5; - */ - label?: string; - - /** - * @generated from field: optional int32 messageReceived = 6; - */ - messageReceived?: number; - - /** - * @generated from field: optional int32 messageSent = 7; - */ - messageSent?: number; - - /** - * @generated from field: optional string protocol = 8; - */ - protocol?: string; - - /** - * @generated from field: optional string state = 9; - */ - state?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.DataChannel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "dataChannelIdentifier", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "messageReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "messageSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_DataChannel { - return new Samples_ClientSample_DataChannel().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_DataChannel | PlainMessage | undefined, b: Samples_ClientSample_DataChannel | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_DataChannel, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport - */ -export class Samples_ClientSample_PeerConnectionTransport extends Message { - /** - * @generated from field: optional bytes peerConnectionId = 1; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional string transportId = 2; - */ - transportId?: string; - - /** - * @generated from field: optional int64 bytesReceived = 3; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 4; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional string dtlsCipher = 5; - */ - dtlsCipher?: string; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum dtlsRole = 6; - */ - dtlsRole?: Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum; - - /** - * @generated from field: optional string dtlsState = 7; - */ - dtlsState?: string; - - /** - * @generated from field: optional string iceLocalUsernameFragment = 8; - */ - iceLocalUsernameFragment?: string; - - /** - * @generated from field: optional string iceRole = 9; - */ - iceRole?: string; - - /** - * @generated from field: optional string iceState = 10; - */ - iceState?: string; - - /** - * @generated from field: optional string label = 11; - */ - label?: string; - - /** - * @generated from field: optional string localCertificateId = 12; - */ - localCertificateId?: string; - - /** - * @generated from field: optional int32 packetsReceived = 13; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 14; - */ - packetsSent?: number; - - /** - * @generated from field: optional string remoteCertificateId = 15; - */ - remoteCertificateId?: string; - - /** - * @generated from field: optional int32 selectedCandidatePairChanges = 16; - */ - selectedCandidatePairChanges?: number; - - /** - * @generated from field: optional string selectedCandidatePairId = 17; - */ - selectedCandidatePairId?: string; - - /** - * @generated from field: optional string srtpCipher = 18; - */ - srtpCipher?: string; - - /** - * @generated from field: optional string tlsGroup = 19; - */ - tlsGroup?: string; - - /** - * @generated from field: optional string tlsVersion = 20; - */ - tlsVersion?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "dtlsCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "dtlsRole", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum), opt: true }, - { no: 7, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "iceLocalUsernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 12, name: "localCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 13, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 14, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "remoteCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 16, name: "selectedCandidatePairChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "selectedCandidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 18, name: "srtpCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 19, name: "tlsGroup", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 20, name: "tlsVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_PeerConnectionTransport { - return new Samples_ClientSample_PeerConnectionTransport().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_PeerConnectionTransport | PlainMessage | undefined, b: Samples_ClientSample_PeerConnectionTransport | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_PeerConnectionTransport, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum - */ -export enum Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum { - /** - * For dtlsRole - * - * @generated from enum value: CLIENT = 0; - */ - CLIENT = 0, - - /** - * @generated from enum value: SERVER = 1; - */ - SERVER = 1, - - /** - * @generated from enum value: UNKNOWN = 2; - */ - UNKNOWN = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum) -proto3.util.setEnumType(Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.PeerConnectionTransport.PeerConnectionTransportEnum", [ - { no: 0, name: "CLIENT" }, - { no: 1, name: "SERVER" }, - { no: 2, name: "UNKNOWN" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair - */ -export class Samples_ClientSample_IceCandidatePair extends Message { - /** - * @generated from field: optional string candidatePairId = 1; - */ - candidatePairId?: string; - - /** - * @generated from field: optional bytes peerConnectionId = 2; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional double availableIncomingBitrate = 3; - */ - availableIncomingBitrate?: number; - - /** - * @generated from field: optional double availableOutgoingBitrate = 4; - */ - availableOutgoingBitrate?: number; - - /** - * @generated from field: optional int64 bytesDiscardedOnSend = 5; - */ - bytesDiscardedOnSend?: bigint; - - /** - * @generated from field: optional int64 bytesReceived = 6; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 7; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 consentRequestsSent = 8; - */ - consentRequestsSent?: number; - - /** - * @generated from field: optional double currentRoundTripTime = 9; - */ - currentRoundTripTime?: number; - - /** - * @generated from field: optional string label = 10; - */ - label?: string; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 11; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int64 lastPacketSentTimestamp = 12; - */ - lastPacketSentTimestamp?: bigint; - - /** - * @generated from field: optional string localCandidateId = 13; - */ - localCandidateId?: string; - - /** - * @generated from field: optional bool nominated = 14; - */ - nominated?: boolean; - - /** - * @generated from field: optional int32 packetsDiscardedOnSend = 15; - */ - packetsDiscardedOnSend?: number; - - /** - * @generated from field: optional int32 packetsReceived = 16; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 17; - */ - packetsSent?: number; - - /** - * @generated from field: optional string remoteCandidateId = 18; - */ - remoteCandidateId?: string; - - /** - * @generated from field: optional int32 requestsReceived = 19; - */ - requestsReceived?: number; - - /** - * @generated from field: optional int32 requestsSent = 20; - */ - requestsSent?: number; - - /** - * @generated from field: optional int32 responsesReceived = 21; - */ - responsesReceived?: number; - - /** - * @generated from field: optional int32 responsesSent = 22; - */ - responsesSent?: number; - - /** - * @generated from field: optional string state = 23; - */ - state?: string; - - /** - * @generated from field: optional double totalRoundTripTime = 24; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: optional string transportId = 25; - */ - transportId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceCandidatePair"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "candidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "availableIncomingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "availableOutgoingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "bytesDiscardedOnSend", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 8, name: "consentRequestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "currentRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 10, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "lastPacketSentTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "localCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 14, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 15, name: "packetsDiscardedOnSend", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "remoteCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 19, name: "requestsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "requestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "responsesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "responsesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 24, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 25, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceCandidatePair { - return new Samples_ClientSample_IceCandidatePair().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_IceCandidatePair | PlainMessage | undefined, b: Samples_ClientSample_IceCandidatePair | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceCandidatePair, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat - */ -export class Samples_ClientSample_MediaSourceStat extends Message { - /** - * @generated from field: optional double audioLevel = 1; - */ - audioLevel?: number; - - /** - * @generated from field: optional double droppedSamplesDuration = 2; - */ - droppedSamplesDuration?: number; - - /** - * @generated from field: optional int32 droppedSamplesEvents = 3; - */ - droppedSamplesEvents?: number; - - /** - * @generated from field: optional double echoReturnLoss = 4; - */ - echoReturnLoss?: number; - - /** - * @generated from field: optional double echoReturnLossEnhancement = 5; - */ - echoReturnLossEnhancement?: number; - - /** - * @generated from field: optional int32 frames = 6; - */ - frames?: number; - - /** - * @generated from field: optional double framesPerSecond = 7; - */ - framesPerSecond?: number; - - /** - * @generated from field: optional int32 height = 8; - */ - height?: number; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum kind = 9; - */ - kind?: Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum; - - /** - * @generated from field: optional bool relayedSource = 10; - */ - relayedSource?: boolean; - - /** - * @generated from field: optional double totalAudioEnergy = 11; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: optional double totalCaptureDelay = 12; - */ - totalCaptureDelay?: number; - - /** - * @generated from field: optional double totalSamplesCaptured = 13; - */ - totalSamplesCaptured?: number; - - /** - * @generated from field: optional double totalSamplesDuration = 14; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: optional bytes trackIdentifier = 15; - */ - trackIdentifier?: Uint8Array; - - /** - * @generated from field: optional int32 width = 16; - */ - width?: number; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 2, name: "droppedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 3, name: "droppedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 6, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 8, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "kind", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum), opt: true }, - { no: 10, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 11, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 12, name: "totalCaptureDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 13, name: "totalSamplesCaptured", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 16, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaSourceStat { - return new Samples_ClientSample_MediaSourceStat().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaSourceStat | PlainMessage | undefined, b: Samples_ClientSample_MediaSourceStat | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaSourceStat, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum - */ -export enum Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum { - /** - * For kind - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaSourceStat_MediaSourceStatEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaSourceStat.MediaSourceStatEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats - */ -export class Samples_ClientSample_MediaCodecStats extends Message { - /** - * @generated from field: optional int32 channels = 1; - */ - channels?: number; - - /** - * @generated from field: optional int32 clockRate = 2; - */ - clockRate?: number; - - /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum codecType = 3; - */ - codecType?: Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum; - - /** - * @generated from field: optional string mimeType = 4; - */ - mimeType?: string; - - /** - * @generated from field: optional string payloadType = 5; - */ - payloadType?: string; - - /** - * @generated from field: optional string sdpFmtpLine = 6; - */ - sdpFmtpLine?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "channels", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "codecType", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum), opt: true }, - { no: 4, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "payloadType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_MediaCodecStats { - return new Samples_ClientSample_MediaCodecStats().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_MediaCodecStats | PlainMessage | undefined, b: Samples_ClientSample_MediaCodecStats | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_MediaCodecStats, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum - */ -export enum Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum { - /** - * For codecType - * - * @generated from enum value: ENCODE = 0; - */ - ENCODE = 0, - - /** - * @generated from enum value: DECODE = 1; - */ - DECODE = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum) -proto3.util.setEnumType(Samples_ClientSample_MediaCodecStats_MediaCodecStatsEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.MediaCodecStats.MediaCodecStatsEnum", [ - { no: 0, name: "ENCODE" }, - { no: 1, name: "DECODE" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.Certificate - */ -export class Samples_ClientSample_Certificate extends Message { - /** - * @generated from field: optional string base64Certificate = 1; - */ - base64Certificate?: string; - - /** - * @generated from field: optional string fingerprint = 2; - */ - fingerprint?: string; - - /** - * @generated from field: optional string fingerprintAlgorithm = 3; - */ - fingerprintAlgorithm?: string; - - /** - * @generated from field: optional string issuerCertificateId = 4; - */ - issuerCertificateId?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.Certificate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "base64Certificate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "fingerprintAlgorithm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "issuerCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_Certificate { - return new Samples_ClientSample_Certificate().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_Certificate | PlainMessage | undefined, b: Samples_ClientSample_Certificate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_Certificate, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack - */ -export class Samples_ClientSample_InboundAudioTrack extends Message { - /** - * @generated from field: optional int64 ssrc = 1; - */ - ssrc?: bigint; - - /** - * @generated from field: optional double audioLevel = 2; - */ - audioLevel?: number; - - /** - * @generated from field: optional int64 bytesReceived = 3; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 4; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional int32 concealedSamples = 5; - */ - concealedSamples?: number; - - /** - * @generated from field: optional int32 concealmentEvents = 6; - */ - concealmentEvents?: number; - - /** - * @generated from field: optional string decoderImplementation = 7; - */ - decoderImplementation?: string; - - /** - * @generated from field: optional int64 estimatedPlayoutTimestamp = 8; - */ - estimatedPlayoutTimestamp?: bigint; - - /** - * @generated from field: optional int32 fecPacketsDiscarded = 9; - */ - fecPacketsDiscarded?: number; - - /** - * @generated from field: optional int32 fecPacketsReceived = 10; - */ - fecPacketsReceived?: number; - - /** - * @generated from field: optional int64 headerBytesReceived = 11; - */ - headerBytesReceived?: bigint; - - /** - * @generated from field: optional int32 insertedSamplesForDeceleration = 12; - */ - insertedSamplesForDeceleration?: number; - - /** - * @generated from field: optional double jitter = 13; - */ - jitter?: number; - - /** - * @generated from field: optional double jitterBufferDelay = 14; - */ - jitterBufferDelay?: number; - - /** - * @generated from field: optional int32 jitterBufferEmittedCount = 15; - */ - jitterBufferEmittedCount?: number; - - /** - * @generated from field: optional double jitterBufferMinimumDelay = 16; - */ - jitterBufferMinimumDelay?: number; - - /** - * @generated from field: optional double jitterBufferTargetDelay = 17; - */ - jitterBufferTargetDelay?: number; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 18; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int32 nackCount = 19; - */ - nackCount?: number; - - /** - * @generated from field: optional int32 packetsDiscarded = 20; - */ - packetsDiscarded?: number; - - /** - * @generated from field: optional int32 packetsLost = 21; - */ - packetsLost?: number; - - /** - * @generated from field: optional int32 packetsReceived = 22; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 23; - */ - packetsSent?: number; - - /** - * @generated from field: optional bytes peerConnectionId = 24; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional bytes remoteClientId = 25; - */ - remoteClientId?: Uint8Array; - - /** - * @generated from field: optional int64 remoteTimestamp = 26; - */ - remoteTimestamp?: bigint; - - /** - * @generated from field: optional int32 removedSamplesForAcceleration = 27; - */ - removedSamplesForAcceleration?: number; - - /** - * @generated from field: optional int32 reportsSent = 28; - */ - reportsSent?: number; - - /** - * @generated from field: optional double roundTripTime = 29; - */ - roundTripTime?: number; - - /** - * @generated from field: optional int32 roundTripTimeMeasurements = 30; - */ - roundTripTimeMeasurements?: number; - - /** - * @generated from field: optional bytes sfuSinkId = 31; - */ - sfuSinkId?: Uint8Array; - - /** - * @generated from field: optional bytes sfuStreamId = 32; - */ - sfuStreamId?: Uint8Array; - - /** - * @generated from field: optional int32 silentConcealedSamples = 33; - */ - silentConcealedSamples?: number; - - /** - * @generated from field: optional double synthesizedSamplesDuration = 34; - */ - synthesizedSamplesDuration?: number; - - /** - * @generated from field: optional int32 synthesizedSamplesEvents = 35; - */ - synthesizedSamplesEvents?: number; - - /** - * @generated from field: optional double totalAudioEnergy = 36; - */ - totalAudioEnergy?: number; - - /** - * @generated from field: optional double totalPlayoutDelay = 37; - */ - totalPlayoutDelay?: number; - - /** - * @generated from field: optional double totalProcessingDelay = 38; - */ - totalProcessingDelay?: number; - - /** - * @generated from field: optional double totalRoundTripTime = 39; - */ - totalRoundTripTime?: number; - - /** - * @generated from field: optional int32 totalSamplesCount = 40; - */ - totalSamplesCount?: number; - - /** - * @generated from field: optional double totalSamplesDuration = 41; - */ - totalSamplesDuration?: number; - - /** - * @generated from field: optional int32 totalSamplesReceived = 42; - */ - totalSamplesReceived?: number; - - /** - * @generated from field: optional bytes trackId = 43; - */ - trackId?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.InboundAudioTrack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 3, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "concealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "concealmentEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "insertedSamplesForDeceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 17, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 19, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "remoteClientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 26, name: "remoteTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 27, name: "removedSamplesForAcceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 29, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 32, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 33, name: "silentConcealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "synthesizedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 35, name: "synthesizedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 37, name: "totalPlayoutDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 38, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 39, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 40, name: "totalSamplesCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalSamplesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 43, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_InboundAudioTrack { - return new Samples_ClientSample_InboundAudioTrack().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_InboundAudioTrack | PlainMessage | undefined, b: Samples_ClientSample_InboundAudioTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_InboundAudioTrack, a, b); - } -} - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack - */ -export class Samples_ClientSample_InboundVideoTrack extends Message { - /** - * @generated from field: optional int64 ssrc = 1; - */ - ssrc?: bigint; - - /** - * @generated from field: optional int64 bytesReceived = 2; - */ - bytesReceived?: bigint; - - /** - * @generated from field: optional int64 bytesSent = 3; - */ - bytesSent?: bigint; - - /** - * @generated from field: optional string decoderImplementation = 4; - */ - decoderImplementation?: string; - - /** - * @generated from field: optional int64 estimatedPlayoutTimestamp = 5; - */ - estimatedPlayoutTimestamp?: bigint; - - /** - * @generated from field: optional int32 fecPacketsDiscarded = 6; - */ - fecPacketsDiscarded?: number; - - /** - * @generated from field: optional int32 fecPacketsReceived = 7; - */ - fecPacketsReceived?: number; - - /** - * @generated from field: optional int32 firCount = 8; - */ - firCount?: number; - - /** - * @generated from field: optional int32 frameHeight = 9; - */ - frameHeight?: number; - - /** - * @generated from field: optional int32 frameWidth = 10; - */ - frameWidth?: number; - - /** - * @generated from field: optional int32 framesDecoded = 11; - */ - framesDecoded?: number; - - /** - * @generated from field: optional int32 framesDropped = 12; - */ - framesDropped?: number; - - /** - * @generated from field: optional double framesPerSecond = 13; - */ - framesPerSecond?: number; - - /** - * @generated from field: optional int32 framesReceived = 14; - */ - framesReceived?: number; - - /** - * @generated from field: optional int64 headerBytesReceived = 15; - */ - headerBytesReceived?: bigint; - - /** - * @generated from field: optional double jitter = 16; - */ - jitter?: number; - - /** - * @generated from field: optional double jitterBufferDelay = 17; - */ - jitterBufferDelay?: number; - - /** - * @generated from field: optional int32 jitterBufferEmittedCount = 18; - */ - jitterBufferEmittedCount?: number; - - /** - * @generated from field: optional double jitterBufferMinimumDelay = 19; - */ - jitterBufferMinimumDelay?: number; - - /** - * @generated from field: optional double jitterBufferTargetDelay = 20; - */ - jitterBufferTargetDelay?: number; - - /** - * @generated from field: optional int32 keyFramesDecoded = 21; - */ - keyFramesDecoded?: number; - - /** - * @generated from field: optional int64 lastPacketReceivedTimestamp = 22; - */ - lastPacketReceivedTimestamp?: bigint; - - /** - * @generated from field: optional int32 nackCount = 23; - */ - nackCount?: number; - - /** - * @generated from field: optional int32 packetsDiscarded = 24; - */ - packetsDiscarded?: number; - - /** - * @generated from field: optional int32 packetsLost = 25; - */ - packetsLost?: number; - - /** - * @generated from field: optional int32 packetsReceived = 26; - */ - packetsReceived?: number; - - /** - * @generated from field: optional int32 packetsSent = 27; - */ - packetsSent?: number; - - /** - * @generated from field: optional bytes peerConnectionId = 28; - */ - peerConnectionId?: Uint8Array; - - /** - * @generated from field: optional int32 pliCount = 29; - */ - pliCount?: number; - - /** - * @generated from field: optional int64 qpSum = 30; - */ - qpSum?: bigint; - - /** - * @generated from field: optional bytes remoteClientId = 31; - */ - remoteClientId?: Uint8Array; - - /** - * @generated from field: optional int64 remoteTimestamp = 32; - */ - remoteTimestamp?: bigint; - - /** - * @generated from field: optional int32 reportsSent = 33; - */ - reportsSent?: number; + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample { + return new ClientSample_PeerConnectionSample().fromJsonString(jsonString, options); + } + static equals(a: ClientSample_PeerConnectionSample | PlainMessage | undefined, b: ClientSample_PeerConnectionSample | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats + */ +export class ClientSample_PeerConnectionSample_CodecStats extends Message { /** - * @generated from field: optional double roundTripTime = 34; + * @generated from field: optional string id = 1; */ - roundTripTime?: number; + id?: string; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 35; + * @generated from field: optional string mimeType = 2; */ - roundTripTimeMeasurements?: number; + mimeType?: string; /** - * @generated from field: optional bytes sfuSinkId = 36; + * @generated from field: optional int32 payloadType = 3; */ - sfuSinkId?: Uint8Array; + payloadType?: number; /** - * @generated from field: optional bytes sfuStreamId = 37; + * @generated from field: optional double timestamp = 4; */ - sfuStreamId?: Uint8Array; + timestamp?: number; /** - * @generated from field: optional double totalDecodeTime = 38; + * @generated from field: optional string transportId = 5; */ - totalDecodeTime?: number; + transportId?: string; /** - * @generated from field: optional double totalInterFrameDelay = 39; + * @generated from field: optional string type = 6; */ - totalInterFrameDelay?: number; + type?: string; /** - * @generated from field: optional double totalProcessingDelay = 40; + * @generated from field: optional bytes appData = 7; */ - totalProcessingDelay?: number; + appData?: Uint8Array; /** - * @generated from field: optional double totalRoundTripTime = 41; + * @generated from field: optional int32 channels = 8; */ - totalRoundTripTime?: number; + channels?: number; /** - * @generated from field: optional double totalSquaredInterFrameDelay = 42; + * @generated from field: optional int32 clockRate = 9; */ - totalSquaredInterFrameDelay?: number; + clockRate?: number; /** - * @generated from field: optional bytes trackId = 43; + * @generated from field: optional string sdpFmtpLine = 10; */ - trackId?: Uint8Array; + sdpFmtpLine?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.InboundVideoTrack"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CodecStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 17, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 20, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 21, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 23, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 29, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 30, name: "qpSum", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 31, name: "remoteClientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 32, name: "remoteTimestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 33, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 35, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 37, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 38, name: "totalDecodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 39, name: "totalInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 40, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 41, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalSquaredInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 43, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "channels", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 10, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_InboundVideoTrack { - return new Samples_ClientSample_InboundVideoTrack().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_CodecStats { + return new ClientSample_PeerConnectionSample_CodecStats().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_InboundVideoTrack | PlainMessage | undefined, b: Samples_ClientSample_InboundVideoTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_InboundVideoTrack, a, b); + static equals(a: ClientSample_PeerConnectionSample_CodecStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_CodecStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_CodecStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats */ -export class Samples_ClientSample_OutboundAudioTrack extends Message { +export class ClientSample_PeerConnectionSample_InboundRtpStats extends Message { /** - * @generated from field: optional int64 ssrc = 1; + * @generated from field: optional string id = 1; */ - ssrc?: bigint; + id?: string; /** - * @generated from field: optional bool active = 2; + * @generated from field: optional string kind = 2; */ - active?: boolean; + kind?: string; /** - * @generated from field: optional double audioLevel = 3; + * @generated from field: optional int64 ssrc = 3; */ - audioLevel?: number; + ssrc?: bigint; /** - * @generated from field: optional double averageRtcpInterval = 4; + * @generated from field: optional int64 timestamp = 4; */ - averageRtcpInterval?: number; + timestamp?: bigint; /** - * @generated from field: optional int64 bytesSent = 5; + * @generated from field: optional bytes trackIdentifier = 5; */ - bytesSent?: bigint; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional double droppedSamplesDuration = 6; + * @generated from field: optional bytes appData = 6; */ - droppedSamplesDuration?: number; + appData?: Uint8Array; /** - * @generated from field: optional int32 droppedSamplesEvents = 7; + * @generated from field: optional double audioLevel = 7; */ - droppedSamplesEvents?: number; + audioLevel?: number; /** - * @generated from field: optional double echoReturnLoss = 8; + * @generated from field: optional int64 bytesReceived = 8; */ - echoReturnLoss?: number; + bytesReceived?: bigint; /** - * @generated from field: optional double echoReturnLossEnhancement = 9; + * @generated from field: optional string codecId = 9; */ - echoReturnLossEnhancement?: number; + codecId?: string; /** - * @generated from field: optional string encoderImplementation = 10; + * @generated from field: optional int32 concealedSamples = 10; */ - encoderImplementation?: string; + concealedSamples?: number; /** - * @generated from field: optional double fractionLost = 11; + * @generated from field: optional int32 concealmentEvents = 11; */ - fractionLost?: number; + concealmentEvents?: number; /** - * @generated from field: optional int64 headerBytesSent = 12; + * @generated from field: optional int32 corruptionMeasurements = 12; */ - headerBytesSent?: bigint; + corruptionMeasurements?: number; /** - * @generated from field: optional double jitter = 13; + * @generated from field: optional string decoderImplementation = 13; */ - jitter?: number; + decoderImplementation?: string; /** - * @generated from field: optional int32 nackCount = 14; + * @generated from field: optional double estimatedPlayoutTimestamp = 14; */ - nackCount?: number; + estimatedPlayoutTimestamp?: number; /** - * @generated from field: optional int32 packetsLost = 15; + * @generated from field: optional int64 fecBytesReceived = 15; */ - packetsLost?: number; + fecBytesReceived?: bigint; /** - * @generated from field: optional int32 packetsReceived = 16; + * @generated from field: optional int32 fecPacketsDiscarded = 16; */ - packetsReceived?: number; + fecPacketsDiscarded?: number; /** - * @generated from field: optional int32 packetsSent = 17; + * @generated from field: optional int32 fecPacketsReceived = 17; */ - packetsSent?: number; + fecPacketsReceived?: number; /** - * @generated from field: optional bytes peerConnectionId = 18; + * @generated from field: optional int64 fecSsrc = 18; */ - peerConnectionId?: Uint8Array; + fecSsrc?: bigint; /** - * @generated from field: optional bool relayedSource = 19; + * @generated from field: optional int32 firCount = 19; */ - relayedSource?: boolean; + firCount?: number; /** - * @generated from field: optional int64 retransmittedBytesSent = 20; + * @generated from field: optional int32 frameHeight = 20; */ - retransmittedBytesSent?: bigint; + frameHeight?: number; /** - * @generated from field: optional int32 retransmittedPacketsSent = 21; + * @generated from field: optional int32 frameWidth = 21; */ - retransmittedPacketsSent?: number; + frameWidth?: number; /** - * @generated from field: optional string rid = 22; + * @generated from field: optional int32 framesAssembledFromMultiplePackets = 22; */ - rid?: string; + framesAssembledFromMultiplePackets?: number; /** - * @generated from field: optional double roundTripTime = 23; + * @generated from field: optional int32 framesDecoded = 23; */ - roundTripTime?: number; + framesDecoded?: number; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 24; + * @generated from field: optional int32 framesDropped = 24; */ - roundTripTimeMeasurements?: number; + framesDropped?: number; /** - * @generated from field: optional bytes sfuStreamId = 25; + * @generated from field: optional double framesPerSecond = 25; */ - sfuStreamId?: Uint8Array; + framesPerSecond?: number; /** - * @generated from field: optional int32 targetBitrate = 26; + * @generated from field: optional int32 framesReceived = 26; */ - targetBitrate?: number; + framesReceived?: number; /** - * @generated from field: optional double totalAudioEnergy = 27; + * @generated from field: optional int32 framesRendered = 27; */ - totalAudioEnergy?: number; + framesRendered?: number; /** - * @generated from field: optional double totalCaptureDelay = 28; + * @generated from field: optional int32 freezeCount = 28; */ - totalCaptureDelay?: number; + freezeCount?: number; /** - * @generated from field: optional int64 totalEncodedBytesTarget = 29; + * @generated from field: optional int64 headerBytesReceived = 29; */ - totalEncodedBytesTarget?: bigint; + headerBytesReceived?: bigint; /** - * @generated from field: optional double totalPacketSendDelay = 30; + * @generated from field: optional int32 insertedSamplesForDeceleration = 30; */ - totalPacketSendDelay?: number; + insertedSamplesForDeceleration?: number; /** - * @generated from field: optional double totalRoundTripTime = 31; + * @generated from field: optional double jitter = 31; */ - totalRoundTripTime?: number; + jitter?: number; /** - * @generated from field: optional double totalSamplesCaptured = 32; + * @generated from field: optional double jitterBufferDelay = 32; */ - totalSamplesCaptured?: number; + jitterBufferDelay?: number; /** - * @generated from field: optional double totalSamplesDuration = 33; + * @generated from field: optional int32 jitterBufferEmittedCount = 33; */ - totalSamplesDuration?: number; + jitterBufferEmittedCount?: number; /** - * @generated from field: optional bytes trackId = 34; + * @generated from field: optional double jitterBufferMinimumDelay = 34; */ - trackId?: Uint8Array; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OutboundAudioTrack"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "averageRtcpInterval", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "droppedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 7, name: "droppedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 9, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 10, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 12, name: "headerBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 19, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 20, name: "retransmittedBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 21, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 23, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 24, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 26, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 28, name: "totalCaptureDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 29, name: "totalEncodedBytesTarget", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 30, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 31, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 32, name: "totalSamplesCaptured", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 33, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 34, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OutboundAudioTrack { - return new Samples_ClientSample_OutboundAudioTrack().fromJsonString(jsonString, options); - } + jitterBufferMinimumDelay?: number; - static equals(a: Samples_ClientSample_OutboundAudioTrack | PlainMessage | undefined, b: Samples_ClientSample_OutboundAudioTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OutboundAudioTrack, a, b); - } -} + /** + * @generated from field: optional double jitterBufferTargetDelay = 35; + */ + jitterBufferTargetDelay?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack - */ -export class Samples_ClientSample_OutboundVideoTrack extends Message { /** - * @generated from field: optional int64 ssrc = 1; + * @generated from field: optional int32 keyFramesDecoded = 36; */ - ssrc?: bigint; + keyFramesDecoded?: number; /** - * @generated from field: optional bool active = 2; + * @generated from field: optional double lastPacketReceivedTimestamp = 37; */ - active?: boolean; + lastPacketReceivedTimestamp?: number; /** - * @generated from field: optional double averageRtcpInterval = 3; + * @generated from field: optional string mid = 38; */ - averageRtcpInterval?: number; + mid?: string; /** - * @generated from field: optional int64 bytesSent = 4; + * @generated from field: optional int32 nackCount = 39; */ - bytesSent?: bigint; + nackCount?: number; /** - * @generated from field: optional string encoderImplementation = 5; + * @generated from field: optional int32 packetsDiscarded = 40; */ - encoderImplementation?: string; + packetsDiscarded?: number; /** - * @generated from field: optional int32 firCount = 6; + * @generated from field: optional int32 packetsLost = 41; */ - firCount?: number; + packetsLost?: number; /** - * @generated from field: optional double fractionLost = 7; + * @generated from field: optional int32 packetsReceived = 42; */ - fractionLost?: number; + packetsReceived?: number; /** - * @generated from field: optional int32 frameHeight = 8; + * @generated from field: optional int32 pauseCount = 43; */ - frameHeight?: number; + pauseCount?: number; /** - * @generated from field: optional int32 frameWidth = 9; + * @generated from field: optional string playoutId = 44; */ - frameWidth?: number; + playoutId?: string; /** - * @generated from field: optional int32 frames = 10; + * @generated from field: optional int32 pliCount = 45; */ - frames?: number; + pliCount?: number; /** - * @generated from field: optional int32 framesDropped = 11; + * @generated from field: optional bool powerEfficientDecoder = 46; */ - framesDropped?: number; + powerEfficientDecoder?: boolean; /** - * @generated from field: optional int32 framesEncoded = 12; + * @generated from field: optional double qpSum = 47; */ - framesEncoded?: number; + qpSum?: number; /** - * @generated from field: optional double framesPerSecond = 13; + * @generated from field: optional string remoteId = 48; */ - framesPerSecond?: number; + remoteId?: string; /** - * @generated from field: optional int32 framesSent = 14; + * @generated from field: optional int32 removedSamplesForAcceleration = 49; */ - framesSent?: number; + removedSamplesForAcceleration?: number; /** - * @generated from field: optional int64 headerBytesSent = 15; + * @generated from field: optional int64 retransmittedBytesReceived = 50; */ - headerBytesSent?: bigint; + retransmittedBytesReceived?: bigint; /** - * @generated from field: optional int32 height = 16; + * @generated from field: optional int32 retransmittedPacketsReceived = 51; */ - height?: number; + retransmittedPacketsReceived?: number; /** - * @generated from field: optional int32 hugeFramesSent = 17; + * @generated from field: optional int64 rtxSsrc = 52; */ - hugeFramesSent?: number; + rtxSsrc?: bigint; /** - * @generated from field: optional double jitter = 18; + * @generated from field: optional int32 silentConcealedSamples = 53; */ - jitter?: number; + silentConcealedSamples?: number; /** - * @generated from field: optional int32 keyFramesEncoded = 19; + * @generated from field: optional double totalAssemblyTime = 54; */ - keyFramesEncoded?: number; + totalAssemblyTime?: number; /** - * @generated from field: optional int32 nackCount = 20; + * @generated from field: optional double totalAudioEnergy = 55; */ - nackCount?: number; + totalAudioEnergy?: number; /** - * @generated from field: optional int32 packetsLost = 21; + * @generated from field: optional double totalCorruptionProbability = 56; */ - packetsLost?: number; + totalCorruptionProbability?: number; /** - * @generated from field: optional int32 packetsReceived = 22; + * @generated from field: optional double totalDecodeTime = 57; */ - packetsReceived?: number; + totalDecodeTime?: number; /** - * @generated from field: optional int32 packetsSent = 23; + * @generated from field: optional double totalFreezesDuration = 58; */ - packetsSent?: number; + totalFreezesDuration?: number; /** - * @generated from field: optional bytes peerConnectionId = 24; + * @generated from field: optional double totalInterFrameDelay = 59; */ - peerConnectionId?: Uint8Array; + totalInterFrameDelay?: number; /** - * @generated from field: optional int32 pliCount = 25; + * @generated from field: optional double totalPausesDuration = 60; */ - pliCount?: number; + totalPausesDuration?: number; /** - * @generated from field: optional int64 qpSum = 26; + * @generated from field: optional double totalProcessingDelay = 61; */ - qpSum?: bigint; + totalProcessingDelay?: number; /** - * @generated from field: optional double qualityLimitationDurationBandwidth = 27; + * @generated from field: optional double totalSamplesDuration = 62; */ - qualityLimitationDurationBandwidth?: number; + totalSamplesDuration?: number; /** - * @generated from field: optional double qualityLimitationDurationCPU = 28; + * @generated from field: optional int32 totalSamplesReceived = 63; */ - qualityLimitationDurationCPU?: number; + totalSamplesReceived?: number; /** - * @generated from field: optional double qualityLimitationDurationNone = 29; + * @generated from field: optional double totalSquaredCorruptionProbability = 64; */ - qualityLimitationDurationNone?: number; + totalSquaredCorruptionProbability?: number; /** - * @generated from field: optional double qualityLimitationDurationOther = 30; + * @generated from field: optional double totalSquaredInterFrameDelay = 65; */ - qualityLimitationDurationOther?: number; + totalSquaredInterFrameDelay?: number; /** - * @generated from field: optional string qualityLimitationReason = 31; + * @generated from field: optional string transportId = 66; */ - qualityLimitationReason?: string; + transportId?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.InboundRtpStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 9, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "concealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "concealmentEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "corruptionMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "decoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "estimatedPlayoutTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "fecBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 16, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 17, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "fecSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 19, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 20, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 21, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 22, name: "framesAssembledFromMultiplePackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 23, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 24, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 25, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 26, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 27, name: "framesRendered", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 28, name: "freezeCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 29, name: "headerBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 30, name: "insertedSamplesForDeceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 31, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 32, name: "jitterBufferDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 33, name: "jitterBufferEmittedCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 34, name: "jitterBufferMinimumDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 35, name: "jitterBufferTargetDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 36, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 37, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 38, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 39, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 40, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 41, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 42, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 43, name: "pauseCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 44, name: "playoutId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 45, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 46, name: "powerEfficientDecoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 47, name: "qpSum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 48, name: "remoteId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 49, name: "removedSamplesForAcceleration", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 50, name: "retransmittedBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 51, name: "retransmittedPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 52, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 53, name: "silentConcealedSamples", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 54, name: "totalAssemblyTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 55, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 56, name: "totalCorruptionProbability", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 57, name: "totalDecodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 58, name: "totalFreezesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 59, name: "totalInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 60, name: "totalPausesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 61, name: "totalProcessingDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 62, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 63, name: "totalSamplesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 64, name: "totalSquaredCorruptionProbability", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 65, name: "totalSquaredInterFrameDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 66, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_InboundRtpStats { + return new ClientSample_PeerConnectionSample_InboundRtpStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_InboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_InboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_InboundRtpStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats + */ +export class ClientSample_PeerConnectionSample_RemoteInboundRtpStats extends Message { /** - * @generated from field: optional int32 qualityLimitationResolutionChanges = 32; + * @generated from field: optional string id = 1; */ - qualityLimitationResolutionChanges?: number; + id?: string; /** - * @generated from field: optional bool relayedSource = 33; + * @generated from field: optional string kind = 2; */ - relayedSource?: boolean; + kind?: string; /** - * @generated from field: optional int64 retransmittedBytesSent = 34; + * @generated from field: optional int64 ssrc = 3; */ - retransmittedBytesSent?: bigint; + ssrc?: bigint; /** - * @generated from field: optional int32 retransmittedPacketsSent = 35; + * @generated from field: optional double timestamp = 4; */ - retransmittedPacketsSent?: number; + timestamp?: number; /** - * @generated from field: optional string rid = 36; + * @generated from field: optional bytes appData = 5; */ - rid?: string; + appData?: Uint8Array; /** - * @generated from field: optional double roundTripTime = 37; + * @generated from field: optional string codecId = 6; */ - roundTripTime?: number; + codecId?: string; /** - * @generated from field: optional int32 roundTripTimeMeasurements = 38; + * @generated from field: optional double fractionLost = 7; */ - roundTripTimeMeasurements?: number; + fractionLost?: number; /** - * @generated from field: optional bytes sfuStreamId = 39; + * @generated from field: optional double jitter = 8; */ - sfuStreamId?: Uint8Array; + jitter?: number; /** - * @generated from field: optional int32 targetBitrate = 40; + * @generated from field: optional string localId = 9; */ - targetBitrate?: number; + localId?: string; /** - * @generated from field: optional double totalEncodeTime = 41; + * @generated from field: optional int32 packetsLost = 10; */ - totalEncodeTime?: number; + packetsLost?: number; /** - * @generated from field: optional int64 totalEncodedBytesTarget = 42; + * @generated from field: optional int32 packetsReceived = 11; */ - totalEncodedBytesTarget?: bigint; + packetsReceived?: number; /** - * @generated from field: optional double totalPacketSendDelay = 43; + * @generated from field: optional double roundTripTime = 12; */ - totalPacketSendDelay?: number; + roundTripTime?: number; /** - * @generated from field: optional double totalRoundTripTime = 44; + * @generated from field: optional int32 roundTripTimeMeasurements = 13; */ - totalRoundTripTime?: number; + roundTripTimeMeasurements?: number; /** - * @generated from field: optional bytes trackId = 45; + * @generated from field: optional double totalRoundTripTime = 14; */ - trackId?: Uint8Array; + totalRoundTripTime?: number; /** - * @generated from field: optional int32 width = 46; + * @generated from field: optional string transportId = 15; */ - width?: number; + transportId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.OutboundVideoTrack"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteInboundRtpStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "averageRtcpInterval", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 4, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 7, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 8, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "framesDropped", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "headerBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "hugeFramesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 18, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 19, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 25, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "qpSum", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 27, name: "qualityLimitationDurationBandwidth", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 28, name: "qualityLimitationDurationCPU", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 29, name: "qualityLimitationDurationNone", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "qualityLimitationDurationOther", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 31, name: "qualityLimitationReason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 32, name: "qualityLimitationResolutionChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 33, name: "relayedSource", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 34, name: "retransmittedBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 35, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 37, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 38, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 39, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 40, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "totalEncodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 42, name: "totalEncodedBytesTarget", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 43, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 44, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 45, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 46, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "localId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 13, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_OutboundVideoTrack { - return new Samples_ClientSample_OutboundVideoTrack().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats().fromJsonString(jsonString, options); } - static equals(a: Samples_ClientSample_OutboundVideoTrack | PlainMessage | undefined, b: Samples_ClientSample_OutboundVideoTrack | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_OutboundVideoTrack, a, b); + static equals(a: ClientSample_PeerConnectionSample_RemoteInboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_RemoteInboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_RemoteInboundRtpStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats */ -export class Samples_ClientSample_IceLocalCandidate extends Message { +export class ClientSample_PeerConnectionSample_OutboundRtpStats extends Message { /** - * @generated from field: optional string address = 1; + * @generated from field: optional string id = 1; */ - address?: string; + id?: string; /** - * @generated from field: optional string candidateType = 2; + * @generated from field: optional string kind = 2; */ - candidateType?: string; + kind?: string; /** - * @generated from field: optional string id = 3; + * @generated from field: optional int64 ssrc = 3; */ - id?: string; + ssrc?: bigint; /** - * @generated from field: optional bytes peerConnectionId = 4; + * @generated from field: optional double timestamp = 4; */ - peerConnectionId?: Uint8Array; + timestamp?: number; /** - * @generated from field: optional int32 port = 5; + * @generated from field: optional bool active = 5; */ - port?: number; + active?: boolean; /** - * @generated from field: optional int64 priority = 6; + * @generated from field: optional bytes appData = 6; */ - priority?: bigint; + appData?: Uint8Array; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum protocol = 7; + * @generated from field: optional int32 bytesSent = 7; */ - protocol?: Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum; + bytesSent?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum relayProtocol = 8; + * @generated from field: optional string codecId = 8; */ - relayProtocol?: Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum; + codecId?: string; /** - * @generated from field: optional string url = 9; + * @generated from field: optional string encoderImplementation = 9; */ - url?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } + encoderImplementation?: string; - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "protocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum), opt: true }, - { no: 8, name: "relayProtocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum), opt: true }, - { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + /** + * @generated from field: optional int32 firCount = 10; + */ + firCount?: number; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromBinary(bytes, options); - } + /** + * @generated from field: optional int32 frameHeight = 11; + */ + frameHeight?: number; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromJson(jsonValue, options); - } + /** + * @generated from field: optional int32 frameWidth = 12; + */ + frameWidth?: number; - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceLocalCandidate { - return new Samples_ClientSample_IceLocalCandidate().fromJsonString(jsonString, options); - } + /** + * @generated from field: optional int32 framesEncoded = 13; + */ + framesEncoded?: number; - static equals(a: Samples_ClientSample_IceLocalCandidate | PlainMessage | undefined, b: Samples_ClientSample_IceLocalCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceLocalCandidate, a, b); - } -} + /** + * @generated from field: optional double framesPerSecond = 14; + */ + framesPerSecond?: number; -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum - */ -export enum Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum { /** - * For protocol - * - * @generated from enum value: TCP = 0; + * @generated from field: optional int32 framesSent = 15; */ - TCP = 0, + framesSent?: number; /** - * @generated from enum value: UDP = 1; + * @generated from field: optional int32 headerBytesSent = 16; */ - UDP = 1, + headerBytesSent?: number; /** - * For relayProtocol - * - * @generated from enum value: TLS = 2; + * @generated from field: optional int32 hugeFramesSent = 17; */ - TLS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum) -proto3.util.setEnumType(Samples_ClientSample_IceLocalCandidate_IceLocalCandidateEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.IceLocalCandidate.IceLocalCandidateEnum", [ - { no: 0, name: "TCP" }, - { no: 1, name: "UDP" }, - { no: 2, name: "TLS" }, -]); + hugeFramesSent?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate - */ -export class Samples_ClientSample_IceRemoteCandidate extends Message { /** - * @generated from field: optional string address = 1; + * @generated from field: optional int32 keyFramesEncoded = 18; */ - address?: string; + keyFramesEncoded?: number; /** - * @generated from field: optional string candidateType = 2; + * @generated from field: optional string mediaSourceId = 19; */ - candidateType?: string; + mediaSourceId?: string; /** - * @generated from field: optional string id = 3; + * @generated from field: optional string mid = 20; */ - id?: string; + mid?: string; /** - * @generated from field: optional bytes peerConnectionId = 4; + * @generated from field: optional int32 nackCount = 21; */ - peerConnectionId?: Uint8Array; + nackCount?: number; /** - * @generated from field: optional int32 port = 5; + * @generated from field: optional int32 packetsSent = 22; */ - port?: number; + packetsSent?: number; /** - * @generated from field: optional int64 priority = 6; + * @generated from field: optional int32 pliCount = 23; */ - priority?: bigint; + pliCount?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum protocol = 7; + * @generated from field: optional bool powerEfficientEncoder = 24; */ - protocol?: Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum; + powerEfficientEncoder?: boolean; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum relayProtocol = 8; + * @generated from field: optional double qpSum = 25; */ - relayProtocol?: Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum; + qpSum?: number; /** - * @generated from field: optional string url = 9; + * @generated from field: optional org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations qualityLimitationDurations = 26; */ - url?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "protocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum), opt: true }, - { no: 8, name: "relayProtocol", kind: "enum", T: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum), opt: true }, - { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + qualityLimitationDurations?: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_ClientSample_IceRemoteCandidate { - return new Samples_ClientSample_IceRemoteCandidate().fromJsonString(jsonString, options); - } - - static equals(a: Samples_ClientSample_IceRemoteCandidate | PlainMessage | undefined, b: Samples_ClientSample_IceRemoteCandidate | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_ClientSample_IceRemoteCandidate, a, b); - } -} - -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum - */ -export enum Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum { /** - * For protocol - * - * @generated from enum value: TCP = 0; + * @generated from field: optional string qualityLimitationReason = 27; */ - TCP = 0, + qualityLimitationReason?: string; /** - * @generated from enum value: UDP = 1; + * @generated from field: optional int32 qualityLimitationResolutionChanges = 28; */ - UDP = 1, + qualityLimitationResolutionChanges?: number; /** - * For relayProtocol - * - * @generated from enum value: TLS = 2; + * @generated from field: optional string remoteId = 29; */ - TLS = 2, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum) -proto3.util.setEnumType(Samples_ClientSample_IceRemoteCandidate_IceRemoteCandidateEnum, "org.observertc.schemas.protobuf.Samples.ClientSample.IceRemoteCandidate.IceRemoteCandidateEnum", [ - { no: 0, name: "TCP" }, - { no: 1, name: "UDP" }, - { no: 2, name: "TLS" }, -]); + remoteId?: string; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample - */ -export class Samples_SfuSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent customSfuEvents = 1; + * @generated from field: optional int32 retransmittedBytesSent = 30; */ - customSfuEvents: Samples_SfuSample_CustomSfuEvent[] = []; + retransmittedBytesSent?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats extensionStats = 2; + * @generated from field: optional int32 retransmittedPacketsSent = 31; */ - extensionStats: Samples_SfuSample_SfuExtensionStats[] = []; + retransmittedPacketsSent?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad inboundRtpPads = 3; + * @generated from field: optional string rid = 32; */ - inboundRtpPads: Samples_SfuSample_SfuInboundRtpPad[] = []; + rid?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad outboundRtpPads = 4; + * @generated from field: optional int32 rtxSsrc = 33; */ - outboundRtpPads: Samples_SfuSample_SfuOutboundRtpPad[] = []; + rtxSsrc?: number; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel sctpChannels = 5; + * @generated from field: optional string scalabilityMode = 34; */ - sctpChannels: Samples_SfuSample_SfuSctpChannel[] = []; + scalabilityMode?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport transports = 6; + * @generated from field: optional double targetBitrate = 35; */ - transports: Samples_SfuSample_SfuTransport[] = []; + targetBitrate?: number; /** - * @generated from field: optional bytes sfuId = 7; + * @generated from field: optional double totalEncodeTime = 36; */ - sfuId?: Uint8Array; + totalEncodeTime?: number; /** - * @generated from field: optional int64 timestamp = 8; + * @generated from field: optional int32 totalEncodedBytesTarget = 37; */ - timestamp?: bigint; + totalEncodedBytesTarget?: number; /** - * @generated from field: optional string marker = 9; + * @generated from field: optional double totalPacketSendDelay = 38; */ - marker?: string; + totalPacketSendDelay?: number; /** - * @generated from field: optional int32 timeZoneOffsetInHours = 10; + * @generated from field: optional string transportId = 39; */ - timeZoneOffsetInHours?: number; + transportId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "customSfuEvents", kind: "message", T: Samples_SfuSample_CustomSfuEvent, repeated: true }, - { no: 2, name: "extensionStats", kind: "message", T: Samples_SfuSample_SfuExtensionStats, repeated: true }, - { no: 3, name: "inboundRtpPads", kind: "message", T: Samples_SfuSample_SfuInboundRtpPad, repeated: true }, - { no: 4, name: "outboundRtpPads", kind: "message", T: Samples_SfuSample_SfuOutboundRtpPad, repeated: true }, - { no: 5, name: "sctpChannels", kind: "message", T: Samples_SfuSample_SfuSctpChannel, repeated: true }, - { no: 6, name: "transports", kind: "message", T: Samples_SfuSample_SfuTransport, repeated: true }, - { no: 7, name: "sfuId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 8, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "marker", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "timeZoneOffsetInHours", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "bytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "encoderImplementation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 11, name: "frameHeight", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "frameWidth", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 16, name: "headerBytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 17, name: "hugeFramesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 19, name: "mediaSourceId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 20, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 21, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 22, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 23, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 24, name: "powerEfficientEncoder", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 25, name: "qpSum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 26, name: "qualityLimitationDurations", kind: "message", T: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations, opt: true }, + { no: 27, name: "qualityLimitationReason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 28, name: "qualityLimitationResolutionChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 29, name: "remoteId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 30, name: "retransmittedBytesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 31, name: "retransmittedPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 32, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 33, name: "rtxSsrc", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 34, name: "scalabilityMode", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 35, name: "targetBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 36, name: "totalEncodeTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 37, name: "totalEncodedBytesTarget", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 38, name: "totalPacketSendDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 39, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample { - return new Samples_SfuSample().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats { + return new ClientSample_PeerConnectionSample_OutboundRtpStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample | PlainMessage | undefined, b: Samples_SfuSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample, a, b); + static equals(a: ClientSample_PeerConnectionSample_OutboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_OutboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_OutboundRtpStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations */ -export class Samples_SfuSample_CustomSfuEvent extends Message { +export class ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations extends Message { /** - * @generated from field: optional string name = 1; + * @generated from field: optional double bandwidth = 1; */ - name?: string; + bandwidth?: number; /** - * @generated from field: optional string attachments = 2; + * @generated from field: optional double cpu = 2; */ - attachments?: string; + cpu?: number; /** - * @generated from field: optional string message = 3; + * @generated from field: optional double none = 3; */ - message?: string; + none?: number; /** - * @generated from field: optional bytes sfuSinkId = 4; + * @generated from field: optional double other = 4; */ - sfuSinkId?: Uint8Array; + other?: number; - /** - * @generated from field: optional bytes sfuStreamId = 5; - */ - sfuStreamId?: Uint8Array; - - /** - * @generated from field: optional int64 timestamp = 6; - */ - timestamp?: bigint; - - /** - * @generated from field: optional string transportId = 7; - */ - transportId?: string; - - /** - * @generated from field: optional string value = 8; - */ - value?: string; - - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.CustomSfuEvent"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.OutboundRtpStats.QualityLimitationDurations"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "attachments", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "sfuSinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "sfuStreamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 6, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "bandwidth", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 2, name: "cpu", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "none", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "other", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_CustomSfuEvent { - return new Samples_SfuSample_CustomSfuEvent().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations { + return new ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_CustomSfuEvent | PlainMessage | undefined, b: Samples_SfuSample_CustomSfuEvent | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_CustomSfuEvent, a, b); + static equals(a: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_OutboundRtpStats_QualityLimitationDurations, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats */ -export class Samples_SfuSample_SfuTransport extends Message { +export class ClientSample_PeerConnectionSample_RemoteOutboundRtpStats extends Message { /** - * @generated from field: optional string transportId = 1; + * @generated from field: optional string id = 1; */ - transportId?: string; + id?: string; /** - * @generated from field: optional string dtlsState = 2; + * @generated from field: optional string kind = 2; */ - dtlsState?: string; + kind?: string; /** - * @generated from field: optional string iceRole = 3; + * @generated from field: optional int64 ssrc = 3; */ - iceRole?: string; + ssrc?: bigint; /** - * @generated from field: optional string iceState = 4; + * @generated from field: optional double timestamp = 4; */ - iceState?: string; + timestamp?: number; /** - * @generated from field: optional bool internal = 5; + * @generated from field: optional bytes appData = 5; */ - internal?: boolean; + appData?: Uint8Array; /** - * @generated from field: optional string localAddress = 6; + * @generated from field: optional int64 bytesSent = 6; */ - localAddress?: string; + bytesSent?: bigint; /** - * @generated from field: optional int32 localPort = 7; + * @generated from field: optional string codecId = 7; */ - localPort?: number; + codecId?: string; /** - * @generated from field: optional bool noReport = 8; + * @generated from field: optional string localId = 8; */ - noReport?: boolean; + localId?: string; /** - * @generated from field: optional string protocol = 9; + * @generated from field: optional int32 packetsSent = 9; */ - protocol?: string; + packetsSent?: number; /** - * @generated from field: optional string remoteAddress = 10; + * @generated from field: optional double remoteTimestamp = 10; */ - remoteAddress?: string; + remoteTimestamp?: number; /** - * @generated from field: optional int32 remotePort = 11; + * @generated from field: optional int32 reportsSent = 11; */ - remotePort?: number; + reportsSent?: number; /** - * @generated from field: optional int64 rtpBytesReceived = 12; + * @generated from field: optional double roundTripTime = 12; */ - rtpBytesReceived?: bigint; + roundTripTime?: number; /** - * @generated from field: optional int64 rtpBytesSent = 13; + * @generated from field: optional int32 roundTripTimeMeasurements = 13; */ - rtpBytesSent?: bigint; + roundTripTimeMeasurements?: number; /** - * @generated from field: optional int32 rtpPacketsLost = 14; + * @generated from field: optional double totalRoundTripTime = 14; */ - rtpPacketsLost?: number; + totalRoundTripTime?: number; /** - * @generated from field: optional int32 rtpPacketsReceived = 15; + * @generated from field: optional string transportId = 15; */ - rtpPacketsReceived?: number; + transportId?: string; - /** - * @generated from field: optional int32 rtpPacketsSent = 16; - */ - rtpPacketsSent?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int64 rtxBytesReceived = 17; - */ - rtxBytesReceived?: bigint; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.RemoteOutboundRtpStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 7, name: "codecId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "localId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 10, name: "remoteTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "reportsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 13, name: "roundTripTimeMeasurements", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 15, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromBinary(bytes, options); + } + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_RemoteOutboundRtpStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_RemoteOutboundRtpStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats + */ +export class ClientSample_PeerConnectionSample_AudioSourceStats extends Message { /** - * @generated from field: optional int64 rtxBytesSent = 18; + * @generated from field: optional string id = 1; */ - rtxBytesSent?: bigint; + id?: string; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 19; + * @generated from field: optional string kind = 2; */ - rtxPacketsDiscarded?: number; + kind?: string; /** - * @generated from field: optional int32 rtxPacketsLost = 20; + * @generated from field: optional double timestamp = 3; */ - rtxPacketsLost?: number; + timestamp?: number; /** - * @generated from field: optional int32 rtxPacketsReceived = 21; + * @generated from field: optional bytes trackIdentifier = 4; */ - rtxPacketsReceived?: number; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional int32 rtxPacketsSent = 22; + * @generated from field: optional bytes appData = 5; */ - rtxPacketsSent?: number; + appData?: Uint8Array; /** - * @generated from field: optional int64 sctpBytesReceived = 23; + * @generated from field: optional double audioLevel = 6; */ - sctpBytesReceived?: bigint; + audioLevel?: number; /** - * @generated from field: optional int64 sctpBytesSent = 24; + * @generated from field: optional double echoReturnLoss = 7; */ - sctpBytesSent?: bigint; + echoReturnLoss?: number; /** - * @generated from field: optional int32 sctpPacketsReceived = 25; + * @generated from field: optional double echoReturnLossEnhancement = 8; */ - sctpPacketsReceived?: number; + echoReturnLossEnhancement?: number; /** - * @generated from field: optional int32 sctpPacketsSent = 26; + * @generated from field: optional double totalAudioEnergy = 9; */ - sctpPacketsSent?: number; + totalAudioEnergy?: number; /** - * @generated from field: optional string sctpState = 27; + * @generated from field: optional double totalSamplesDuration = 10; */ - sctpState?: string; + totalSamplesDuration?: number; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuTransport"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioSourceStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "localAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "localPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 9, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "remoteAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 11, name: "remotePort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "rtpBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "rtpBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 14, name: "rtpPacketsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "rtpPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "rtpPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 17, name: "rtxBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 18, name: "rtxBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 19, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 20, name: "rtxPacketsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "rtxPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "rtxPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "sctpBytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 24, name: "sctpBytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 25, name: "sctpPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "sctpPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "sctpState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 6, name: "audioLevel", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "echoReturnLoss", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "echoReturnLossEnhancement", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "totalAudioEnergy", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 10, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuTransport { - return new Samples_SfuSample_SfuTransport().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_AudioSourceStats { + return new ClientSample_PeerConnectionSample_AudioSourceStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuTransport | PlainMessage | undefined, b: Samples_SfuSample_SfuTransport | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuTransport, a, b); + static equals(a: ClientSample_PeerConnectionSample_AudioSourceStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_AudioSourceStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_AudioSourceStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats */ -export class Samples_SfuSample_SfuInboundRtpPad extends Message { +export class ClientSample_PeerConnectionSample_VideoSourceStats extends Message { /** - * @generated from field: optional bytes padId = 1; + * @generated from field: optional int32 frames = 1; */ - padId?: Uint8Array; + frames?: number; /** - * @generated from field: optional int64 ssrc = 2; + * @generated from field: optional double framesPerSecond = 2; */ - ssrc?: bigint; + framesPerSecond?: number; /** - * @generated from field: optional bytes streamId = 3; + * @generated from field: optional int32 height = 3; */ - streamId?: Uint8Array; + height?: number; /** - * @generated from field: optional string transportId = 4; + * @generated from field: optional string id = 4; */ - transportId?: string; + id?: string; /** - * @generated from field: optional int64 bytesReceived = 5; + * @generated from field: optional string kind = 5; */ - bytesReceived?: bigint; + kind?: string; /** - * @generated from field: optional int32 clockRate = 6; + * @generated from field: optional double timestamp = 6; */ - clockRate?: number; + timestamp?: number; /** - * @generated from field: optional int32 fecPacketsDiscarded = 7; + * @generated from field: optional bytes trackIdentifier = 7; */ - fecPacketsDiscarded?: number; + trackIdentifier?: Uint8Array; /** - * @generated from field: optional int32 fecPacketsReceived = 8; + * @generated from field: optional int32 width = 8; */ - fecPacketsReceived?: number; + width?: number; /** - * @generated from field: optional int32 firCount = 9; + * @generated from field: optional bytes appData = 9; */ - firCount?: number; + appData?: Uint8Array; - /** - * @generated from field: optional double fractionLost = 10; - */ - fractionLost?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 framesDecoded = 11; - */ - framesDecoded?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.VideoSourceStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "frames", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 2, name: "framesPerSecond", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "trackIdentifier", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 8, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 framesReceived = 12; - */ - framesReceived?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromBinary(bytes, options); + } - /** - * @generated from field: optional bool internal = 13; - */ - internal?: boolean; + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_VideoSourceStats { + return new ClientSample_PeerConnectionSample_VideoSourceStats().fromJsonString(jsonString, options); + } + static equals(a: ClientSample_PeerConnectionSample_VideoSourceStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_VideoSourceStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_VideoSourceStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats + */ +export class ClientSample_PeerConnectionSample_AudioPlayoutStats extends Message { /** - * @generated from field: optional double jitter = 14; + * @generated from field: optional string id = 1; */ - jitter?: number; + id?: string; /** - * @generated from field: optional int32 keyFramesDecoded = 15; + * @generated from field: optional string kind = 2; */ - keyFramesDecoded?: number; + kind?: string; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum mediaType = 16; + * @generated from field: optional double synthesizedSamplesDuration = 3; */ - mediaType?: Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum; + synthesizedSamplesDuration?: number; /** - * @generated from field: optional string mimeType = 17; + * @generated from field: optional int32 synthesizedSamplesEvents = 4; */ - mimeType?: string; + synthesizedSamplesEvents?: number; /** - * @generated from field: optional int32 nackCount = 18; + * @generated from field: optional double timestamp = 5; */ - nackCount?: number; + timestamp?: number; /** - * @generated from field: optional bool noReport = 19; + * @generated from field: optional double totalPlayoutDelay = 6; */ - noReport?: boolean; + totalPlayoutDelay?: number; /** - * @generated from field: optional int32 packetsDiscarded = 20; + * @generated from field: optional int32 totalSamplesCount = 7; */ - packetsDiscarded?: number; + totalSamplesCount?: number; /** - * @generated from field: optional int32 packetsDuplicated = 21; + * @generated from field: optional double totalSamplesDuration = 8; */ - packetsDuplicated?: number; + totalSamplesDuration?: number; /** - * @generated from field: optional int32 packetsFailedDecryption = 22; + * @generated from field: optional bytes appData = 9; */ - packetsFailedDecryption?: number; + appData?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.AudioPlayoutStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "synthesizedSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 4, name: "synthesizedSamplesEvents", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 6, name: "totalPlayoutDelay", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 7, name: "totalSamplesCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "totalSamplesDuration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 9, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromBinary(bytes, options); + } + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_AudioPlayoutStats { + return new ClientSample_PeerConnectionSample_AudioPlayoutStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_AudioPlayoutStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_AudioPlayoutStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_AudioPlayoutStats, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats + */ +export class ClientSample_PeerConnectionSample_PeerConnectionTransportStats extends Message { /** - * @generated from field: optional int32 packetsLost = 23; + * @generated from field: optional int32 dataChannelsClosed = 1; */ - packetsLost?: number; + dataChannelsClosed?: number; /** - * @generated from field: optional int32 packetsReceived = 24; + * @generated from field: optional int32 dataChannelsOpened = 2; */ - packetsReceived?: number; + dataChannelsOpened?: number; /** - * @generated from field: optional int32 packetsRepaired = 25; + * @generated from field: optional string id = 3; */ - packetsRepaired?: number; + id?: string; /** - * @generated from field: optional int32 payloadType = 26; + * @generated from field: optional double timestamp = 4; */ - payloadType?: number; + timestamp?: number; /** - * @generated from field: optional int32 pliCount = 27; + * @generated from field: optional bytes appData = 5; */ - pliCount?: number; + appData?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.PeerConnectionTransportStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "dataChannelsClosed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 2, name: "dataChannelsOpened", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 5, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_PeerConnectionTransportStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_PeerConnectionTransportStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_PeerConnectionTransportStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats + */ +export class ClientSample_PeerConnectionSample_DataChannelStats extends Message { /** - * @generated from field: optional string rid = 28; + * @generated from field: optional int64 bytesReceived = 1; */ - rid?: string; + bytesReceived?: bigint; /** - * @generated from field: optional double roundTripTime = 29; + * @generated from field: optional int64 bytesSent = 2; */ - roundTripTime?: number; + bytesSent?: bigint; /** - * @generated from field: optional int32 rtcpRrSent = 30; + * @generated from field: optional int32 dataChannelIdentifier = 3; */ - rtcpRrSent?: number; + dataChannelIdentifier?: number; /** - * @generated from field: optional int32 rtcpSrReceived = 31; + * @generated from field: optional string id = 4; */ - rtcpSrReceived?: number; + id?: string; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 32; + * @generated from field: optional string label = 5; */ - rtxPacketsDiscarded?: number; + label?: string; /** - * @generated from field: optional int32 rtxPacketsReceived = 33; + * @generated from field: optional int32 messagesReceived = 6; */ - rtxPacketsReceived?: number; + messagesReceived?: number; /** - * @generated from field: optional int64 rtxSsrc = 34; + * @generated from field: optional int32 messagesSent = 7; */ - rtxSsrc?: bigint; + messagesSent?: number; /** - * @generated from field: optional string sdpFmtpLine = 35; + * @generated from field: optional string protocol = 8; */ - sdpFmtpLine?: string; + protocol?: string; /** - * @generated from field: optional int32 sliCount = 36; + * @generated from field: optional string state = 9; */ - sliCount?: number; + state?: string; /** - * @generated from field: optional int32 targetBitrate = 37; + * @generated from field: optional double timestamp = 10; */ - targetBitrate?: number; + timestamp?: number; /** - * @generated from field: optional bool voiceActivityFlag = 38; + * @generated from field: optional bytes appData = 11; */ - voiceActivityFlag?: boolean; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.DataChannelStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "padId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 3, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 4, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "fecPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 11, name: "framesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "framesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 14, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "keyFramesDecoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "mediaType", kind: "enum", T: proto3.getEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum), opt: true }, - { no: 17, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 18, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 20, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 21, name: "packetsDuplicated", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "packetsFailedDecryption", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 23, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsRepaired", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 29, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 30, name: "rtcpRrSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "rtcpSrReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 32, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 33, name: "rtxPacketsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 35, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 36, name: "sliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 37, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 38, name: "voiceActivityFlag", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 1, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 2, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 3, name: "dataChannelIdentifier", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "messagesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 7, name: "messagesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 8, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuInboundRtpPad { - return new Samples_SfuSample_SfuInboundRtpPad().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_DataChannelStats { + return new ClientSample_PeerConnectionSample_DataChannelStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuInboundRtpPad | PlainMessage | undefined, b: Samples_SfuSample_SfuInboundRtpPad | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuInboundRtpPad, a, b); + static equals(a: ClientSample_PeerConnectionSample_DataChannelStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_DataChannelStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_DataChannelStats, a, b); } } -/** - * @generated from enum org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum - */ -export enum Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum { - /** - * For mediaType - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum) -proto3.util.setEnumType(Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum, "org.observertc.schemas.protobuf.Samples.SfuSample.SfuInboundRtpPad.SfuInboundRtpPadEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad - */ -export class Samples_SfuSample_SfuOutboundRtpPad extends Message { - /** - * @generated from field: optional bytes padId = 1; - */ - padId?: Uint8Array; - - /** - * @generated from field: optional bytes sinkId = 2; - */ - sinkId?: Uint8Array; - - /** - * @generated from field: optional int64 ssrc = 3; - */ - ssrc?: bigint; - - /** - * @generated from field: optional bytes streamId = 4; - */ - streamId?: Uint8Array; - +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats + */ +export class ClientSample_PeerConnectionSample_IceTransportStats extends Message { /** - * @generated from field: optional string transportId = 5; + * @generated from field: optional int64 bytesReceived = 1; */ - transportId?: string; + bytesReceived?: bigint; /** - * @generated from field: optional int64 bytesSent = 6; + * @generated from field: optional int64 bytesSent = 2; */ bytesSent?: bigint; /** - * @generated from field: optional bytes callId = 7; + * @generated from field: optional string dtlsCipher = 3; */ - callId?: Uint8Array; + dtlsCipher?: string; /** - * @generated from field: optional bytes clientId = 8; + * @generated from field: optional string dtlsRole = 4; */ - clientId?: Uint8Array; + dtlsRole?: string; /** - * @generated from field: optional int32 clockRate = 9; + * @generated from field: optional string dtlsState = 5; */ - clockRate?: number; + dtlsState?: string; /** - * @generated from field: optional int32 fecPacketsDiscarded = 10; + * @generated from field: optional string iceLocalUsernameFragment = 6; */ - fecPacketsDiscarded?: number; + iceLocalUsernameFragment?: string; /** - * @generated from field: optional int32 fecPacketsSent = 11; + * @generated from field: optional string iceRole = 7; */ - fecPacketsSent?: number; + iceRole?: string; /** - * @generated from field: optional int32 firCount = 12; + * @generated from field: optional string iceState = 8; */ - firCount?: number; + iceState?: string; /** - * @generated from field: optional double fractionLost = 13; + * @generated from field: optional string id = 9; */ - fractionLost?: number; + id?: string; /** - * @generated from field: optional int32 framesEncoded = 14; + * @generated from field: optional string localCertificateId = 10; */ - framesEncoded?: number; + localCertificateId?: string; /** - * @generated from field: optional int32 framesSent = 15; + * @generated from field: optional int32 packetsReceived = 11; */ - framesSent?: number; + packetsReceived?: number; /** - * @generated from field: optional bool internal = 16; + * @generated from field: optional int32 packetsSent = 12; */ - internal?: boolean; + packetsSent?: number; /** - * @generated from field: optional double jitter = 17; + * @generated from field: optional string remoteCertificateId = 13; */ - jitter?: number; + remoteCertificateId?: string; /** - * @generated from field: optional int32 keyFramesEncoded = 18; + * @generated from field: optional int32 selectedCandidatePairChanges = 14; */ - keyFramesEncoded?: number; + selectedCandidatePairChanges?: number; /** - * @generated from field: optional org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum mediaType = 19; + * @generated from field: optional string selectedCandidatePairId = 15; */ - mediaType?: Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum; + selectedCandidatePairId?: string; /** - * @generated from field: optional string mimeType = 20; + * @generated from field: optional string srtpCipher = 16; */ - mimeType?: string; + srtpCipher?: string; /** - * @generated from field: optional int32 nackCount = 21; + * @generated from field: optional double timestamp = 17; */ - nackCount?: number; + timestamp?: number; /** - * @generated from field: optional bool noReport = 22; + * @generated from field: optional string tlsVersion = 18; */ - noReport?: boolean; + tlsVersion?: string; /** - * @generated from field: optional int32 packetsDiscarded = 23; + * @generated from field: optional bytes appData = 19; */ - packetsDiscarded?: number; + appData?: Uint8Array; - /** - * @generated from field: optional int32 packetsDuplicated = 24; - */ - packetsDuplicated?: number; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 packetsFailedEncryption = 25; - */ - packetsFailedEncryption?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceTransportStats"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 2, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 3, name: "dtlsCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "dtlsRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "dtlsState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "iceLocalUsernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "iceRole", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "iceState", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "localCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 11, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 12, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 13, name: "remoteCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "selectedCandidatePairChanges", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 15, name: "selectedCandidatePairId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 16, name: "srtpCipher", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 17, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 18, name: "tlsVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 19, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 packetsLost = 26; - */ - packetsLost?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceTransportStats { + return new ClientSample_PeerConnectionSample_IceTransportStats().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_PeerConnectionSample_IceTransportStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceTransportStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceTransportStats, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats + */ +export class ClientSample_PeerConnectionSample_IceCandidateStats extends Message { /** - * @generated from field: optional int32 packetsRetransmitted = 27; + * @generated from field: optional string candidateType = 1; */ - packetsRetransmitted?: number; + candidateType?: string; /** - * @generated from field: optional int32 packetsSent = 28; + * @generated from field: optional string foundation = 2; */ - packetsSent?: number; + foundation?: string; /** - * @generated from field: optional int32 payloadType = 29; + * @generated from field: optional string id = 3; */ - payloadType?: number; + id?: string; /** - * @generated from field: optional int32 pliCount = 30; + * @generated from field: optional int32 port = 4; */ - pliCount?: number; + port?: number; /** - * @generated from field: optional string rid = 31; + * @generated from field: optional int64 priority = 5; */ - rid?: string; + priority?: bigint; /** - * @generated from field: optional double roundTripTime = 32; + * @generated from field: optional string protocol = 6; */ - roundTripTime?: number; + protocol?: string; /** - * @generated from field: optional int32 rtcpRrReceived = 33; + * @generated from field: optional string relatedAddress = 7; */ - rtcpRrReceived?: number; + relatedAddress?: string; /** - * @generated from field: optional int32 rtcpSrSent = 34; + * @generated from field: optional int32 relatedPort = 8; */ - rtcpSrSent?: number; + relatedPort?: number; /** - * @generated from field: optional int32 rtxPacketsDiscarded = 35; + * @generated from field: optional string relayProtocol = 9; */ - rtxPacketsDiscarded?: number; + relayProtocol?: string; /** - * @generated from field: optional int32 rtxPacketsSent = 36; + * @generated from field: optional string tcpType = 10; */ - rtxPacketsSent?: number; + tcpType?: string; /** - * @generated from field: optional int64 rtxSsrc = 37; + * @generated from field: optional double timestamp = 11; */ - rtxSsrc?: bigint; + timestamp?: number; /** - * @generated from field: optional string sdpFmtpLine = 38; + * @generated from field: optional string transportId = 12; */ - sdpFmtpLine?: string; + transportId?: string; /** - * @generated from field: optional int32 sliCount = 39; + * @generated from field: optional string url = 13; */ - sliCount?: number; + url?: string; /** - * @generated from field: optional int32 targetBitrate = 40; + * @generated from field: optional string usernameFragment = 14; */ - targetBitrate?: number; + usernameFragment?: string; /** - * @generated from field: optional bytes trackId = 41; + * @generated from field: optional string address = 15; */ - trackId?: Uint8Array; + address?: string; /** - * @generated from field: optional bool voiceActivityFlag = 42; + * @generated from field: optional bytes appData = 16; */ - voiceActivityFlag?: boolean; + appData?: Uint8Array; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidateStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "padId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "sinkId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 5, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 7, name: "callId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 8, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 9, name: "clockRate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "fecPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "fecPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "firCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "fractionLost", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 14, name: "framesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "framesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 16, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 17, name: "jitter", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 18, name: "keyFramesEncoded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 19, name: "mediaType", kind: "enum", T: proto3.getEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum), opt: true }, - { no: 20, name: "mimeType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 21, name: "nackCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 22, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 23, name: "packetsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 24, name: "packetsDuplicated", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 25, name: "packetsFailedEncryption", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 26, name: "packetsLost", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 27, name: "packetsRetransmitted", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 28, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 29, name: "payloadType", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 30, name: "pliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 31, name: "rid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 32, name: "roundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 33, name: "rtcpRrReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 34, name: "rtcpSrSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 35, name: "rtxPacketsDiscarded", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 36, name: "rtxPacketsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 37, name: "rtxSsrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 38, name: "sdpFmtpLine", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 39, name: "sliCount", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 40, name: "targetBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 41, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 42, name: "voiceActivityFlag", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 1, name: "candidateType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "foundation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "port", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 5, name: "priority", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 7, name: "relatedAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "relatedPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 9, name: "relayProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "tcpType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 11, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 12, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 13, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 14, name: "usernameFragment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 15, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 16, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuOutboundRtpPad { - return new Samples_SfuSample_SfuOutboundRtpPad().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceCandidateStats { + return new ClientSample_PeerConnectionSample_IceCandidateStats().fromJsonString(jsonString, options); } - static equals(a: Samples_SfuSample_SfuOutboundRtpPad | PlainMessage | undefined, b: Samples_SfuSample_SfuOutboundRtpPad | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuOutboundRtpPad, a, b); + static equals(a: ClientSample_PeerConnectionSample_IceCandidateStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceCandidateStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceCandidateStats, a, b); } } /** - * @generated from enum org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum - */ -export enum Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum { - /** - * For mediaType - * - * @generated from enum value: AUDIO = 0; - */ - AUDIO = 0, - - /** - * @generated from enum value: VIDEO = 1; - */ - VIDEO = 1, -} -// Retrieve enum metadata with: proto3.getEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum) -proto3.util.setEnumType(Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum, "org.observertc.schemas.protobuf.Samples.SfuSample.SfuOutboundRtpPad.SfuOutboundRtpPadEnum", [ - { no: 0, name: "AUDIO" }, - { no: 1, name: "VIDEO" }, -]); - -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats */ -export class Samples_SfuSample_SfuSctpChannel extends Message { +export class ClientSample_PeerConnectionSample_IceCandidatePairStats extends Message { /** - * @generated from field: optional bytes channelId = 1; + * @generated from field: optional double availableIncomingBitrate = 1; */ - channelId?: Uint8Array; + availableIncomingBitrate?: number; /** - * @generated from field: optional bytes streamId = 2; + * @generated from field: optional double availableOutgoingBitrate = 2; */ - streamId?: Uint8Array; + availableOutgoingBitrate?: number; /** - * @generated from field: optional string transportId = 3; + * @generated from field: optional int64 bytesDiscardedOnSend = 3; */ - transportId?: string; + bytesDiscardedOnSend?: bigint; /** * @generated from field: optional int64 bytesReceived = 4; @@ -3835,434 +2016,438 @@ export class Samples_SfuSample_SfuSctpChannel extends Message) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuSctpChannel"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "channelId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 2, name: "streamId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 3, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "internal", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 7, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 8, name: "messageReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "messageSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "noReport", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 11, name: "protocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 12, name: "sctpCongestionWindow", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 13, name: "sctpMtu", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 14, name: "sctpReceiverWindow", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 15, name: "sctpSmoothedRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, - { no: 16, name: "sctpUnackData", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuSctpChannel { - return new Samples_SfuSample_SfuSctpChannel().fromJsonString(jsonString, options); - } - - static equals(a: Samples_SfuSample_SfuSctpChannel | PlainMessage | undefined, b: Samples_SfuSample_SfuSctpChannel | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuSctpChannel, a, b); - } -} + remoteCandidateId?: string; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats - */ -export class Samples_SfuSample_SfuExtensionStats extends Message { /** - * @generated from field: optional string payload = 1; + * @generated from field: optional int32 requestsReceived = 17; */ - payload?: string; + requestsReceived?: number; /** - * @generated from field: optional string type = 2; + * @generated from field: optional int32 requestsSent = 18; */ - type?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.SfuSample.SfuExtensionStats"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); + requestsSent?: number; - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromBinary(bytes, options); - } + /** + * @generated from field: optional int32 responsesReceived = 19; + */ + responsesReceived?: number; - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromJson(jsonValue, options); - } + /** + * @generated from field: optional int32 responsesSent = 20; + */ + responsesSent?: number; - static fromJsonString(jsonString: string, options?: Partial): Samples_SfuSample_SfuExtensionStats { - return new Samples_SfuSample_SfuExtensionStats().fromJsonString(jsonString, options); - } + /** + * @generated from field: optional double timestamp = 21; + */ + timestamp?: number; - static equals(a: Samples_SfuSample_SfuExtensionStats | PlainMessage | undefined, b: Samples_SfuSample_SfuExtensionStats | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_SfuSample_SfuExtensionStats, a, b); - } -} + /** + * @generated from field: optional double totalRoundTripTime = 22; + */ + totalRoundTripTime?: number; -/** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample - */ -export class Samples_TurnSample extends Message { /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation allocations = 1; + * @generated from field: optional string transportId = 23; */ - allocations: Samples_TurnSample_TurnPeerAllocation[] = []; + transportId?: string; /** - * @generated from field: repeated org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession sessions = 2; + * @generated from field: optional bytes appData = 24; */ - sessions: Samples_TurnSample_TurnSession[] = []; + appData?: Uint8Array; /** - * @generated from field: optional string serverId = 3; + * @generated from field: optional org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum state = 25; */ - serverId?: string; + state?: ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "allocations", kind: "message", T: Samples_TurnSample_TurnPeerAllocation, repeated: true }, - { no: 2, name: "sessions", kind: "message", T: Samples_TurnSample_TurnSession, repeated: true }, - { no: 3, name: "serverId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "availableIncomingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 2, name: "availableOutgoingBitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 3, name: "bytesDiscardedOnSend", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 4, name: "bytesReceived", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "bytesSent", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "consentRequestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 7, name: "currentRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 8, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "lastPacketReceivedTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 10, name: "lastPacketSentTimestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 11, name: "localCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 12, name: "nominated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 13, name: "packetsDiscardedOnSend", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 14, name: "packetsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 15, name: "packetsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 16, name: "remoteCandidateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 17, name: "requestsReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 18, name: "requestsSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 19, name: "responsesReceived", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 20, name: "responsesSent", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 21, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 22, name: "totalRoundTripTime", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 23, name: "transportId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 24, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 25, name: "state", kind: "enum", T: proto3.getEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum), opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample { - return new Samples_TurnSample().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_IceCandidatePairStats { + return new ClientSample_PeerConnectionSample_IceCandidatePairStats().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample | PlainMessage | undefined, b: Samples_TurnSample | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample, a, b); + static equals(a: ClientSample_PeerConnectionSample_IceCandidatePairStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_IceCandidatePairStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_IceCandidatePairStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation + * @generated from enum org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum */ -export class Samples_TurnSample_TurnPeerAllocation extends Message { - /** - * @generated from field: optional string peerId = 1; - */ - peerId?: string; - - /** - * @generated from field: optional string relayedAddress = 2; - */ - relayedAddress?: string; - +export enum ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum { /** - * @generated from field: optional int32 relayedPort = 3; + * For state + * + * @generated from enum value: NEW = 0; */ - relayedPort?: number; + NEW = 0, /** - * @generated from field: optional string sessionId = 4; + * @generated from enum value: INPROGRESS = 1; */ - sessionId?: string; + INPROGRESS = 1, /** - * @generated from field: optional string transportProtocol = 5; + * @generated from enum value: FAILED = 2; */ - transportProtocol?: string; + FAILED = 2, /** - * @generated from field: optional string peerAddress = 6; + * @generated from enum value: SUCCEEDED = 3; */ - peerAddress?: string; + SUCCEEDED = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum) +proto3.util.setEnumType(ClientSample_PeerConnectionSample_IceCandidatePairStats_IceCandidatePairStatsEnum, "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.IceCandidatePairStats.IceCandidatePairStatsEnum", [ + { no: 0, name: "NEW" }, + { no: 1, name: "INPROGRESS" }, + { no: 2, name: "FAILED" }, + { no: 3, name: "SUCCEEDED" }, +]); +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats + */ +export class ClientSample_PeerConnectionSample_CertificateStats extends Message { /** - * @generated from field: optional int32 peerPort = 7; + * @generated from field: optional string base64Certificate = 1; */ - peerPort?: number; + base64Certificate?: string; /** - * @generated from field: optional int64 receivedBytes = 8; + * @generated from field: optional string fingerprint = 2; */ - receivedBytes?: bigint; + fingerprint?: string; /** - * @generated from field: optional int32 receivedPackets = 9; + * @generated from field: optional string fingerprintAlgorithm = 3; */ - receivedPackets?: number; + fingerprintAlgorithm?: string; /** - * @generated from field: optional int32 receivingBitrate = 10; + * @generated from field: optional string id = 4; */ - receivingBitrate?: number; + id?: string; /** - * @generated from field: optional int32 sendingBitrate = 11; + * @generated from field: optional double timestamp = 5; */ - sendingBitrate?: number; + timestamp?: number; /** - * @generated from field: optional int64 sentBytes = 12; + * @generated from field: optional bytes appData = 6; */ - sentBytes?: bigint; + appData?: Uint8Array; /** - * @generated from field: optional int32 sentPackets = 13; + * @generated from field: optional string issuerCertificateId = 7; */ - sentPackets?: number; + issuerCertificateId?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample.TurnPeerAllocation"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.PeerConnectionSample.CertificateStats"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "peerId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "relayedAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "relayedPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "transportProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "peerAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "peerPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "receivedBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 9, name: "receivedPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "receivingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "sendingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 12, name: "sentBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 13, name: "sentPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, + { no: 1, name: "base64Certificate", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "fingerprint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "fingerprintAlgorithm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true }, + { no: 6, name: "appData", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 7, name: "issuerCertificateId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample_TurnPeerAllocation { - return new Samples_TurnSample_TurnPeerAllocation().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_PeerConnectionSample_CertificateStats { + return new ClientSample_PeerConnectionSample_CertificateStats().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample_TurnPeerAllocation | PlainMessage | undefined, b: Samples_TurnSample_TurnPeerAllocation | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample_TurnPeerAllocation, a, b); + static equals(a: ClientSample_PeerConnectionSample_CertificateStats | PlainMessage | undefined, b: ClientSample_PeerConnectionSample_CertificateStats | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_PeerConnectionSample_CertificateStats, a, b); } } /** - * @generated from message org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession + * @generated from message org.observertc.schemas.protobuf.ClientSample.ClientEvent */ -export class Samples_TurnSample_TurnSession extends Message { +export class ClientSample_ClientEvent extends Message { /** - * @generated from field: optional string sessionId = 1; + * @generated from field: optional string type = 1; */ - sessionId?: string; + type?: string; /** - * @generated from field: optional string clientAddress = 2; + * @generated from field: optional string payload = 2; */ - clientAddress?: string; + payload?: string; /** - * @generated from field: optional bytes clientId = 3; + * @generated from field: optional bytes peerConnectionId = 3; */ - clientId?: Uint8Array; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional int32 clientPort = 4; + * @generated from field: optional int64 ssrc = 4; */ - clientPort?: number; + ssrc?: bigint; /** - * @generated from field: optional int64 nonceExpirationTime = 5; + * @generated from field: optional int64 timestamp = 5; */ - nonceExpirationTime?: bigint; + timestamp?: bigint; /** - * @generated from field: optional string realm = 6; + * @generated from field: optional bytes trackId = 6; */ - realm?: string; + trackId?: Uint8Array; - /** - * @generated from field: optional int64 receivedBytes = 7; - */ - receivedBytes?: bigint; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } - /** - * @generated from field: optional int32 receivedPackets = 8; - */ - receivedPackets?: number; + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ClientEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 4, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); - /** - * @generated from field: optional int32 receivingBitrate = 9; - */ - receivingBitrate?: number; + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromJson(jsonValue, options); + } + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ClientEvent { + return new ClientSample_ClientEvent().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_ClientEvent | PlainMessage | undefined, b: ClientSample_ClientEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ClientEvent, a, b); + } +} + +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.ClientMetaData + */ +export class ClientSample_ClientMetaData extends Message { /** - * @generated from field: optional int32 sendingBitrate = 10; + * @generated from field: optional string type = 1; */ - sendingBitrate?: number; + type?: string; /** - * @generated from field: optional int64 sentBytes = 11; + * @generated from field: optional string payload = 2; */ - sentBytes?: bigint; + payload?: string; /** - * @generated from field: optional int32 sentPackets = 12; + * @generated from field: optional bytes peerConnectionId = 3; */ - sentPackets?: number; + peerConnectionId?: Uint8Array; /** - * @generated from field: optional string serverAddress = 13; + * @generated from field: optional int64 ssrc = 4; */ - serverAddress?: string; + ssrc?: bigint; /** - * @generated from field: optional int32 serverPort = 14; + * @generated from field: optional int64 timestamp = 5; */ - serverPort?: number; + timestamp?: bigint; /** - * @generated from field: optional int64 started = 15; + * @generated from field: optional bytes trackId = 6; */ - started?: bigint; + trackId?: Uint8Array; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime = proto3; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ClientMetaData"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "peerConnectionId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + { no: 4, name: "ssrc", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 5, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 6, name: "trackId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ClientMetaData { + return new ClientSample_ClientMetaData().fromJsonString(jsonString, options); + } + + static equals(a: ClientSample_ClientMetaData | PlainMessage | undefined, b: ClientSample_ClientMetaData | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ClientMetaData, a, b); + } +} +/** + * @generated from message org.observertc.schemas.protobuf.ClientSample.ExtensionStat + */ +export class ClientSample_ExtensionStat extends Message { /** - * @generated from field: optional string transportProtocol = 16; + * @generated from field: optional string payload = 1; */ - transportProtocol?: string; + payload?: string; /** - * @generated from field: optional string username = 17; + * @generated from field: optional string type = 2; */ - username?: string; + type?: string; - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime = proto3; - static readonly typeName = "org.observertc.schemas.protobuf.Samples.TurnSample.TurnSession"; + static readonly typeName = "org.observertc.schemas.protobuf.ClientSample.ExtensionStat"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sessionId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "clientAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "clientId", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 4, name: "clientPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "nonceExpirationTime", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "realm", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "receivedBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 8, name: "receivedPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "receivingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "sendingBitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "sentBytes", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 12, name: "sentPackets", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 13, name: "serverAddress", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 14, name: "serverPort", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 15, name: "started", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 16, name: "transportProtocol", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 17, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "payload", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); - static fromBinary(bytes: Uint8Array, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromBinary(bytes, options); + static fromBinary(bytes: Uint8Array, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromBinary(bytes, options); } - static fromJson(jsonValue: JsonValue, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromJson(jsonValue, options); + static fromJson(jsonValue: JsonValue, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromJson(jsonValue, options); } - static fromJsonString(jsonString: string, options?: Partial): Samples_TurnSample_TurnSession { - return new Samples_TurnSample_TurnSession().fromJsonString(jsonString, options); + static fromJsonString(jsonString: string, options?: Partial): ClientSample_ExtensionStat { + return new ClientSample_ExtensionStat().fromJsonString(jsonString, options); } - static equals(a: Samples_TurnSample_TurnSession | PlainMessage | undefined, b: Samples_TurnSample_TurnSession | PlainMessage | undefined): boolean { - return proto3.util.equals(Samples_TurnSample_TurnSession, a, b); + static equals(a: ClientSample_ExtensionStat | PlainMessage | undefined, b: ClientSample_ExtensionStat | PlainMessage | undefined): boolean { + return proto3.util.equals(ClientSample_ExtensionStat, a, b); } } diff --git a/npm-samples-encoder/src/PeerConnectionSampleEncoder.ts b/npm-samples-encoder/src/PeerConnectionSampleEncoder.ts new file mode 100644 index 00000000..0c20aadd --- /dev/null +++ b/npm-samples-encoder/src/PeerConnectionSampleEncoder.ts @@ -0,0 +1,376 @@ +import { AudioPlayoutEncoder } from "./AudioPlayoutEncoder"; +import { AudioSourceEncoder } from "./AudioSourceEncoder"; +import { CertificateEncoder } from "./CertificateEncoder"; +import { ClientSampleEncoder } from "./ClientSampleEncoder"; +import { CodecStatsEncoder } from "./CodecStatsEncoder"; +import { DataChannelEncoder } from "./DataChannelEncoder"; +import { IceCandidateEncoder } from "./IceCandidateEncoder"; +import { IceCandidatePairEncoder } from "./IceCandidatePairStatsEncoder"; +import { IceTransportEncoder } from "./IceTransportEncoder"; +import { InboundRtpEncoder } from "./InboundRtpEncoder"; +import { PeerConnectionSample as InputClientSample, PeerConnectionSample } from "./InputSamples"; +import { OutboundRtpEncoder } from "./OutboundRtpEncoder"; +import { ClientSample_PeerConnectionSample } from "./OutputSamples"; +import { PeerConnectionTransportEncoder } from "./PeerConnectionTransportEncoder"; +import { RemoteInboundRtpEncoder } from "./RemoteInboundRtpEncoder"; +import { RemoteOutboundRtpEncoder } from "./RemoteOutboundRtpEncoder"; +import { + AppDataEncoder, + Encoder, + OneTimePassStringToUint8ArrayEncoder, + OneTimePassUuidToByteArrayEncoder, + stringToBytesArray, + uuidToByteArray +} from "./utils"; +import { VideoSourceEncoder } from "./VideoSourceEncoder"; + +export class PeerConnectionSampleEncoder implements Encoder{ + private readonly _peerConnectionId: Uint8Array; + private _visited = false; + + private _codecStatsEncoders = new Map(); + private _inboundRtpEncoders = new Map(); + private _outboundRtpEncoders = new Map(); + private _remoteInboundRtpEncoders = new Map(); + private _remoteOutboundRtpEncoders = new Map(); + private _iceCandidatePairEncoders = new Map(); + private _dataChannelEncoders = new Map(); + private _audioSourceEncoders = new Map(); + private _videoSourceEncoders = new Map(); + private _audioPlayoutEncoders = new Map(); + private _peerConnectionTransportEncoders = new Map(); + private _iceTransportEncoders = new Map(); + private _iceCandidateEncoders = new Map(); + private _certificateEncoders = new Map(); + private _appDataEncoder: AppDataEncoder; + + public constructor( + peerConnectionId: string, + public parent: ClientSampleEncoder, + ) { + this._peerConnectionId = this.parent.settings.peerConnectionIdIsUuid + ? uuidToByteArray(peerConnectionId) + : stringToBytesArray(peerConnectionId); + this._appDataEncoder = this.parent.appDataEncoderFactory.createPeerConnectionSampleAppDataEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._appDataEncoder.reset(); + this._codecStatsEncoders.forEach((encoder) => encoder.reset()); + this._audioPlayoutEncoders.forEach((encoder) => encoder.reset()); + this._audioSourceEncoders.forEach((encoder) => encoder.reset()); + this._certificateEncoders.forEach((encoder) => encoder.reset()); + this._dataChannelEncoders.forEach((encoder) => encoder.reset()); + this._iceCandidateEncoders.forEach((encoder) => encoder.reset()); + this._iceTransportEncoders.forEach((encoder) => encoder.reset()); + this._inboundRtpEncoders.forEach((encoder) => encoder.reset()); + this._outboundRtpEncoders.forEach((encoder) => encoder.reset()); + this._peerConnectionTransportEncoders.forEach((encoder) => encoder.reset()); + this._remoteInboundRtpEncoders.forEach((encoder) => encoder.reset()); + this._remoteOutboundRtpEncoders.forEach((encoder) => encoder.reset()); + this._iceCandidatePairEncoders.forEach((encoder) => encoder.reset()); + this._videoSourceEncoders.forEach((encoder) => encoder.reset()); + + } + + public encode(sample: PeerConnectionSample): ClientSample_PeerConnectionSample { + this._visited = true; + + const codecs = sample.codecs?.map(this._encodeCodecStats.bind(this)); + const inboundRtps = sample.inboundRtps?.map(this._encodeInboundRtp.bind(this)); + const outboundRtps = sample.outboundRtps?.map(this._encodeOutboundRtp.bind(this)); + const remoteInboundRtps = sample.remoteInboundRtps?.map(this._encodeRemoteInboundRtp.bind(this)); + const remoteOutboundRtps = sample.remoteOutboundRtps?.map(this._encodeRemoteOutboundRtp.bind(this)); + const dataChannels = sample.dataChannels?.map(this._encodeDataChannel.bind(this)); + const audioSources = sample.audioSources?.map(this._encodeAudioSource.bind(this)); + const videoSources = sample.videoSources?.map(this._encodeVideoSource.bind(this)); + const audioPlayouts = sample.audioPlayouts?.map(this._encodeAudioPlayout.bind(this)); + const peerConnectionTransports = sample.peerConnectionTransports?.map(this._encodePeerConnectionTransport.bind(this)); + const iceTransports = sample.iceTransports?.map(this._encodeIceTransport.bind(this)); + const iceCandidates = sample.iceCandidates?.map(this._encodeIceCandidate.bind(this)); + const iceCandidatePairs = sample.iceCandidatePairs?.map(this._encodeIceCandidatePair.bind(this)); + const certificates = sample.certificates?.map(this._encodeCertificate.bind(this)); + + return new ClientSample_PeerConnectionSample({ + peerConnectionId: this._peerConnectionId, + codecs, + inboundRtps, + outboundRtps, + remoteInboundRtps, + remoteOutboundRtps, + dataChannels, + audioSources, + videoSources, + audioPlayouts, + peerConnectionTransports, + iceTransports, + iceCandidates, + iceCandidatePairs, + certificates, + + appData: this._appDataEncoder.encode(sample.appData), + }); + } + + private _encodeCodecStats(input: Required['codecs'][number]) { + let encoder = this._codecStatsEncoders.get(input.id); + if (!encoder) { + encoder = new CodecStatsEncoder( + this.parent.appDataEncoderFactory.createCodecStatsAppDataEncoder() + ); + this._codecStatsEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeInboundRtp(input: Required['inboundRtps'][number]) { + let encoder = this._inboundRtpEncoders.get(input.ssrc); + if (!encoder) { + const trackIdEncoder = this.parent.settings.trackIdIsUuid + ? new OneTimePassUuidToByteArrayEncoder() + : new OneTimePassStringToUint8ArrayEncoder(); + encoder = new InboundRtpEncoder( + input.ssrc, + trackIdEncoder, + this.parent.appDataEncoderFactory.createInboundRtpAppDataEncoder() + ); + this._inboundRtpEncoders.set(input.ssrc, encoder); + } + return encoder.encode(input); + } + + private _encodeOutboundRtp(input: Required['outboundRtps'][number]) { + let encoder = this._outboundRtpEncoders.get(input.ssrc); + if (!encoder) { + encoder = new OutboundRtpEncoder( + input.ssrc, + this.parent.appDataEncoderFactory.createOutboundRtpAppDataEncoder() + ); + this._outboundRtpEncoders.set(input.ssrc, encoder); + } + return encoder.encode(input); + } + + private _encodeRemoteInboundRtp(input: Required['remoteInboundRtps'][number]) { + let encoder = this._remoteInboundRtpEncoders.get(input.ssrc); + if (!encoder) { + encoder = new RemoteInboundRtpEncoder( + input.ssrc, + this.parent.appDataEncoderFactory.createRemoteInboundRtpAppDataEncoder() + ); + this._remoteInboundRtpEncoders.set(input.ssrc, encoder); + } + return encoder.encode(input); + } + + private _encodeRemoteOutboundRtp(input: Required['remoteOutboundRtps'][number]) { + let encoder = this._remoteOutboundRtpEncoders.get(input.ssrc); + if (!encoder) { + encoder = new RemoteOutboundRtpEncoder( + input.ssrc, + this.parent.appDataEncoderFactory.createRemoteOutboundRtpAppDataEncoder() + ); + this._remoteOutboundRtpEncoders.set(input.ssrc, encoder); + } + return encoder.encode(input); + } + + private _encodeDataChannel(input: Required['dataChannels'][number]) { + let encoder = this._dataChannelEncoders.get(input.id); + if (!encoder) { + encoder = new DataChannelEncoder( + this.parent.appDataEncoderFactory.createDataChannelAppDataEncoder() + ); + this._dataChannelEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeAudioSource(input: Required['audioSources'][number]) { + let encoder = this._audioSourceEncoders.get(input.id); + if (!encoder) { + encoder = new AudioSourceEncoder( + this.parent.appDataEncoderFactory.createAudioSourceAppDataEncoder() + ); + this._audioSourceEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeVideoSource(input: Required['videoSources'][number]) { + let encoder = this._videoSourceEncoders.get(input.id); + if (!encoder) { + encoder = new VideoSourceEncoder( + this.parent.appDataEncoderFactory.createVideoSourceAppDataEncoder() + ); + this._videoSourceEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeAudioPlayout(input: Required['audioPlayouts'][number]) { + let encoder = this._audioPlayoutEncoders.get(input.id); + if (!encoder) { + encoder = new AudioPlayoutEncoder( + this.parent.appDataEncoderFactory.createAudioPlayoutAppDataEncoder() + ); + this._audioPlayoutEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodePeerConnectionTransport(input: Required['peerConnectionTransports'][number]) { + let encoder = this._peerConnectionTransportEncoders.get(input.id); + if (!encoder) { + encoder = new PeerConnectionTransportEncoder( + this.parent.appDataEncoderFactory.createPeerConnectionTransportAppDataEncoder() + ); + this._peerConnectionTransportEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeIceTransport(input: Required['iceTransports'][number]) { + let encoder = this._iceTransportEncoders.get(input.id); + if (!encoder) { + encoder = new IceTransportEncoder( + this.parent.appDataEncoderFactory.createIceTransportAppDataEncoder() + ); + this._iceTransportEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeIceCandidate(input: Required['iceCandidates'][number]) { + let encoder = this._iceCandidateEncoders.get(input.id); + if (!encoder) { + encoder = new IceCandidateEncoder( + this.parent.appDataEncoderFactory.createIceCandidateAppDataEncoder() + ); + this._iceCandidateEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeIceCandidatePair(input: Required['iceCandidatePairs'][number]) { + let encoder = this._iceCandidatePairEncoders.get(input.id); + if (!encoder) { + encoder = new IceCandidatePairEncoder( + this.parent.appDataEncoderFactory.createIceCandidatePairAppDataEncoder() + ); + this._iceCandidatePairEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + private _encodeCertificate(input: Required['certificates'][number]) { + let encoder = this._certificateEncoders.get(input.id); + if (!encoder) { + encoder = new CertificateEncoder( + this.parent.appDataEncoderFactory.createCertificateAppDataEncoder() + ); + this._certificateEncoders.set(input.id, encoder); + } + return encoder.encode(input); + } + + public checkVisitsAndClean() { + let visited = false; + + for (const [id, encoder] of [...this._codecStatsEncoders.entries()]) { + if (!encoder.visited) { + this._codecStatsEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [ssrc, encoder] of [...this._inboundRtpEncoders.entries()]) { + if (!encoder.visited) { + this._inboundRtpEncoders.delete(ssrc); + continue; + } + visited = true; + } + + for (const [ssrc, encoder] of [...this._outboundRtpEncoders.entries()]) { + if (!encoder.visited) { + this._outboundRtpEncoders.delete(ssrc); + continue; + } + visited = true; + } + + for (const [ssrc, encoder] of [...this._remoteInboundRtpEncoders.entries()]) { + if (!encoder.visited) { + this._remoteInboundRtpEncoders.delete(ssrc); + continue; + } + visited = true; + } + + for (const [ssrc, encoder] of [...this._remoteOutboundRtpEncoders.entries()]) { + if (!encoder.visited) { + this._remoteOutboundRtpEncoders.delete(ssrc); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._dataChannelEncoders.entries()]) { + if (!encoder.visited) { + this._dataChannelEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._audioSourceEncoders.entries()]) { + if (!encoder.visited) { + this._audioSourceEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._videoSourceEncoders.entries()]) { + if (!encoder.visited) { + this._videoSourceEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._audioPlayoutEncoders.entries()]) { + if (!encoder.visited) { + this._audioPlayoutEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._iceCandidatePairEncoders.entries()]) { + if (!encoder.visited) { + this._iceCandidatePairEncoders.delete(id); + continue; + } + visited = true; + } + + for (const [id, encoder] of [...this._peerConnectionTransportEncoders.entries()]) { + if (!encoder.visited) { + this._peerConnectionTransportEncoders.delete(id); + continue; + } + visited = true; + } + + return visited; + } +} \ No newline at end of file diff --git a/npm-samples-encoder/src/PeerConnectionTransportEncoder.ts b/npm-samples-encoder/src/PeerConnectionTransportEncoder.ts index 8cdc18c9..ab80eccd 100644 --- a/npm-samples-encoder/src/PeerConnectionTransportEncoder.ts +++ b/npm-samples-encoder/src/PeerConnectionTransportEncoder.ts @@ -1,214 +1,56 @@ -import { PeerConnectionTransport } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { - Samples_ClientSample_PeerConnectionTransport, - Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum } from './OutputSamples'; -import { ClientSampleEncodingOptions } from "./EncodingOptions"; - -export class PeerConnectionTransportEncoder { - private readonly _peerConnectionId?: Uint8Array; - private _transportId?: string; - private _bytesReceived?: number; - private _bytesSent?: number; - private _dtlsCipher?: string; - private _dtlsRole?: string; - private _dtlsState?: string; - private _iceLocalUsernameFragment?: string; - private _iceRole?: string; - private _iceState?: string; - private _label?: string; - private _localCertificateId?: string; - private _packetsReceived?: number; - private _packetsSent?: number; - private _remoteCertificateId?: string; - private _selectedCandidatePairChanges?: number; - private _selectedCandidatePairId?: string; - private _srtpCipher?: string; - private _tlsGroup?: string; - private _tlsVersion?: string; - - private _visited = false; - - public constructor( - public readonly peerConnectionId: string, - private readonly _options: ClientSampleEncodingOptions, - ) { - this._peerConnectionId = this._options.peerConnectionIdIsUuid ? uuidToByteArray(peerConnectionId) : stringToBytesArray(peerConnectionId); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: PeerConnectionTransport): Samples_ClientSample_PeerConnectionTransport { - this._visited = true; - - const result = new Samples_ClientSample_PeerConnectionTransport({ - peerConnectionId: this._peerConnectionId, - transportId: this._encodeTransportId(sample.transportId), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - bytesSent: this._encodeBytesSent(sample.bytesSent), - dtlsCipher: this._encodeDtlsCipher(sample.dtlsCipher), - dtlsRole: this._encodeDtlsRole(sample.dtlsRole), - dtlsState: this._encodeDtlsState(sample.dtlsState), - iceLocalUsernameFragment: this._encodeIceLocalUsernameFragment(sample.iceLocalUsernameFragment), - iceRole: this._encodeIceRole(sample.iceRole), - iceState: this._encodeIceState(sample.iceState), - label: this._encodeLabel(sample.label), - localCertificateId: this._encodeLocalCertificateId(sample.localCertificateId), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsSent: this._encodePacketsSent(sample.packetsSent), - remoteCertificateId: this._encodeRemoteCertificateId(sample.remoteCertificateId), - selectedCandidatePairChanges: this._encodeSelectedCandidatePairChanges(sample.selectedCandidatePairChanges), - selectedCandidatePairId: this._encodeSelectedCandidatePairId(sample.selectedCandidatePairId), - srtpCipher: this._encodeSrtpCipher(sample.srtpCipher), - tlsGroup: this._encodeTlsGroup(sample.tlsGroup), - tlsVersion: this._encodeTlsVersion(sample.tlsVersion), - }); - return result; - } - - private _encodeTransportId(transportId?: string): string | undefined { - if (!transportId) return; - if (transportId === this._transportId) return; - this._transportId = transportId; - return this._transportId; - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (bytesReceived === undefined) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (bytesSent === undefined) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - // Note: You need to define an appropriate type for dtlsCipher and replace "SomeType" with that. - private _encodeDtlsCipher(dtlsCipher?: string): string | undefined { - if (!dtlsCipher) return; - if (dtlsCipher === this._dtlsCipher) return; - this._dtlsCipher = dtlsCipher; - return this._dtlsCipher; - } - - // The same applies to other methods, replace "SomeType" with the appropriate type for each property. - private _encodeDtlsRole(dtlsRole?: string): Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum | undefined { - if (!dtlsRole) return; - if (dtlsRole === this._dtlsRole) return; - this._dtlsRole = dtlsRole; - switch (dtlsRole.toLocaleLowerCase()) { - case 'server': - return Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum.SERVER; - case 'client': - return Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum.CLIENT; - default: - return Samples_ClientSample_PeerConnectionTransport_PeerConnectionTransportEnum.UNKNOWN; - } - } - - private _encodeDtlsState(dtlsState?: string): string | undefined { - if (!dtlsState) return; - if (dtlsState === this._dtlsState) return; - this._dtlsState = dtlsState; - return this._dtlsState; - } - - private _encodeIceLocalUsernameFragment(iceLocalUsernameFragment?: string): string | undefined { - if (!iceLocalUsernameFragment) return; - if (iceLocalUsernameFragment === this._iceLocalUsernameFragment) return; - this._iceLocalUsernameFragment = iceLocalUsernameFragment; - return this._iceLocalUsernameFragment; - } - - private _encodeIceRole(iceRole?: string): string | undefined { - if (!iceRole) return; - if (iceRole === this._iceRole) return; - this._iceRole = iceRole; - return this._iceRole; - } - - private _encodeIceState(iceState?: string): string | undefined { - if (!iceState) return; - if (iceState === this._iceState) return; - this._iceState = iceState; - return this._iceState; - } - - private _encodeLabel(label?: string): string | undefined { - if (!label) return; - if (label === this._label) return; - this._label = label; - return this._label; - } - - private _encodeLocalCertificateId(localCertificateId?: string): string | undefined { - if (!localCertificateId) return; - if (localCertificateId === this._localCertificateId) return; - this._localCertificateId = localCertificateId; - return this._localCertificateId; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (packetsReceived === undefined) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (packetsSent === undefined) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodeRemoteCertificateId(remoteCertificateId?: string): string | undefined { - if (!remoteCertificateId) return; - if (remoteCertificateId === this._remoteCertificateId) return; - this._remoteCertificateId = remoteCertificateId; - return this._remoteCertificateId; - } - - private _encodeSelectedCandidatePairChanges(selectedCandidatePairChanges?: number): number | undefined { - if (selectedCandidatePairChanges === undefined) return; - if (selectedCandidatePairChanges === this._selectedCandidatePairChanges) return; - this._selectedCandidatePairChanges = selectedCandidatePairChanges; - return this._selectedCandidatePairChanges; - } - - private _encodeSelectedCandidatePairId(selectedCandidatePairId?: string): string | undefined { - if (!selectedCandidatePairId) return; - if (selectedCandidatePairId === this._selectedCandidatePairId) return; - this._selectedCandidatePairId = selectedCandidatePairId; - return this._selectedCandidatePairId; - } - - private _encodeSrtpCipher(srtpCipher?: string): string | undefined { - if (!srtpCipher) return; - if (srtpCipher === this._srtpCipher) return; - this._srtpCipher = srtpCipher; - return this._srtpCipher; - } - - private _encodeTlsGroup(tlsGroup?: string): string | undefined { - if (!tlsGroup) return; - if (tlsGroup === this._tlsGroup) return; - this._tlsGroup = tlsGroup; - return this._tlsGroup; - } - - private _encodeTlsVersion(tlsVersion?: string): string | undefined { - if (!tlsVersion) return; - if (tlsVersion === this._tlsVersion) return; - this._tlsVersion = tlsVersion; - return this._tlsVersion; - } +import { AppDataEncoder, NumberToNumberEncoder, StringToStringEncoder } from "./utils"; +import { Encoder } from "./utils"; +import { PeerConnectionTransportStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_PeerConnectionTransportStats } from "./OutputSamples"; + +export class PeerConnectionTransportEncoder + implements + Encoder +{ + private _visited = false; + private readonly _idEncoder: StringToStringEncoder; + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _dataChannelsOpenedEncoder: NumberToNumberEncoder; + private readonly _dataChannelsClosedEncoder: NumberToNumberEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._idEncoder = new StringToStringEncoder(); + this._timestampEncoder = new NumberToNumberEncoder(); + this._dataChannelsOpenedEncoder = new NumberToNumberEncoder(); + this._dataChannelsClosedEncoder = new NumberToNumberEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._idEncoder.reset(); + this._timestampEncoder.reset(); + this._dataChannelsOpenedEncoder.reset(); + this._dataChannelsClosedEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode( + sample: PeerConnectionTransportStats + ): ClientSample_PeerConnectionSample_PeerConnectionTransportStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_PeerConnectionTransportStats({ + id: this._idEncoder.encode(sample.id), + timestamp: this._timestampEncoder.encode(sample.timestamp), + dataChannelsOpened: this._dataChannelsOpenedEncoder.encode( + sample.dataChannelsOpened + ), + dataChannelsClosed: this._dataChannelsClosedEncoder.encode( + sample.dataChannelsClosed + ), + appData: this._appDataEncoder.encode(sample.appData), + }); + } } diff --git a/npm-samples-encoder/src/RemoteInboundRtpEncoder.ts b/npm-samples-encoder/src/RemoteInboundRtpEncoder.ts new file mode 100644 index 00000000..6320e6a1 --- /dev/null +++ b/npm-samples-encoder/src/RemoteInboundRtpEncoder.ts @@ -0,0 +1,95 @@ +import { + AppDataEncoder, + NumberToNumberEncoder, + StringToStringEncoder, + OneTimePassEncoder, + StringToUint8ArrayEncoder, +} from "./utils"; +import { RemoteInboundRtpStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_RemoteInboundRtpStats } from "./OutputSamples"; +import { Encoder } from "./utils"; + +export class RemoteInboundRtpEncoder implements Encoder { + public readonly ssrc: bigint; + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _idEncoder: StringToStringEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _transportIdEncoder: OneTimePassEncoder; + private readonly _codecIdEncoder: OneTimePassEncoder; + private readonly _packetsReceivedEncoder: NumberToNumberEncoder; + private readonly _packetsLostEncoder: NumberToNumberEncoder; + private readonly _jitterEncoder: NumberToNumberEncoder; + private readonly _localIdEncoder: StringToStringEncoder; + private readonly _roundTripTimeEncoder: NumberToNumberEncoder; + private readonly _totalRoundTripTimeEncoder: NumberToNumberEncoder; + private readonly _fractionLostEncoder: NumberToNumberEncoder; + private readonly _roundTripTimeMeasurementsEncoder: NumberToNumberEncoder; + + constructor( + ssrc: number, + private readonly _appDataEncoder: AppDataEncoder + ) { + this.ssrc = BigInt(ssrc); + + this._timestampEncoder = new NumberToNumberEncoder(); + this._idEncoder = new StringToStringEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._transportIdEncoder = new OneTimePassEncoder(); + this._codecIdEncoder = new OneTimePassEncoder(); + this._packetsReceivedEncoder = new NumberToNumberEncoder(); + this._packetsLostEncoder = new NumberToNumberEncoder(); + this._jitterEncoder = new NumberToNumberEncoder(); + this._localIdEncoder = new StringToStringEncoder(); + this._roundTripTimeEncoder = new NumberToNumberEncoder(); + this._totalRoundTripTimeEncoder = new NumberToNumberEncoder(); + this._fractionLostEncoder = new NumberToNumberEncoder(); + this._roundTripTimeMeasurementsEncoder = new NumberToNumberEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._idEncoder.reset(); + this._kindEncoder.reset(); + this._transportIdEncoder.reset(); + this._codecIdEncoder.reset(); + this._packetsReceivedEncoder.reset(); + this._packetsLostEncoder.reset(); + this._jitterEncoder.reset(); + this._localIdEncoder.reset(); + this._roundTripTimeEncoder.reset(); + this._totalRoundTripTimeEncoder.reset(); + this._fractionLostEncoder.reset(); + this._roundTripTimeMeasurementsEncoder.reset(); + } + + public encode(sample: RemoteInboundRtpStats): ClientSample_PeerConnectionSample_RemoteInboundRtpStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_RemoteInboundRtpStats({ + ssrc: this.ssrc, + + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: this._idEncoder.encode(sample.id), + kind: this._kindEncoder.encode(sample.kind), + transportId: this._transportIdEncoder.encode(sample.transportId), + codecId: this._codecIdEncoder.encode(sample.codecId), + packetsReceived: this._packetsReceivedEncoder.encode(sample.packetsReceived), + packetsLost: this._packetsLostEncoder.encode(sample.packetsLost), + jitter: this._jitterEncoder.encode(sample.jitter), + localId: this._localIdEncoder.encode(sample.localId), + roundTripTime: this._roundTripTimeEncoder.encode(sample.roundTripTime), + totalRoundTripTime: this._totalRoundTripTimeEncoder.encode(sample.totalRoundTripTime), + fractionLost: this._fractionLostEncoder.encode(sample.fractionLost), + roundTripTimeMeasurements: this._roundTripTimeMeasurementsEncoder.encode(sample.roundTripTimeMeasurements), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/RemoteOutboundRtpEncoder.ts b/npm-samples-encoder/src/RemoteOutboundRtpEncoder.ts new file mode 100644 index 00000000..d3a0312a --- /dev/null +++ b/npm-samples-encoder/src/RemoteOutboundRtpEncoder.ts @@ -0,0 +1,96 @@ +import { + AppDataEncoder, + NumberToNumberEncoder, + StringToStringEncoder, + OneTimePassEncoder, + StringToUint8ArrayEncoder, + NumberToBigIntEncoder, + Encoder, +} from "./utils"; +import { RemoteOutboundRtpStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_RemoteOutboundRtpStats } from "./OutputSamples"; + +export class RemoteOutboundRtpEncoder implements Encoder { + private readonly _ssrc: bigint; + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _idEncoder: StringToStringEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _transportIdEncoder: OneTimePassEncoder; + private readonly _codecIdEncoder: OneTimePassEncoder; + private readonly _packetsSentEncoder: NumberToNumberEncoder; + private readonly _bytesSentEncoder: NumberToBigIntEncoder; + private readonly _localIdEncoder: StringToStringEncoder; + private readonly _remoteTimestampEncoder: NumberToNumberEncoder; + private readonly _reportsSentEncoder: NumberToNumberEncoder; + private readonly _roundTripTimeEncoder: NumberToNumberEncoder; + private readonly _totalRoundTripTimeEncoder: NumberToNumberEncoder; + private readonly _roundTripTimeMeasurementsEncoder: NumberToNumberEncoder; + + + constructor( + ssrc: number, + private readonly _appDataEncoder: AppDataEncoder + ) { + this._ssrc = BigInt(ssrc); + + this._timestampEncoder = new NumberToNumberEncoder(); + this._idEncoder = new StringToStringEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._transportIdEncoder = new OneTimePassEncoder(); + this._codecIdEncoder = new OneTimePassEncoder(); + this._packetsSentEncoder = new NumberToNumberEncoder(); + this._bytesSentEncoder = new NumberToBigIntEncoder(); + this._localIdEncoder = new StringToStringEncoder(); + this._remoteTimestampEncoder = new NumberToNumberEncoder(); + this._reportsSentEncoder = new NumberToNumberEncoder(); + this._roundTripTimeEncoder = new NumberToNumberEncoder(); + this._totalRoundTripTimeEncoder = new NumberToNumberEncoder(); + this._roundTripTimeMeasurementsEncoder = new NumberToNumberEncoder(); + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._idEncoder.reset(); + this._kindEncoder.reset(); + this._transportIdEncoder.reset(); + this._codecIdEncoder.reset(); + this._packetsSentEncoder.reset(); + this._bytesSentEncoder.reset(); + this._localIdEncoder.reset(); + this._remoteTimestampEncoder.reset(); + this._reportsSentEncoder.reset(); + this._roundTripTimeEncoder.reset(); + this._totalRoundTripTimeEncoder.reset(); + this._roundTripTimeMeasurementsEncoder.reset(); + } + + public encode(sample: RemoteOutboundRtpStats): ClientSample_PeerConnectionSample_RemoteOutboundRtpStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_RemoteOutboundRtpStats({ + ssrc: this._ssrc, + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: this._idEncoder.encode(sample.id), + kind: this._kindEncoder.encode(sample.kind), + transportId: this._transportIdEncoder.encode(sample.transportId), + codecId: this._codecIdEncoder.encode(sample.codecId), + packetsSent: this._packetsSentEncoder.encode(sample.packetsSent), + bytesSent: this._bytesSentEncoder.encode(sample.bytesSent), + localId: this._localIdEncoder.encode(sample.localId), + remoteTimestamp: this._remoteTimestampEncoder.encode(sample.remoteTimestamp), + reportsSent: this._reportsSentEncoder.encode(sample.reportsSent), + roundTripTime: this._roundTripTimeEncoder.encode(sample.roundTripTime), + totalRoundTripTime: this._totalRoundTripTimeEncoder.encode(sample.totalRoundTripTime), + roundTripTimeMeasurements: this._roundTripTimeMeasurementsEncoder.encode(sample.roundTripTimeMeasurements), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} \ No newline at end of file diff --git a/npm-samples-encoder/src/SamplesEncoder.ts b/npm-samples-encoder/src/SamplesEncoder.ts deleted file mode 100644 index 281095c9..00000000 --- a/npm-samples-encoder/src/SamplesEncoder.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { - Samples as InputSamples -} from './InputSamples'; -import { ClientSampleEncoder } from "./ClientSampleEncoder"; - -import { Samples as OutputSamples, Samples_ClientSample, Samples_SfuSample } from './OutputSamples'; -import { convertUint8ToBase64 } from './encodingTools'; -import { SfuSampleEncoder } from './SfuSampleEncoder'; -import { SampleEncodingOptions } from './EncodingOptions'; - -export class SamplesEncoder { - private _clientSampleEncoders = new Map(); - private _sfuSampleEncoders = new Map(); - - public readonly options: SampleEncodingOptions; - public constructor(options?: Partial) { - this.options = Object.assign({ - sfuIdIsUuid: false, - callIdIsUuid: false, - sfuStreamIdIsUuid: false, - sfuSinkIdIsUuid: false, - clientIdIsUuid: false, - peerConnectionIdIsUuid: false, - sfuPadIdIsUuid: false, - trackIdIsUuid: true, - dataChannelIdIsUuid: false, - dataStreamIdIsUuid: false, - }, options ?? {}); - } - - public encodeToBytes(input: InputSamples): Uint8Array { - const output = this.encodeToProtobufSamples(input); - return output.toBinary(); - } - - public encodeToBase64(input: InputSamples): string { - const output = this.encodeToProtobufSamples(input); - const bytes = output.toBinary(); - return convertUint8ToBase64(bytes); - } - - public reset() { - this._clientSampleEncoders.clear(); - this._sfuSampleEncoders.clear(); - } - - public encodeToProtobufSamples(input: InputSamples): OutputSamples { - const clientSamples: Samples_ClientSample[] = []; - try { - for (const clientSample of (input.clientSamples ? input.clientSamples : [])) { - - let encoder = this._clientSampleEncoders.get(clientSample.clientId); - if (!encoder) { - encoder = new ClientSampleEncoder(); - this._clientSampleEncoders.set(clientSample.clientId, encoder); - } - const encodedSample = encoder.encodeToProtobufSamples(clientSample); - clientSamples.push(encodedSample); - } - } catch (err ) { - console.error(`Error occurred while encoding client sample`, err); - } - - for (const [clientId, encoder] of Array.from(this._clientSampleEncoders.entries())) { - if (encoder.visited) continue; - this._clientSampleEncoders.delete(clientId); - } - - - const sfuSamples: Samples_SfuSample[] = []; - try { - for (const sfuSample of (input.sfuSamples ? input.sfuSamples : [])) { - - let encoder = this._sfuSampleEncoders.get(sfuSample.sfuId); - if (!encoder) { - encoder = new SfuSampleEncoder(); - this._sfuSampleEncoders.set(sfuSample.sfuId, encoder); - } - const encodedSample = encoder.encodeToProtobufSamples(sfuSample); - sfuSamples.push(encodedSample); - } - } catch (err ) { - console.error(`Error occurred while encoding client sample`, err); - } - - for (const [clientId, encoder] of Array.from(this._sfuSampleEncoders.entries())) { - if (encoder.visited) continue; - this._sfuSampleEncoders.delete(clientId); - } - - return new OutputSamples({ - clientSamples, - }); - } -} \ No newline at end of file diff --git a/npm-samples-encoder/src/SfuInboundRtpPadEncoder.ts b/npm-samples-encoder/src/SfuInboundRtpPadEncoder.ts deleted file mode 100644 index 9da8fb29..00000000 --- a/npm-samples-encoder/src/SfuInboundRtpPadEncoder.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { SfuInboundRtpPad } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_SfuSample_SfuInboundRtpPad, Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum } from './OutputSamples'; -import { ClientSampleEncodingOptions, SfuSampleEncodingOptions } from "./EncodingOptions"; - -export class SfuInboundRtpPadEncoder { - private _streamId: Uint8Array - private _padId: Uint8Array - private _ssrc: bigint; - private _noReport?: boolean; - private _internal?: boolean; - private _mediaType?: "audio" | "video"; - private _payloadType?: number; - private _mimeType?: string; - private _clockRate?: number; - private _sdpFmtpLine?: string; - private _rid?: string; - private _rtxSsrc?: number; - private _targetBitrate?: number; - private _voiceActivityFlag?: boolean; - private _firCount?: number; - private _pliCount?: number; - private _nackCount?: number; - private _sliCount?: number; - private _packetsLost?: number; - private _packetsReceived?: number; - private _packetsDiscarded?: number; - private _packetsRepaired?: number; - private _packetsFailedDecryption?: number; - private _packetsDuplicated?: number; - private _fecPacketsReceived?: number; - private _fecPacketsDiscarded?: number; - private _bytesReceived?: number; - private _rtcpSrReceived?: number; - private _rtcpRrSent?: number; - private _rtxPacketsReceived?: number; - private _rtxPacketsDiscarded?: number; - private _framesReceived?: number; - private _framesDecoded?: number; - private _keyFramesDecoded?: number; - private _fractionLost?: number; - private _jitter?: number; - private _roundTripTime?: number; - private _visited = false; - - public constructor( - public readonly transportId: string, - public readonly streamId: string, - public readonly padId: string, - public readonly ssrc: number, - private readonly _options: SfuSampleEncodingOptions, - ) { - this._ssrc = BigInt(ssrc); - this._streamId = this._options.sfuStreamIdIsUuid ? uuidToByteArray(streamId) : stringToBytesArray(streamId); - this._padId = this._options.sfuPadIdIsUuid ? uuidToByteArray(padId) : stringToBytesArray(padId); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: SfuInboundRtpPad): Samples_SfuSample_SfuInboundRtpPad { - this._visited = true; - - const result = new Samples_SfuSample_SfuInboundRtpPad({ - transportId: this.transportId, - streamId: this._streamId, - padId: this._padId, - ssrc: this._ssrc, - noReport: this._encodeNoReport(sample.noReport), - internal: this._encodeInternal(sample.internal), - mediaType: this._encodeMediaType(sample.mediaType), - payloadType: this._encodePayloadType(sample.payloadType), - mimeType: this._encodeMimeType(sample.mimeType), - clockRate: this._encodeClockRate(sample.clockRate), - sdpFmtpLine: this._encodeSdpFmtpLine(sample.sdpFmtpLine), - rid: this._encodeRid(sample.rid), - rtxSsrc: this._encodeRtxSsrc(sample.rtxSsrc), - targetBitrate: this._encodeTargetBitrate(sample.targetBitrate), - voiceActivityFlag: this._encodeVoiceActivityFlag(sample.voiceActivityFlag), - firCount: this._encodeFirCount(sample.firCount), - pliCount: this._encodePliCount(sample.pliCount), - nackCount: this._encodeNackCount(sample.nackCount), - sliCount: this._encodeSliCount(sample.sliCount), - packetsLost: this._encodePacketsLost(sample.packetsLost), - packetsReceived: this._encodePacketsReceived(sample.packetsReceived), - packetsDiscarded: this._encodePacketsDiscarded(sample.packetsDiscarded), - packetsRepaired: this._encodePacketsRepaired(sample.packetsRepaired), - packetsFailedDecryption: this._encodePacketsFailedDecryption(sample.packetsFailedDecryption), - packetsDuplicated: this._encodePacketsDuplicated(sample.packetsDuplicated), - fecPacketsReceived: this._encodeFecPacketsReceived(sample.fecPacketsReceived), - fecPacketsDiscarded: this._encodeFecPacketsDiscarded(sample.fecPacketsDiscarded), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - rtcpSrReceived: this._encodeRtcpSrReceived(sample.rtcpSrReceived), - rtcpRrSent: this._encodeRtcpRrSent(sample.rtcpRrSent), - rtxPacketsReceived: this._encodeRtxPacketsReceived(sample.rtxPacketsReceived), - rtxPacketsDiscarded: this._encodeRtxPacketsDiscarded(sample.rtxPacketsDiscarded), - framesReceived: this._encodeFramesReceived(sample.framesReceived), - framesDecoded: this._encodeFramesDecoded(sample.framesDecoded), - keyFramesDecoded: this._encodeKeyFramesDecoded(sample.keyFramesDecoded), - fractionLost: this._encodeFractionLost(sample.fractionLost), - jitter: this._encodeJitter(sample.jitter), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime) - }); - return result; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (!roundTripTime) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodePacketsReceived(packetsReceived?: number): number | undefined { - if (!packetsReceived) return; - if (packetsReceived === this._packetsReceived) return; - this._packetsReceived = packetsReceived; - return this._packetsReceived; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (!packetsLost) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodeJitter(jitter?: number): number | undefined { - if (!jitter) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodePacketsDiscarded(packetsDiscarded?: number): number | undefined { - if (!packetsDiscarded) return; - if (packetsDiscarded === this._packetsDiscarded) return; - this._packetsDiscarded = packetsDiscarded; - return this._packetsDiscarded; - } - - private _encodeFecPacketsReceived(fecPacketsReceived?: number): number | undefined { - if (!fecPacketsReceived) return; - if (fecPacketsReceived === this._fecPacketsReceived) return; - this._fecPacketsReceived = fecPacketsReceived; - return this._fecPacketsReceived; - } - - private _encodeFecPacketsDiscarded(fecPacketsDiscarded?: number): number | undefined { - if (!fecPacketsDiscarded) return; - if (fecPacketsDiscarded === this._fecPacketsDiscarded) return; - this._fecPacketsDiscarded = fecPacketsDiscarded; - return this._fecPacketsDiscarded; - } - - private _encodeFramesDecoded(framesDecoded?: number): number | undefined { - if (!framesDecoded) return; - if (framesDecoded === this._framesDecoded) return; - this._framesDecoded = framesDecoded; - return this._framesDecoded; - } - - private _encodeKeyFramesDecoded(keyFramesDecoded?: number): number | undefined { - if (!keyFramesDecoded) return; - if (keyFramesDecoded === this._keyFramesDecoded) return; - this._keyFramesDecoded = keyFramesDecoded; - return this._keyFramesDecoded; - } - - private _encodeFirCount(firCount?: number): number | undefined { - if (!firCount) return; - if (firCount === this._firCount) return; - this._firCount = firCount; - return this._firCount; - } - - private _encodePliCount(pliCount?: number): number | undefined { - if (!pliCount) return; - if (pliCount === this._pliCount) return; - this._pliCount = pliCount; - return this._pliCount; - } - - private _encodeFramesReceived(framesReceived?: number): number | undefined { - if (!framesReceived) return; - if (framesReceived === this._framesReceived) return; - this._framesReceived = framesReceived; - return this._framesReceived; - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (!bytesReceived) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (!nackCount) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodeNoReport(noReport?: boolean): boolean | undefined { - if (noReport === undefined) return; - if (noReport === this._noReport) return; - this._noReport = noReport; - return this._noReport; - } - - private _encodeInternal(internal?: boolean): boolean | undefined { - if (internal === undefined) return; - if (internal === this._internal) return; - this._internal = internal; - return this._internal; - } - - private _encodeMediaType(mediaType?: "audio" | "video"): Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum | undefined { - if (!mediaType) return; - if (mediaType === this._mediaType) return; - this._mediaType = mediaType; - switch (this._mediaType) { - case "audio": - return Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum.AUDIO; - case "video": - return Samples_SfuSample_SfuInboundRtpPad_SfuInboundRtpPadEnum.VIDEO; - } - } - - private _encodePayloadType(payloadType?: number): number | undefined { - if (!payloadType) return; - if (payloadType === this._payloadType) return; - this._payloadType = payloadType; - return this._payloadType; - } - - private _encodeMimeType(mimeType?: string): string | undefined { - if (!mimeType) return; - if (mimeType === this._mimeType) return; - this._mimeType = mimeType; - return this._mimeType; - } - - private _encodeClockRate(clockRate?: number): number | undefined { - if (!clockRate) return; - if (clockRate === this._clockRate) return; - this._clockRate = clockRate; - return this._clockRate; - } - - private _encodeSdpFmtpLine(sdpFmtpLine?: string): string | undefined { - if (!sdpFmtpLine) return; - if (sdpFmtpLine === this._sdpFmtpLine) return; - this._sdpFmtpLine = sdpFmtpLine; - return this._sdpFmtpLine; - } - - private _encodeRid(rid?: string): string | undefined { - if (!rid) return; - if (rid === this._rid) return; - this._rid = rid; - return this._rid; - } - - private _encodeRtxSsrc(rtxSsrc?: number): bigint | undefined { - if (!rtxSsrc) return; - if (rtxSsrc === this._rtxSsrc) return; - this._rtxSsrc = rtxSsrc; - return BigInt(this._rtxSsrc); - } - - private _encodeTargetBitrate(targetBitrate?: number): number | undefined { - if (!targetBitrate) return; - if (targetBitrate === this._targetBitrate) return; - this._targetBitrate = targetBitrate; - return this._targetBitrate; - } - - private _encodeVoiceActivityFlag(voiceActivityFlag?: boolean): boolean | undefined { - if (voiceActivityFlag === undefined) return; - if (voiceActivityFlag === this._voiceActivityFlag) return; - this._voiceActivityFlag = voiceActivityFlag; - return this._voiceActivityFlag; - } - - private _encodeSliCount(sliCount?: number): number | undefined { - if (!sliCount) return; - if (sliCount === this._sliCount) return; - this._sliCount = sliCount; - return this._sliCount; - } - - private _encodePacketsRepaired(packetsRepaired?: number): number | undefined { - if (!packetsRepaired) return; - if (packetsRepaired === this._packetsRepaired) return; - this._packetsRepaired = packetsRepaired; - return this._packetsRepaired; - } - - private _encodePacketsFailedDecryption(packetsFailedDecryption?: number): number | undefined { - if (!packetsFailedDecryption) return; - if (packetsFailedDecryption === this._packetsFailedDecryption) return; - this._packetsFailedDecryption = packetsFailedDecryption; - return this._packetsFailedDecryption; - } - - private _encodePacketsDuplicated(packetsDuplicated?: number): number | undefined { - if (!packetsDuplicated) return; - if (packetsDuplicated === this._packetsDuplicated) return; - this._packetsDuplicated = packetsDuplicated; - return this._packetsDuplicated; - } - - private _encodeRtcpSrReceived(rtcpSrReceived?: number): number | undefined { - if (!rtcpSrReceived) return; - if (rtcpSrReceived === this._rtcpSrReceived) return; - this._rtcpSrReceived = rtcpSrReceived; - return this._rtcpSrReceived; - } - - private _encodeRtcpRrSent(rtcpRrSent?: number): number | undefined { - if (!rtcpRrSent) return; - if (rtcpRrSent === this._rtcpRrSent) return; - this._rtcpRrSent = rtcpRrSent; - return this._rtcpRrSent; - } - - private _encodeRtxPacketsReceived(rtxPacketsReceived?: number): number | undefined { - if (!rtxPacketsReceived) return; - if (rtxPacketsReceived === this._rtxPacketsReceived) return; - this._rtxPacketsReceived = rtxPacketsReceived; - return this._rtxPacketsReceived; - } - - private _encodeRtxPacketsDiscarded(rtxPacketsDiscarded?: number): number | undefined { - if (!rtxPacketsDiscarded) return; - if (rtxPacketsDiscarded === this._rtxPacketsDiscarded) return; - this._rtxPacketsDiscarded = rtxPacketsDiscarded; - return this._rtxPacketsDiscarded; - } - - private _encodeFractionLost(fractionLost?: number): number | undefined { - if (!fractionLost) return; - if (fractionLost === this._fractionLost) return; - this._fractionLost = fractionLost; - return this._fractionLost; - } -} diff --git a/npm-samples-encoder/src/SfuOutboundRtpPadEncoder.ts b/npm-samples-encoder/src/SfuOutboundRtpPadEncoder.ts deleted file mode 100644 index 370e2528..00000000 --- a/npm-samples-encoder/src/SfuOutboundRtpPadEncoder.ts +++ /dev/null @@ -1,383 +0,0 @@ -import { SfuOutboundRtpPad } from "./InputSamples"; -import { stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { Samples_SfuSample_SfuOutboundRtpPad, Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum } from './OutputSamples'; -import { SfuSampleEncodingOptions } from "./EncodingOptions"; - -export class SfuOutboundRtpPadEncoder { - private _streamId: Uint8Array; - private _sinkId: Uint8Array; - private _padId: Uint8Array; - private _ssrc: bigint; - private _noReport?: boolean; - private _internal?: boolean; - private _callId?: string; - private _clientId?: string; - private _trackId?: string; - private _mediaType?: "audio" | "video"; - private _payloadType?: number; - private _mimeType?: string; - private _clockRate?: number; - private _sdpFmtpLine?: string; - private _rid?: string; - private _rtxSsrc?: number; - private _targetBitrate?: number; - private _voiceActivityFlag?: boolean; - private _firCount?: number; - private _pliCount?: number; - private _nackCount?: number; - private _sliCount?: number; - private _packetsLost?: number; - private _packetsSent?: number; - private _packetsDiscarded?: number; - private _packetsRetransmitted?: number; - private _packetsFailedEncryption?: number; - private _packetsDuplicated?: number; - private _fecPacketsSent?: number; - private _fecPacketsDiscarded?: number; - private _bytesSent?: number; - private _rtcpSrSent?: number; - private _rtcpRrReceived?: number; - private _rtxPacketsSent?: number; - private _rtxPacketsDiscarded?: number; - private _framesSent?: number; - private _framesEncoded?: number; - private _keyFramesEncoded?: number; - private _fractionLost?: number; - private _jitter?: number; - private _roundTripTime?: number; - private _visited = false; - - public constructor( - public readonly transportId: string, - public readonly streamId: string, - public readonly sinkId: string, - public readonly padId: string, - public readonly ssrc: number, - private readonly _options: SfuSampleEncodingOptions, - ) { - this._ssrc = BigInt(ssrc); - this._streamId = this._options.sfuStreamIdIsUuid ? uuidToByteArray(streamId) : stringToBytesArray(streamId); - this._sinkId = this._options.sfuSinkIdIsUuid ? uuidToByteArray(sinkId) : stringToBytesArray(sinkId); - this._padId = this._options.sfuPadIdIsUuid ? uuidToByteArray(padId) : stringToBytesArray(padId); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: SfuOutboundRtpPad): Samples_SfuSample_SfuOutboundRtpPad { - this._visited = true; - - const result = new Samples_SfuSample_SfuOutboundRtpPad({ - transportId: this.transportId, - streamId: this._streamId, - sinkId: this._sinkId, - padId: this._padId, - ssrc: this._ssrc, - noReport: this._encodeNoReport(sample.noReport), - internal: this._encodeInternal(sample.internal), - callId: this._encodeCallId(sample.callId), - clientId: this._encodeClientId(sample.clientId), - trackId: this._encodeTrackId(sample.trackId), - mediaType: this._encodeMediaType(sample.mediaType), - payloadType: this._encodePayloadType(sample.payloadType), - mimeType: this._encodeMimeType(sample.mimeType), - clockRate: this._encodeClockRate(sample.clockRate), - sdpFmtpLine: this._encodeSdpFmtpLine(sample.sdpFmtpLine), - rid: this._encodeRid(sample.rid), - rtxSsrc: this._encodeRtxSsrc(sample.rtxSsrc), - targetBitrate: this._encodeTargetBitrate(sample.targetBitrate), - voiceActivityFlag: this._encodeVoiceActivityFlag(sample.voiceActivityFlag), - firCount: this._encodeFirCount(sample.firCount), - pliCount: this._encodePliCount(sample.pliCount), - nackCount: this._encodeNackCount(sample.nackCount), - sliCount: this._encodeSliCount(sample.sliCount), - packetsLost: this._encodePacketsLost(sample.packetsLost), - packetsSent: this._encodePacketsSent(sample.packetsSent), - packetsDiscarded: this._encodePacketsDiscarded(sample.packetsDiscarded), - packetsRetransmitted: this._encodePacketsRetransmitted(sample.packetsRetransmitted), - packetsFailedEncryption: this._encodePacketsFailedEncryption(sample.packetsFailedEncryption), - packetsDuplicated: this._encodePacketsDuplicated(sample.packetsDuplicated), - fecPacketsSent: this._encodeFecPacketsSent(sample.fecPacketsSent), - fecPacketsDiscarded: this._encodeFecPacketsDiscarded(sample.fecPacketsDiscarded), - bytesSent: this._encodeBytesSent(sample.bytesSent), - rtcpSrSent: this._encodeRtcpSrSent(sample.rtcpSrSent), - rtcpRrReceived: this._encodeRtcpRrReceived(sample.rtcpRrReceived), - rtxPacketsSent: this._encodeRtxPacketsSent(sample.rtxPacketsSent), - rtxPacketsDiscarded: this._encodeRtxPacketsDiscarded(sample.rtxPacketsDiscarded), - framesSent: this._encodeFramesSent(sample.framesSent), - framesEncoded: this._encodeFramesEncoded(sample.framesEncoded), - keyFramesEncoded: this._encodeKeyFramesEncoded(sample.keyFramesEncoded), - fractionLost: this._encodeFractionLost(sample.fractionLost), - jitter: this._encodeJitter(sample.jitter), - roundTripTime: this._encodeRoundTripTime(sample.roundTripTime) - }); - return result; - } - - private _encodeRoundTripTime(roundTripTime?: number): number | undefined { - if (!roundTripTime) return; - if (roundTripTime === this._roundTripTime) return; - this._roundTripTime = roundTripTime; - return this._roundTripTime; - } - - private _encodePacketsLost(packetsLost?: number): number | undefined { - if (!packetsLost) return; - if (packetsLost === this._packetsLost) return; - this._packetsLost = packetsLost; - return this._packetsLost; - } - - private _encodeJitter(jitter?: number): number | undefined { - if (!jitter) return; - if (jitter === this._jitter) return; - this._jitter = jitter; - return this._jitter; - } - - private _encodePacketsDiscarded(packetsDiscarded?: number): number | undefined { - if (!packetsDiscarded) return; - if (packetsDiscarded === this._packetsDiscarded) return; - this._packetsDiscarded = packetsDiscarded; - return this._packetsDiscarded; - } - - private _encodeFecPacketsDiscarded(fecPacketsDiscarded?: number): number | undefined { - if (!fecPacketsDiscarded) return; - if (fecPacketsDiscarded === this._fecPacketsDiscarded) return; - this._fecPacketsDiscarded = fecPacketsDiscarded; - return this._fecPacketsDiscarded; - } - - private _encodeFirCount(firCount?: number): number | undefined { - if (!firCount) return; - if (firCount === this._firCount) return; - this._firCount = firCount; - return this._firCount; - } - - private _encodePliCount(pliCount?: number): number | undefined { - if (!pliCount) return; - if (pliCount === this._pliCount) return; - this._pliCount = pliCount; - return this._pliCount; - } - - private _encodeNackCount(nackCount?: number): number | undefined { - if (!nackCount) return; - if (nackCount === this._nackCount) return; - this._nackCount = nackCount; - return this._nackCount; - } - - private _encodeNoReport(noReport?: boolean): boolean | undefined { - if (noReport === undefined) return; - if (noReport === this._noReport) return; - this._noReport = noReport; - return this._noReport; - } - - private _encodeInternal(internal?: boolean): boolean | undefined { - if (internal === undefined) return; - if (internal === this._internal) return; - this._internal = internal; - return this._internal; - } - - private _encodeMediaType(mediaType?: "audio" | "video"): Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum | undefined { - if (!mediaType) return; - if (mediaType === this._mediaType) return; - this._mediaType = mediaType; - switch (this._mediaType) { - case "audio": - return Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum.AUDIO; - case "video": - return Samples_SfuSample_SfuOutboundRtpPad_SfuOutboundRtpPadEnum.VIDEO; - } - } - - private _encodePayloadType(payloadType?: number): number | undefined { - if (!payloadType) return; - if (payloadType === this._payloadType) return; - this._payloadType = payloadType; - return this._payloadType; - } - - private _encodeMimeType(mimeType?: string): string | undefined { - if (!mimeType) return; - if (mimeType === this._mimeType) return; - this._mimeType = mimeType; - return this._mimeType; - } - - private _encodeClockRate(clockRate?: number): number | undefined { - if (!clockRate) return; - if (clockRate === this._clockRate) return; - this._clockRate = clockRate; - return this._clockRate; - } - - private _encodeSdpFmtpLine(sdpFmtpLine?: string): string | undefined { - if (!sdpFmtpLine) return; - if (sdpFmtpLine === this._sdpFmtpLine) return; - this._sdpFmtpLine = sdpFmtpLine; - return this._sdpFmtpLine; - } - - private _encodeRid(rid?: string): string | undefined { - if (!rid) return; - if (rid === this._rid) return; - this._rid = rid; - return this._rid; - } - - private _encodeRtxSsrc(rtxSsrc?: number): bigint | undefined { - if (!rtxSsrc) return; - if (rtxSsrc === this._rtxSsrc) return; - this._rtxSsrc = rtxSsrc; - return BigInt(this._rtxSsrc); - } - - private _encodeTargetBitrate(targetBitrate?: number): number | undefined { - if (!targetBitrate) return; - if (targetBitrate === this._targetBitrate) return; - this._targetBitrate = targetBitrate; - return this._targetBitrate; - } - - private _encodeVoiceActivityFlag(voiceActivityFlag?: boolean): boolean | undefined { - if (voiceActivityFlag === undefined) return; - if (voiceActivityFlag === this._voiceActivityFlag) return; - this._voiceActivityFlag = voiceActivityFlag; - return this._voiceActivityFlag; - } - - private _encodeSliCount(sliCount?: number): number | undefined { - if (!sliCount) return; - if (sliCount === this._sliCount) return; - this._sliCount = sliCount; - return this._sliCount; - } - - private _encodePacketsDuplicated(packetsDuplicated?: number): number | undefined { - if (!packetsDuplicated) return; - if (packetsDuplicated === this._packetsDuplicated) return; - this._packetsDuplicated = packetsDuplicated; - return this._packetsDuplicated; - } - - private _encodeRtxPacketsDiscarded(rtxPacketsDiscarded?: number): number | undefined { - if (!rtxPacketsDiscarded) return; - if (rtxPacketsDiscarded === this._rtxPacketsDiscarded) return; - this._rtxPacketsDiscarded = rtxPacketsDiscarded; - return this._rtxPacketsDiscarded; - } - - private _encodeFractionLost(fractionLost?: number): number | undefined { - if (!fractionLost) return; - if (fractionLost === this._fractionLost) return; - this._fractionLost = fractionLost; - return this._fractionLost; - } - - private _encodeCallId(callId?: string): Uint8Array | undefined { - if (!callId) return; - if (callId === this._callId) return; - this._callId = callId; - return this._options.callIdIsUuid ? uuidToByteArray(this._callId) : stringToBytesArray(this._callId); - } - - private _encodeClientId(clientId?: string): Uint8Array | undefined { - if (!clientId) return; - if (clientId === this._clientId) return; - this._clientId = clientId; - return this._options.clientIdIsUuid ? uuidToByteArray(this._clientId) : stringToBytesArray(this._clientId); - } - - private _encodeTrackId(trackId?: string): Uint8Array | undefined { - if (!trackId) return; - if (trackId === this._trackId) return; - this._trackId = trackId; - return this._options.trackIdIsUuid ? uuidToByteArray(this._trackId) : stringToBytesArray(this._trackId); - } - - private _encodePacketsSent(packetsSent?: number): number | undefined { - if (!packetsSent) return; - if (packetsSent === this._packetsSent) return; - this._packetsSent = packetsSent; - return this._packetsSent; - } - - private _encodePacketsRetransmitted(packetsRetransmitted?: number): number | undefined { - if (!packetsRetransmitted) return; - if (packetsRetransmitted === this._packetsRetransmitted) return; - this._packetsRetransmitted = packetsRetransmitted; - return this._packetsRetransmitted; - } - - private _encodePacketsFailedEncryption(packetsFailedEncryption?: number): number | undefined { - if (!packetsFailedEncryption) return; - if (packetsFailedEncryption === this._packetsFailedEncryption) return; - this._packetsFailedEncryption = packetsFailedEncryption; - return this._packetsFailedEncryption; - } - - private _encodeFecPacketsSent(fecPacketsSent?: number): number | undefined { - if (!fecPacketsSent) return; - if (fecPacketsSent === this._fecPacketsSent) return; - this._fecPacketsSent = fecPacketsSent; - return this._fecPacketsSent; - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - private _encodeRtcpSrSent(rtcpSrSent?: number): number | undefined { - if (!rtcpSrSent) return; - if (rtcpSrSent === this._rtcpSrSent) return; - this._rtcpSrSent = rtcpSrSent; - return this._rtcpSrSent; - } - - private _encodeRtcpRrReceived(rtcpRrReceived?: number): number | undefined { - if (!rtcpRrReceived) return; - if (rtcpRrReceived === this._rtcpRrReceived) return; - this._rtcpRrReceived = rtcpRrReceived; - return this._rtcpRrReceived; - } - - private _encodeRtxPacketsSent(rtxPacketsSent?: number): number | undefined { - if (!rtxPacketsSent) return; - if (rtxPacketsSent === this._rtxPacketsSent) return; - this._rtxPacketsSent = rtxPacketsSent; - return this._rtxPacketsSent; - } - - private _encodeFramesSent(framesSent?: number): number | undefined { - if (!framesSent) return; - if (framesSent === this._framesSent) return; - this._framesSent = framesSent; - return this._framesSent; - } - - private _encodeFramesEncoded(framesEncoded?: number): number | undefined { - if (!framesEncoded) return; - if (framesEncoded === this._framesEncoded) return; - this._framesEncoded = framesEncoded; - return this._framesEncoded; - } - - private _encodeKeyFramesEncoded(keyFramesEncoded?: number): number | undefined { - if (!keyFramesEncoded) return; - if (keyFramesEncoded === this._keyFramesEncoded) return; - this._keyFramesEncoded = keyFramesEncoded; - return this._keyFramesEncoded; - } -} diff --git a/npm-samples-encoder/src/SfuSampleEncoder.ts b/npm-samples-encoder/src/SfuSampleEncoder.ts deleted file mode 100644 index b1aa39e9..00000000 --- a/npm-samples-encoder/src/SfuSampleEncoder.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { SfuSample } from "./InputSamples"; -import { convertUint8ToBase64, stringToBytesArray, uuidToByteArray } from "./encodingTools"; -import { - Samples_SfuSample_CustomSfuEvent, - Samples_SfuSample_SfuExtensionStats, - Samples_SfuSample, - Samples_SfuSample_SfuInboundRtpPad, - Samples_SfuSample_SfuOutboundRtpPad, - Samples_SfuSample_SfuTransport, - Samples_SfuSample_SfuSctpChannel -} from './OutputSamples'; -import { SfuTransportEncoder } from "./SfuTransportEncoder"; -import { SfuInboundRtpPadEncoder } from "./SfuInboundRtpPadEncoder"; -import { SfuOutboundRtpPadEncoder } from "./SfuOutboundRtpPadEncoder"; -import { SfuSctpChannelEncoder } from "./SfuSctpChannelEncoder"; -import { SfuSampleEncodingOptions } from "./EncodingOptions"; - -export class SfuSampleEncoder { - - private _timeZoneOffsetInHours?: number; - public readonly options: SfuSampleEncodingOptions; - private _transports = new Map(); - private _inboundRtpPads = new Map(); - private _outboundRtpPads = new Map(); - private _sctpChannels = new Map(); - private _visited = false; - - public constructor(options?: Partial) { - this.options = Object.assign({ - sfuIdIsUuid: false, - callIdIsUuid: false, - sfuStreamIdIsUuid: false, - sfuSinkIdIsUuid: false, - clientIdIsUuid: false, - peerConnectionIdIsUuid: false, - sfuPadIdIsUuid: false, - trackIdIsUuid: false, - dataChannelIdIsUuid: false, - dataStreamIdIsUuid: false, - }, options ?? {}); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encodeToBytes(sfuSample: SfuSample): Uint8Array { - return this.encodeToProtobufSamples(sfuSample).toBinary() - } - - public encodeToBase64(sfuSample: SfuSample): string { - const bytes = this.encodeToProtobufSamples(sfuSample).toBinary(); - return convertUint8ToBase64(bytes); - } - - public encodeToProtobufSamples(sfuSample: SfuSample): Samples_SfuSample { - - this._visited = true; - - const result = new Samples_SfuSample({ - sfuId: sfuSample.sfuId ? uuidToByteArray(sfuSample.sfuId) : undefined, - timestamp: BigInt(sfuSample.timestamp), - marker: sfuSample.marker, - - timeZoneOffsetInHours: this._encodeTimeZoneOffsetInHours(sfuSample.timeZoneOffsetInHours), - transports: this._encodeSfuTransports(sfuSample.transports), - inboundRtpPads: this._encodeSfuInboundRtpPads(sfuSample.inboundRtpPads), - outboundRtpPads: this._encodeSfuOutboundRtpPads(sfuSample.outboundRtpPads), - sctpChannels: this._encodeSfuSctpChannels(sfuSample.sctpChannels), - extensionStats: this._encodeExtensionStats(sfuSample.extensionStats), - customSfuEvents: this._encodeCustomSfuEvents(sfuSample.customSfuEvents), - - }); - - return result; - } - - public reset() { - this._timeZoneOffsetInHours = undefined; - this._inboundRtpPads.clear(); - this._outboundRtpPads.clear(); - this._sctpChannels.clear(); - this._visited = false; - } - - - private _encodeTimeZoneOffsetInHours( - timeZoneOffsetInHours?: number, - ): number | undefined { - if (!timeZoneOffsetInHours) return; - if (this._timeZoneOffsetInHours === timeZoneOffsetInHours) return; - this._timeZoneOffsetInHours = timeZoneOffsetInHours; - return timeZoneOffsetInHours; - } - - private _encodeExtensionStats( - extensionStats?: SfuSample['extensionStats'], - ): Samples_SfuSample_SfuExtensionStats[] { - if (!extensionStats) return []; - return extensionStats.map(extensionStats => new Samples_SfuSample_SfuExtensionStats({ - ...extensionStats - })); - } - - private _encodeCustomSfuEvents( - customSfuEvents?: SfuSample['customSfuEvents'], - ): Samples_SfuSample_CustomSfuEvent[] { - if (!customSfuEvents) return []; - return customSfuEvents.map(customSfuEvent => new Samples_SfuSample_CustomSfuEvent({ - ...customSfuEvent, - sfuSinkId: customSfuEvent.sfuSinkId ? this.options.sfuSinkIdIsUuid ? uuidToByteArray(customSfuEvent.sfuSinkId) : stringToBytesArray(customSfuEvent.sfuSinkId) : undefined, - sfuStreamId: customSfuEvent.sfuStreamId ? this.options.sfuStreamIdIsUuid ? uuidToByteArray(customSfuEvent.sfuStreamId) : stringToBytesArray(customSfuEvent.sfuStreamId): undefined, - timestamp: customSfuEvent.timestamp ? BigInt(customSfuEvent.timestamp) : undefined, - })); - } - - - private _encodeSfuInboundRtpPads( - inboundRtpPads?: SfuSample['inboundRtpPads'] - ): Samples_SfuSample_SfuInboundRtpPad[] { - const result: Samples_SfuSample_SfuInboundRtpPad[] = []; - for (const sample of (inboundRtpPads ? inboundRtpPads : [])) { - if (!sample.padId || !sample.transportId || !sample.streamId || !sample.ssrc) continue; - let encoder = this._inboundRtpPads.get(sample.padId); - if (!encoder) { - encoder = new SfuInboundRtpPadEncoder( - sample.transportId, - sample.streamId, - sample.padId, - sample.ssrc, - this.options, - ); - this._inboundRtpPads.set(sample.padId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const encoder of Array.from(this._inboundRtpPads.values())) { - if (!encoder.visited) { - this._inboundRtpPads.delete(encoder.padId); - } - } - - return result; - } - - private _encodeSfuOutboundRtpPads( - outboundRtpPads?: SfuSample['outboundRtpPads'] - ): Samples_SfuSample_SfuOutboundRtpPad[] { - const result: Samples_SfuSample_SfuOutboundRtpPad[] = []; - for (const sample of (outboundRtpPads ? outboundRtpPads : [])) { - if (!sample.padId || !sample.transportId || !sample.streamId || !sample.ssrc || !sample.sinkId) continue; - let encoder = this._outboundRtpPads.get(sample.padId); - if (!encoder) { - encoder = new SfuOutboundRtpPadEncoder( - sample.transportId, - sample.streamId, - sample.sinkId, - sample.padId, - sample.ssrc, - this.options, - ); - this._outboundRtpPads.set(sample.padId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const encoder of Array.from(this._outboundRtpPads.values())) { - if (!encoder.visited) { - this._outboundRtpPads.delete(encoder.padId); - } - } - - return result; - } - - private _encodeSfuTransports( - transports?: SfuSample['transports'] - ): Samples_SfuSample_SfuTransport[] { - const result: Samples_SfuSample_SfuTransport[] = []; - for (const sample of (transports ? transports : [])) { - if (!sample.transportId) continue; - let encoder = this._transports.get(sample.transportId); - if (!encoder) { - encoder = new SfuTransportEncoder( - sample.transportId, - ); - this._transports.set(sample.transportId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const encoder of Array.from(this._transports.values())) { - if (!encoder.visited) { - this._transports.delete(encoder.transportId); - } - } - - return result; - } - - private _encodeSfuSctpChannels( - sctpChannels?: SfuSample['sctpChannels'] - ): Samples_SfuSample_SfuSctpChannel[] { - const result: Samples_SfuSample_SfuSctpChannel[] = []; - for (const sample of (sctpChannels ? sctpChannels : [])) { - if (!sample.transportId || !sample.channelId) continue; - let encoder = this._sctpChannels.get(sample.channelId); - if (!encoder) { - encoder = new SfuSctpChannelEncoder( - sample.transportId, - sample.streamId, - sample.channelId, - this.options, - ); - this._sctpChannels.set(sample.channelId, encoder); - } - const encodedSample = encoder.encode(sample); - result.push(encodedSample); - } - - for (const encoder of Array.from(this._sctpChannels.values())) { - if (!encoder.visited) { - this._transports.delete(encoder.channelId); - } - } - - return result; - } -} diff --git a/npm-samples-encoder/src/SfuSctpChannelEncoder.ts b/npm-samples-encoder/src/SfuSctpChannelEncoder.ts deleted file mode 100644 index 36db515e..00000000 --- a/npm-samples-encoder/src/SfuSctpChannelEncoder.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { SfuSctpChannel } from "./InputSamples"; -import { uuidToByteArray } from "./encodingTools"; -import { Samples_SfuSample_SfuSctpChannel } from './OutputSamples'; -import { SfuSampleEncodingOptions } from "./EncodingOptions"; - -export class SfuSctpChannelEncoder { - private _streamId: Uint8Array; - private _channelId: Uint8Array; - private _label?: string; - private _protocol?: string; - private _sctpSmoothedRoundTripTime?: number; - private _sctpCongestionWindow?: number; - private _sctpReceiverWindow?: number; - private _sctpMtu?: number; - private _sctpUnackData?: number; - private _messageReceived?: number; - private _messageSent?: number; - private _bytesReceived?: number; - private _bytesSent?: number; - private _visited = false; - - public constructor( - public readonly transportId: string, - public readonly streamId: string, - public readonly channelId: string, - private readonly _options: SfuSampleEncodingOptions, - ) { - this._streamId = this._options.dataStreamIdIsUuid ? uuidToByteArray(streamId) : uuidToByteArray(streamId); - this._channelId = this._options.dataChannelIdIsUuid ? uuidToByteArray(channelId) : uuidToByteArray(channelId); - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: SfuSctpChannel): Samples_SfuSample_SfuSctpChannel { - this._visited = true; - - const result = new Samples_SfuSample_SfuSctpChannel({ - transportId: this.transportId, - streamId: this._streamId, - channelId: this._channelId, - noReport: sample.noReport, - internal: sample.internal, - label: this._encodeLabel(sample.label), - protocol: this._encodeProtocol(sample.protocol), - sctpSmoothedRoundTripTime: this._encodeSctpSmoothedRoundTripTime(sample.sctpSmoothedRoundTripTime), - sctpCongestionWindow: this._encodeSctpCongestionWindow(sample.sctpCongestionWindow), - sctpReceiverWindow: this._encodeSctpReceiverWindow(sample.sctpReceiverWindow), - sctpMtu: this._encodeSctpMtu(sample.sctpMtu), - sctpUnackData: this._encodeSctpUnackData(sample.sctpUnackData), - messageReceived: this._encodeMessageReceived(sample.messageReceived), - messageSent: this._encodeMessageSent(sample.messageSent), - bytesReceived: this._encodeBytesReceived(sample.bytesReceived), - bytesSent: this._encodeBytesSent(sample.bytesSent), - }); - return result; - } - - private _encodeLabel(label?: string): string | undefined { - if (!label) return; - if (label === this._label) return; - this._label = label; - return this._label; - } - - private _encodeProtocol(protocol?: string): string | undefined { - if (!protocol) return; - if (protocol === this._protocol) return; - this._protocol = protocol; - return this._protocol; - } - - private _encodeSctpSmoothedRoundTripTime(sctpSmoothedRoundTripTime?: number): number | undefined { - if (!sctpSmoothedRoundTripTime) return; - if (sctpSmoothedRoundTripTime === this._sctpSmoothedRoundTripTime) return; - this._sctpSmoothedRoundTripTime = sctpSmoothedRoundTripTime; - return this._sctpSmoothedRoundTripTime; - } - - private _encodeSctpCongestionWindow(sctpCongestionWindow?: number): number | undefined { - if (!sctpCongestionWindow) return; - if (sctpCongestionWindow === this._sctpCongestionWindow) return; - this._sctpCongestionWindow = sctpCongestionWindow; - return this._sctpCongestionWindow; - } - - private _encodeSctpReceiverWindow(sctpReceiverWindow?: number): number | undefined { - if (!sctpReceiverWindow) return; - if (sctpReceiverWindow === this._sctpReceiverWindow) return; - this._sctpReceiverWindow = sctpReceiverWindow; - return this._sctpReceiverWindow; - } - - private _encodeSctpMtu(sctpMtu?: number): number | undefined { - if (!sctpMtu) return; - if (sctpMtu === this._sctpMtu) return; - this._sctpMtu = sctpMtu; - return this._sctpMtu; - } - - private _encodeSctpUnackData(sctpUnackData?: number): number | undefined { - if (!sctpUnackData) return; - if (sctpUnackData === this._sctpUnackData) return; - this._sctpUnackData = sctpUnackData; - return this._sctpUnackData; - } - - private _encodeMessageReceived(messageReceived?: number): number | undefined { - if (!messageReceived) return; - if (messageReceived === this._messageReceived) return; - this._messageReceived = messageReceived; - return this._messageReceived; - } - - private _encodeMessageSent(messageSent?: number): number | undefined { - if (!messageSent) return; - if (messageSent === this._messageSent) return; - this._messageSent = messageSent; - return this._messageSent; - } - - private _encodeBytesReceived(bytesReceived?: number): bigint | undefined { - if (!bytesReceived) return; - if (bytesReceived === this._bytesReceived) return; - this._bytesReceived = bytesReceived; - return BigInt(this._bytesReceived); - } - - private _encodeBytesSent(bytesSent?: number): bigint | undefined { - if (!bytesSent) return; - if (bytesSent === this._bytesSent) return; - this._bytesSent = bytesSent; - return BigInt(this._bytesSent); - } - - -} diff --git a/npm-samples-encoder/src/SfuTransportEncoder.ts b/npm-samples-encoder/src/SfuTransportEncoder.ts deleted file mode 100644 index 4f58d15e..00000000 --- a/npm-samples-encoder/src/SfuTransportEncoder.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { SfuTransport } from "./InputSamples"; -import { Samples_SfuSample_SfuTransport } from './OutputSamples'; - -export class SfuTransportEncoder { - private _noReport?: boolean; - private _internal?: boolean; - private _dtlsState?: string; - private _iceState?: string; - private _sctpState?: string; - private _iceRole?: string; - private _localAddress?: string; - private _localPort?: number; - private _protocol?: string; - private _remoteAddress?: string; - private _remotePort?: number; - private _rtpBytesReceived?: number; - private _rtpBytesSent?: number; - private _rtpPacketsReceived?: number; - private _rtpPacketsSent?: number; - private _rtpPacketsLost?: number; - private _rtxBytesReceived?: number; - private _rtxBytesSent?: number; - private _rtxPacketsReceived?: number; - private _rtxPacketsSent?: number; - private _rtxPacketsLost?: number; - private _rtxPacketsDiscarded?: number; - private _sctpBytesReceived?: number; - private _sctpBytesSent?: number; - private _sctpPacketsReceived?: number; - private _sctpPacketsSent?: number; - private _visited = false; - - public constructor( - public readonly transportId: string, - ) { - // empty - } - - public get visited(): boolean { - const result = this._visited; - this._visited = false; - return result; - } - - public encode(sample: SfuTransport): Samples_SfuSample_SfuTransport { - this._visited = true; - - const result = new Samples_SfuSample_SfuTransport({ - transportId: this.transportId, - noReport: this._encodeNoReport(sample.noReport), - internal: this._encodeInternal(sample.internal), - dtlsState: this._encodeDtlsState(sample.dtlsState), - iceState: this._encodeIceState(sample.iceState), - sctpState: this._encodeSctpState(sample.sctpState), - iceRole: this._encodeIceRole(sample.iceRole), - localAddress: this._encodeLocalAddress(sample.localAddress), - localPort: this._encodeLocalPort(sample.localPort), - protocol: this._encodeProtocol(sample.protocol), - remoteAddress: this._encodeRemoteAddress(sample.remoteAddress), - remotePort: this._encodeRemotePort(sample.remotePort), - rtpBytesReceived: this._encodeRtpBytesReceived(sample.rtpBytesReceived), - rtpBytesSent: this._encodeRtpBytesSent(sample.rtpBytesSent), - rtpPacketsReceived: this._encodeRtpPacketsReceived(sample.rtpPacketsReceived), - rtpPacketsSent: this._encodeRtpPacketsSent(sample.rtpPacketsSent), - rtpPacketsLost: this._encodeRtpPacketsLost(sample.rtpPacketsLost), - rtxBytesReceived: this._encodeRtxBytesReceived(sample.rtxBytesReceived), - rtxBytesSent: this._encodeRtxBytesSent(sample.rtxBytesSent), - rtxPacketsReceived: this._encodeRtxPacketsReceived(sample.rtxPacketsReceived), - rtxPacketsSent: this._encodeRtxPacketsSent(sample.rtxPacketsSent), - rtxPacketsLost: this._encodeRtxPacketsLost(sample.rtxPacketsLost), - rtxPacketsDiscarded: this._encodeRtxPacketsDiscarded(sample.rtxPacketsDiscarded), - sctpBytesReceived: this._encodeSctpBytesReceived(sample.sctpBytesReceived), - sctpBytesSent: this._encodeSctpBytesSent(sample.sctpBytesSent), - sctpPacketsReceived: this._encodeSctpPacketsReceived(sample.sctpPacketsReceived), - sctpPacketsSent: this._encodeSctpPacketsSent(sample.sctpPacketsSent), - }); - return result; - } - - - - private _encodeNoReport(noReport?: boolean): boolean | undefined { - if (noReport === undefined) return; - if (noReport === this._noReport) return; - this._noReport = noReport; - return this._noReport; - } - - private _encodeInternal(internal?: boolean): boolean | undefined { - if (internal === undefined) return; - if (internal === this._internal) return; - this._internal = internal; - return this._internal; - } - - private _encodeRtxPacketsDiscarded(rtxPacketsDiscarded?: number): number | undefined { - if (!rtxPacketsDiscarded) return; - if (rtxPacketsDiscarded === this._rtxPacketsDiscarded) return; - this._rtxPacketsDiscarded = rtxPacketsDiscarded; - return this._rtxPacketsDiscarded; - } - - private _encodeRtxPacketsSent(rtxPacketsSent?: number): number | undefined { - if (!rtxPacketsSent) return; - if (rtxPacketsSent === this._rtxPacketsSent) return; - this._rtxPacketsSent = rtxPacketsSent; - return this._rtxPacketsSent; - } - - private _encodeDtlsState(dtlsState?: string): string | undefined { - if (!dtlsState) return; - if (dtlsState === this._dtlsState) return; - this._dtlsState = dtlsState; - return this._dtlsState; - } - - private _encodeIceState(iceState?: string): string | undefined { - if (!iceState) return; - if (iceState === this._iceState) return; - this._iceState = iceState; - return this._iceState; - } - - private _encodeSctpState(sctpState?: string): string | undefined { - if (!sctpState) return; - if (sctpState === this._sctpState) return; - this._sctpState = sctpState; - return this._sctpState; - } - - private _encodeIceRole(iceRole?: string): string | undefined { - if (!iceRole) return; - if (iceRole === this._iceRole) return; - this._iceRole = iceRole; - return this._iceRole; - } - - private _encodeLocalAddress(localAddress?: string): string | undefined { - if (!localAddress) return; - if (localAddress === this._localAddress) return; - this._localAddress = localAddress; - return this._localAddress; - } - - private _encodeLocalPort(localPort?: number): number | undefined { - if (!localPort) return; - if (localPort === this._localPort) return; - this._localPort = localPort; - return this._localPort; - } - - private _encodeProtocol(protocol?: string): string | undefined { - if (!protocol) return; - if (protocol === this._protocol) return; - this._protocol = protocol; - return this._protocol; - } - - private _encodeRemoteAddress(remoteAddress?: string): string | undefined { - if (!remoteAddress) return; - if (remoteAddress === this._remoteAddress) return; - this._remoteAddress = remoteAddress; - return this._remoteAddress; - } - - private _encodeRemotePort(remotePort?: number): number | undefined { - if (!remotePort) return; - if (remotePort === this._remotePort) return; - this._remotePort = remotePort; - return this._remotePort; - } - - private _encodeRtpBytesReceived(rtpBytesReceived?: number): bigint | undefined { - if (!rtpBytesReceived) return; - if (rtpBytesReceived === this._rtpBytesReceived) return; - this._rtpBytesReceived = rtpBytesReceived; - return BigInt(this._rtpBytesReceived); - } - - private _encodeRtpBytesSent(rtpBytesSent?: number): bigint | undefined { - if (rtpBytesSent === undefined || rtpBytesSent === this._rtpBytesSent) { - return undefined; - } - this._rtpBytesSent = rtpBytesSent; - return BigInt(this._rtpBytesSent); - } - - private _encodeRtpPacketsReceived(rtpPacketsReceived?: number): number | undefined { - if (rtpPacketsReceived === undefined || rtpPacketsReceived === this._rtpPacketsReceived) { - return undefined; - } - this._rtpPacketsReceived = rtpPacketsReceived; - return this._rtpPacketsReceived; - } - - private _encodeRtpPacketsSent(rtpPacketsSent?: number): number | undefined { - if (rtpPacketsSent === undefined || rtpPacketsSent === this._rtpPacketsSent) { - return undefined; - } - this._rtpPacketsSent = rtpPacketsSent; - return this._rtpPacketsSent; - } - - private _encodeRtpPacketsLost(rtpPacketsLost?: number): number | undefined { - if (rtpPacketsLost === undefined || rtpPacketsLost === this._rtpPacketsLost) { - return undefined; - } - this._rtpPacketsLost = rtpPacketsLost; - return this._rtpPacketsLost; - } - - private _encodeRtxBytesReceived(rtxBytesReceived?: number): bigint | undefined { - if (rtxBytesReceived === undefined || rtxBytesReceived === this._rtxBytesReceived) { - return undefined; - } - this._rtxBytesReceived = rtxBytesReceived; - return BigInt(this._rtxBytesReceived); - } - - private _encodeRtxBytesSent(rtxBytesSent?: number): bigint | undefined { - if (rtxBytesSent === undefined || rtxBytesSent === this._rtxBytesSent) { - return undefined; - } - this._rtxBytesSent = rtxBytesSent; - return BigInt(this._rtxBytesSent); - } - - private _encodeRtxPacketsReceived(rtxPacketsReceived?: number): number | undefined { - if (rtxPacketsReceived === undefined || rtxPacketsReceived === this._rtxPacketsReceived) { - return undefined; - } - this._rtxPacketsReceived = rtxPacketsReceived; - return this._rtxPacketsReceived; - } - - private _encodeRtxPacketsLost(rtxPacketsLost?: number): number | undefined { - if (rtxPacketsLost === undefined || rtxPacketsLost === this._rtxPacketsLost) { - return undefined; - } - this._rtxPacketsLost = rtxPacketsLost; - return this._rtxPacketsLost; - } - - private _encodeSctpBytesReceived(sctpBytesReceived?: number): bigint | undefined { - if (sctpBytesReceived === undefined || sctpBytesReceived === this._sctpBytesReceived) { - return undefined; - } - this._sctpBytesReceived = sctpBytesReceived; - return BigInt(this._sctpBytesReceived); - } - - private _encodeSctpBytesSent(sctpBytesSent?: number): bigint | undefined { - if (sctpBytesSent === undefined || sctpBytesSent === this._sctpBytesSent) { - return undefined; - } - this._sctpBytesSent = sctpBytesSent; - return BigInt(this._sctpBytesSent); - } - - private _encodeSctpPacketsReceived(sctpPacketsReceived?: number): number | undefined { - if (typeof sctpPacketsReceived !== 'number') return; - if (sctpPacketsReceived === this._sctpPacketsReceived) return; - this._sctpPacketsReceived = sctpPacketsReceived; - return this._sctpPacketsReceived; - } - - private _encodeSctpPacketsSent(sctpPacketsSent?: number): number | undefined { - if (typeof sctpPacketsSent !== 'number') return; - if (sctpPacketsSent === this._sctpPacketsSent) return; - this._sctpPacketsSent = sctpPacketsSent; - return this._sctpPacketsSent; - } -} diff --git a/npm-samples-encoder/src/VideoSourceEncoder.ts b/npm-samples-encoder/src/VideoSourceEncoder.ts new file mode 100644 index 00000000..32d8c4d9 --- /dev/null +++ b/npm-samples-encoder/src/VideoSourceEncoder.ts @@ -0,0 +1,64 @@ +import { Encoder, StringToUint8ArrayEncoder } from "./utils"; +import { StringToStringEncoder, NumberToNumberEncoder, AppDataEncoder } from "./utils"; +import { VideoSourceStats as InputVideoSourceStats } from "./InputSamples"; +import { ClientSample_PeerConnectionSample_VideoSourceStats } from "./OutputSamples"; + +export class VideoSourceEncoder implements Encoder { + private _visited = false; + + private readonly _timestampEncoder: NumberToNumberEncoder; + private readonly _idEncoder: StringToStringEncoder; + private readonly _trackIdentifierEncoder: StringToUint8ArrayEncoder; + private readonly _kindEncoder: StringToStringEncoder; + private readonly _widthEncoder: NumberToNumberEncoder; + private readonly _heightEncoder: NumberToNumberEncoder; + private readonly _framesEncoder: NumberToNumberEncoder; + private readonly _framesPerSecondEncoder: NumberToNumberEncoder; + private readonly _appDataEncoder: AppDataEncoder; + + constructor(appDataEncoder: AppDataEncoder) { + this._timestampEncoder = new NumberToNumberEncoder(); + this._idEncoder = new StringToStringEncoder(); + this._trackIdentifierEncoder = new StringToUint8ArrayEncoder(); + this._kindEncoder = new StringToStringEncoder(); + this._widthEncoder = new NumberToNumberEncoder(); + this._heightEncoder = new NumberToNumberEncoder(); + this._framesEncoder = new NumberToNumberEncoder(); + this._framesPerSecondEncoder = new NumberToNumberEncoder(); + this._appDataEncoder = appDataEncoder; + } + + public get visited(): boolean { + const result = this._visited; + this._visited = false; + return result; + } + + public reset(): void { + this._timestampEncoder.reset(); + this._idEncoder.reset(); + this._trackIdentifierEncoder.reset(); + this._kindEncoder.reset(); + this._widthEncoder.reset(); + this._heightEncoder.reset(); + this._framesEncoder.reset(); + this._framesPerSecondEncoder.reset(); + this._appDataEncoder.reset(); + } + + public encode(sample: InputVideoSourceStats): ClientSample_PeerConnectionSample_VideoSourceStats { + this._visited = true; + + return new ClientSample_PeerConnectionSample_VideoSourceStats({ + timestamp: this._timestampEncoder.encode(sample.timestamp), + id: this._idEncoder.encode(sample.id), + trackIdentifier: this._trackIdentifierEncoder.encode(sample.trackIdentifier), + kind: this._kindEncoder.encode(sample.kind), + width: this._widthEncoder.encode(sample.width), + height: this._heightEncoder.encode(sample.height), + frames: this._framesEncoder.encode(sample.frames), + framesPerSecond: this._framesPerSecondEncoder.encode(sample.framesPerSecond), + appData: this._appDataEncoder.encode(sample.appData), + }); + } +} diff --git a/npm-samples-encoder/src/encodingTools.ts b/npm-samples-encoder/src/encodingTools.ts deleted file mode 100644 index aeab44fe..00000000 --- a/npm-samples-encoder/src/encodingTools.ts +++ /dev/null @@ -1,64 +0,0 @@ -const encoder = new TextEncoder(); - -export function stringToBytesArray(str: string): Uint8Array { - return encoder.encode(str); -} - -export function uuidToByteArray(uuid: string): Uint8Array { - const hex = uuid.replace(/[-]/g, ''); - const byteArray = new Uint8Array(16); - - for (let i = 0, j = 0; i < 32; i += 2, j++) { - byteArray[j] = parseInt(hex.substr(i, 2), 16); - } - - return byteArray; -} - - - -/* Base64 string to array encoding */ -function uint6ToB64(nUint6: number) { - return nUint6 < 26 - ? nUint6 + 65 - : nUint6 < 52 - ? nUint6 + 71 - : nUint6 < 62 - ? nUint6 - 4 - : nUint6 === 62 - ? 43 - : nUint6 === 63 - ? 47 - : 65; - } - - -export function convertUint8ToBase64(aBytes: Uint8Array) { - let nMod3 = 2; - let sB64Enc = ""; - - const nLen = aBytes.length; - let nUint24 = 0; - for (let nIdx = 0; nIdx < nLen; nIdx++) { - nMod3 = nIdx % 3; - // To break your base64 into several 80-character lines, add: - // if (nIdx > 0 && ((nIdx * 4) / 3) % 76 === 0) { - // sB64Enc += "\r\n"; - // } - - nUint24 |= aBytes[nIdx] << ((16 >>> nMod3) & 24); - if (nMod3 === 2 || aBytes.length - nIdx === 1) { - sB64Enc += String.fromCodePoint( - uint6ToB64((nUint24 >>> 18) & 63), - uint6ToB64((nUint24 >>> 12) & 63), - uint6ToB64((nUint24 >>> 6) & 63), - uint6ToB64(nUint24 & 63) - ); - nUint24 = 0; - } - } - return ( - sB64Enc.substring(0, sB64Enc.length - 2 + nMod3) + - (nMod3 === 2 ? "" : nMod3 === 1 ? "=" : "==") - ); -} \ No newline at end of file diff --git a/npm-samples-encoder/src/index.ts b/npm-samples-encoder/src/index.ts index 64278b41..83576ac3 100644 --- a/npm-samples-encoder/src/index.ts +++ b/npm-samples-encoder/src/index.ts @@ -1,5 +1,10 @@ export { schemaVersion } from './InputSamples'; export { ClientSampleEncoder } from './ClientSampleEncoder'; -export { SfuSampleEncoder } from './SfuSampleEncoder'; -export { SamplesEncoder } from './SamplesEncoder'; +export type { ClientEventEncoder } from './ClientEventEncoder'; +export type { ClientMetaDataEncoder } from './ClientMetaDataEncoder'; +export type { + Encoder, + AppDataEncoder, + AppDataEncoderFactory, +} from './utils'; diff --git a/npm-samples-encoder/src/utils.ts b/npm-samples-encoder/src/utils.ts new file mode 100644 index 00000000..d3e760ab --- /dev/null +++ b/npm-samples-encoder/src/utils.ts @@ -0,0 +1,370 @@ +const textEncoder = new TextEncoder(); + +// export interface Logger { +// info(...args: string[]): void; +// warn(...args: string[]): void; +// error(...args: string[]): void; +// } + +// export class DefaultLogger implements Logger { +// info(...args: string[]) { +// console.info(...args); +// } + +// warn(...args: string[]) { +// console.warn(...args); +// } + +// error(...args: string[]) { +// console.error(...args); +// } +// } + +export interface Encoder { + actualValue?: I; + encode(newValue?: I): O | undefined; + reset(): void; +} +export interface AppDataEncoder extends Encoder, Uint8Array> { + reset(): void; +} + + + +export type ClientSampleEncoderSettings = { + callIdIsUuid?: boolean; + clientIdIsUuid?: boolean; + peerConnectionIdIsUuid?: boolean; + trackIdIsUuid?: boolean; +}; + +export interface AppDataEncoderFactory { + createIceCandidatePairAppDataEncoder(): AppDataEncoder; + createCodecStatsAppDataEncoder(): AppDataEncoder; + createClientSampleAppDataEncoder(): AppDataEncoder; + createPeerConnectionSampleAppDataEncoder(): AppDataEncoder; + createCertificateAppDataEncoder(): AppDataEncoder; + createIceCandidateAppDataEncoder(): AppDataEncoder; + createIceTransportAppDataEncoder(): AppDataEncoder; + createInboundRtpAppDataEncoder(): AppDataEncoder; + createOutboundRtpAppDataEncoder(): AppDataEncoder; + createDataChannelAppDataEncoder(): AppDataEncoder; + createRemoteInboundRtpAppDataEncoder(): AppDataEncoder; + createRemoteOutboundRtpAppDataEncoder(): AppDataEncoder; + createAudioSourceAppDataEncoder(): AppDataEncoder; + createVideoSourceAppDataEncoder(): AppDataEncoder; + createAudioPlayoutAppDataEncoder(): AppDataEncoder; + createPeerConnectionTransportAppDataEncoder(): AppDataEncoder; +} + +export class DefaultAppDataEncoderFactory implements AppDataEncoderFactory { + public createIceCandidatePairAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createCodecStatsAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createClientSampleAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createPeerConnectionSampleAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createCertificateAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createIceCandidateAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createIceTransportAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createInboundRtpAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createOutboundRtpAppDataEncoder(): AppDataEncoder { + return new DefaultAppDataEncoder(); + } + + public createDataChannelAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createRemoteInboundRtpAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createRemoteOutboundRtpAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createAudioSourceAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createVideoSourceAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createAudioPlayoutAppDataEncoder() { + return new DefaultAppDataEncoder(); + } + + public createPeerConnectionTransportAppDataEncoder() { + return new DefaultAppDataEncoder(); + } +} + +export class DefaultAppDataEncoder implements AppDataEncoder { + private _actualJsonStr?: string; + + public constructor() { + + } + + public reset() { + this._actualJsonStr = undefined; + } + + encode(newValue?: Record) { + if (this._actualJsonStr) return; + if (newValue === undefined) return; + const jsonStr = JSON.stringify(newValue); + this._actualJsonStr = jsonStr; + return textEncoder.encode(jsonStr); + } +} + +export class OneTimePassEncoder implements Encoder { + private _value: T | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: T) { + if (this._value !== undefined) return; + this._value = newValue; + return newValue; + } +} + +export class OneTimePassUuidToByteArrayEncoder implements Encoder { + private _done?: boolean; + + public reset() { + this._done = undefined; + } + + encode(newValue?: string) { + if (newValue === undefined) return; + if (this._done) return; + this._done = true; + return uuidToByteArray(newValue); + } +} + +export class OneTimePassStringToUint8ArrayEncoder implements Encoder { + private _done?: boolean; + + public reset() { + this._done = undefined; + } + + encode(newValue?: string) { + if (newValue === undefined) return; + if (this._done) return; + this._done = true; + return textEncoder.encode(newValue); + } +} + +export class StringToStringEncoder implements Encoder { + private _value: string | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: string) { + if (!newValue) return; + if (newValue === this._value) return; + this._value = newValue; + return newValue; + } +} + +export class StringToUint8ArrayEncoder implements Encoder { + private _value: string | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: string) { + if (!newValue) return; + if (newValue === this._value) return; + this._value = newValue; + return textEncoder.encode(newValue); + } +} + +export class StringToNumberEncoder implements Encoder { + private _value: string | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: string) { + if (newValue === undefined) return; + if (newValue === this._value) return; + this._value = newValue; + return Number(newValue); + } +} + +export class NumberToBigIntEncoder implements Encoder { + private _value: number | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: number) { + if (newValue === undefined) return; + if (newValue === this._value) return; + this._value = newValue; + return BigInt(newValue); + } +} + +export class NumberToNumberEncoder implements Encoder { + private _value: number | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: number) { + if (newValue === undefined) return; + if (newValue === this._value) return; + this._value = newValue; + return newValue; + } +} + +export class BooleanToBooleanEncoder implements Encoder { + private _value: boolean | undefined; + + public get actualValue() { + return this._value; + } + + public reset() { + this._value = undefined; + } + + encode(newValue?: boolean) { + if (!newValue) return; + if (newValue === this._value) return; + this._value = newValue; + return newValue; + } +} + + +export function stringToBytesArray(str: string): Uint8Array { + return textEncoder.encode(str); +} + +export function uuidToByteArray(uuid: string): Uint8Array { + const hex = uuid.replace(/[-]/g, ''); + const byteArray = new Uint8Array(16); + + for (let i = 0, j = 0; i < 32; i += 2, j++) { + byteArray[j] = parseInt(hex.substr(i, 2), 16); + } + + return byteArray; +} + + + +/* Base64 string to array encoding */ +function uint6ToB64(nUint6: number) { + return nUint6 < 26 + ? nUint6 + 65 + : nUint6 < 52 + ? nUint6 + 71 + : nUint6 < 62 + ? nUint6 - 4 + : nUint6 === 62 + ? 43 + : nUint6 === 63 + ? 47 + : 65; + } + + +export function convertUint8ToBase64(aBytes: Uint8Array) { + let nMod3 = 2; + let sB64Enc = ""; + + const nLen = aBytes.length; + let nUint24 = 0; + for (let nIdx = 0; nIdx < nLen; nIdx++) { + nMod3 = nIdx % 3; + // To break your base64 into several 80-character lines, add: + // if (nIdx > 0 && ((nIdx * 4) / 3) % 76 === 0) { + // sB64Enc += "\r\n"; + // } + + nUint24 |= aBytes[nIdx] << ((16 >>> nMod3) & 24); + if (nMod3 === 2 || aBytes.length - nIdx === 1) { + sB64Enc += String.fromCodePoint( + uint6ToB64((nUint24 >>> 18) & 63), + uint6ToB64((nUint24 >>> 12) & 63), + uint6ToB64((nUint24 >>> 6) & 63), + uint6ToB64(nUint24 & 63) + ); + nUint24 = 0; + } + } + return ( + sB64Enc.substring(0, sB64Enc.length - 2 + nMod3) + + (nMod3 === 2 ? "" : nMod3 === 1 ? "=" : "==") + ); +} \ No newline at end of file diff --git a/npm-samples-lib/README.md b/npm-samples-lib/README.md index dd9de337..2cae6488 100644 --- a/npm-samples-lib/README.md +++ b/npm-samples-lib/README.md @@ -2,6 +2,26 @@ ObserveRTC Schemas --- Javascript bindings for ObserveRTC schemas - [samples](#samples) + * [ExtensionStat](#ExtensionStat) + * [ClientMetaData](#ClientMetaData) + * [ClientEvent](#ClientEvent) + * [CertificateStats](#CertificateStats) + * [IceCandidatePairStats](#IceCandidatePairStats) + * [IceCandidateStats](#IceCandidateStats) + * [IceTransportStats](#IceTransportStats) + * [DataChannelStats](#DataChannelStats) + * [PeerConnectionTransportStats](#PeerConnectionTransportStats) + * [AudioPlayoutStats](#AudioPlayoutStats) + * [VideoSourceStats](#VideoSourceStats) + * [AudioSourceStats](#AudioSourceStats) + * [RemoteOutboundRtpStats](#RemoteOutboundRtpStats) + * [QualityLimitationDurations](#QualityLimitationDurations) + * [OutboundRtpStats](#OutboundRtpStats) + * [RemoteInboundRtpStats](#RemoteInboundRtpStats) + * [InboundRtpStats](#InboundRtpStats) + * [CodecStats](#CodecStats) + * [PeerConnectionSample](#PeerConnectionSample) + * [ClientSample](#ClientSample) * [TurnSession](#TurnSession) * [TurnPeerAllocation](#TurnPeerAllocation) * [TurnSample](#TurnSample) @@ -12,487 +32,427 @@ Javascript bindings for ObserveRTC schemas * [SfuTransport](#SfuTransport) * [CustomSfuEvent](#CustomSfuEvent) * [SfuSample](#SfuSample) - * [IceRemoteCandidate](#IceRemoteCandidate) - * [IceLocalCandidate](#IceLocalCandidate) - * [OutboundVideoTrack](#OutboundVideoTrack) - * [OutboundAudioTrack](#OutboundAudioTrack) - * [InboundVideoTrack](#InboundVideoTrack) - * [InboundAudioTrack](#InboundAudioTrack) - * [Certificate](#Certificate) - * [MediaCodecStats](#MediaCodecStats) - * [MediaSourceStat](#MediaSourceStat) - * [IceCandidatePair](#IceCandidatePair) - * [PeerConnectionTransport](#PeerConnectionTransport) - * [DataChannel](#DataChannel) - * [CustomObserverEvent](#CustomObserverEvent) - * [CustomCallEvent](#CustomCallEvent) - * [ExtensionStat](#ExtensionStat) - * [MediaDevice](#MediaDevice) - * [OperationSystem](#OperationSystem) - * [Browser](#Browser) - * [Platform](#Platform) - * [Engine](#Engine) - * [ClientSample](#ClientSample) * [Controls](#Controls) * [Samples](#Samples) - [Changelog](#Changelog) -## Controls - - +## CodecStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp when the stats were generated. +type (**Mandatory**) | The type of the stats. +id (**Mandatory**) | The unique identifier for the stats object. +payloadType (**Mandatory**) | The payload type of the codec. +transportId (**Mandatory**) | The identifier of the transport associated with the codec. +mimeType (**Mandatory**) | The MIME type of the codec. +clockRate | The clock rate of the codec in Hz. +channels | The number of audio channels for the codec, if applicable. +sdpFmtpLine | The SDP format-specific parameters line for the codec. +appData | Additional information attached to this stats + +## InboundRtpStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The time the stats were collected, in high-resolution time. +id (**Mandatory**) | Unique identifier of the stats object. +ssrc (**Mandatory**) | Synchronization source identifier of the RTP stream. +kind (**Mandatory**) | Kind of the media (e.g., 'audio' or 'video'). +trackIdentifier (**Mandatory**) | Identifier for the media track associated with the RTP stream. +transportId | ID of the transport associated with the RTP stream. +codecId | ID of the codec used for the RTP stream. +packetsReceived | Number of packets received on the RTP stream. +packetsLost | Number of packets lost on the RTP stream. +jitter | Jitter of the RTP stream in seconds. +mid | The MediaStream ID of the RTP stream. +remoteId | Remote stats object ID associated with the RTP stream. +framesDecoded | Number of frames decoded. +keyFramesDecoded | Number of keyframes decoded. +framesRendered | Number of frames rendered. +framesDropped | Number of frames dropped. +frameWidth | Width of the decoded video frames. +frameHeight | Height of the decoded video frames. +framesPerSecond | Frame rate in frames per second. +qpSum | Sum of the Quantization Parameter values for decoded frames. +totalDecodeTime | Total time spent decoding in seconds. +totalInterFrameDelay | Sum of inter-frame delays in seconds. +totalSquaredInterFrameDelay | Sum of squared inter-frame delays in seconds. +pauseCount | Number of times playback was paused. +totalPausesDuration | Total duration of pauses in seconds. +freezeCount | Number of times playback was frozen. +totalFreezesDuration | Total duration of freezes in seconds. +lastPacketReceivedTimestamp | Timestamp of the last packet received. +headerBytesReceived | Total header bytes received. +packetsDiscarded | Total packets discarded. +fecBytesReceived | Total bytes received from FEC. +fecPacketsReceived | Total packets received from FEC. +fecPacketsDiscarded | Total FEC packets discarded. +bytesReceived | Total bytes received on the RTP stream. +nackCount | Number of NACKs sent. +firCount | Number of Full Intra Requests sent. +pliCount | Number of Picture Loss Indications sent. +totalProcessingDelay | Total processing delay in seconds. +estimatedPlayoutTimestamp | Estimated timestamp of playout. +jitterBufferDelay | Total jitter buffer delay in seconds. +jitterBufferTargetDelay | Target delay for the jitter buffer in seconds. +jitterBufferEmittedCount | Number of packets emitted from the jitter buffer. +jitterBufferMinimumDelay | Minimum delay of the jitter buffer in seconds. +totalSamplesReceived | Total audio samples received. +concealedSamples | Number of concealed audio samples. +silentConcealedSamples | Number of silent audio samples concealed. +concealmentEvents | Number of audio concealment events. +insertedSamplesForDeceleration | Number of audio samples inserted for deceleration. +removedSamplesForAcceleration | Number of audio samples removed for acceleration. +audioLevel | Audio level in the range [0.0, 1.0]. +totalAudioEnergy | Total audio energy in the stream. +totalSamplesDuration | Total duration of all received audio samples in seconds. +framesReceived | Total number of frames received. +decoderImplementation | Decoder implementation used for decoding frames. +playoutId | Playout identifier for the RTP stream. +powerEfficientDecoder | Indicates if the decoder is power-efficient. +framesAssembledFromMultiplePackets | Number of frames assembled from multiple packets. +totalAssemblyTime | Total assembly time for frames in seconds. +retransmittedPacketsReceived | Number of retransmitted packets received. +retransmittedBytesReceived | Number of retransmitted bytes received. +rtxSsrc | SSRC of the retransmission stream. +fecSsrc | SSRC of the FEC stream. +totalCorruptionProbability | Total corruption probability of packets. +totalSquaredCorruptionProbability | Total squared corruption probability of packets. +corruptionMeasurements | Number of corruption measurements. +appData | Additional information attached to this stats + +## RemoteInboundRtpStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp for this stats object in DOMHighResTimeStamp format. +id (**Mandatory**) | The unique identifier for this stats object. +ssrc (**Mandatory**) | The SSRC identifier of the RTP stream. +kind (**Mandatory**) | The type of media ('audio' or 'video'). +transportId | The ID of the transport used for this stream. +codecId | The ID of the codec used for this stream. +packetsReceived | The total number of packets received on this stream. +packetsLost | The total number of packets lost on this stream. +jitter | The jitter value for this stream in seconds. +localId | The ID of the local object corresponding to this remote stream. +roundTripTime | The most recent RTT measurement for this stream in seconds. +totalRoundTripTime | The cumulative RTT for all packets on this stream in seconds. +fractionLost | The fraction of packets lost on this stream, calculated over a time interval. +roundTripTimeMeasurements | The total number of RTT measurements for this stream. +appData | Additional information attached to this stats + +## OutboundRtpStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp for this stats object in DOMHighResTimeStamp format. +id (**Mandatory**) | The unique identifier for this stats object. +ssrc (**Mandatory**) | The SSRC identifier of the RTP stream. +kind (**Mandatory**) | The type of media ('audio' or 'video'). +qualityLimitationDurations (**Mandatory**) | The duration of quality limitation reasons categorized by type. +transportId | The ID of the transport used for this stream. +codecId | The ID of the codec used for this stream. +packetsSent | The total number of packets sent on this stream. +bytesSent | The total number of bytes sent on this stream. +mid | The media ID associated with this RTP stream. +mediaSourceId | The ID of the media source associated with this stream. +remoteId | The ID of the remote object corresponding to this stream. +rid | The RID value of the RTP stream. +headerBytesSent | The total number of header bytes sent on this stream. +retransmittedPacketsSent | The number of retransmitted packets sent on this stream. +retransmittedBytesSent | The number of retransmitted bytes sent on this stream. +rtxSsrc | The SSRC for the RTX stream, if applicable. +targetBitrate | The target bitrate for this RTP stream in bits per second. +totalEncodedBytesTarget | The total target encoded bytes for this stream. +frameWidth | The width of the frames sent in pixels. +frameHeight | The height of the frames sent in pixels. +framesPerSecond | The number of frames sent per second. +framesSent | The total number of frames sent on this stream. +hugeFramesSent | The total number of huge frames sent on this stream. +framesEncoded | The total number of frames encoded on this stream. +keyFramesEncoded | The total number of key frames encoded on this stream. +qpSum | The sum of QP values for all frames encoded on this stream. +totalEncodeTime | The total time spent encoding frames on this stream in seconds. +totalPacketSendDelay | The total delay for packets sent on this stream in seconds. +qualityLimitationReason | The reason for any quality limitation on this stream. +qualityLimitationResolutionChanges | The number of resolution changes due to quality limitations. +nackCount | The total number of NACK packets sent on this stream. +firCount | The total number of FIR packets sent on this stream. +pliCount | The total number of PLI packets sent on this stream. +encoderImplementation | The implementation of the encoder used for this stream. +powerEfficientEncoder | Indicates whether the encoder is power efficient. +active | Indicates whether this stream is actively sending data. +scalabilityMode | The scalability mode of the encoder used for this stream. +appData | Additional information attached to this stats. + +## RemoteOutboundRtpStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp for this stats object in DOMHighResTimeStamp format. +id (**Mandatory**) | The unique identifier for this stats object. +ssrc (**Mandatory**) | The SSRC identifier of the RTP stream. +kind (**Mandatory**) | The type of media ('audio' or 'video'). +transportId | The ID of the transport used for this stream. +codecId | The ID of the codec used for this stream. +packetsSent | The total number of packets sent on this stream. +bytesSent | The total number of bytes sent on this stream. +localId | The ID of the local object corresponding to this stream. +remoteTimestamp | The remote timestamp for this stats object in DOMHighResTimeStamp format. +reportsSent | The total number of reports sent on this stream. +roundTripTime | The current estimated round-trip time for this stream in seconds. +totalRoundTripTime | The total round-trip time for this stream in seconds. +roundTripTimeMeasurements | The total number of round-trip time measurements for this stream. +appData | Additional information attached to this stats + +## AudioSourceStats + + Field | Description --- | --- -close | Indicate that the server should close the connection -accessClaim | Holds a new claim to process +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +trackIdentifier (**Mandatory**) | The identifier of the media track. +kind (**Mandatory**) | The kind of media (audio/video). +audioLevel | The current audio level. +totalAudioEnergy | The total audio energy. +totalSamplesDuration | The total duration of audio samples. +echoReturnLoss | The echo return loss. +echoReturnLossEnhancement | The enhancement of echo return loss. +appData | Additional information attached to this stats + +## VideoSourceStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +trackIdentifier (**Mandatory**) | The identifier of the media track. +kind (**Mandatory**) | The kind of media (audio/video). +width (**Mandatory**) | The width of the video. +height (**Mandatory**) | The height of the video. +frames (**Mandatory**) | The total number of frames. +framesPerSecond (**Mandatory**) | The frames per second of the video. +appData | Additional information attached to this stats -## Engine +## AudioPlayoutStats -Field | Description ---- | --- -name | The name of the Engine -version | The version of the engine +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +kind (**Mandatory**) | The kind of media (audio/video). +synthesizedSamplesDuration (**Mandatory**) | The duration of synthesized audio samples. +synthesizedSamplesEvents (**Mandatory**) | The number of synthesized audio samples events. +totalSamplesDuration (**Mandatory**) | The total duration of all audio samples. +totalPlayoutDelay (**Mandatory**) | The total delay experienced during audio playout. +totalSamplesCount (**Mandatory**) | The total count of audio samples. +appData | Additional information attached to this stats + +## PeerConnectionTransportStats + + +Field | Description +--- | --- +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +dataChannelsOpened (**Mandatory**) | The number of data channels opened. +dataChannelsClosed (**Mandatory**) | The number of data channels closed. +appData | Additional information attached to this stats -## Platform +## DataChannelStats Field | Description --- | --- -type | The name of the platform -vendor | The name of the vendor -model | The name of the model +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +label (**Mandatory**) | The label of the data channel. +protocol (**Mandatory**) | The protocol of the data channel. +dataChannelIdentifier (**Mandatory**) | The identifier for the data channel. +state (**Mandatory**) | The state of the data channel (e.g., 'open', 'closed'). +messagesSent (**Mandatory**) | The number of messages sent on the data channel. +bytesSent (**Mandatory**) | The number of bytes sent on the data channel. +messagesReceived (**Mandatory**) | The number of messages received on the data channel. +bytesReceived (**Mandatory**) | The number of bytes received on the data channel. +appData | Additional information attached to this stats -## Browser +## IceTransportStats Field | Description --- | --- -name | The name of the operating system (e.g., Linux) the WebRTC app uses -version | The version of the operating system +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +packetsSent (**Mandatory**) | The number of packets sent. +packetsReceived (**Mandatory**) | The number of packets received. +bytesSent (**Mandatory**) | The number of bytes sent. +bytesReceived (**Mandatory**) | The number of bytes received. +iceRole (**Mandatory**) | The ICE role (e.g., 'controlling', 'controlled'). +iceLocalUsernameFragment (**Mandatory**) | The local username fragment for ICE. +dtlsState (**Mandatory**) | The DTLS transport state (e.g., 'new', 'connecting', 'connected'). +iceState (**Mandatory**) | The ICE transport state (e.g., 'new', 'checking', 'connected'). +selectedCandidatePairId (**Mandatory**) | The ID of the selected ICE candidate pair. +localCertificateId (**Mandatory**) | The ID of the local certificate. +remoteCertificateId (**Mandatory**) | The ID of the remote certificate. +tlsVersion (**Mandatory**) | The TLS version used for encryption. +dtlsCipher (**Mandatory**) | The DTLS cipher suite used. +dtlsRole (**Mandatory**) | The role in the DTLS handshake (e.g., 'client', 'server'). +srtpCipher (**Mandatory**) | The SRTP cipher used for encryption. +selectedCandidatePairChanges (**Mandatory**) | The number of changes to the selected ICE candidate pair. +appData | Additional information attached to this stats -## OperationSystem +## IceCandidateStats Field | Description --- | --- -name | The name of the operating system (e.g., Linux) the WebRTC app uses -version | The version of the operating system -versionName | The name of the version of the operating system +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +transportId (**Mandatory**) | The transport ID associated with the ICE candidate. +address (**Mandatory**) | The IP address of the ICE candidate (nullable). +port (**Mandatory**) | The port number of the ICE candidate. +protocol (**Mandatory**) | The transport protocol used by the candidate (e.g., 'udp', 'tcp'). +candidateType (**Mandatory**) | The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). +priority (**Mandatory**) | The priority of the ICE candidate. +url (**Mandatory**) | The URL of the ICE candidate. +relayProtocol (**Mandatory**) | The protocol used for the relay (e.g., 'tcp', 'udp'). +foundation (**Mandatory**) | A string representing the foundation for the ICE candidate. +relatedAddress (**Mandatory**) | The related address for the ICE candidate (if any). +relatedPort (**Mandatory**) | The related port for the ICE candidate (if any). +usernameFragment (**Mandatory**) | The username fragment for the ICE candidate. +tcpType (**Mandatory**) | The TCP type of the ICE candidate (e.g., 'active', 'passive'). +appData | Additional information attached to this stats -## MediaDevice +## IceCandidatePairStats Field | Description --- | --- -id | the provided id of the media input / output -kind | The media kind of the media device (Possible values are: videoinput,
audioinput,
audiooutput) -label | The name of the device - -## ExtensionStat - - +id (**Mandatory**) | The unique identifier for this RTCStats object. +timestamp (**Mandatory**) | The timestamp of when the stats were recorded, in seconds. +transportId (**Mandatory**) | The transport id of the connection this candidate pair belongs to. +localCandidateId (**Mandatory**) | The ID of the local ICE candidate in this pair. +remoteCandidateId (**Mandatory**) | The ID of the remote ICE candidate in this pair. +packetsSent (**Mandatory**) | The number of packets sent using this candidate pair. +packetsReceived (**Mandatory**) | The number of packets received using this candidate pair. +bytesSent (**Mandatory**) | The total number of bytes sent using this candidate pair. +bytesReceived (**Mandatory**) | The total number of bytes received using this candidate pair. +lastPacketSentTimestamp (**Mandatory**) | The timestamp of the last packet sent using this candidate pair. +lastPacketReceivedTimestamp (**Mandatory**) | The timestamp of the last packet received using this candidate pair. +totalRoundTripTime (**Mandatory**) | The total round trip time (RTT) for this candidate pair in seconds. +currentRoundTripTime (**Mandatory**) | The current round trip time (RTT) for this candidate pair in seconds. +availableOutgoingBitrate (**Mandatory**) | The available outgoing bitrate (in bits per second) for this candidate pair. +availableIncomingBitrate (**Mandatory**) | The available incoming bitrate (in bits per second) for this candidate pair. +requestsReceived (**Mandatory**) | The number of ICE connection requests received by this candidate pair. +requestsSent (**Mandatory**) | The number of ICE connection requests sent by this candidate pair. +responsesReceived (**Mandatory**) | The number of ICE connection responses received by this candidate pair. +responsesSent (**Mandatory**) | The number of ICE connection responses sent by this candidate pair. +consentRequestsSent (**Mandatory**) | The number of ICE connection consent requests sent by this candidate pair. +packetsDiscardedOnSend (**Mandatory**) | The number of packets discarded while attempting to send via this candidate pair. +bytesDiscardedOnSend (**Mandatory**) | The total number of bytes discarded while attempting to send via this candidate pair. +state | undefined (Possible values are: new,
inProgress,
failed,
succeeded) +nominated | Whether this candidate pair has been nominated. +appData | Additional information attached to this stats + +## CertificateStats + + Field | Description --- | --- -type (**Mandatory**) | The type of the extension stats the custom app provides -payload (**Mandatory**) | The payload of the extension stats the custom app provides - -## CustomCallEvent +timestamp (**Mandatory**) | The timestamp of the stat. +id (**Mandatory**) | A unique identifier for the stat. +fingerprint (**Mandatory**) | The fingerprint of the certificate. +fingerprintAlgorithm (**Mandatory**) | The algorithm used for the fingerprint (e.g., 'SHA-256'). +base64Certificate (**Mandatory**) | The certificate encoded in base64 format. +issuerCertificateId (**Mandatory**) | The certificate ID of the issuer (nullable). +appData | Additional information attached to this stats## PeerConnectionSample -Field | Description ---- | --- -name (**Mandatory**) | the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) -value | the value of the event -peerConnectionId | The unique identifier of the peer connection -mediaTrackId | The identifier of the media track the event is related to -message | the human readable message of the event -attachments | Additional attachment relevant for the event -timestamp | The EPOCH timestamp the event is generated - -## CustomObserverEvent - - -Field | Description ---- | --- -name (**Mandatory**) | the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) -mediaTrackId | The identifier of the media track the event is related to -message | the human readable message of the event -attachments | Additional attachment relevant for the event -timestamp | The EPOCH timestamp the event is generated - -## DataChannel - - -Field | Description ---- | --- -peerConnectionId (**Mandatory**) | The id of the peer connection the data channel is assigned to -dataChannelIdentifier | The id of the data channel assigned by the peer connection when it is opened -label | The label of the data channel -protocol | The protocol the data channel utilizes -state | The state of the data channel -messageSent | The total number of messages sent on the data channel -bytesSent | The total number of bytes sent on the data channel -messageReceived | The total number of messages received on the data channel -bytesReceived | The total number of bytes received on the data channel - -## PeerConnectionTransport - - -Field | Description ---- | --- -transportId (**Mandatory**) | The identifier of the transport the ICE candidate pair is negotiated on -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -label | The label associated with the peer connection -packetsSent | Represents the total number of packets sent on the corresponding transport -packetsReceived | Represents the total number of packets received on the corresponding transport -bytesSent | Represents the total amount of bytes sent on the corresponding transport -bytesReceived | Represents the total amount of bytes received on the corresponding transport -iceRole | Represents the current role of ICE under DTLS Transport -iceLocalUsernameFragment | Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport -dtlsState | Represents the current state of DTLS for the peer connection transport layer -selectedCandidatePairId | The identifier of the candidate pair the transport currently uses -iceState | Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer -localCertificateId | If DTLS negotiated, it gives the ID of the local certificate -remoteCertificateId | If DTLS negotiated, it gives the ID of the remote certificate -tlsVersion | Represents the version number of the TLS used in the corresponding transport -dtlsCipher | Represents the name of the DTLS cipher used in the corresponding transport -dtlsRole | The role this host plays in DTLS negotiations (Possible values are: client,
server,
unknown) -srtpCipher | Represents the name of the SRTP cipher used in the corresponding transport -tlsGroup | Represents the name of the IANA TLS Supported Groups used in the corresponding transport -selectedCandidatePairChanges | The total number of candidate pair changes over the peer connection - -## IceCandidatePair - - -Field | Description ---- | --- -candidatePairId (**Mandatory**) | The unique identifier of the peer connection -peerConnectionId (**Mandatory**) | The unique identifier of the peer connection -label | The label associated with the peer connection -transportId | The identifier of the transport the ice candidate pair is negotiated on -localCandidateId | The unique identifier of the candidate the negotiated pair is selected on the local side -remoteCandidateId | The unique identifier of the candidate the negotiated pair is selected on the remote side -state | The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport -nominated | Indicates if the ice candidate pair is nominated or not -packetsSent | The total number of packets sent using the last selected candidate pair over the corresponding transport -packetsReceived | The total number of packets received using the last selected candidate pair over the corresponding transport -bytesSent | The total number of bytes sent using the last selected candidate pair over the corresponding transport -bytesReceived | The total number of bytes received using the last selected candidate pair over the corresponding transport -lastPacketSentTimestamp | Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) -totalRoundTripTime | Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport -currentRoundTripTime | Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport -availableOutgoingBitrate | The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport -availableIncomingBitrate | The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport -requestsReceived | Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport -requestsSent | Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport -responsesReceived | Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport -responsesSent | Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport -consentRequestsSent | Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport -packetsDiscardedOnSend | Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport -bytesDiscardedOnSend | Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - -## MediaSourceStat - - -Field | Description ---- | --- -trackIdentifier | The unique identifier of the corresponding media track -kind | The type of the media the MediaSource produces. (Possible values are: audio,
video) -relayedSource | Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. -audioLevel | The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. -totalAudioEnergy | The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy -totalSamplesDuration | The duration of the audio type media source -echoReturnLoss | if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en -echoReturnLossEnhancement | www.itu.int/rec/T-REC-G.168-201504-I/en -droppedSamplesDuration | The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source -droppedSamplesEvents | A counter increases every time a sample is dropped after a non-dropped sample -totalCaptureDelay | Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source -totalSamplesCaptured | The total number of captured samples reaching the audio source -width | The width, in pixels, of the last frame originating from the media source -height | The height, in pixels, of the last frame originating from the media source -frames | The total number of frames originating from the media source -framesPerSecond | The number of frames originating from the media source in the last second - -## MediaCodecStats +docs Field | Description --- | --- -payloadType | Payload type used in the RTP encoding/decoding process. -codecType | Indicates the role of the codec (encode or decode) (Possible values are: encode,
decode) -mimeType | The MIME type of the media, e.g., audio/opus. -clockRate | The clock rate used in RTP transport to generate the timestamp for the carried frames -channels | Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented -sdpFmtpLine | The SDP line determines the codec +peerConnectionId (**Mandatory**) | Unique identifier of the stats object. +appData | Additional information attached to this sample +codecs | Codec items +inboundRtps | Inbound RTPs +remoteInboundRtps | Remote Inbound RTPs +outboundRtps | Outbound RTPs +remoteOutboundRtps | Remote Outbound RTPs +audioSources | Audio Source Stats +videoSources | Video Source Stats +audioPlayouts | Audio Playout Stats +peerConnectionTransports | PeerConnection Transport Stats +dataChannels | Data Channels Stats +iceTransports | ICE Transport Stats +iceCandidates | ICE Candidate Stats +iceCandidatePairs | ICE Candidate Pair Stats +certificates | Certificates -## Certificate +## ClientEvent Field | Description --- | --- -fingerprint | The fingerprint of the certificate. -fingerprintAlgorithm | The hash function used to generate the fingerprint. -base64Certificate | The DER encoded base-64 representation of the certificate. -issuerCertificateId | The ID of the next certificate in the certificate chain +type (**Mandatory**) | The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). +payload | The value associated with the event, if applicable. +peerConnectionId | The unique identifier of the peer connection for which the event was generated. +trackId | The identifier of the media track related to the event, if applicable. +ssrc | The SSRC (Synchronization Source) identifier associated with the event, if applicable. +timestamp | The timestamp in epoch format when the event was generated. -## InboundAudioTrack +## ClientMetaData Field | Description --- | --- -ssrc (**Mandatory**) | The RTP SSRC field -trackId | The ID of the track -peerConnectionId | The unique generated identifier of the peer connection the inbound audio track belongs to -remoteClientId | The remote client ID the source outbound track belongs to -sfuStreamId | The ID of the SFU stream this track is synced from -sfuSinkId | The ID of the sink this track belongs to in the SFU -packetsReceived | The total number of packets received on the corresponding synchronization source -packetsLost | The total number of bytes received on the corresponding synchronization source -jitter | The corresponding synchronization source reported jitter -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) -headerBytesReceived | Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) -packetsDiscarded | The total number of packets that missed the playout point and were therefore discarded by the jitter buffer -fecPacketsReceived | Total number of FEC packets received over the corresponding synchronization source (ssrc) -fecPacketsDiscarded | Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. -bytesReceived | Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) -totalProcessingDelay | The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded -estimatedPlayoutTimestamp | The estimated playout time of the corresponding synchronization source -jitterBufferDelay | The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. -jitterBufferTargetDelay | This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. -jitterBufferEmittedCount | The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) -jitterBufferMinimumDelay | This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it -totalSamplesReceived | The total number of audio samples received on the corresponded RTP stream -concealedSamples | The total number of samples decoded by the media decoder from the corresponded RTP stream -silentConcealedSamples | The total number of samples concealed from the corresponded RTP stream -concealmentEvents | The total number of concealed event emitted to the media codec by the corresponded jitterbuffer -insertedSamplesForDeceleration | The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) -removedSamplesForAcceleration | The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) -audioLevel | The current audio level -totalAudioEnergy | Represents the energy level reported by the media source -totalSamplesDuration | Represents the total duration of the audio samples the media source actually transconverted in seconds -decoderImplementation | Indicate the name of the decoder implementation library -packetsSent | Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source -bytesSent | Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source -remoteTimestamp | The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) -reportsSent | The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to -roundTripTime | Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream -totalRoundTripTime | Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream -roundTripTimeMeasurements | Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream -synthesizedSamplesDuration | This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized -synthesizedSamplesEvents | The number of synthesized samples events. -totalPlayoutDelay | The playout delay includes the delay from being emitted to the actual time of playout on the device -totalSamplesCount | When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - -## InboundVideoTrack - - -Field | Description ---- | --- -ssrc (**Mandatory**) | The RTP SSRC field -trackId | The id of the track -peerConnectionId | The unique generated identifier of the peer connection the inbound audio track belongs to -remoteClientId | The remote clientId the source outbound track belongs to -sfuStreamId | The id of the SFU stream this track is sinked from -sfuSinkId | The id of the sink this track belongs to in the SFU -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -framesDropped | The number of frames dropped prior to decode or missing chunks -lastPacketReceivedTimestamp | Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) -headerBytesReceived | Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) -packetsDiscarded | The total number of packets missed the playout point and therefore discarded by the jitterbuffer -fecPacketsReceived | Total number of FEC packets received over the corresponding synchronization source (ssrc) -fecPacketsDiscarded | Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -bytesReceived | Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) -totalProcessingDelay | The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded -estimatedPlayoutTimestamp | The estimated playout time of the corresponded synchronization source -jitterBufferDelay | The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. -jitterBufferTargetDelay | This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. -jitterBufferEmittedCount | The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) -jitterBufferMinimumDelay | This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it -decoderImplementation | Indicate the name of the decoder implementation library -framesDecoded | The total number of frames decoded on the corresponded RTP stream -keyFramesDecoded | The total number of keyframes decoded on the corresponding RTP stream -frameWidth | The width of the frame of the video sent by the remote source on the corresponding RTP stream -frameHeight | The height of the frame of the video sent by the remote source on the corresponding RTP stream -framesPerSecond | The frame rate of the video sent by the remote source on the corresponding RTP stream -qpSum | The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream -totalDecodeTime | The total time spent on decoding video on the corresponding RTP stream -totalInterFrameDelay | The total interframe delay on the corresponding RTP stream -totalSquaredInterFrameDelay | The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays -firCount | The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream -pliCount | The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream -framesReceived | The total number of frames received on the corresponding RTP stream -packetsSent | Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source -bytesSent | Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source -remoteTimestamp | The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) -reportsSent | The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to -roundTripTime | Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream -totalRoundTripTime | Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream -roundTripTimeMeasurements | Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - -## OutboundAudioTrack - +type (**Mandatory**) | The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). +payload | The value associated with the event, if applicable. +peerConnectionId | The unique identifier of the peer connection for which the event was generated. +trackId | The identifier of the media track related to the event, if applicable. +ssrc | The SSRC (Synchronization Source) identifier associated with the event, if applicable. +timestamp | The timestamp in epoch format when the event was generated. -Field | Description ---- | --- -ssrc (**Mandatory**) | The RTP SSRC field -trackId | The id of the track -peerConnectionId | The unique generated identifier of the peer connection the inbound audio track belongs to -sfuStreamId | The id of the SFU stream this track is related to -packetsSent | The total number of packets sent on the corresponded synchronization source -bytesSent | The total number of bytes sent on the corresponded synchronization source -rid | The rid encoding parameter of the corresponded synchronization source -headerBytesSent | Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) -retransmittedPacketsSent | Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). -retransmittedBytesSent | Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). -targetBitrate | Reflects the current encoder target in bits per second. -totalEncodedBytesTarget | The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets -totalPacketSendDelay | The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source -averageRtcpInterval | The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) -encoderImplementation | Indicate the name of the encoder implementation library -active | Indicates whether this RTP stream is configured to be sent or disabled -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -roundTripTime | RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source -totalRoundTripTime | The sum of RTT measurements belongs to the corresponded synchronization source -fractionLost | The receiver reported fractional lost belongs to the corresponded synchronization source -roundTripTimeMeasurements | The total number of calculated RR measurements received on this source -relayedSource | True if the corresponded media source is remote, false otherwise (or null depending on browser and version) -audioLevel | Represents the audio level reported by the media source -totalAudioEnergy | Represents the energy level reported by the media source -totalSamplesDuration | Represents the total duration of the audio samples the media source actually transconverted in seconds -echoReturnLoss | Represents the echo cancellation in decibels corresponded to the media source. -echoReturnLossEnhancement | Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. -droppedSamplesDuration | The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source -droppedSamplesEvents | A counter increases every time a sample is dropped after a non-dropped sample -totalCaptureDelay | Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source -totalSamplesCaptured | The total number of captured samples reaching the audio source - -## OutboundVideoTrack +## ExtensionStat Field | Description --- | --- -ssrc (**Mandatory**) | The RTP SSRC field -trackId | The id of the track -peerConnectionId | The unique generated identifier of the peer connection the inbound audio track belongs to -sfuStreamId | The id of the SFU stream this track is related to -packetsSent | The total number of packets sent on the corresponded synchronization source -bytesSent | The total number of bytes sent on the corresponded synchronization source -rid | The rid encoding parameter of the corresponded synchronization source -headerBytesSent | Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) -retransmittedPacketsSent | Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). -retransmittedBytesSent | Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). -targetBitrate | Reflects the current encoder target in bits per second. -totalEncodedBytesTarget | The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets -totalPacketSendDelay | The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source -averageRtcpInterval | The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) -nackCount | Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) -encoderImplementation | Indicate the name of the encoder implementation library -active | Indicates whether this RTP stream is configured to be sent or disabled -frameWidth | The frame width in pixels of the frames targeted by the media encoder -frameHeight | The frame height in pixels of the frames targeted by the media encoder -framesPerSecond | The encoded number of frames in the last second on the corresponding media source -framesSent | The total number of frames sent on the corresponding RTP stream -hugeFramesSent | The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream -framesEncoded | The total number of frames encoded by the media source -keyFramesEncoded | The total number of keyframes encoded on the corresponding RTP stream -qpSum | The sum of the QP the media encoder provided on the corresponding RTP stream. -totalEncodeTime | The total time in seconds spent in encoding media frames for the corresponding RTP stream. -qualityLimitationDurationNone | Time elapsed in seconds when the RTC connection has not limited the quality -qualityLimitationDurationCPU | Time elapsed in seconds the RTC connection had a limitation because of CPU -qualityLimitationDurationBandwidth | Time elapsed in seconds the RTC connection had a limitation because of Bandwidth -qualityLimitationDurationOther | Time elapsed in seconds the RTC connection had a limitation because of Other factor -qualityLimitationReason | Indicate a reason for the quality limitation of the corresponded synchronization source -qualityLimitationResolutionChanges | The total number of resolution changes occurred on the corresponded RTP stream due to quality changes -firCount | The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream -pliCount | The total number of Picture Loss Indication sent on the corresponded RTP stream -packetsReceived | The total number of packets received on the corresponded synchronization source -packetsLost | The total number of bytes received on the corresponded synchronization source -jitter | The corresponded synchronization source reported jitter -roundTripTime | RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source -totalRoundTripTime | The sum of RTT measurements belongs to the corresponded synchronization source -fractionLost | The receiver reported fractional lost belongs to the corresponded synchronization source -roundTripTimeMeasurements | The total number of calculated RR measurements received on this source -framesDropped | The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream -relayedSource | True if the corresponded media source is remote, false otherwise (or null depending on browser and version) -width | The width, in pixels, of the last frame originating from the media source -height | The height, in pixels, of the last frame originating from the media source -frames | The total number of frames originated from the media source - -## IceLocalCandidate +type (**Mandatory**) | The type of the extension stats the custom app provides +payload (**Mandatory**) | The payload of the extension stats the custom app provides## ClientSample -Field | Description ---- | --- -peerConnectionId | Refers to the peer connection the local candidate belongs to -id | The unique identifier of the local candidate -address | The address of the local endpoint (Ipv4, Ipv6, FQDN) -port | The port number of the local endpoint the ICE uses -protocol | The protocol for the ICE (Possible values are: tcp,
udp) -candidateType | The type of the local candidate -priority | The priority of the local candidate -url | The url of the ICE server -relayProtocol | The relay protocol the local candidate uses (Possible values are: tcp,
udp,
tls) - -## IceRemoteCandidate +docs Field | Description --- | --- -peerConnectionId | Refers to the peer connection the local candidate belongs to -id | The unique identifier of the local candidate -address | The address of the local endpoint (Ipv4, Ipv6, FQDN) -port | The port number of the local endpoint the ICE uses -protocol | The protocol for the ICE (Possible values are: tcp,
udp) -candidateType | The type of the local candidate -priority | The priority of the local candidate -url | The url of the ICE server -relayProtocol | The relay protocol the local candidate uses (Possible values are: tcp,
udp,
tls)## ClientSample +clientId (**Mandatory**) | Unique id of the client providing samples. +timestamp (**Mandatory**) | The timestamp the sample is created in GMT +callId | the unique identifier of the call or session +appData | Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) +peerConnections | Samples taken PeerConnections +clientEvents | A list of additional client events. +clientMetaItems | A list of additional client events. +extensionStats | The WebRTC app provided custom stats payload -docs +## Controls Field | Description --- | --- -clientId (**Mandatory**) | Unique id of the client providing samples. Must be a valid UUID. -timestamp (**Mandatory**) | The timestamp the sample is created in GMT -callId | If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. -sampleSeq | The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. -roomId | The WebRTC app configured room id the client joined for the call. -userId | The WebRTC app configured human-readable user id the client is joined. -engine | WebRTC App provided information related to the engine the client uses. -platform | WebRTC App provided information related to the platform the client uses. -browser | WebRTC App provided information related to the browser the client uses. -os | WebRTC App provided information related to the operating system the client uses. -mediaConstraints | The WebRTC app provided list of the media constraints the client has. -mediaDevices | The WebRTC app provided list of the media devices the client has. -userMediaErrors | The WebRTC app provided list of user media errors the client has. -extensionStats | The WebRTC app provided custom stats payload -customCallEvents | User provided custom call events -customObserverEvents | User provided custom observer events -iceServers | The WebRTC app provided list of ICE servers the client used. -localSDPs | The local part of the Signal Description Protocol to establish connections -dataChannels | Measurements about the data channels currently available on peer connections -pcTransports | Transport stats of Peer Connection -iceCandidatePairs | Candidate pair stats -mediaSources | WebRTC App provided information related to the operation system the client uses. -codecs | List of codec the client has -certificates | List of certificates the client provided -inboundAudioTracks | List of compound measurements related to inbound audio tracks -inboundVideoTracks | List of compound measurements related to inbound video tracks -outboundAudioTracks | List of compound measurements related to outbound audio tracks -outboundVideoTracks | List of compound measurements related to outbound video tracks -iceLocalCandidates | List of local ICE candidates -iceRemoteCandidates | List of remote ICE candidates -timeZoneOffsetInHours | The offset from GMT in hours -marker | Special marker for the samples +close | Indicate that the server should close the connection +accessClaim | Holds a new claim to process ## CustomSfuEvent @@ -739,7 +699,6 @@ Observer created reports related to events (call started, call ended, client joi Field | Description --- | --- controls | Additional control flags indicate various operation has to be performed -clientSamples | Samples taken from the client sfuSamples | Samples taken from an Sfu turnSamples | Samples taken from the TURN server diff --git a/npm-samples-lib/package.json b/npm-samples-lib/package.json index 068503db..a5f0b8bd 100644 --- a/npm-samples-lib/package.json +++ b/npm-samples-lib/package.json @@ -1,6 +1,6 @@ { "name": "@observertc/sample-schemas-js", - "version": "2.2.12", + "version": "3.0.0", "description": "ObserveRTC Generated Library for Sample Schemas", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/npm-samples-lib/src/index.ts b/npm-samples-lib/src/index.ts index d926a7cf..9488c055 100644 --- a/npm-samples-lib/src/index.ts +++ b/npm-samples-lib/src/index.ts @@ -1,3 +1,4 @@ +export * from "./samples/ClientSample"; export * from "./samples/Samples"; export * as W3CStats from "./w3c/W3cStatsIdentifiers"; -export const version = "2.2.12"; \ No newline at end of file +export const version = "3.0.0"; \ No newline at end of file diff --git a/npm-samples-lib/src/samples/ClientSample.ts b/npm-samples-lib/src/samples/ClientSample.ts new file mode 100644 index 00000000..7722bdcc --- /dev/null +++ b/npm-samples-lib/src/samples/ClientSample.ts @@ -0,0 +1,1608 @@ + +export const schemaVersion = "3.0.0"; + +/** +* The WebRTC app provided custom stats payload +*/ +export type ExtensionStat = { + /** + * The type of the extension stats the custom app provides + */ + type: string; + + /** + * The payload of the extension stats the custom app provides + */ + payload: string; + +} + +/** +* A list of additional client events. +*/ +export type ClientMetaData = { + /** + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + */ + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; + + /** + * The identifier of the media track related to the event, if applicable. + */ + trackId?: string; + + /** + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. + */ + ssrc?: number; + + /** + * The timestamp in epoch format when the event was generated. + */ + timestamp?: number; + +} + +/** +* A list of additional client events. +*/ +export type ClientEvent = { + /** + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + */ + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; + + /** + * The identifier of the media track related to the event, if applicable. + */ + trackId?: string; + + /** + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. + */ + ssrc?: number; + + /** + * The timestamp in epoch format when the event was generated. + */ + timestamp?: number; + +} + +/** +* Certificates +*/ +export type CertificateStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The fingerprint of the certificate. + */ + fingerprint: string; + + /** + * The algorithm used for the fingerprint (e.g., 'SHA-256'). + */ + fingerprintAlgorithm: string; + + /** + * The certificate encoded in base64 format. + */ + base64Certificate: string; + + /** + * The certificate ID of the issuer (nullable). + */ + issuerCertificateId: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Candidate Pair Stats +*/ +export type IceCandidatePairStats = { + /** + * The unique identifier for this RTCStats object. + */ + id: string; + + /** + * The timestamp of when the stats were recorded, in seconds. + */ + timestamp: number; + + /** + * The transport id of the connection this candidate pair belongs to. + */ + transportId: string; + + /** + * The ID of the local ICE candidate in this pair. + */ + localCandidateId: string; + + /** + * The ID of the remote ICE candidate in this pair. + */ + remoteCandidateId: string; + + /** + * The number of packets sent using this candidate pair. + */ + packetsSent: number; + + /** + * The number of packets received using this candidate pair. + */ + packetsReceived: number; + + /** + * The total number of bytes sent using this candidate pair. + */ + bytesSent: number; + + /** + * The total number of bytes received using this candidate pair. + */ + bytesReceived: number; + + /** + * The timestamp of the last packet sent using this candidate pair. + */ + lastPacketSentTimestamp: number; + + /** + * The timestamp of the last packet received using this candidate pair. + */ + lastPacketReceivedTimestamp: number; + + /** + * The total round trip time (RTT) for this candidate pair in seconds. + */ + totalRoundTripTime: number; + + /** + * The current round trip time (RTT) for this candidate pair in seconds. + */ + currentRoundTripTime: number; + + /** + * The available outgoing bitrate (in bits per second) for this candidate pair. + */ + availableOutgoingBitrate: number; + + /** + * The available incoming bitrate (in bits per second) for this candidate pair. + */ + availableIncomingBitrate: number; + + /** + * The number of ICE connection requests received by this candidate pair. + */ + requestsReceived: number; + + /** + * The number of ICE connection requests sent by this candidate pair. + */ + requestsSent: number; + + /** + * The number of ICE connection responses received by this candidate pair. + */ + responsesReceived: number; + + /** + * The number of ICE connection responses sent by this candidate pair. + */ + responsesSent: number; + + /** + * The number of ICE connection consent requests sent by this candidate pair. + */ + consentRequestsSent: number; + + /** + * The number of packets discarded while attempting to send via this candidate pair. + */ + packetsDiscardedOnSend: number; + + /** + * The total number of bytes discarded while attempting to send via this candidate pair. + */ + bytesDiscardedOnSend: number; + + state?: "new" | "inProgress" | "failed" | "succeeded"; + /** + * Whether this candidate pair has been nominated. + */ + nominated?: boolean; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Candidate Stats +*/ +export type IceCandidateStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The transport ID associated with the ICE candidate. + */ + transportId: string; + + /** + * The IP address of the ICE candidate (nullable). + */ + address: string; + + /** + * The port number of the ICE candidate. + */ + port: number; + + /** + * The transport protocol used by the candidate (e.g., 'udp', 'tcp'). + */ + protocol: string; + + /** + * The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). + */ + candidateType: string; + + /** + * The priority of the ICE candidate. + */ + priority: number; + + /** + * The URL of the ICE candidate. + */ + url: string; + + /** + * The protocol used for the relay (e.g., 'tcp', 'udp'). + */ + relayProtocol: string; + + /** + * A string representing the foundation for the ICE candidate. + */ + foundation: string; + + /** + * The related address for the ICE candidate (if any). + */ + relatedAddress: string; + + /** + * The related port for the ICE candidate (if any). + */ + relatedPort: number; + + /** + * The username fragment for the ICE candidate. + */ + usernameFragment: string; + + /** + * The TCP type of the ICE candidate (e.g., 'active', 'passive'). + */ + tcpType: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Transport Stats +*/ +export type IceTransportStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The number of packets sent. + */ + packetsSent: number; + + /** + * The number of packets received. + */ + packetsReceived: number; + + /** + * The number of bytes sent. + */ + bytesSent: number; + + /** + * The number of bytes received. + */ + bytesReceived: number; + + /** + * The ICE role (e.g., 'controlling', 'controlled'). + */ + iceRole: string; + + /** + * The local username fragment for ICE. + */ + iceLocalUsernameFragment: string; + + /** + * The DTLS transport state (e.g., 'new', 'connecting', 'connected'). + */ + dtlsState: string; + + /** + * The ICE transport state (e.g., 'new', 'checking', 'connected'). + */ + iceState: string; + + /** + * The ID of the selected ICE candidate pair. + */ + selectedCandidatePairId: string; + + /** + * The ID of the local certificate. + */ + localCertificateId: string; + + /** + * The ID of the remote certificate. + */ + remoteCertificateId: string; + + /** + * The TLS version used for encryption. + */ + tlsVersion: string; + + /** + * The DTLS cipher suite used. + */ + dtlsCipher: string; + + /** + * The role in the DTLS handshake (e.g., 'client', 'server'). + */ + dtlsRole: string; + + /** + * The SRTP cipher used for encryption. + */ + srtpCipher: string; + + /** + * The number of changes to the selected ICE candidate pair. + */ + selectedCandidatePairChanges: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Data Channels Stats +*/ +export type DataChannelStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The label of the data channel. + */ + label: string; + + /** + * The protocol of the data channel. + */ + protocol: string; + + /** + * The identifier for the data channel. + */ + dataChannelIdentifier: number; + + /** + * The state of the data channel (e.g., 'open', 'closed'). + */ + state: string; + + /** + * The number of messages sent on the data channel. + */ + messagesSent: number; + + /** + * The number of bytes sent on the data channel. + */ + bytesSent: number; + + /** + * The number of messages received on the data channel. + */ + messagesReceived: number; + + /** + * The number of bytes received on the data channel. + */ + bytesReceived: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* PeerConnection Transport Stats +*/ +export type PeerConnectionTransportStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The number of data channels opened. + */ + dataChannelsOpened: number; + + /** + * The number of data channels closed. + */ + dataChannelsClosed: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Audio Playout Stats +*/ +export type AudioPlayoutStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The duration of synthesized audio samples. + */ + synthesizedSamplesDuration: number; + + /** + * The number of synthesized audio samples events. + */ + synthesizedSamplesEvents: number; + + /** + * The total duration of all audio samples. + */ + totalSamplesDuration: number; + + /** + * The total delay experienced during audio playout. + */ + totalPlayoutDelay: number; + + /** + * The total count of audio samples. + */ + totalSamplesCount: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Video Source Stats +*/ +export type VideoSourceStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The identifier of the media track. + */ + trackIdentifier: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The width of the video. + */ + width: number; + + /** + * The height of the video. + */ + height: number; + + /** + * The total number of frames. + */ + frames: number; + + /** + * The frames per second of the video. + */ + framesPerSecond: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Audio Source Stats +*/ +export type AudioSourceStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The identifier of the media track. + */ + trackIdentifier: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The current audio level. + */ + audioLevel?: number; + + /** + * The total audio energy. + */ + totalAudioEnergy?: number; + + /** + * The total duration of audio samples. + */ + totalSamplesDuration?: number; + + /** + * The echo return loss. + */ + echoReturnLoss?: number; + + /** + * The enhancement of echo return loss. + */ + echoReturnLossEnhancement?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Remote Outbound RTPs +*/ +export type RemoteOutboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets sent on this stream. + */ + packetsSent?: number; + + /** + * The total number of bytes sent on this stream. + */ + bytesSent?: number; + + /** + * The ID of the local object corresponding to this stream. + */ + localId?: string; + + /** + * The remote timestamp for this stats object in DOMHighResTimeStamp format. + */ + remoteTimestamp?: number; + + /** + * The total number of reports sent on this stream. + */ + reportsSent?: number; + + /** + * The current estimated round-trip time for this stream in seconds. + */ + roundTripTime?: number; + + /** + * The total round-trip time for this stream in seconds. + */ + totalRoundTripTime?: number; + + /** + * The total number of round-trip time measurements for this stream. + */ + roundTripTimeMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* The duration of quality limitation reasons categorized by type. +*/ +export type QualityLimitationDurations = { + /** + * Duration of no quality limitation in seconds. + */ + none: number; + + /** + * Duration of CPU-based quality limitation in seconds. + */ + cpu: number; + + /** + * Duration of bandwidth-based quality limitation in seconds. + */ + bandwidth: number; + + /** + * Duration of other quality limitation reasons in seconds. + */ + other: number; + +} + +/** +* Outbound RTPs +*/ +export type OutboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The duration of quality limitation reasons categorized by type. + */ + qualityLimitationDurations: QualityLimitationDurations; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets sent on this stream. + */ + packetsSent?: number; + + /** + * The total number of bytes sent on this stream. + */ + bytesSent?: number; + + /** + * The media ID associated with this RTP stream. + */ + mid?: string; + + /** + * The ID of the media source associated with this stream. + */ + mediaSourceId?: string; + + /** + * The ID of the remote object corresponding to this stream. + */ + remoteId?: string; + + /** + * The RID value of the RTP stream. + */ + rid?: string; + + /** + * The total number of header bytes sent on this stream. + */ + headerBytesSent?: number; + + /** + * The number of retransmitted packets sent on this stream. + */ + retransmittedPacketsSent?: number; + + /** + * The number of retransmitted bytes sent on this stream. + */ + retransmittedBytesSent?: number; + + /** + * The SSRC for the RTX stream, if applicable. + */ + rtxSsrc?: number; + + /** + * The target bitrate for this RTP stream in bits per second. + */ + targetBitrate?: number; + + /** + * The total target encoded bytes for this stream. + */ + totalEncodedBytesTarget?: number; + + /** + * The width of the frames sent in pixels. + */ + frameWidth?: number; + + /** + * The height of the frames sent in pixels. + */ + frameHeight?: number; + + /** + * The number of frames sent per second. + */ + framesPerSecond?: number; + + /** + * The total number of frames sent on this stream. + */ + framesSent?: number; + + /** + * The total number of huge frames sent on this stream. + */ + hugeFramesSent?: number; + + /** + * The total number of frames encoded on this stream. + */ + framesEncoded?: number; + + /** + * The total number of key frames encoded on this stream. + */ + keyFramesEncoded?: number; + + /** + * The sum of QP values for all frames encoded on this stream. + */ + qpSum?: number; + + /** + * The total time spent encoding frames on this stream in seconds. + */ + totalEncodeTime?: number; + + /** + * The total delay for packets sent on this stream in seconds. + */ + totalPacketSendDelay?: number; + + /** + * The reason for any quality limitation on this stream. + */ + qualityLimitationReason?: string; + + /** + * The number of resolution changes due to quality limitations. + */ + qualityLimitationResolutionChanges?: number; + + /** + * The total number of NACK packets sent on this stream. + */ + nackCount?: number; + + /** + * The total number of FIR packets sent on this stream. + */ + firCount?: number; + + /** + * The total number of PLI packets sent on this stream. + */ + pliCount?: number; + + /** + * The implementation of the encoder used for this stream. + */ + encoderImplementation?: string; + + /** + * Indicates whether the encoder is power efficient. + */ + powerEfficientEncoder?: boolean; + + /** + * Indicates whether this stream is actively sending data. + */ + active?: boolean; + + /** + * The scalability mode of the encoder used for this stream. + */ + scalabilityMode?: string; + + /** + * Additional information attached to this stats. + */ + appData?: Record; + +} + +/** +* Remote Inbound RTPs +*/ +export type RemoteInboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets received on this stream. + */ + packetsReceived?: number; + + /** + * The total number of packets lost on this stream. + */ + packetsLost?: number; + + /** + * The jitter value for this stream in seconds. + */ + jitter?: number; + + /** + * The ID of the local object corresponding to this remote stream. + */ + localId?: string; + + /** + * The most recent RTT measurement for this stream in seconds. + */ + roundTripTime?: number; + + /** + * The cumulative RTT for all packets on this stream in seconds. + */ + totalRoundTripTime?: number; + + /** + * The fraction of packets lost on this stream, calculated over a time interval. + */ + fractionLost?: number; + + /** + * The total number of RTT measurements for this stream. + */ + roundTripTimeMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Inbound RTPs +*/ +export type InboundRtpStats = { + /** + * The time the stats were collected, in high-resolution time. + */ + timestamp: number; + + /** + * Unique identifier of the stats object. + */ + id: string; + + /** + * Synchronization source identifier of the RTP stream. + */ + ssrc: number; + + /** + * Kind of the media (e.g., 'audio' or 'video'). + */ + kind: string; + + /** + * Identifier for the media track associated with the RTP stream. + */ + trackIdentifier: string; + + /** + * ID of the transport associated with the RTP stream. + */ + transportId?: string; + + /** + * ID of the codec used for the RTP stream. + */ + codecId?: string; + + /** + * Number of packets received on the RTP stream. + */ + packetsReceived?: number; + + /** + * Number of packets lost on the RTP stream. + */ + packetsLost?: number; + + /** + * Jitter of the RTP stream in seconds. + */ + jitter?: number; + + /** + * The MediaStream ID of the RTP stream. + */ + mid?: string; + + /** + * Remote stats object ID associated with the RTP stream. + */ + remoteId?: string; + + /** + * Number of frames decoded. + */ + framesDecoded?: number; + + /** + * Number of keyframes decoded. + */ + keyFramesDecoded?: number; + + /** + * Number of frames rendered. + */ + framesRendered?: number; + + /** + * Number of frames dropped. + */ + framesDropped?: number; + + /** + * Width of the decoded video frames. + */ + frameWidth?: number; + + /** + * Height of the decoded video frames. + */ + frameHeight?: number; + + /** + * Frame rate in frames per second. + */ + framesPerSecond?: number; + + /** + * Sum of the Quantization Parameter values for decoded frames. + */ + qpSum?: number; + + /** + * Total time spent decoding in seconds. + */ + totalDecodeTime?: number; + + /** + * Sum of inter-frame delays in seconds. + */ + totalInterFrameDelay?: number; + + /** + * Sum of squared inter-frame delays in seconds. + */ + totalSquaredInterFrameDelay?: number; + + /** + * Number of times playback was paused. + */ + pauseCount?: number; + + /** + * Total duration of pauses in seconds. + */ + totalPausesDuration?: number; + + /** + * Number of times playback was frozen. + */ + freezeCount?: number; + + /** + * Total duration of freezes in seconds. + */ + totalFreezesDuration?: number; + + /** + * Timestamp of the last packet received. + */ + lastPacketReceivedTimestamp?: number; + + /** + * Total header bytes received. + */ + headerBytesReceived?: number; + + /** + * Total packets discarded. + */ + packetsDiscarded?: number; + + /** + * Total bytes received from FEC. + */ + fecBytesReceived?: number; + + /** + * Total packets received from FEC. + */ + fecPacketsReceived?: number; + + /** + * Total FEC packets discarded. + */ + fecPacketsDiscarded?: number; + + /** + * Total bytes received on the RTP stream. + */ + bytesReceived?: number; + + /** + * Number of NACKs sent. + */ + nackCount?: number; + + /** + * Number of Full Intra Requests sent. + */ + firCount?: number; + + /** + * Number of Picture Loss Indications sent. + */ + pliCount?: number; + + /** + * Total processing delay in seconds. + */ + totalProcessingDelay?: number; + + /** + * Estimated timestamp of playout. + */ + estimatedPlayoutTimestamp?: number; + + /** + * Total jitter buffer delay in seconds. + */ + jitterBufferDelay?: number; + + /** + * Target delay for the jitter buffer in seconds. + */ + jitterBufferTargetDelay?: number; + + /** + * Number of packets emitted from the jitter buffer. + */ + jitterBufferEmittedCount?: number; + + /** + * Minimum delay of the jitter buffer in seconds. + */ + jitterBufferMinimumDelay?: number; + + /** + * Total audio samples received. + */ + totalSamplesReceived?: number; + + /** + * Number of concealed audio samples. + */ + concealedSamples?: number; + + /** + * Number of silent audio samples concealed. + */ + silentConcealedSamples?: number; + + /** + * Number of audio concealment events. + */ + concealmentEvents?: number; + + /** + * Number of audio samples inserted for deceleration. + */ + insertedSamplesForDeceleration?: number; + + /** + * Number of audio samples removed for acceleration. + */ + removedSamplesForAcceleration?: number; + + /** + * Audio level in the range [0.0, 1.0]. + */ + audioLevel?: number; + + /** + * Total audio energy in the stream. + */ + totalAudioEnergy?: number; + + /** + * Total duration of all received audio samples in seconds. + */ + totalSamplesDuration?: number; + + /** + * Total number of frames received. + */ + framesReceived?: number; + + /** + * Decoder implementation used for decoding frames. + */ + decoderImplementation?: string; + + /** + * Playout identifier for the RTP stream. + */ + playoutId?: string; + + /** + * Indicates if the decoder is power-efficient. + */ + powerEfficientDecoder?: boolean; + + /** + * Number of frames assembled from multiple packets. + */ + framesAssembledFromMultiplePackets?: number; + + /** + * Total assembly time for frames in seconds. + */ + totalAssemblyTime?: number; + + /** + * Number of retransmitted packets received. + */ + retransmittedPacketsReceived?: number; + + /** + * Number of retransmitted bytes received. + */ + retransmittedBytesReceived?: number; + + /** + * SSRC of the retransmission stream. + */ + rtxSsrc?: number; + + /** + * SSRC of the FEC stream. + */ + fecSsrc?: number; + + /** + * Total corruption probability of packets. + */ + totalCorruptionProbability?: number; + + /** + * Total squared corruption probability of packets. + */ + totalSquaredCorruptionProbability?: number; + + /** + * Number of corruption measurements. + */ + corruptionMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Codec items +*/ +export type CodecStats = { + /** + * The timestamp when the stats were generated. + */ + timestamp: number; + + /** + * The type of the stats. + */ + type: string; + + /** + * The unique identifier for the stats object. + */ + id: string; + + /** + * The payload type of the codec. + */ + payloadType: number; + + /** + * The identifier of the transport associated with the codec. + */ + transportId: string; + + /** + * The MIME type of the codec. + */ + mimeType: string; + + /** + * The clock rate of the codec in Hz. + */ + clockRate?: number; + + /** + * The number of audio channels for the codec, if applicable. + */ + channels?: number; + + /** + * The SDP format-specific parameters line for the codec. + */ + sdpFmtpLine?: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* docs +*/ +export type PeerConnectionSample = { + /** + * Unique identifier of the stats object. + */ + peerConnectionId: string; + + /** + * Additional information attached to this sample + */ + appData?: Record; + + /** + * Codec items + */ + codecs?: CodecStats[]; + + /** + * Inbound RTPs + */ + inboundRtps?: InboundRtpStats[]; + + /** + * Remote Inbound RTPs + */ + remoteInboundRtps?: RemoteInboundRtpStats[]; + + /** + * Outbound RTPs + */ + outboundRtps?: OutboundRtpStats[]; + + /** + * Remote Outbound RTPs + */ + remoteOutboundRtps?: RemoteOutboundRtpStats[]; + + /** + * Audio Source Stats + */ + audioSources?: AudioSourceStats[]; + + /** + * Video Source Stats + */ + videoSources?: VideoSourceStats[]; + + /** + * Audio Playout Stats + */ + audioPlayouts?: AudioPlayoutStats[]; + + /** + * PeerConnection Transport Stats + */ + peerConnectionTransports?: PeerConnectionTransportStats[]; + + /** + * Data Channels Stats + */ + dataChannels?: DataChannelStats[]; + + /** + * ICE Transport Stats + */ + iceTransports?: IceTransportStats[]; + + /** + * ICE Candidate Stats + */ + iceCandidates?: IceCandidateStats[]; + + /** + * ICE Candidate Pair Stats + */ + iceCandidatePairs?: IceCandidatePairStats[]; + + /** + * Certificates + */ + certificates?: CertificateStats[]; + +} + +/** +* docs +*/ +export type ClientSample = { + /** + * Unique id of the client providing samples. + */ + clientId: string; + + /** + * The timestamp the sample is created in GMT + */ + timestamp: number; + + /** + * the unique identifier of the call or session + */ + callId?: string; + + /** + * Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) + */ + appData?: Record; + + /** + * Samples taken PeerConnections + */ + peerConnections?: PeerConnectionSample[]; + + /** + * A list of additional client events. + */ + clientEvents?: ClientEvent[]; + + /** + * A list of additional client events. + */ + clientMetaItems?: ClientMetaData[]; + + /** + * The WebRTC app provided custom stats payload + */ + extensionStats?: ExtensionStat[]; + +} diff --git a/npm-samples-lib/src/samples/Samples.ts b/npm-samples-lib/src/samples/Samples.ts index 0da37a91..95ddfaa2 100644 --- a/npm-samples-lib/src/samples/Samples.ts +++ b/npm-samples-lib/src/samples/Samples.ts @@ -1,5 +1,5 @@ -export const schemaVersion = "2.2.12"; +export const schemaVersion = "3.0.0"; /** * Session data @@ -941,1747 +941,6 @@ export type SfuSample = { } -/** -* List of remote ICE candidates -*/ -export type IceRemoteCandidate = { - /** - * Refers to the peer connection the local candidate belongs to - */ - peerConnectionId?: string; - - /** - * The unique identifier of the local candidate - */ - id?: string; - - /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) - */ - address?: string; - - /** - * The port number of the local endpoint the ICE uses - */ - port?: number; - - /** - * The protocol for the ICE - */ - protocol?: "tcp" | "udp"; - - /** - * The type of the local candidate - */ - candidateType?: string; - - /** - * The priority of the local candidate - */ - priority?: number; - - /** - * The url of the ICE server - */ - url?: string; - - /** - * The relay protocol the local candidate uses - */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} - -/** -* List of local ICE candidates -*/ -export type IceLocalCandidate = { - /** - * Refers to the peer connection the local candidate belongs to - */ - peerConnectionId?: string; - - /** - * The unique identifier of the local candidate - */ - id?: string; - - /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) - */ - address?: string; - - /** - * The port number of the local endpoint the ICE uses - */ - port?: number; - - /** - * The protocol for the ICE - */ - protocol?: "tcp" | "udp"; - - /** - * The type of the local candidate - */ - candidateType?: string; - - /** - * The priority of the local candidate - */ - priority?: number; - - /** - * The url of the ICE server - */ - url?: string; - - /** - * The relay protocol the local candidate uses - */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} - -/** -* List of compound measurements related to outbound video tracks -*/ -export type OutboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame height in pixels of the frames targeted by the media encoder - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponding media source - */ - framesPerSecond?: number; - - /** - * The total number of frames sent on the corresponding RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponding RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponding RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponding RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occurred on the corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} - -/** -* List of compound measurements related to outbound audio tracks -*/ -export type OutboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} - -/** -* List of compound measurements related to inbound video tracks -*/ -export type InboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote clientId the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The id of the SFU stream this track is sinked from - */ - sfuStreamId?: string; - - /** - * The id of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponding RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameHeight?: number; - - /** - * The frame rate of the video sent by the remote source on the corresponding RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream - */ - qpSum?: number; - - /** - * The total time spent on decoding video on the corresponding RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay on the corresponding RTP stream - */ - totalInterFrameDelay?: number; - - /** - * The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponding RTP stream - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} - -/** -* List of compound measurements related to inbound audio tracks -*/ -export type InboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The ID of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote client ID the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The ID of the SFU stream this track is synced from - */ - sfuStreamId?: string; - - /** - * The ID of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponding synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponding synchronization source - */ - packetsLost?: number; - - /** - * The corresponding synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets that missed the playout point and were therefore discarded by the jitter buffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponding synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} - -/** -* List of certificates the client provided -*/ -export type Certificate = { - /** - * The fingerprint of the certificate. - */ - fingerprint?: string; - - /** - * The hash function used to generate the fingerprint. - */ - fingerprintAlgorithm?: string; - - /** - * The DER encoded base-64 representation of the certificate. - */ - base64Certificate?: string; - - /** - * The ID of the next certificate in the certificate chain - */ - issuerCertificateId?: string; - -} - -/** -* List of codec the client has -*/ -export type MediaCodecStats = { - /** - * Payload type used in the RTP encoding/decoding process. - */ - payloadType?: string; - - /** - * Indicates the role of the codec (encode or decode) - */ - codecType?: "encode" | "decode"; - - /** - * The MIME type of the media, e.g., audio/opus. - */ - mimeType?: string; - - /** - * The clock rate used in RTP transport to generate the timestamp for the carried frames - */ - clockRate?: number; - - /** - * Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented - */ - channels?: number; - - /** - * The SDP line determines the codec - */ - sdpFmtpLine?: string; - -} - -/** -* WebRTC App provided information related to the operation system the client uses. -*/ -export type MediaSourceStat = { - /** - * The unique identifier of the corresponding media track - */ - trackIdentifier?: string; - - /** - * The type of the media the MediaSource produces. - */ - kind?: "audio" | "video"; - - /** - * Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. - */ - relayedSource?: boolean; - - /** - * The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. - */ - audioLevel?: number; - - /** - * The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy - */ - totalAudioEnergy?: number; - - /** - * The duration of the audio type media source - */ - totalSamplesDuration?: number; - - /** - * if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLoss?: number; - - /** - * www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originating from the media source - */ - frames?: number; - - /** - * The number of frames originating from the media source in the last second - */ - framesPerSecond?: number; - -} - -/** -* Candidate pair stats -*/ -export type IceCandidatePair = { - /** - * The unique identifier of the peer connection - */ - candidatePairId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The label associated with the peer connection - */ - label?: string; - - /** - * The identifier of the transport the ice candidate pair is negotiated on - */ - transportId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected on the local side - */ - localCandidateId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected on the remote side - */ - remoteCandidateId?: string; - - /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport - */ - state?: string; - - /** - * Indicates if the ice candidate pair is nominated or not - */ - nominated?: boolean; - - /** - * The total number of packets sent using the last selected candidate pair over the corresponding transport - */ - packetsSent?: number; - - /** - * The total number of packets received using the last selected candidate pair over the corresponding transport - */ - packetsReceived?: number; - - /** - * The total number of bytes sent using the last selected candidate pair over the corresponding transport - */ - bytesSent?: number; - - /** - * The total number of bytes received using the last selected candidate pair over the corresponding transport - */ - bytesReceived?: number; - - /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport - */ - totalRoundTripTime?: number; - - /** - * Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport - */ - currentRoundTripTime?: number; - - /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport - */ - availableOutgoingBitrate?: number; - - /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport - */ - availableIncomingBitrate?: number; - - /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport - */ - requestsReceived?: number; - - /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport - */ - requestsSent?: number; - - /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport - */ - responsesReceived?: number; - - /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport - */ - responsesSent?: number; - - /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport - */ - consentRequestsSent?: number; - - /** - * Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - */ - packetsDiscardedOnSend?: number; - - /** - * Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - */ - bytesDiscardedOnSend?: number; - -} - -/** -* Transport stats of Peer Connection -*/ -export type PeerConnectionTransport = { - /** - * The identifier of the transport the ICE candidate pair is negotiated on - */ - transportId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The label associated with the peer connection - */ - label?: string; - - /** - * Represents the total number of packets sent on the corresponding transport - */ - packetsSent?: number; - - /** - * Represents the total number of packets received on the corresponding transport - */ - packetsReceived?: number; - - /** - * Represents the total amount of bytes sent on the corresponding transport - */ - bytesSent?: number; - - /** - * Represents the total amount of bytes received on the corresponding transport - */ - bytesReceived?: number; - - /** - * Represents the current role of ICE under DTLS Transport - */ - iceRole?: string; - - /** - * Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport - */ - iceLocalUsernameFragment?: string; - - /** - * Represents the current state of DTLS for the peer connection transport layer - */ - dtlsState?: string; - - /** - * The identifier of the candidate pair the transport currently uses - */ - selectedCandidatePairId?: string; - - /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - */ - iceState?: string; - - /** - * If DTLS negotiated, it gives the ID of the local certificate - */ - localCertificateId?: string; - - /** - * If DTLS negotiated, it gives the ID of the remote certificate - */ - remoteCertificateId?: string; - - /** - * Represents the version number of the TLS used in the corresponding transport - */ - tlsVersion?: string; - - /** - * Represents the name of the DTLS cipher used in the corresponding transport - */ - dtlsCipher?: string; - - /** - * The role this host plays in DTLS negotiations - */ - dtlsRole?: "client" | "server" | "unknown"; - - /** - * Represents the name of the SRTP cipher used in the corresponding transport - */ - srtpCipher?: string; - - /** - * Represents the name of the IANA TLS Supported Groups used in the corresponding transport - */ - tlsGroup?: string; - - /** - * The total number of candidate pair changes over the peer connection - */ - selectedCandidatePairChanges?: number; - -} - -/** -* Measurements about the data channels currently available on peer connections -*/ -export type DataChannel = { - /** - * The id of the peer connection the data channel is assigned to - */ - peerConnectionId: string; - - /** - * The id of the data channel assigned by the peer connection when it is opened - */ - dataChannelIdentifier?: number; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol the data channel utilizes - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; - - /** - * The total number of messages sent on the data channel - */ - messageSent?: number; - - /** - * The total number of bytes sent on the data channel - */ - bytesSent?: number; - - /** - * The total number of messages received on the data channel - */ - messageReceived?: number; - - /** - * The total number of bytes received on the data channel - */ - bytesReceived?: number; - -} - -/** -* User provided custom observer events -*/ -export type CustomObserverEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} - -/** -* User provided custom call events -*/ -export type CustomCallEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * the value of the event - */ - value?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} - -/** -* The WebRTC app provided custom stats payload -*/ -export type ExtensionStat = { - /** - * The type of the extension stats the custom app provides - */ - type: string; - - /** - * The payload of the extension stats the custom app provides - */ - payload: string; - -} - -/** -* The WebRTC app provided list of the media devices the client has. -*/ -export type MediaDevice = { - /** - * the provided id of the media input / output - */ - id?: string; - - /** - * The media kind of the media device - */ - kind?: "videoinput" | "audioinput" | "audiooutput"; - - /** - * The name of the device - */ - label?: string; - -} - -/** -* WebRTC App provided information related to the operating system the client uses. -*/ -export type OperationSystem = { - /** - * The name of the operating system (e.g., Linux) the WebRTC app uses - */ - name?: string; - - /** - * The version of the operating system - */ - version?: string; - - /** - * The name of the version of the operating system - */ - versionName?: string; - -} - -/** -* WebRTC App provided information related to the browser the client uses. -*/ -export type Browser = { - /** - * The name of the operating system (e.g., Linux) the WebRTC app uses - */ - name?: string; - - /** - * The version of the operating system - */ - version?: string; - -} - -/** -* WebRTC App provided information related to the platform the client uses. -*/ -export type Platform = { - /** - * The name of the platform - */ - type?: string; - - /** - * The name of the vendor - */ - vendor?: string; - - /** - * The name of the model - */ - model?: string; - -} - -/** -* WebRTC App provided information related to the engine the client uses. -*/ -export type Engine = { - /** - * The name of the Engine - */ - name?: string; - - /** - * The version of the engine - */ - version?: string; - -} - -/** -* docs -*/ -export type ClientSample = { - /** - * Unique id of the client providing samples. Must be a valid UUID. - */ - clientId: string; - - /** - * The timestamp the sample is created in GMT - */ - timestamp: number; - - /** - * If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. - */ - callId?: string; - - /** - * The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. - */ - sampleSeq?: number; - - /** - * The WebRTC app configured room id the client joined for the call. - */ - roomId?: string; - - /** - * The WebRTC app configured human-readable user id the client is joined. - */ - userId?: string; - - /** - * WebRTC App provided information related to the engine the client uses. - */ - engine?: Engine; - - /** - * WebRTC App provided information related to the platform the client uses. - */ - platform?: Platform; - - /** - * WebRTC App provided information related to the browser the client uses. - */ - browser?: Browser; - - /** - * WebRTC App provided information related to the operating system the client uses. - */ - os?: OperationSystem; - - /** - * The WebRTC app provided list of the media constraints the client has. - */ - mediaConstraints?: string[]; - - /** - * The WebRTC app provided list of the media devices the client has. - */ - mediaDevices?: MediaDevice[]; - - /** - * The WebRTC app provided list of user media errors the client has. - */ - userMediaErrors?: string[]; - - /** - * The WebRTC app provided custom stats payload - */ - extensionStats?: ExtensionStat[]; - - /** - * User provided custom call events - */ - customCallEvents?: CustomCallEvent[]; - - /** - * User provided custom observer events - */ - customObserverEvents?: CustomObserverEvent[]; - - /** - * The WebRTC app provided list of ICE servers the client used. - */ - iceServers?: string[]; - - /** - * The local part of the Signal Description Protocol to establish connections - */ - localSDPs?: string[]; - - /** - * Measurements about the data channels currently available on peer connections - */ - dataChannels?: DataChannel[]; - - /** - * Transport stats of Peer Connection - */ - pcTransports?: PeerConnectionTransport[]; - - /** - * Candidate pair stats - */ - iceCandidatePairs?: IceCandidatePair[]; - - /** - * WebRTC App provided information related to the operation system the client uses. - */ - mediaSources?: MediaSourceStat[]; - - /** - * List of codec the client has - */ - codecs?: MediaCodecStats[]; - - /** - * List of certificates the client provided - */ - certificates?: Certificate[]; - - /** - * List of compound measurements related to inbound audio tracks - */ - inboundAudioTracks?: InboundAudioTrack[]; - - /** - * List of compound measurements related to inbound video tracks - */ - inboundVideoTracks?: InboundVideoTrack[]; - - /** - * List of compound measurements related to outbound audio tracks - */ - outboundAudioTracks?: OutboundAudioTrack[]; - - /** - * List of compound measurements related to outbound video tracks - */ - outboundVideoTracks?: OutboundVideoTrack[]; - - /** - * List of local ICE candidates - */ - iceLocalCandidates?: IceLocalCandidate[]; - - /** - * List of remote ICE candidates - */ - iceRemoteCandidates?: IceRemoteCandidate[]; - - /** - * The offset from GMT in hours - */ - timeZoneOffsetInHours?: number; - - /** - * Special marker for the samples - */ - marker?: string; - -} - /** * Additional control flags indicate various operation has to be performed */ @@ -2707,11 +966,6 @@ export type Samples = { */ controls?: Controls; - /** - * Samples taken from the client - */ - clientSamples?: ClientSample[]; - /** * Samples taken from an Sfu */ diff --git a/npm-samples-lib/src/w3c/W3cStatsIdentifiers.ts b/npm-samples-lib/src/w3c/W3cStatsIdentifiers.ts index 63bfd3e1..ad0fc647 100644 --- a/npm-samples-lib/src/w3c/W3cStatsIdentifiers.ts +++ b/npm-samples-lib/src/w3c/W3cStatsIdentifiers.ts @@ -3,9 +3,8 @@ type RtcStatsVersion = { } export const version: RtcStatsVersion = { - date: new Date("2022-09-21"), + date: new Date("2024-11-07"), } - export enum StatsType { codec = "codec", inboundRtp = "inbound-rtp", @@ -35,7 +34,7 @@ export enum StatsType { receiver = "receiver", sctpTransport = "sctp-transport", iceServer = "ice-server", -}; +} // https://www.w3.org/TR/webrtc-stats/#summary // export type CodecStats = RtcCodecStats; @@ -92,7 +91,9 @@ export interface RtcReceivedRtpStreamStats extends RtcRtpStreamStats { packetsReceived?: number; packetsLost?: number; jitter?: number; - framesDropped?: number; // only video + + // Deprecated somewhere 2023 + // framesDropped?: number; // only video // Deprecated 2022-09-21 // --------------------- @@ -152,6 +153,24 @@ export interface RtcInboundRtpStreamStats extends RtcReceivedRtpStreamStats { framesReceived?: number; // only video decoderImplementation?: string; playoutId?: string; + + framesRendered?: number; // only video + framesDropped?: number; // only video + pauseCount?: number; // only video + totalPausesDuration?: number; // only video + freezeCount?: number; // only video + totalFreezesDuration?: number; // only video + fecBytesReceived?: number; + powerEfficientDecoder?: boolean; // only video + framesAssembledFromMultiplePackets?: number; // only video + totalAssemblyTime?: number; // only video + retransmittedPacketsReceived?: number; + retransmittedBytesReceived?: number; + rtxSsrc?: number; // only video + fecSsrc?: number; // only video + totalCorruptionProbability?: number; // only video + totalSquaredCorruptionProbability?: number; // only video + corruptionMeasurements?: number; // only video // Deprecated 2022-09-21, but kept for backward compatibility receiverId?: string; @@ -171,16 +190,17 @@ export interface RtcInboundRtpStreamStats extends RtcReceivedRtpStreamStats { } + // RTCRemoteInboundRtpStreamStats (https://www.w3.org/TR/webrtc-stats/#remoteinboundrtpstats-dict*) export interface RtcRemoteInboundRtpStreamStats extends RtcReceivedRtpStreamStats { - localId?: string; - roundTripTime?: number; - totalRoundTripTime?: number; - fractionLost?: number; - roundTripTimeMeasurements?: number; + localId?: string; // 20241107 + roundTripTime?: number; // 20241107 + totalRoundTripTime?: number; // 20241107 + fractionLost?: number; // 20241107 + roundTripTimeMeasurements?: number; // 20241107 // Deprecated 2022-09-21 - // reportsReceived?: number; + // reportsReceived?: number; // Commented out as per structure above } // RTCSentRtpStreamStats (https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict*) @@ -229,6 +249,11 @@ export interface RtcOutboundRTPStreamStats extends RtcSentRtpStreamStats { encoderImplementation?: string; active?: boolean; + // added 20241107 + rtxSsrc: number; + powerEfficientEncoder: boolean; + scalabilityMode: string; + // Deprecated, but due to backward compatibility it is kept here senderId?: string; @@ -265,7 +290,8 @@ export interface RtcMediaSourceStats extends RtcStats { trackIdentifier: string; kind: RtcMediaKind; - relayedSource?: boolean; + // Deprecated 2024-11-07 + // relayedSource?: boolean; } // RTCAudioSourceStats (https://www.w3.org/TR/webrtc-stats/#audiosourcestats-dict*) @@ -276,9 +302,24 @@ export interface RtcAudioSourceStats extends RtcMediaHandlerStats { echoReturnLoss?: number; // audio only echoReturnLossEnhancement?: number; // audio only + /** + * @deprecated 2024-11-07 + */ droppedSamplesDuration?: number; + + /** + * @deprecated 2024-11-07 + */ droppedSamplesEvents?: number; + + /** + * @deprecated 2024-11-07 + */ totalCaptureDelay?: number; + + /** + * @deprecated 2024-11-07 + */ totalSamplesCaptured?: number; } @@ -364,6 +405,7 @@ export interface RtcAudioReceiverStats extends RtcAudioHandlerStats { } export interface RTCAudioPlayoutStats extends RtcStats { + kind?: RtcMediaKind; synthesizedSamplesDuration?: number; synthesizedSamplesEvents?: number; totalSamplesDuration?: number; @@ -446,6 +488,12 @@ export interface RtcIceCandidateStats extends RtcStats { priority?: number; url?: string; relayProtocol?: RtcRelayProtocol; + + foundation?: string; + relatedAddress?: string; + relatedPort?: number; + usernameFragment?: string; + tcpType?: RTCIceTcpCandidateType; } export type RtcStatsIceCandidatePairState = "failed" | "cancelled" | "frozen" | "inprogress" | "succeeded" | "waiting"; diff --git a/outputs/avsc/ClientSample.avsc b/outputs/avsc/ClientSample.avsc new file mode 100644 index 00000000..1c884935 --- /dev/null +++ b/outputs/avsc/ClientSample.avsc @@ -0,0 +1,2334 @@ +{ + "name": "ClientSample", + "type": "record", + "doc": "docs", + "fields": [ + { + "name": "callId", + "doc": "the unique identifier of the call or session", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "clientId", + "doc": "Unique id of the client providing samples.", + "type": "string" + }, + { + "name": "appData", + "doc": "Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...)", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "timestamp", + "doc": "The timestamp the sample is created in GMT", + "type": "long" + }, + { + "name": "peerConnections", + "doc": "Samples taken PeerConnections", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "PeerConnectionSample", + "type": "record", + "doc": "docs", + "fields": [ + { + "name": "peerConnectionId", + "type": "string", + "doc": "Unique identifier of the stats object." + }, + { + "name": "appData", + "doc": "Additional information attached to this sample", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "codecs", + "doc": "Codec items", + "type": [ + "null", + { + "type": "array", + "items": { + "type": "record", + "name": "CodecStats", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp when the stats were generated." + }, + { + "name": "type", + "type": "string", + "doc": "The type of the stats." + }, + { + "name": "id", + "type": "string", + "doc": "The unique identifier for the stats object." + }, + { + "name": "payloadType", + "type": "int", + "doc": "The payload type of the codec." + }, + { + "name": "transportId", + "type": "string", + "doc": "The identifier of the transport associated with the codec." + }, + { + "name": "mimeType", + "type": "string", + "doc": "The MIME type of the codec." + }, + { + "name": "clockRate", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The clock rate of the codec in Hz." + }, + { + "name": "channels", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The number of audio channels for the codec, if applicable." + }, + { + "name": "sdpFmtpLine", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The SDP format-specific parameters line for the codec." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "inboundRtps", + "doc": "Inbound RTPs", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "InboundRtpStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "long", + "doc": "The time the stats were collected, in high-resolution time." + }, + { + "name": "id", + "type": "string", + "doc": "Unique identifier of the stats object." + }, + { + "name": "ssrc", + "type": "long", + "doc": "Synchronization source identifier of the RTP stream." + }, + { + "name": "kind", + "type": "string", + "doc": "Kind of the media (e.g., 'audio' or 'video')." + }, + { + "name": "transportId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "ID of the transport associated with the RTP stream." + }, + { + "name": "codecId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "ID of the codec used for the RTP stream." + }, + { + "name": "packetsReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of packets received on the RTP stream." + }, + { + "name": "packetsLost", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of packets lost on the RTP stream." + }, + { + "name": "jitter", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Jitter of the RTP stream in seconds." + }, + { + "name": "trackIdentifier", + "type": "string", + "doc": "Identifier for the media track associated with the RTP stream." + }, + { + "name": "mid", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The MediaStream ID of the RTP stream." + }, + { + "name": "remoteId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Remote stats object ID associated with the RTP stream." + }, + { + "name": "framesDecoded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of frames decoded." + }, + { + "name": "keyFramesDecoded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of keyframes decoded." + }, + { + "name": "framesRendered", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of frames rendered." + }, + { + "name": "framesDropped", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of frames dropped." + }, + { + "name": "frameWidth", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Width of the decoded video frames." + }, + { + "name": "frameHeight", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Height of the decoded video frames." + }, + { + "name": "framesPerSecond", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Frame rate in frames per second." + }, + { + "name": "qpSum", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Sum of the Quantization Parameter values for decoded frames." + }, + { + "name": "totalDecodeTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total time spent decoding in seconds." + }, + { + "name": "totalInterFrameDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Sum of inter-frame delays in seconds." + }, + { + "name": "totalSquaredInterFrameDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Sum of squared inter-frame delays in seconds." + }, + { + "name": "pauseCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of times playback was paused." + }, + { + "name": "totalPausesDuration", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total duration of pauses in seconds." + }, + { + "name": "freezeCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of times playback was frozen." + }, + { + "name": "totalFreezesDuration", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total duration of freezes in seconds." + }, + { + "name": "lastPacketReceivedTimestamp", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Timestamp of the last packet received." + }, + { + "name": "headerBytesReceived", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "Total header bytes received." + }, + { + "name": "packetsDiscarded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Total packets discarded." + }, + { + "name": "fecBytesReceived", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "Total bytes received from FEC." + }, + { + "name": "fecPacketsReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Total packets received from FEC." + }, + { + "name": "fecPacketsDiscarded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Total FEC packets discarded." + }, + { + "name": "bytesReceived", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "Total bytes received on the RTP stream." + }, + { + "name": "nackCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of NACKs sent." + }, + { + "name": "firCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of Full Intra Requests sent." + }, + { + "name": "pliCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of Picture Loss Indications sent." + }, + { + "name": "totalProcessingDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total processing delay in seconds." + }, + { + "name": "estimatedPlayoutTimestamp", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Estimated timestamp of playout." + }, + { + "name": "jitterBufferDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total jitter buffer delay in seconds." + }, + { + "name": "jitterBufferTargetDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Target delay for the jitter buffer in seconds." + }, + { + "name": "jitterBufferEmittedCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of packets emitted from the jitter buffer." + }, + { + "name": "jitterBufferMinimumDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Minimum delay of the jitter buffer in seconds." + }, + { + "name": "totalSamplesReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Total audio samples received." + }, + { + "name": "concealedSamples", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of concealed audio samples." + }, + { + "name": "silentConcealedSamples", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of silent audio samples concealed." + }, + { + "name": "concealmentEvents", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of audio concealment events." + }, + { + "name": "insertedSamplesForDeceleration", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of audio samples inserted for deceleration." + }, + { + "name": "removedSamplesForAcceleration", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of audio samples removed for acceleration." + }, + { + "name": "audioLevel", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Audio level in the range [0.0, 1.0]." + }, + { + "name": "totalAudioEnergy", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total audio energy in the stream." + }, + { + "name": "totalSamplesDuration", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total duration of all received audio samples in seconds." + }, + { + "name": "framesReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Total number of frames received." + }, + { + "name": "decoderImplementation", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Decoder implementation used for decoding frames." + }, + { + "name": "playoutId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Playout identifier for the RTP stream." + }, + { + "name": "powerEfficientDecoder", + "type": [ + "null", + "boolean" + ], + "default": null, + "doc": "Indicates if the decoder is power-efficient." + }, + { + "name": "framesAssembledFromMultiplePackets", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of frames assembled from multiple packets." + }, + { + "name": "totalAssemblyTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total assembly time for frames in seconds." + }, + { + "name": "retransmittedPacketsReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of retransmitted packets received." + }, + { + "name": "retransmittedBytesReceived", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "Number of retransmitted bytes received." + }, + { + "name": "rtxSsrc", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "SSRC of the retransmission stream." + }, + { + "name": "fecSsrc", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "SSRC of the FEC stream." + }, + { + "name": "totalCorruptionProbability", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total corruption probability of packets." + }, + { + "name": "totalSquaredCorruptionProbability", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "Total squared corruption probability of packets." + }, + { + "name": "corruptionMeasurements", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "Number of corruption measurements." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "remoteInboundRtps", + "doc": "Remote Inbound RTPs", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "RemoteInboundRtpStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp for this stats object in DOMHighResTimeStamp format." + }, + { + "name": "id", + "type": "string", + "doc": "The unique identifier for this stats object." + }, + { + "name": "ssrc", + "type": "long", + "doc": "The SSRC identifier of the RTP stream." + }, + { + "name": "kind", + "type": "string", + "doc": "The type of media ('audio' or 'video')." + }, + { + "name": "transportId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the transport used for this stream." + }, + { + "name": "codecId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the codec used for this stream." + }, + { + "name": "packetsReceived", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of packets received on this stream." + }, + { + "name": "packetsLost", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of packets lost on this stream." + }, + { + "name": "jitter", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The jitter value for this stream in seconds." + }, + { + "name": "localId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the local object corresponding to this remote stream." + }, + { + "name": "roundTripTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The most recent RTT measurement for this stream in seconds." + }, + { + "name": "totalRoundTripTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The cumulative RTT for all packets on this stream in seconds." + }, + { + "name": "fractionLost", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The fraction of packets lost on this stream, calculated over a time interval." + }, + { + "name": "roundTripTimeMeasurements", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of RTT measurements for this stream." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "outboundRtps", + "doc": "Outbound RTPs", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "OutboundRtpStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp for this stats object in DOMHighResTimeStamp format." + }, + { + "name": "id", + "type": "string", + "doc": "The unique identifier for this stats object." + }, + { + "name": "ssrc", + "type": "long", + "doc": "The SSRC identifier of the RTP stream." + }, + { + "name": "kind", + "type": "string", + "doc": "The type of media ('audio' or 'video')." + }, + { + "name": "transportId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the transport used for this stream." + }, + { + "name": "codecId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the codec used for this stream." + }, + { + "name": "packetsSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of packets sent on this stream." + }, + { + "name": "bytesSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of bytes sent on this stream." + }, + { + "name": "mid", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The media ID associated with this RTP stream." + }, + { + "name": "mediaSourceId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the media source associated with this stream." + }, + { + "name": "remoteId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the remote object corresponding to this stream." + }, + { + "name": "rid", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The RID value of the RTP stream." + }, + { + "name": "headerBytesSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of header bytes sent on this stream." + }, + { + "name": "retransmittedPacketsSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The number of retransmitted packets sent on this stream." + }, + { + "name": "retransmittedBytesSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The number of retransmitted bytes sent on this stream." + }, + { + "name": "rtxSsrc", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The SSRC for the RTX stream, if applicable." + }, + { + "name": "targetBitrate", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The target bitrate for this RTP stream in bits per second." + }, + { + "name": "totalEncodedBytesTarget", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total target encoded bytes for this stream." + }, + { + "name": "frameWidth", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The width of the frames sent in pixels." + }, + { + "name": "frameHeight", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The height of the frames sent in pixels." + }, + { + "name": "framesPerSecond", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The number of frames sent per second." + }, + { + "name": "framesSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of frames sent on this stream." + }, + { + "name": "hugeFramesSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of huge frames sent on this stream." + }, + { + "name": "framesEncoded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of frames encoded on this stream." + }, + { + "name": "keyFramesEncoded", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of key frames encoded on this stream." + }, + { + "name": "qpSum", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The sum of QP values for all frames encoded on this stream." + }, + { + "name": "totalEncodeTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The total time spent encoding frames on this stream in seconds." + }, + { + "name": "totalPacketSendDelay", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The total delay for packets sent on this stream in seconds." + }, + { + "name": "qualityLimitationReason", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The reason for any quality limitation on this stream." + }, + { + "name": "qualityLimitationResolutionChanges", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The number of resolution changes due to quality limitations." + }, + { + "name": "nackCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of NACK packets sent on this stream." + }, + { + "name": "firCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of FIR packets sent on this stream." + }, + { + "name": "pliCount", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of PLI packets sent on this stream." + }, + { + "name": "encoderImplementation", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The implementation of the encoder used for this stream." + }, + { + "name": "powerEfficientEncoder", + "type": [ + "null", + "boolean" + ], + "default": null, + "doc": "Indicates whether the encoder is power efficient." + }, + { + "name": "active", + "type": [ + "null", + "boolean" + ], + "default": null, + "doc": "Indicates whether this stream is actively sending data." + }, + { + "name": "scalabilityMode", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The scalability mode of the encoder used for this stream." + }, + { + "name": "qualityLimitationDurations", + "type": [ + "null", + { + "type": "record", + "name": "QualityLimitationDurations", + "fields": [ + { + "name": "none", + "type": "double", + "doc": "Duration of no quality limitation in seconds." + }, + { + "name": "cpu", + "type": "double", + "doc": "Duration of CPU-based quality limitation in seconds." + }, + { + "name": "bandwidth", + "type": "double", + "doc": "Duration of bandwidth-based quality limitation in seconds." + }, + { + "name": "other", + "type": "double", + "doc": "Duration of other quality limitation reasons in seconds." + } + ] + } + ], + "doc": "The duration of quality limitation reasons categorized by type." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats." + } + ] + } + } + ], + "default": null + }, + { + "name": "remoteOutboundRtps", + "doc": "Remote Outbound RTPs", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "RemoteOutboundRtpStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp for this stats object in DOMHighResTimeStamp format." + }, + { + "name": "id", + "type": "string", + "doc": "The unique identifier for this stats object." + }, + { + "name": "ssrc", + "type": "long", + "doc": "The SSRC identifier of the RTP stream." + }, + { + "name": "kind", + "type": "string", + "doc": "The type of media ('audio' or 'video')." + }, + { + "name": "transportId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the transport used for this stream." + }, + { + "name": "codecId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the codec used for this stream." + }, + { + "name": "packetsSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of packets sent on this stream." + }, + { + "name": "bytesSent", + "type": [ + "null", + "long" + ], + "default": null, + "doc": "The total number of bytes sent on this stream." + }, + { + "name": "localId", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "The ID of the local object corresponding to this stream." + }, + { + "name": "remoteTimestamp", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The remote timestamp for this stats object in DOMHighResTimeStamp format." + }, + { + "name": "reportsSent", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of reports sent on this stream." + }, + { + "name": "roundTripTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The current estimated round-trip time for this stream in seconds." + }, + { + "name": "totalRoundTripTime", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The total round-trip time for this stream in seconds." + }, + { + "name": "roundTripTimeMeasurements", + "type": [ + "null", + "int" + ], + "default": null, + "doc": "The total number of round-trip time measurements for this stream." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "audioSources", + "doc": "Audio Source Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "AudioSourceStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "trackIdentifier", + "type": "string", + "doc": "The identifier of the media track." + }, + { + "name": "kind", + "type": "string", + "doc": "The kind of media (audio/video)." + }, + { + "name": "audioLevel", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The current audio level." + }, + { + "name": "totalAudioEnergy", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The total audio energy." + }, + { + "name": "totalSamplesDuration", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The total duration of audio samples." + }, + { + "name": "echoReturnLoss", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The echo return loss." + }, + { + "name": "echoReturnLossEnhancement", + "type": [ + "null", + "double" + ], + "default": null, + "doc": "The enhancement of echo return loss." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "videoSources", + "doc": "Video Source Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "VideoSourceStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "trackIdentifier", + "type": "string", + "doc": "The identifier of the media track." + }, + { + "name": "kind", + "type": "string", + "doc": "The kind of media (audio/video)." + }, + { + "name": "width", + "type": "int", + "doc": "The width of the video." + }, + { + "name": "height", + "type": "int", + "doc": "The height of the video." + }, + { + "name": "frames", + "type": "int", + "doc": "The total number of frames." + }, + { + "name": "framesPerSecond", + "type": "double", + "doc": "The frames per second of the video." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "audioPlayouts", + "doc": "Audio Playout Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "AudioPlayoutStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "kind", + "type": "string", + "doc": "The kind of media (audio/video)." + }, + { + "name": "synthesizedSamplesDuration", + "type": "double", + "doc": "The duration of synthesized audio samples." + }, + { + "name": "synthesizedSamplesEvents", + "type": "int", + "doc": "The number of synthesized audio samples events." + }, + { + "name": "totalSamplesDuration", + "type": "double", + "doc": "The total duration of all audio samples." + }, + { + "name": "totalPlayoutDelay", + "type": "double", + "doc": "The total delay experienced during audio playout." + }, + { + "name": "totalSamplesCount", + "type": "int", + "doc": "The total count of audio samples." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "peerConnectionTransports", + "doc": "PeerConnection Transport Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "PeerConnectionTransportStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "dataChannelsOpened", + "type": "int", + "doc": "The number of data channels opened." + }, + { + "name": "dataChannelsClosed", + "type": "int", + "doc": "The number of data channels closed." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "dataChannels", + "doc": "Data Channels Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "DataChannelStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "label", + "type": "string", + "doc": "The label of the data channel." + }, + { + "name": "protocol", + "type": "string", + "doc": "The protocol of the data channel." + }, + { + "name": "dataChannelIdentifier", + "type": "int", + "doc": "The identifier for the data channel." + }, + { + "name": "state", + "type": "string", + "doc": "The state of the data channel (e.g., 'open', 'closed')." + }, + { + "name": "messagesSent", + "type": "int", + "doc": "The number of messages sent on the data channel." + }, + { + "name": "bytesSent", + "type": "long", + "doc": "The number of bytes sent on the data channel." + }, + { + "name": "messagesReceived", + "type": "int", + "doc": "The number of messages received on the data channel." + }, + { + "name": "bytesReceived", + "type": "long", + "doc": "The number of bytes received on the data channel." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "iceTransports", + "doc": "ICE Transport Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "IceTransportStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "packetsSent", + "type": "int", + "doc": "The number of packets sent." + }, + { + "name": "packetsReceived", + "type": "int", + "doc": "The number of packets received." + }, + { + "name": "bytesSent", + "type": "long", + "doc": "The number of bytes sent." + }, + { + "name": "bytesReceived", + "type": "long", + "doc": "The number of bytes received." + }, + { + "name": "iceRole", + "type": "string", + "doc": "The ICE role (e.g., 'controlling', 'controlled')." + }, + { + "name": "iceLocalUsernameFragment", + "type": "string", + "doc": "The local username fragment for ICE." + }, + { + "name": "dtlsState", + "type": "string", + "doc": "The DTLS transport state (e.g., 'new', 'connecting', 'connected')." + }, + { + "name": "iceState", + "type": "string", + "doc": "The ICE transport state (e.g., 'new', 'checking', 'connected')." + }, + { + "name": "selectedCandidatePairId", + "type": "string", + "doc": "The ID of the selected ICE candidate pair." + }, + { + "name": "localCertificateId", + "type": "string", + "doc": "The ID of the local certificate." + }, + { + "name": "remoteCertificateId", + "type": "string", + "doc": "The ID of the remote certificate." + }, + { + "name": "tlsVersion", + "type": "string", + "doc": "The TLS version used for encryption." + }, + { + "name": "dtlsCipher", + "type": "string", + "doc": "The DTLS cipher suite used." + }, + { + "name": "dtlsRole", + "type": "string", + "doc": "The role in the DTLS handshake (e.g., 'client', 'server')." + }, + { + "name": "srtpCipher", + "type": "string", + "doc": "The SRTP cipher used for encryption." + }, + { + "name": "selectedCandidatePairChanges", + "type": "int", + "doc": "The number of changes to the selected ICE candidate pair." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "iceCandidates", + "doc": "ICE Candidate Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "IceCandidateStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "transportId", + "type": "string", + "doc": "The transport ID associated with the ICE candidate." + }, + { + "name": "address", + "type": [ + "null", + "string" + ], + "doc": "The IP address of the ICE candidate (nullable)." + }, + { + "name": "port", + "type": "int", + "doc": "The port number of the ICE candidate." + }, + { + "name": "protocol", + "type": "string", + "doc": "The transport protocol used by the candidate (e.g., 'udp', 'tcp')." + }, + { + "name": "candidateType", + "type": "string", + "doc": "The type of the ICE candidate (e.g., 'host', 'srflx', 'relay')." + }, + { + "name": "priority", + "type": "long", + "doc": "The priority of the ICE candidate." + }, + { + "name": "url", + "type": "string", + "doc": "The URL of the ICE candidate." + }, + { + "name": "relayProtocol", + "type": "string", + "doc": "The protocol used for the relay (e.g., 'tcp', 'udp')." + }, + { + "name": "foundation", + "type": "string", + "doc": "A string representing the foundation for the ICE candidate." + }, + { + "name": "relatedAddress", + "type": "string", + "doc": "The related address for the ICE candidate (if any)." + }, + { + "name": "relatedPort", + "type": "int", + "doc": "The related port for the ICE candidate (if any)." + }, + { + "name": "usernameFragment", + "type": "string", + "doc": "The username fragment for the ICE candidate." + }, + { + "name": "tcpType", + "type": "string", + "doc": "The TCP type of the ICE candidate (e.g., 'active', 'passive')." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "iceCandidatePairs", + "doc": "ICE Candidate Pair Stats", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "IceCandidatePairStats", + "type": "record", + "fields": [ + { + "name": "id", + "type": "string", + "doc": "The unique identifier for this RTCStats object." + }, + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of when the stats were recorded, in seconds." + }, + { + "name": "transportId", + "type": "string", + "doc": "The transport id of the connection this candidate pair belongs to." + }, + { + "name": "localCandidateId", + "type": "string", + "doc": "The ID of the local ICE candidate in this pair." + }, + { + "name": "remoteCandidateId", + "type": "string", + "doc": "The ID of the remote ICE candidate in this pair." + }, + { + "name": "state", + "type": [ + "null", + { + "type": "enum", + "name": "RTCStatsIceCandidatePairState", + "symbols": [ + "new", + "inProgress", + "failed", + "succeeded" + ], + "doc": "The state of the ICE candidate pair." + } + ], + "default": null + }, + { + "name": "nominated", + "type": "boolean", + "default": false, + "doc": "Whether this candidate pair has been nominated." + }, + { + "name": "packetsSent", + "type": "int", + "doc": "The number of packets sent using this candidate pair." + }, + { + "name": "packetsReceived", + "type": "int", + "doc": "The number of packets received using this candidate pair." + }, + { + "name": "bytesSent", + "type": "long", + "doc": "The total number of bytes sent using this candidate pair." + }, + { + "name": "bytesReceived", + "type": "long", + "doc": "The total number of bytes received using this candidate pair." + }, + { + "name": "lastPacketSentTimestamp", + "type": "double", + "doc": "The timestamp of the last packet sent using this candidate pair." + }, + { + "name": "lastPacketReceivedTimestamp", + "type": "double", + "doc": "The timestamp of the last packet received using this candidate pair." + }, + { + "name": "totalRoundTripTime", + "type": "double", + "doc": "The total round trip time (RTT) for this candidate pair in seconds." + }, + { + "name": "currentRoundTripTime", + "type": "double", + "doc": "The current round trip time (RTT) for this candidate pair in seconds." + }, + { + "name": "availableOutgoingBitrate", + "type": "double", + "doc": "The available outgoing bitrate (in bits per second) for this candidate pair." + }, + { + "name": "availableIncomingBitrate", + "type": "double", + "doc": "The available incoming bitrate (in bits per second) for this candidate pair." + }, + { + "name": "requestsReceived", + "type": "int", + "doc": "The number of ICE connection requests received by this candidate pair." + }, + { + "name": "requestsSent", + "type": "int", + "doc": "The number of ICE connection requests sent by this candidate pair." + }, + { + "name": "responsesReceived", + "type": "int", + "doc": "The number of ICE connection responses received by this candidate pair." + }, + { + "name": "responsesSent", + "type": "int", + "doc": "The number of ICE connection responses sent by this candidate pair." + }, + { + "name": "consentRequestsSent", + "type": "int", + "doc": "The number of ICE connection consent requests sent by this candidate pair." + }, + { + "name": "packetsDiscardedOnSend", + "type": "int", + "doc": "The number of packets discarded while attempting to send via this candidate pair." + }, + { + "name": "bytesDiscardedOnSend", + "type": "long", + "doc": "The total number of bytes discarded while attempting to send via this candidate pair." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + }, + { + "name": "certificates", + "doc": "Certificates", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "CertificateStats", + "type": "record", + "fields": [ + { + "name": "timestamp", + "type": "double", + "doc": "The timestamp of the stat." + }, + { + "name": "id", + "type": "string", + "doc": "A unique identifier for the stat." + }, + { + "name": "fingerprint", + "type": "string", + "doc": "The fingerprint of the certificate." + }, + { + "name": "fingerprintAlgorithm", + "type": "string", + "doc": "The algorithm used for the fingerprint (e.g., 'SHA-256')." + }, + { + "name": "base64Certificate", + "type": "string", + "doc": "The certificate encoded in base64 format." + }, + { + "name": "issuerCertificateId", + "type": [ + "null", + "string" + ], + "doc": "The certificate ID of the issuer (nullable)." + }, + { + "name": "appData", + "type": [ + "null", + "string" + ], + "default": null, + "doc": "Additional information attached to this stats" + } + ] + } + } + ], + "default": null + } + ] + } + } + ], + "default": null + }, + { + "name": "clientEvents", + "doc": "A list of additional client events.", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "ClientEvent", + "type": "record", + "fields": [ + { + "name": "type", + "doc": "The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).", + "type": "string" + }, + { + "name": "payload", + "doc": "The value associated with the event, if applicable.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "peerConnectionId", + "doc": "The unique identifier of the peer connection for which the event was generated.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "trackId", + "doc": "The identifier of the media track related to the event, if applicable.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "ssrc", + "doc": "The SSRC (Synchronization Source) identifier associated with the event, if applicable.", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "timestamp", + "doc": "The timestamp in epoch format when the event was generated.", + "type": [ + "null", + "long" + ], + "default": null + } + ] + } + } + ], + "default": null + }, + { + "name": "clientMetaItems", + "doc": "A list of additional client events.", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "ClientMetaData", + "type": "record", + "fields": [ + { + "name": "type", + "doc": "The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).", + "type": "string" + }, + { + "name": "payload", + "doc": "The value associated with the event, if applicable.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "peerConnectionId", + "doc": "The unique identifier of the peer connection for which the event was generated.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "trackId", + "doc": "The identifier of the media track related to the event, if applicable.", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "ssrc", + "doc": "The SSRC (Synchronization Source) identifier associated with the event, if applicable.", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "timestamp", + "doc": "The timestamp in epoch format when the event was generated.", + "type": [ + "null", + "long" + ], + "default": null + } + ] + } + } + ], + "default": null + }, + { + "name": "extensionStats", + "doc": "The WebRTC app provided custom stats payload", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "ExtensionStat", + "type": "record", + "fields": [ + { + "name": "type", + "type": "string", + "doc": "The type of the extension stats the custom app provides" + }, + { + "name": "payload", + "type": "string", + "doc": "The payload of the extension stats the custom app provides" + } + ] + } + } + ], + "default": null + } + ] +} \ No newline at end of file diff --git a/outputs/avsc/Samples.avsc b/outputs/avsc/Samples.avsc index 84a74490..9f740b17 100644 --- a/outputs/avsc/Samples.avsc +++ b/outputs/avsc/Samples.avsc @@ -36,3091 +36,6 @@ ], "default": null }, - { - "name": "clientSamples", - "doc": "Samples taken from the client", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "ClientSample", - "type": "record", - "doc": "docs", - "fields": [ - { - "name": "callId", - "doc": "If provided, the server uses the given id to match clients in the same call. Must be a valid UUID.", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "clientId", - "doc": "Unique id of the client providing samples. Must be a valid UUID.", - "type": "string" - }, - { - "name": "sampleSeq", - "doc": "The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "roomId", - "doc": "The WebRTC app configured room id the client joined for the call.", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "userId", - "doc": "The WebRTC app configured human-readable user id the client is joined.", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "engine", - "doc": "WebRTC App provided information related to the engine the client uses.", - "type": [ - "null", - { - "name": "Engine", - "type": "record", - "fields": [ - { - "name": "name", - "type": [ - "null", - "string" - ], - "doc": "The name of the Engine", - "default": null - }, - { - "name": "version", - "type": [ - "null", - "string" - ], - "doc": "The version of the engine", - "default": null - } - ] - } - ], - "default": null - }, - { - "name": "platform", - "doc": "WebRTC App provided information related to the platform the client uses.", - "type": [ - "null", - { - "name": "Platform", - "type": "record", - "fields": [ - { - "name": "type", - "type": [ - "null", - "string" - ], - "doc": "The name of the platform", - "default": null - }, - { - "name": "vendor", - "type": [ - "null", - "string" - ], - "doc": "The name of the vendor", - "default": null - }, - { - "name": "model", - "type": [ - "null", - "string" - ], - "doc": "The name of the model", - "default": null - } - ] - } - ], - "default": null - }, - { - "name": "browser", - "doc": "WebRTC App provided information related to the browser the client uses.", - "type": [ - "null", - { - "name": "Browser", - "type": "record", - "fields": [ - { - "name": "name", - "type": [ - "null", - "string" - ], - "doc": "The name of the operating system (e.g., Linux) the WebRTC app uses", - "default": null - }, - { - "name": "version", - "type": [ - "null", - "string" - ], - "doc": "The version of the operating system", - "default": null - } - ] - } - ], - "default": null - }, - { - "name": "os", - "doc": "WebRTC App provided information related to the operating system the client uses.", - "type": [ - "null", - { - "name": "OperationSystem", - "type": "record", - "fields": [ - { - "name": "name", - "type": [ - "null", - "string" - ], - "doc": "The name of the operating system (e.g., Linux) the WebRTC app uses", - "default": null - }, - { - "name": "version", - "type": [ - "null", - "string" - ], - "doc": "The version of the operating system", - "default": null - }, - { - "name": "versionName", - "type": [ - "null", - "string" - ], - "doc": "The name of the version of the operating system", - "default": null - } - ] - } - ], - "default": null - }, - { - "name": "mediaConstraints", - "doc": "The WebRTC app provided list of the media constraints the client has.", - "type": [ - "null", - { - "type": "array", - "items": "string" - } - ], - "default": null - }, - { - "name": "mediaDevices", - "doc": "The WebRTC app provided list of the media devices the client has.", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "MediaDevice", - "type": "record", - "fields": [ - { - "name": "id", - "type": [ - "null", - "string" - ], - "doc": "the provided id of the media input / output", - "default": null - }, - { - "name": "kind", - "doc": "The media kind of the media device", - "type": [ - "null", - { - "type": "enum", - "name": "InputMediaDeviceKind", - "symbols": [ - "videoinput", - "audioinput", - "audiooutput" - ] - } - ], - "default": null - }, - { - "name": "label", - "type": [ - "null", - "string" - ], - "doc": "The name of the device", - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "userMediaErrors", - "doc": "The WebRTC app provided list of user media errors the client has.", - "type": [ - "null", - { - "type": "array", - "items": "string" - } - ], - "default": null - }, - { - "name": "extensionStats", - "doc": "The WebRTC app provided custom stats payload", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "ExtensionStat", - "type": "record", - "fields": [ - { - "name": "type", - "type": "string", - "doc": "The type of the extension stats the custom app provides" - }, - { - "name": "payload", - "type": "string", - "doc": "The payload of the extension stats the custom app provides" - } - ] - } - } - ], - "default": null - }, - { - "name": "customCallEvents", - "doc": "User provided custom call events", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "CustomCallEvent", - "type": "record", - "fields": [ - { - "name": "name", - "doc": "the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..)", - "type": "string" - }, - { - "name": "value", - "doc": "the value of the event", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "mediaTrackId", - "doc": "The identifier of the media track the event is related to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "message", - "doc": "the human readable message of the event", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "attachments", - "doc": "Additional attachment relevant for the event", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "timestamp", - "doc": "The EPOCH timestamp the event is generated", - "type": [ - "null", - "long" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "customObserverEvents", - "doc": "User provided custom observer events", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "CustomObserverEvent", - "type": "record", - "fields": [ - { - "name": "name", - "doc": "the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..)", - "type": "string" - }, - { - "name": "mediaTrackId", - "doc": "The identifier of the media track the event is related to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "message", - "doc": "the human readable message of the event", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "attachments", - "doc": "Additional attachment relevant for the event", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "timestamp", - "doc": "The EPOCH timestamp the event is generated", - "type": [ - "null", - "long" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "iceServers", - "doc": "The WebRTC app provided list of ICE servers the client used.", - "type": [ - "null", - { - "type": "array", - "items": "string" - } - ], - "default": null - }, - { - "name": "localSDPs", - "doc": "The local part of the Signal Description Protocol to establish connections", - "type": [ - "null", - { - "type": "array", - "items": "string" - } - ], - "default": null - }, - { - "name": "dataChannels", - "doc": "Measurements about the data channels currently available on peer connections", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "DataChannel", - "type": "record", - "fields": [ - { - "name": "peerConnectionId", - "type": "string", - "doc": "The id of the peer connection the data channel is assigned to" - }, - { - "name": "dataChannelIdentifier", - "type": [ - "null", - "int" - ], - "doc": "The id of the data channel assigned by the peer connection when it is opened", - "default": null - }, - { - "name": "label", - "doc": "The label of the data channel", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "protocol", - "doc": "The protocol the data channel utilizes", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "state", - "doc": "The state of the data channel", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "messageSent", - "doc": "The total number of messages sent on the data channel", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "The total number of bytes sent on the data channel", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "messageReceived", - "doc": "The total number of messages received on the data channel", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesReceived", - "doc": "The total number of bytes received on the data channel", - "type": [ - "null", - "long" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "pcTransports", - "doc": "Transport stats of Peer Connection", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "PeerConnectionTransport", - "type": "record", - "fields": [ - { - "name": "transportId", - "doc": "The identifier of the transport the ICE candidate pair is negotiated on", - "type": "string" - }, - { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, - { - "name": "label", - "doc": "The label associated with the peer connection", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "packetsSent", - "doc": "Represents the total number of packets sent on the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsReceived", - "doc": "Represents the total number of packets received on the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "Represents the total amount of bytes sent on the corresponding transport", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "bytesReceived", - "doc": "Represents the total amount of bytes received on the corresponding transport", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "iceRole", - "doc": "Represents the current role of ICE under DTLS Transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "iceLocalUsernameFragment", - "doc": "Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "dtlsState", - "doc": "Represents the current state of DTLS for the peer connection transport layer", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "selectedCandidatePairId", - "doc": "The identifier of the candidate pair the transport currently uses", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "iceState", - "doc": "Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "localCertificateId", - "doc": "If DTLS negotiated, it gives the ID of the local certificate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "remoteCertificateId", - "doc": "If DTLS negotiated, it gives the ID of the remote certificate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "tlsVersion", - "doc": "Represents the version number of the TLS used in the corresponding transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "dtlsCipher", - "doc": "Represents the name of the DTLS cipher used in the corresponding transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "dtlsRole", - "doc": "The role this host plays in DTLS negotiations", - "type": [ - "null", - { - "type": "enum", - "name": "DtlsRole", - "symbols": [ - "client", - "server", - "unknown" - ] - } - ], - "default": null - }, - { - "name": "srtpCipher", - "doc": "Represents the name of the SRTP cipher used in the corresponding transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "tlsGroup", - "doc": "Represents the name of the IANA TLS Supported Groups used in the corresponding transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "selectedCandidatePairChanges", - "doc": "The total number of candidate pair changes over the peer connection", - "type": [ - "null", - "int" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "iceCandidatePairs", - "doc": "Candidate pair stats", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "IceCandidatePair", - "type": "record", - "fields": [ - { - "name": "candidatePairId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, - { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, - { - "name": "label", - "doc": "The label associated with the peer connection", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "transportId", - "doc": "The identifier of the transport the ice candidate pair is negotiated on", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "localCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected on the local side", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "remoteCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected on the remote side", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "state", - "doc": "The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "nominated", - "doc": "Indicates if the ice candidate pair is nominated or not", - "type": [ - "null", - "boolean" - ], - "default": null - }, - { - "name": "packetsSent", - "doc": "The total number of packets sent using the last selected candidate pair over the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received using the last selected candidate pair over the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "The total number of bytes sent using the last selected candidate pair over the corresponding transport", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "bytesReceived", - "doc": "The total number of bytes received using the last selected candidate pair over the corresponding transport", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "lastPacketSentTimestamp", - "doc": "Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": "Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "currentRoundTripTime", - "doc": "Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "availableOutgoingBitrate", - "doc": "The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "availableIncomingBitrate", - "doc": "The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "requestsReceived", - "doc": "Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "requestsSent", - "doc": "Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "responsesReceived", - "doc": "Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "responsesSent", - "doc": "Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "consentRequestsSent", - "doc": "Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsDiscardedOnSend", - "doc": "Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesDiscardedOnSend", - "doc": "Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport", - "type": [ - "null", - "long" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "mediaSources", - "doc": "WebRTC App provided information related to the operation system the client uses.", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "MediaSourceStat", - "type": "record", - "fields": [ - { - "name": "trackIdentifier", - "type": [ - "null", - "string" - ], - "doc": "The unique identifier of the corresponding media track", - "default": null - }, - { - "name": "kind", - "type": [ - "null", - { - "type": "enum", - "name": "MediaSourceMediaKind", - "symbols": [ - "audio", - "video" - ] - } - ], - "doc": "The type of the media the MediaSource produces.", - "default": null - }, - { - "name": "relayedSource", - "type": [ - "null", - "boolean" - ], - "doc": "Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media.", - "default": null - }, - { - "name": "audioLevel", - "type": [ - "null", - "double" - ], - "doc": "The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov.", - "default": null - }, - { - "name": "totalAudioEnergy", - "type": [ - "null", - "double" - ], - "doc": "The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy", - "default": null - }, - { - "name": "totalSamplesDuration", - "type": [ - "null", - "double" - ], - "doc": "The duration of the audio type media source", - "default": null - }, - { - "name": "echoReturnLoss", - "type": [ - "null", - "double" - ], - "doc": "if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en", - "default": null - }, - { - "name": "echoReturnLossEnhancement", - "type": [ - "null", - "double" - ], - "doc": "www.itu.int/rec/T-REC-G.168-201504-I/en", - "default": null - }, - { - "name": "droppedSamplesDuration", - "type": [ - "null", - "double" - ], - "doc": "The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source", - "default": null - }, - { - "name": "droppedSamplesEvents", - "type": [ - "null", - "int" - ], - "doc": "A counter increases every time a sample is dropped after a non-dropped sample", - "default": null - }, - { - "name": "totalCaptureDelay", - "type": [ - "null", - "double" - ], - "doc": "Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source", - "default": null - }, - { - "name": "totalSamplesCaptured", - "type": [ - "null", - "double" - ], - "doc": "The total number of captured samples reaching the audio source", - "default": null - }, - { - "name": "width", - "type": [ - "null", - "int" - ], - "doc": "The width, in pixels, of the last frame originating from the media source", - "default": null - }, - { - "name": "height", - "type": [ - "null", - "int" - ], - "doc": "The height, in pixels, of the last frame originating from the media source", - "default": null - }, - { - "name": "frames", - "type": [ - "null", - "int" - ], - "doc": "The total number of frames originating from the media source", - "default": null - }, - { - "name": "framesPerSecond", - "type": [ - "null", - "double" - ], - "doc": "The number of frames originating from the media source in the last second", - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "codecs", - "doc": "List of codec the client has", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "MediaCodecStats", - "type": "record", - "fields": [ - { - "name": "payloadType", - "type": [ - "null", - "string" - ], - "doc": "Payload type used in the RTP encoding/decoding process.", - "default": null - }, - { - "name": "codecType", - "type": [ - "null", - { - "type": "enum", - "name": "CodecType", - "symbols": [ - "encode", - "decode" - ] - } - ], - "doc": "Indicates the role of the codec (encode or decode)", - "default": null - }, - { - "name": "mimeType", - "type": [ - "null", - "string" - ], - "doc": "The MIME type of the media, e.g., audio/opus.", - "default": null - }, - { - "name": "clockRate", - "type": [ - "null", - "int" - ], - "doc": "The clock rate used in RTP transport to generate the timestamp for the carried frames", - "default": null - }, - { - "name": "channels", - "type": [ - "null", - "int" - ], - "doc": "Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented", - "default": null - }, - { - "name": "sdpFmtpLine", - "type": [ - "null", - "string" - ], - "doc": "The SDP line determines the codec", - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "certificates", - "doc": "List of certificates the client provided", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "Certificate", - "type": "record", - "fields": [ - { - "name": "fingerprint", - "type": [ - "null", - "string" - ], - "doc": "The fingerprint of the certificate.", - "default": null - }, - { - "name": "fingerprintAlgorithm", - "type": [ - "null", - "string" - ], - "doc": "The hash function used to generate the fingerprint.", - "default": null - }, - { - "name": "base64Certificate", - "type": [ - "null", - "string" - ], - "doc": "The DER encoded base-64 representation of the certificate.", - "default": null - }, - { - "name": "issuerCertificateId", - "type": [ - "null", - "string" - ], - "doc": "The ID of the next certificate in the certificate chain", - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "inboundAudioTracks", - "doc": "List of compound measurements related to inbound audio tracks", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "InboundAudioTrack", - "type": "record", - "fields": [ - { - "name": "trackId", - "doc": "The ID of the track", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "remoteClientId", - "doc": "The remote client ID the source outbound track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuStreamId", - "doc": "The ID of the SFU stream this track is synced from", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuSinkId", - "doc": "The ID of the sink this track belongs to in the SFU", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponding synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponding synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitter", - "doc": "The corresponding synchronization source reported jitter", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "headerBytesReceived", - "doc": "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "packetsDiscarded", - "doc": "The total number of packets that missed the playout point and were therefore discarded by the jitter buffer", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "fecPacketsReceived", - "doc": "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "fecPacketsDiscarded", - "doc": "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesReceived", - "doc": "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired.", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "totalProcessingDelay", - "doc": "The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "estimatedPlayoutTimestamp", - "doc": "The estimated playout time of the corresponding synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "jitterBufferDelay", - "doc": "The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "jitterBufferTargetDelay", - "doc": "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "jitterBufferEmittedCount", - "doc": "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitterBufferMinimumDelay", - "doc": "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalSamplesReceived", - "doc": "The total number of audio samples received on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "concealedSamples", - "doc": "The total number of samples decoded by the media decoder from the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "silentConcealedSamples", - "doc": "The total number of samples concealed from the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "concealmentEvents", - "doc": "The total number of concealed event emitted to the media codec by the corresponded jitterbuffer", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "insertedSamplesForDeceleration", - "doc": "The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "removedSamplesForAcceleration", - "doc": "The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "audioLevel", - "doc": "The current audio level", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalAudioEnergy", - "doc": "Represents the energy level reported by the media source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalSamplesDuration", - "doc": "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "decoderImplementation", - "doc": "Indicate the name of the decoder implementation library", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "packetsSent", - "doc": "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "remoteTimestamp", - "doc": "The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "reportsSent", - "doc": "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "roundTripTime", - "doc": "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": " Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTimeMeasurements", - "doc": "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "synthesizedSamplesDuration", - "doc": "This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "synthesizedSamplesEvents", - "doc": "The number of synthesized samples events.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "totalPlayoutDelay", - "doc": " The playout delay includes the delay from being emitted to the actual time of playout on the device", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalSamplesCount", - "doc": "When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout", - "type": [ - "null", - "int" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "inboundVideoTracks", - "doc": "List of compound measurements related to inbound video tracks", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "InboundVideoTrack", - "type": "record", - "fields": [ - { - "name": "trackId", - "doc": "The id of the track", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "remoteClientId", - "doc": "The remote clientId the source outbound track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuStreamId", - "doc": "The id of the SFU stream this track is sinked from", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuSinkId", - "doc": "The id of the sink this track belongs to in the SFU", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "framesDropped", - "doc": "The number of frames dropped prior to decode or missing chunks", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "headerBytesReceived", - "doc": "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "packetsDiscarded", - "doc": "The total number of packets missed the playout point and therefore discarded by the jitterbuffer", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "fecPacketsReceived", - "doc": "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "fecPacketsDiscarded", - "doc": "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesReceived", - "doc": "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "totalProcessingDelay", - "doc": "The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "estimatedPlayoutTimestamp", - "doc": "The estimated playout time of the corresponded synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "jitterBufferDelay", - "doc": "The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "jitterBufferTargetDelay", - "doc": "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. ", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "jitterBufferEmittedCount", - "doc": "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitterBufferMinimumDelay", - "doc": "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "decoderImplementation", - "doc": "Indicate the name of the decoder implementation library", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "framesDecoded", - "doc": "The total number of frames decoded on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "keyFramesDecoded", - "doc": "The total number of keyframes decoded on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "frameWidth", - "doc": "The width of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "frameHeight", - "doc": "The height of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "framesPerSecond", - "doc": "The frame rate of the video sent by the remote source on the corresponding RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qpSum", - "doc": "The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "totalDecodeTime", - "doc": "The total time spent on decoding video on the corresponding RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalInterFrameDelay", - "doc": "The total interframe delay on the corresponding RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalSquaredInterFrameDelay", - "doc": "The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "firCount", - "doc": "The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "pliCount", - "doc": "The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "framesReceived", - "doc": "The total number of frames received on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsSent", - "doc": "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "remoteTimestamp", - "doc": "The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "reportsSent", - "doc": "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "roundTripTime", - "doc": "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": "Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTimeMeasurements", - "doc": "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "outboundAudioTracks", - "doc": "List of compound measurements related to outbound audio tracks", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "OutboundAudioTrack", - "type": "record", - "fields": [ - { - "name": "trackId", - "doc": "The id of the track", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "peerConnectionId", - "doc": " The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuStreamId", - "doc": "The id of the SFU stream this track is related to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, - { - "name": "packetsSent", - "doc": "The total number of packets sent on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "The total number of bytes sent on the corresponded synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "rid", - "doc": "The rid encoding parameter of the corresponded synchronization source", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "headerBytesSent", - "doc": "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "retransmittedPacketsSent", - "doc": "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "retransmittedBytesSent", - "doc": "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "targetBitrate", - "doc": "Reflects the current encoder target in bits per second.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "totalEncodedBytesTarget", - "doc": "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "totalPacketSendDelay", - "doc": "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "averageRtcpInterval", - "doc": "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "encoderImplementation", - "doc": "Indicate the name of the encoder implementation library", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "active", - "doc": "Indicates whether this RTP stream is configured to be sent or disabled", - "type": [ - "null", - "boolean" - ], - "default": null - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTime", - "doc": "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": "The sum of RTT measurements belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "fractionLost", - "doc": "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTimeMeasurements", - "doc": "The total number of calculated RR measurements received on this source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "relayedSource", - "doc": "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type": [ - "null", - "boolean" - ], - "default": null - }, - { - "name": "audioLevel", - "doc": "Represents the audio level reported by the media source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalAudioEnergy", - "doc": "Represents the energy level reported by the media source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalSamplesDuration", - "doc": "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "echoReturnLoss", - "doc": "Represents the echo cancellation in decibels corresponded to the media source.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "echoReturnLossEnhancement", - "doc": "Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "droppedSamplesDuration", - "type": [ - "null", - "double" - ], - "doc": "The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source", - "default": null - }, - { - "name": "droppedSamplesEvents", - "type": [ - "null", - "int" - ], - "doc": "A counter increases every time a sample is dropped after a non-dropped sample", - "default": null - }, - { - "name": "totalCaptureDelay", - "type": [ - "null", - "double" - ], - "doc": "Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source", - "default": null - }, - { - "name": "totalSamplesCaptured", - "type": [ - "null", - "double" - ], - "doc": "The total number of captured samples reaching the audio source", - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "outboundVideoTracks", - "doc": "List of compound measurements related to outbound video tracks", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "OutboundVideoTrack", - "type": "record", - "fields": [ - { - "name": "trackId", - "doc": "The id of the track", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "sfuStreamId", - "doc": "The id of the SFU stream this track is related to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, - { - "name": "packetsSent", - "doc": "The total number of packets sent on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "bytesSent", - "doc": "The total number of bytes sent on the corresponded synchronization source", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "rid", - "doc": "The rid encoding parameter of the corresponded synchronization source", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "headerBytesSent", - "doc": "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "retransmittedPacketsSent", - "doc": "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "retransmittedBytesSent", - "doc": "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "targetBitrate", - "doc": "Reflects the current encoder target in bits per second.", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "totalEncodedBytesTarget", - "doc": "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "totalPacketSendDelay", - "doc": "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "averageRtcpInterval", - "doc": "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "encoderImplementation", - "doc": "Indicate the name of the encoder implementation library", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "active", - "doc": "Indicates whether this RTP stream is configured to be sent or disabled", - "type": [ - "null", - "boolean" - ], - "default": null - }, - { - "name": "frameWidth", - "doc": "The frame width in pixels of the frames targeted by the media encoder", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "frameHeight", - "doc": "The frame height in pixels of the frames targeted by the media encoder", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "framesPerSecond", - "doc": "The encoded number of frames in the last second on the corresponding media source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "framesSent", - "doc": "The total number of frames sent on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "hugeFramesSent", - "doc": "The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "framesEncoded", - "doc": "The total number of frames encoded by the media source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "keyFramesEncoded", - "doc": "The total number of keyframes encoded on the corresponding RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "qpSum", - "doc": "The sum of the QP the media encoder provided on the corresponding RTP stream.", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "totalEncodeTime", - "doc": "The total time in seconds spent in encoding media frames for the corresponding RTP stream.", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qualityLimitationDurationNone", - "doc": "Time elapsed in seconds when the RTC connection has not limited the quality", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qualityLimitationDurationCPU", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of CPU", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qualityLimitationDurationBandwidth", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of Bandwidth", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qualityLimitationDurationOther", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of Other factor", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "qualityLimitationReason", - "doc": "Indicate a reason for the quality limitation of the corresponded synchronization source", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "qualityLimitationResolutionChanges", - "doc": "The total number of resolution changes occurred on the corresponded RTP stream due to quality changes", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "firCount", - "doc": "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "pliCount", - "doc": "The total number of Picture Loss Indication sent on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTime", - "doc": "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": "The sum of RTT measurements belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "fractionLost", - "doc": "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type": [ - "null", - "double" - ], - "default": null - }, - { - "name": "roundTripTimeMeasurements", - "doc": "The total number of calculated RR measurements received on this source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "framesDropped", - "doc": "The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "relayedSource", - "doc": "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type": [ - "null", - "boolean" - ], - "default": null - }, - { - "name": "width", - "doc": "The width, in pixels, of the last frame originating from the media source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "height", - "doc": "The height, in pixels, of the last frame originating from the media source", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "frames", - "doc": "The total number of frames originated from the media source", - "type": [ - "null", - "int" - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "iceLocalCandidates", - "doc": "List of local ICE candidates", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "IceLocalCandidate", - "type": "record", - "fields": [ - { - "name": "peerConnectionId", - "doc": "Refers to the peer connection the local candidate belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "id", - "doc": "The unique identifier of the local candidate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "address", - "doc": "The address of the local endpoint (Ipv4, Ipv6, FQDN)", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "port", - "doc": "The port number of the local endpoint the ICE uses", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "protocol", - "doc": "The protocol for the ICE", - "type": [ - "null", - { - "type": "enum", - "name": "LocalCandidateProtocol", - "symbols": [ - "tcp", - "udp" - ] - } - ], - "default": null - }, - { - "name": "candidateType", - "doc": "The type of the local candidate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "priority", - "doc": "The priority of the local candidate", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "url", - "doc": "The url of the ICE server", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "relayProtocol", - "doc": "The relay protocol the local candidate uses", - "type": [ - "null", - { - "type": "enum", - "name": "LocalCandidateRelayProtocol", - "symbols": [ - "tcp", - "udp", - "tls" - ] - } - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "iceRemoteCandidates", - "doc": "List of remote ICE candidates", - "type": [ - "null", - { - "type": "array", - "items": { - "name": "IceRemoteCandidate", - "type": "record", - "fields": [ - { - "name": "peerConnectionId", - "doc": "Refers to the peer connection the local candidate belongs to", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "id", - "doc": "The unique identifier of the local candidate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "address", - "doc": "The address of the local endpoint (Ipv4, Ipv6, FQDN)", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "port", - "doc": "The port number of the local endpoint the ICE uses", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "protocol", - "doc": "The protocol for the ICE", - "type": [ - "null", - { - "type": "enum", - "name": "RemoteCandidateProtocol", - "symbols": [ - "tcp", - "udp" - ] - } - ], - "default": null - }, - { - "name": "candidateType", - "doc": "The type of the local candidate", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "priority", - "doc": "The priority of the local candidate", - "type": [ - "null", - "long" - ], - "default": null - }, - { - "name": "url", - "doc": "The url of the ICE server", - "type": [ - "null", - "string" - ], - "default": null - }, - { - "name": "relayProtocol", - "doc": "The relay protocol the local candidate uses", - "type": [ - "null", - { - "type": "enum", - "name": "RemoteCandidateRelayProtocol", - "symbols": [ - "tcp", - "udp", - "tls" - ] - } - ], - "default": null - } - ] - } - } - ], - "default": null - }, - { - "name": "timestamp", - "doc": "The timestamp the sample is created in GMT", - "type": "long" - }, - { - "name": "timeZoneOffsetInHours", - "doc": "The offset from GMT in hours", - "type": [ - "null", - "int" - ], - "default": null - }, - { - "name": "marker", - "doc": "Special marker for the samples", - "type": [ - "null", - "string" - ], - "default": null - } - ] - } - } - ], - "default": null - }, { "name": "sfuSamples", "doc": "Samples taken from an Sfu", diff --git a/outputs/csv/CallEventReport-csv-header.txt b/outputs/csv/CallEventReport-csv-header.txt deleted file mode 100644 index 39a9afed..00000000 --- a/outputs/csv/CallEventReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, name, attachments, callId, clientId, marker, mediaTrackId, mediaUnitId, message, peerConnectionId, roomId, sampleSeq, sampleTimestamp, SSRC, userId, value \ No newline at end of file diff --git a/outputs/csv/CallMetaReport-csv-header.txt b/outputs/csv/CallMetaReport-csv-header.txt deleted file mode 100644 index de628e4a..00000000 --- a/outputs/csv/CallMetaReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, callId, clientId, marker, mediaUnitId, payload, peerConnectionId, roomId, sampleSeq, sampleTimestamp, type, userId \ No newline at end of file diff --git a/outputs/csv/ClientDataChannelReport-csv-header.txt b/outputs/csv/ClientDataChannelReport-csv-header.txt deleted file mode 100644 index 437637a5..00000000 --- a/outputs/csv/ClientDataChannelReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, bytesReceived, bytesSent, label, marker, messagesReceived, messagesSent, peerConnectionLabel, protocol, roomId, state, userId \ No newline at end of file diff --git a/outputs/csv/ClientExtensionReport-csv-header.txt b/outputs/csv/ClientExtensionReport-csv-header.txt deleted file mode 100644 index 98f8bf9c..00000000 --- a/outputs/csv/ClientExtensionReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, extensionType, callId, clientId, marker, mediaUnitId, payload, peerConnectionId, roomId, sampleSeq, userId \ No newline at end of file diff --git a/outputs/csv/IceCandidatePairReport-csv-header.txt b/outputs/csv/IceCandidatePairReport-csv-header.txt deleted file mode 100644 index fc9a67f8..00000000 --- a/outputs/csv/IceCandidatePairReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, availableIncomingBitrate, availableOutgoingBitrate, bytesDiscardedOnSend, bytesReceived, bytesSent, candidatePairId, consentRequestsSent, currentRoundTripTime, label, lastPacketReceivedTimestamp, lastPacketSentTimestamp, localCandidateId, marker, nominated, packetsDiscardedOnSend, packetsReceived, packetsSent, remoteCandidateId, requestsReceived, requestsSent, responsesReceived, responsesSent, roomId, state, totalRoundTripTime, transportId, userId \ No newline at end of file diff --git a/outputs/csv/InboundAudioTrackReport-csv-header.txt b/outputs/csv/InboundAudioTrackReport-csv-header.txt deleted file mode 100644 index 53474d77..00000000 --- a/outputs/csv/InboundAudioTrackReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, ssrc, audioLevel, bytesReceived, bytesSent, concealedSamples, concealmentEvents, decoderImplementation, estimatedPlayoutTimestamp, fecPacketsDiscarded, fecPacketsReceived, headerBytesReceived, insertedSamplesForDeceleration, jitter, jitterBufferDelay, jitterBufferEmittedCount, jitterBufferMinimumDelay, jitterBufferTargetDelay, label, lastPacketReceivedTimestamp, marker, nackCount, packetsDiscarded, packetsLost, packetsReceived, packetsSent, remoteClientId, remotePeerConnectionId, remoteTimestamp, remoteTrackId, remoteUserId, removedSamplesForAcceleration, reportsSent, roomId, roundTripTime, roundTripTimeMeasurements, sfuSinkId, sfuStreamId, silentConcealedSamples, synthesizedSamplesDuration, synthesizedSamplesEvents, totalAudioEnergy, totalPlayoutDelay, totalProcessingDelay, totalRoundTripTime, totalSamplesCount, totalSamplesDuration, totalSamplesReceived, trackId, userId \ No newline at end of file diff --git a/outputs/csv/InboundVideoTrackReport-csv-header.txt b/outputs/csv/InboundVideoTrackReport-csv-header.txt deleted file mode 100644 index 6aa9ce51..00000000 --- a/outputs/csv/InboundVideoTrackReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, ssrc, bytesReceived, bytesSent, decoderImplementation, estimatedPlayoutTimestamp, fecPacketsDiscarded, fecPacketsReceived, firCount, frameHeight, framesDecoded, framesDropped, framesPerSecond, framesReceived, frameWidth, headerBytesReceived, jitter, jitterBufferDelay, jitterBufferEmittedCount, jitterBufferMinimumDelay, jitterBufferTargetDelay, keyFramesDecoded, label, lastPacketReceivedTimestamp, marker, nackCount, packetsDiscarded, packetsLost, packetsReceived, packetsSent, pliCount, qpSum, remoteClientId, remotePeerConnectionId, remoteTimestamp, remoteTrackId, remoteUserId, reportsSent, roomId, roundTripTime, roundTripTimeMeasurements, sfuSinkId, sfuStreamId, totalDecodeTime, totalInterFrameDelay, totalProcessingDelay, totalRoundTripTime, totalSquaredInterFrameDelay, trackId, userId \ No newline at end of file diff --git a/outputs/csv/ObserverEventReport-csv-header.txt b/outputs/csv/ObserverEventReport-csv-header.txt deleted file mode 100644 index 04b7d6e2..00000000 --- a/outputs/csv/ObserverEventReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, callId, name, attachments, clientId, marker, mediaUnitId, message, peerConnectionId, roomId, sampleSeq, sampleTimestamp, userId, value \ No newline at end of file diff --git a/outputs/csv/OutboundAudioTrackReport-csv-header.txt b/outputs/csv/OutboundAudioTrackReport-csv-header.txt deleted file mode 100644 index ec476713..00000000 --- a/outputs/csv/OutboundAudioTrackReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, ssrc, active, audioLevel, averageRtcpInterval, bytesSent, droppedSamplesDuration, droppedSamplesEvents, echoReturnLoss, echoReturnLossEnhancement, encoderImplementation, fractionLost, headerBytesSent, jitter, label, marker, nackCount, packetsLost, packetsReceived, packetsSent, relayedSource, retransmittedBytesSent, retransmittedPacketsSent, rid, roomId, roundTripTime, roundTripTimeMeasurements, sfuStreamId, targetBitrate, totalAudioEnergy, totalCaptureDelay, totalEncodedBytesTarget, totalPacketSendDelay, totalRoundTripTime, totalSamplesCaptured, totalSamplesDuration, trackId, userId \ No newline at end of file diff --git a/outputs/csv/OutboundVideoTrackReport-csv-header.txt b/outputs/csv/OutboundVideoTrackReport-csv-header.txt deleted file mode 100644 index d001759e..00000000 --- a/outputs/csv/OutboundVideoTrackReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, sampleSeq, ssrc, active, averageRtcpInterval, bytesSent, encoderImplementation, firCount, fractionLost, frameHeight, frames, framesDropped, framesEncoded, framesPerSecond, framesSent, frameWidth, headerBytesSent, height, hugeFramesSent, jitter, keyFramesEncoded, label, marker, nackCount, packetsLost, packetsReceived, packetsSent, pliCount, qpSum, qualityLimitationDurationBandwidth, qualityLimitationDurationCPU, qualityLimitationDurationNone, qualityLimitationDurationOther, qualityLimitationReason, qualityLimitationResolutionChanges, relayedSource, retransmittedBytesSent, retransmittedPacketsSent, rid, roomId, roundTripTime, roundTripTimeMeasurements, sfuStreamId, targetBitrate, totalEncodedBytesTarget, totalEncodeTime, totalPacketSendDelay, totalRoundTripTime, trackId, userId, width \ No newline at end of file diff --git a/outputs/csv/PeerConnectionTransportReport-csv-header.txt b/outputs/csv/PeerConnectionTransportReport-csv-header.txt deleted file mode 100644 index 685bf984..00000000 --- a/outputs/csv/PeerConnectionTransportReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, timestamp, callId, clientId, peerConnectionId, transportId, sampleSeq, bytesReceived, bytesSent, dtlsCipher, dtlsRole, dtlsState, iceLocalUsernameFragment, iceRole, iceState, label, localCertificateId, marker, packetsReceived, packetsSent, remoteCertificateId, roomId, selectedCandidatePairChanges, selectedCandidatePairId, srtpCipher, tlsGroup, tlsVersion, userId \ No newline at end of file diff --git a/outputs/csv/Report-csv-header.txt b/outputs/csv/Report-csv-header.txt deleted file mode 100644 index f4f08c87..00000000 --- a/outputs/csv/Report-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -type, payload, schemaVersion \ No newline at end of file diff --git a/outputs/csv/SFUTransportReport-csv-header.txt b/outputs/csv/SFUTransportReport-csv-header.txt deleted file mode 100644 index 57705f01..00000000 --- a/outputs/csv/SFUTransportReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, sfuId, timestamp, transportId, callId, dtlsState, iceRole, iceState, internal, localAddress, localPort, marker, protocol, remoteAddress, remotePort, roomId, rtpBytesReceived, rtpBytesSent, rtpPacketsLost, rtpPacketsReceived, rtpPacketsSent, rtxBytesReceived, rtxBytesSent, rtxPacketsDiscarded, rtxPacketsLost, rtxPacketsReceived, rtxPacketsSent, sctpBytesReceived, sctpBytesSent, sctpPacketsReceived, sctpPacketsSent, sctpState \ No newline at end of file diff --git a/outputs/csv/SfuEventReport-csv-header.txt b/outputs/csv/SfuEventReport-csv-header.txt deleted file mode 100644 index 7f985bb8..00000000 --- a/outputs/csv/SfuEventReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, name, attachments, callId, marker, mediaSinkId, mediaStreamId, mediaUnitId, message, rtpPadId, sctpStreamId, sfuId, transportId, value \ No newline at end of file diff --git a/outputs/csv/SfuExtensionReport-csv-header.txt b/outputs/csv/SfuExtensionReport-csv-header.txt deleted file mode 100644 index 40d7999b..00000000 --- a/outputs/csv/SfuExtensionReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, extensionType, marker, mediaUnitId, payload, sfuId \ No newline at end of file diff --git a/outputs/csv/SfuInboundRtpPadReport-csv-header.txt b/outputs/csv/SfuInboundRtpPadReport-csv-header.txt deleted file mode 100644 index 658f57ab..00000000 --- a/outputs/csv/SfuInboundRtpPadReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, sfuId, timestamp, transportId, sfuStreamId, rtpPadId, ssrc, bytesReceived, callId, clientId, clockRate, fecPacketsDiscarded, fecPacketsReceived, firCount, fractionLost, framesDecoded, framesReceived, internal, jitter, keyFramesDecoded, marker, mediaType, mimeType, nackCount, packetsDiscarded, packetsDuplicated, packetsFailedDecryption, packetsLost, packetsReceived, packetsRepaired, payloadType, pliCount, remoteRtpPadId, remoteSfuId, remoteSinkId, remoteTransportId, rid, roundTripTime, rtcpRrSent, rtcpSrReceived, rtxPacketsDiscarded, rtxPacketsReceived, rtxSsrc, sdpFmtpLine, sliCount, targetBitrate, trackId, voiceActivityFlag \ No newline at end of file diff --git a/outputs/csv/SfuMetaReport-csv-header.txt b/outputs/csv/SfuMetaReport-csv-header.txt deleted file mode 100644 index 7887752b..00000000 --- a/outputs/csv/SfuMetaReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, timestamp, callId, marker, mediaSinkId, mediaStreamId, mediaUnitId, payload, rtpPadId, sctpStreamId, sfuId, transportId, type \ No newline at end of file diff --git a/outputs/csv/SfuOutboundRtpPadReport-csv-header.txt b/outputs/csv/SfuOutboundRtpPadReport-csv-header.txt deleted file mode 100644 index 0500c597..00000000 --- a/outputs/csv/SfuOutboundRtpPadReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, sfuId, timestamp, transportId, sfuStreamId, sfuSinkId, rtpPadId, ssrc, bytesSent, callId, clientId, clockRate, fecPacketsDiscarded, fecPacketsSent, firCount, framesEncoded, framesSent, internal, keyFramesEncoded, marker, mediaType, mimeType, nackCount, packetsDiscarded, packetsDuplicated, packetsFailedEncryption, packetsLost, packetsRetransmitted, packetsSent, payloadType, pliCount, rid, roundTripTime, rtcpRrReceived, rtcpSrSent, rtxPacketsDiscarded, rtxPacketsSent, rtxSsrc, sdpFmtpLine, sliCount, targetBitrate, trackId, voiceActivityFlag \ No newline at end of file diff --git a/outputs/csv/SfuSctpStreamReport-csv-header.txt b/outputs/csv/SfuSctpStreamReport-csv-header.txt deleted file mode 100644 index 6a514846..00000000 --- a/outputs/csv/SfuSctpStreamReport-csv-header.txt +++ /dev/null @@ -1 +0,0 @@ -serviceId, mediaUnitId, sfuId, timestamp, transportId, streamId, bytesReceived, bytesSent, callId, internal, label, marker, messageReceived, messageSent, protocol, roomId, sctpCongestionWindow, sctpMtu, sctpReceiverWindow, sctpSmoothedRoundTripTime, sctpUnackData \ No newline at end of file diff --git a/outputs/generated.txt b/outputs/generated.txt index 7c72c8cc..19755ef2 100644 --- a/outputs/generated.txt +++ b/outputs/generated.txt @@ -1 +1 @@ -Generated from schema version 2.2.12 at Mon, 13 Nov 2023 11:58:08 GMT \ No newline at end of file +Generated from schema version 3.0.0 at Fri, 10 Jan 2025 13:50:54 GMT \ No newline at end of file diff --git a/outputs/proto/ProtobufClientSample.proto b/outputs/proto/ProtobufClientSample.proto new file mode 100644 index 00000000..7ff0eab6 --- /dev/null +++ b/outputs/proto/ProtobufClientSample.proto @@ -0,0 +1,345 @@ +syntax = "proto2"; + +package org.observertc.schemas.protobuf; + +/** +* Schema Version: 3.0.0 +*/ +message ClientSample { + message PeerConnectionSample { + message CodecStats { + required string id = 1; + required string mimeType = 2; + required int32 payloadType = 3; + required double timestamp = 4; + required string transportId = 5; + required string type = 6; + optional string appData = 7; + optional int32 channels = 8; + optional int32 clockRate = 9; + optional string sdpFmtpLine = 10; + } + message InboundRtpStats { + required string id = 1; + required string kind = 2; + required int64 ssrc = 3; + required int64 timestamp = 4; + required string trackIdentifier = 5; + optional string appData = 6; + optional double audioLevel = 7; + optional int64 bytesReceived = 8; + optional string codecId = 9; + optional int32 concealedSamples = 10; + optional int32 concealmentEvents = 11; + optional int32 corruptionMeasurements = 12; + optional string decoderImplementation = 13; + optional double estimatedPlayoutTimestamp = 14; + optional int64 fecBytesReceived = 15; + optional int32 fecPacketsDiscarded = 16; + optional int32 fecPacketsReceived = 17; + optional int64 fecSsrc = 18; + optional int32 firCount = 19; + optional int32 frameHeight = 20; + optional int32 frameWidth = 21; + optional int32 framesAssembledFromMultiplePackets = 22; + optional int32 framesDecoded = 23; + optional int32 framesDropped = 24; + optional double framesPerSecond = 25; + optional int32 framesReceived = 26; + optional int32 framesRendered = 27; + optional int32 freezeCount = 28; + optional int64 headerBytesReceived = 29; + optional int32 insertedSamplesForDeceleration = 30; + optional double jitter = 31; + optional double jitterBufferDelay = 32; + optional int32 jitterBufferEmittedCount = 33; + optional double jitterBufferMinimumDelay = 34; + optional double jitterBufferTargetDelay = 35; + optional int32 keyFramesDecoded = 36; + optional double lastPacketReceivedTimestamp = 37; + optional string mid = 38; + optional int32 nackCount = 39; + optional int32 packetsDiscarded = 40; + optional int32 packetsLost = 41; + optional int32 packetsReceived = 42; + optional int32 pauseCount = 43; + optional string playoutId = 44; + optional int32 pliCount = 45; + optional bool powerEfficientDecoder = 46; + optional double qpSum = 47; + optional string remoteId = 48; + optional int32 removedSamplesForAcceleration = 49; + optional int64 retransmittedBytesReceived = 50; + optional int32 retransmittedPacketsReceived = 51; + optional int64 rtxSsrc = 52; + optional int32 silentConcealedSamples = 53; + optional double totalAssemblyTime = 54; + optional double totalAudioEnergy = 55; + optional double totalCorruptionProbability = 56; + optional double totalDecodeTime = 57; + optional double totalFreezesDuration = 58; + optional double totalInterFrameDelay = 59; + optional double totalPausesDuration = 60; + optional double totalProcessingDelay = 61; + optional double totalSamplesDuration = 62; + optional int32 totalSamplesReceived = 63; + optional double totalSquaredCorruptionProbability = 64; + optional double totalSquaredInterFrameDelay = 65; + optional string transportId = 66; + } + message RemoteInboundRtpStats { + required string id = 1; + required string kind = 2; + required int64 ssrc = 3; + required double timestamp = 4; + optional string appData = 5; + optional string codecId = 6; + optional double fractionLost = 7; + optional double jitter = 8; + optional string localId = 9; + optional int32 packetsLost = 10; + optional int32 packetsReceived = 11; + optional double roundTripTime = 12; + optional int32 roundTripTimeMeasurements = 13; + optional double totalRoundTripTime = 14; + optional string transportId = 15; + } + message OutboundRtpStats { + message QualityLimitationDurations { + required double bandwidth = 1; + required double cpu = 2; + required double none = 3; + required double other = 4; + } + required string id = 1; + required string kind = 2; + required int64 ssrc = 3; + required double timestamp = 4; + optional bool active = 5; + optional string appData = 6; + optional int32 bytesSent = 7; + optional string codecId = 8; + optional string encoderImplementation = 9; + optional int32 firCount = 10; + optional int32 frameHeight = 11; + optional int32 frameWidth = 12; + optional int32 framesEncoded = 13; + optional double framesPerSecond = 14; + optional int32 framesSent = 15; + optional int32 headerBytesSent = 16; + optional int32 hugeFramesSent = 17; + optional int32 keyFramesEncoded = 18; + optional string mediaSourceId = 19; + optional string mid = 20; + optional int32 nackCount = 21; + optional int32 packetsSent = 22; + optional int32 pliCount = 23; + optional bool powerEfficientEncoder = 24; + optional double qpSum = 25; + optional QualityLimitationDurations qualityLimitationDurations = 26; + optional string qualityLimitationReason = 27; + optional int32 qualityLimitationResolutionChanges = 28; + optional string remoteId = 29; + optional int32 retransmittedBytesSent = 30; + optional int32 retransmittedPacketsSent = 31; + optional string rid = 32; + optional int32 rtxSsrc = 33; + optional string scalabilityMode = 34; + optional double targetBitrate = 35; + optional double totalEncodeTime = 36; + optional int32 totalEncodedBytesTarget = 37; + optional double totalPacketSendDelay = 38; + optional string transportId = 39; + } + message RemoteOutboundRtpStats { + required string id = 1; + required string kind = 2; + required int64 ssrc = 3; + required double timestamp = 4; + optional string appData = 5; + optional int64 bytesSent = 6; + optional string codecId = 7; + optional string localId = 8; + optional int32 packetsSent = 9; + optional double remoteTimestamp = 10; + optional int32 reportsSent = 11; + optional double roundTripTime = 12; + optional int32 roundTripTimeMeasurements = 13; + optional double totalRoundTripTime = 14; + optional string transportId = 15; + } + message AudioSourceStats { + required string id = 1; + required string kind = 2; + required double timestamp = 3; + required string trackIdentifier = 4; + optional string appData = 5; + optional double audioLevel = 6; + optional double echoReturnLoss = 7; + optional double echoReturnLossEnhancement = 8; + optional double totalAudioEnergy = 9; + optional double totalSamplesDuration = 10; + } + message VideoSourceStats { + required int32 frames = 1; + required double framesPerSecond = 2; + required int32 height = 3; + required string id = 4; + required string kind = 5; + required double timestamp = 6; + required string trackIdentifier = 7; + required int32 width = 8; + optional string appData = 9; + } + message AudioPlayoutStats { + required string id = 1; + required string kind = 2; + required double synthesizedSamplesDuration = 3; + required int32 synthesizedSamplesEvents = 4; + required double timestamp = 5; + required double totalPlayoutDelay = 6; + required int32 totalSamplesCount = 7; + required double totalSamplesDuration = 8; + optional string appData = 9; + } + message PeerConnectionTransportStats { + required int32 dataChannelsClosed = 1; + required int32 dataChannelsOpened = 2; + required string id = 3; + required double timestamp = 4; + optional string appData = 5; + } + message DataChannelStats { + required int64 bytesReceived = 1; + required int64 bytesSent = 2; + required int32 dataChannelIdentifier = 3; + required string id = 4; + required string label = 5; + required int32 messagesReceived = 6; + required int32 messagesSent = 7; + required string protocol = 8; + required string state = 9; + required double timestamp = 10; + optional string appData = 11; + } + message IceTransportStats { + required int64 bytesReceived = 1; + required int64 bytesSent = 2; + required string dtlsCipher = 3; + required string dtlsRole = 4; + required string dtlsState = 5; + required string iceLocalUsernameFragment = 6; + required string iceRole = 7; + required string iceState = 8; + required string id = 9; + required string localCertificateId = 10; + required int32 packetsReceived = 11; + required int32 packetsSent = 12; + required string remoteCertificateId = 13; + required int32 selectedCandidatePairChanges = 14; + required string selectedCandidatePairId = 15; + required string srtpCipher = 16; + required double timestamp = 17; + required string tlsVersion = 18; + optional string appData = 19; + } + message IceCandidateStats { + required string candidateType = 1; + required string foundation = 2; + required string id = 3; + required int32 port = 4; + required int64 priority = 5; + required string protocol = 6; + required string relatedAddress = 7; + required int32 relatedPort = 8; + required string relayProtocol = 9; + required string tcpType = 10; + required double timestamp = 11; + required string transportId = 12; + required string url = 13; + required string usernameFragment = 14; + optional string address = 15; + optional string appData = 16; + } + message IceCandidatePairStats { + required double availableIncomingBitrate = 1; + required double availableOutgoingBitrate = 2; + required int64 bytesDiscardedOnSend = 3; + required int64 bytesReceived = 4; + required int64 bytesSent = 5; + required int32 consentRequestsSent = 6; + required double currentRoundTripTime = 7; + required string id = 8; + required double lastPacketReceivedTimestamp = 9; + required double lastPacketSentTimestamp = 10; + required string localCandidateId = 11; + required bool nominated = 12; + required int32 packetsDiscardedOnSend = 13; + required int32 packetsReceived = 14; + required int32 packetsSent = 15; + required string remoteCandidateId = 16; + required int32 requestsReceived = 17; + required int32 requestsSent = 18; + required int32 responsesReceived = 19; + required int32 responsesSent = 20; + required double timestamp = 21; + required double totalRoundTripTime = 22; + required string transportId = 23; + optional string appData = 24; + optional string state = 25; + } + message CertificateStats { + required string base64Certificate = 1; + required string fingerprint = 2; + required string fingerprintAlgorithm = 3; + required string id = 4; + required double timestamp = 5; + optional string appData = 6; + optional string issuerCertificateId = 7; + } + repeated AudioPlayoutStats audioPlayouts = 1; + repeated AudioSourceStats audioSources = 2; + repeated CertificateStats certificates = 3; + repeated CodecStats codecs = 4; + repeated DataChannelStats dataChannels = 5; + repeated IceCandidatePairStats iceCandidatePairs = 6; + repeated IceCandidateStats iceCandidates = 7; + repeated IceTransportStats iceTransports = 8; + repeated InboundRtpStats inboundRtps = 9; + repeated OutboundRtpStats outboundRtps = 10; + repeated PeerConnectionTransportStats peerConnectionTransports = 11; + repeated RemoteInboundRtpStats remoteInboundRtps = 12; + repeated RemoteOutboundRtpStats remoteOutboundRtps = 13; + repeated VideoSourceStats videoSources = 14; + required string peerConnectionId = 15; + optional string appData = 16; + } + message ClientEvent { + required string type = 1; + optional string payload = 2; + optional string peerConnectionId = 3; + optional int64 ssrc = 4; + optional int64 timestamp = 5; + optional string trackId = 6; + } + message ClientMetaData { + required string type = 1; + optional string payload = 2; + optional string peerConnectionId = 3; + optional int64 ssrc = 4; + optional int64 timestamp = 5; + optional string trackId = 6; + } + message ExtensionStat { + required string payload = 1; + required string type = 2; + } + repeated ClientEvent clientEvents = 1; + repeated ClientMetaData clientMetaItems = 2; + repeated ExtensionStat extensionStats = 3; + repeated PeerConnectionSample peerConnections = 4; + required string clientId = 5; + required int64 timestamp = 6; + optional string appData = 7; + optional string callId = 8; +} \ No newline at end of file diff --git a/outputs/proto/ProtobufClientSampleV3.proto b/outputs/proto/ProtobufClientSampleV3.proto new file mode 100644 index 00000000..f754ea26 --- /dev/null +++ b/outputs/proto/ProtobufClientSampleV3.proto @@ -0,0 +1,352 @@ +syntax = "proto3"; + +package org.observertc.schemas.protobuf; + +/** +* Schema Version: 3.0.0 +*/ +message ClientSample { + message PeerConnectionSample { + message CodecStats { + string id = 1; + string mimeType = 2; + int32 payloadType = 3; + double timestamp = 4; + string transportId = 5; + string type = 6; + bytes appData = 7; + int32 channels = 8; + int32 clockRate = 9; + string sdpFmtpLine = 10; + } + message InboundRtpStats { + string id = 1; + string kind = 2; + int64 ssrc = 3; + int64 timestamp = 4; + bytes trackIdentifier = 5; + bytes appData = 6; + double audioLevel = 7; + int64 bytesReceived = 8; + string codecId = 9; + int32 concealedSamples = 10; + int32 concealmentEvents = 11; + int32 corruptionMeasurements = 12; + string decoderImplementation = 13; + double estimatedPlayoutTimestamp = 14; + int64 fecBytesReceived = 15; + int32 fecPacketsDiscarded = 16; + int32 fecPacketsReceived = 17; + int64 fecSsrc = 18; + int32 firCount = 19; + int32 frameHeight = 20; + int32 frameWidth = 21; + int32 framesAssembledFromMultiplePackets = 22; + int32 framesDecoded = 23; + int32 framesDropped = 24; + double framesPerSecond = 25; + int32 framesReceived = 26; + int32 framesRendered = 27; + int32 freezeCount = 28; + int64 headerBytesReceived = 29; + int32 insertedSamplesForDeceleration = 30; + double jitter = 31; + double jitterBufferDelay = 32; + int32 jitterBufferEmittedCount = 33; + double jitterBufferMinimumDelay = 34; + double jitterBufferTargetDelay = 35; + int32 keyFramesDecoded = 36; + double lastPacketReceivedTimestamp = 37; + string mid = 38; + int32 nackCount = 39; + int32 packetsDiscarded = 40; + int32 packetsLost = 41; + int32 packetsReceived = 42; + int32 pauseCount = 43; + string playoutId = 44; + int32 pliCount = 45; + bool powerEfficientDecoder = 46; + double qpSum = 47; + string remoteId = 48; + int32 removedSamplesForAcceleration = 49; + int64 retransmittedBytesReceived = 50; + int32 retransmittedPacketsReceived = 51; + int64 rtxSsrc = 52; + int32 silentConcealedSamples = 53; + double totalAssemblyTime = 54; + double totalAudioEnergy = 55; + double totalCorruptionProbability = 56; + double totalDecodeTime = 57; + double totalFreezesDuration = 58; + double totalInterFrameDelay = 59; + double totalPausesDuration = 60; + double totalProcessingDelay = 61; + double totalSamplesDuration = 62; + int32 totalSamplesReceived = 63; + double totalSquaredCorruptionProbability = 64; + double totalSquaredInterFrameDelay = 65; + string transportId = 66; + } + message RemoteInboundRtpStats { + string id = 1; + string kind = 2; + int64 ssrc = 3; + double timestamp = 4; + bytes appData = 5; + string codecId = 6; + double fractionLost = 7; + double jitter = 8; + string localId = 9; + int32 packetsLost = 10; + int32 packetsReceived = 11; + double roundTripTime = 12; + int32 roundTripTimeMeasurements = 13; + double totalRoundTripTime = 14; + string transportId = 15; + } + message OutboundRtpStats { + message QualityLimitationDurations { + double bandwidth = 1; + double cpu = 2; + double none = 3; + double other = 4; + } + string id = 1; + string kind = 2; + int64 ssrc = 3; + double timestamp = 4; + bool active = 5; + bytes appData = 6; + int32 bytesSent = 7; + string codecId = 8; + string encoderImplementation = 9; + int32 firCount = 10; + int32 frameHeight = 11; + int32 frameWidth = 12; + int32 framesEncoded = 13; + double framesPerSecond = 14; + int32 framesSent = 15; + int32 headerBytesSent = 16; + int32 hugeFramesSent = 17; + int32 keyFramesEncoded = 18; + string mediaSourceId = 19; + string mid = 20; + int32 nackCount = 21; + int32 packetsSent = 22; + int32 pliCount = 23; + bool powerEfficientEncoder = 24; + double qpSum = 25; + QualityLimitationDurations qualityLimitationDurations = 26; + string qualityLimitationReason = 27; + int32 qualityLimitationResolutionChanges = 28; + string remoteId = 29; + int32 retransmittedBytesSent = 30; + int32 retransmittedPacketsSent = 31; + string rid = 32; + int32 rtxSsrc = 33; + string scalabilityMode = 34; + double targetBitrate = 35; + double totalEncodeTime = 36; + int32 totalEncodedBytesTarget = 37; + double totalPacketSendDelay = 38; + string transportId = 39; + } + message RemoteOutboundRtpStats { + string id = 1; + string kind = 2; + int64 ssrc = 3; + double timestamp = 4; + bytes appData = 5; + int64 bytesSent = 6; + string codecId = 7; + string localId = 8; + int32 packetsSent = 9; + double remoteTimestamp = 10; + int32 reportsSent = 11; + double roundTripTime = 12; + int32 roundTripTimeMeasurements = 13; + double totalRoundTripTime = 14; + string transportId = 15; + } + message AudioSourceStats { + string id = 1; + string kind = 2; + double timestamp = 3; + bytes trackIdentifier = 4; + bytes appData = 5; + double audioLevel = 6; + double echoReturnLoss = 7; + double echoReturnLossEnhancement = 8; + double totalAudioEnergy = 9; + double totalSamplesDuration = 10; + } + message VideoSourceStats { + int32 frames = 1; + double framesPerSecond = 2; + int32 height = 3; + string id = 4; + string kind = 5; + double timestamp = 6; + bytes trackIdentifier = 7; + int32 width = 8; + bytes appData = 9; + } + message AudioPlayoutStats { + string id = 1; + string kind = 2; + double synthesizedSamplesDuration = 3; + int32 synthesizedSamplesEvents = 4; + double timestamp = 5; + double totalPlayoutDelay = 6; + int32 totalSamplesCount = 7; + double totalSamplesDuration = 8; + bytes appData = 9; + } + message PeerConnectionTransportStats { + int32 dataChannelsClosed = 1; + int32 dataChannelsOpened = 2; + string id = 3; + double timestamp = 4; + bytes appData = 5; + } + message DataChannelStats { + int64 bytesReceived = 1; + int64 bytesSent = 2; + int32 dataChannelIdentifier = 3; + string id = 4; + string label = 5; + int32 messagesReceived = 6; + int32 messagesSent = 7; + string protocol = 8; + string state = 9; + double timestamp = 10; + bytes appData = 11; + } + message IceTransportStats { + int64 bytesReceived = 1; + int64 bytesSent = 2; + string dtlsCipher = 3; + string dtlsRole = 4; + string dtlsState = 5; + string iceLocalUsernameFragment = 6; + string iceRole = 7; + string iceState = 8; + string id = 9; + string localCertificateId = 10; + int32 packetsReceived = 11; + int32 packetsSent = 12; + string remoteCertificateId = 13; + int32 selectedCandidatePairChanges = 14; + string selectedCandidatePairId = 15; + string srtpCipher = 16; + double timestamp = 17; + string tlsVersion = 18; + bytes appData = 19; + } + message IceCandidateStats { + string candidateType = 1; + string foundation = 2; + string id = 3; + int32 port = 4; + int64 priority = 5; + string protocol = 6; + string relatedAddress = 7; + int32 relatedPort = 8; + string relayProtocol = 9; + string tcpType = 10; + double timestamp = 11; + string transportId = 12; + string url = 13; + string usernameFragment = 14; + string address = 15; + bytes appData = 16; + } + message IceCandidatePairStats { + enum IceCandidatePairStatsEnum { + /* For state */ + NEW = 0; + INPROGRESS = 1; + FAILED = 2; + SUCCEEDED = 3; + } + double availableIncomingBitrate = 1; + double availableOutgoingBitrate = 2; + int64 bytesDiscardedOnSend = 3; + int64 bytesReceived = 4; + int64 bytesSent = 5; + int32 consentRequestsSent = 6; + double currentRoundTripTime = 7; + string id = 8; + double lastPacketReceivedTimestamp = 9; + double lastPacketSentTimestamp = 10; + string localCandidateId = 11; + bool nominated = 12; + int32 packetsDiscardedOnSend = 13; + int32 packetsReceived = 14; + int32 packetsSent = 15; + string remoteCandidateId = 16; + int32 requestsReceived = 17; + int32 requestsSent = 18; + int32 responsesReceived = 19; + int32 responsesSent = 20; + double timestamp = 21; + double totalRoundTripTime = 22; + string transportId = 23; + bytes appData = 24; + IceCandidatePairStatsEnum state = 25; + } + message CertificateStats { + string base64Certificate = 1; + string fingerprint = 2; + string fingerprintAlgorithm = 3; + string id = 4; + double timestamp = 5; + bytes appData = 6; + string issuerCertificateId = 7; + } + repeated AudioPlayoutStats audioPlayouts = 1; + repeated AudioSourceStats audioSources = 2; + repeated CertificateStats certificates = 3; + repeated CodecStats codecs = 4; + repeated DataChannelStats dataChannels = 5; + repeated IceCandidatePairStats iceCandidatePairs = 6; + repeated IceCandidateStats iceCandidates = 7; + repeated IceTransportStats iceTransports = 8; + repeated InboundRtpStats inboundRtps = 9; + repeated OutboundRtpStats outboundRtps = 10; + repeated PeerConnectionTransportStats peerConnectionTransports = 11; + repeated RemoteInboundRtpStats remoteInboundRtps = 12; + repeated RemoteOutboundRtpStats remoteOutboundRtps = 13; + repeated VideoSourceStats videoSources = 14; + bytes peerConnectionId = 15; + bytes appData = 16; + } + message ClientEvent { + string type = 1; + string payload = 2; + bytes peerConnectionId = 3; + int64 ssrc = 4; + int64 timestamp = 5; + bytes trackId = 6; + } + message ClientMetaData { + string type = 1; + string payload = 2; + bytes peerConnectionId = 3; + int64 ssrc = 4; + int64 timestamp = 5; + bytes trackId = 6; + } + message ExtensionStat { + string payload = 1; + string type = 2; + } + repeated ClientEvent clientEvents = 1; + repeated ClientMetaData clientMetaItems = 2; + repeated ExtensionStat extensionStats = 3; + repeated PeerConnectionSample peerConnections = 4; + bytes clientId = 5; + int64 timestamp = 6; + bytes appData = 7; + bytes callId = 8; +} \ No newline at end of file diff --git a/outputs/proto/ProtobufClientSampleV3Optional.proto b/outputs/proto/ProtobufClientSampleV3Optional.proto new file mode 100644 index 00000000..7cf1b308 --- /dev/null +++ b/outputs/proto/ProtobufClientSampleV3Optional.proto @@ -0,0 +1,352 @@ +syntax = "proto3"; + +package org.observertc.schemas.protobuf; + +/** +* Schema Version: 3.0.0 +*/ +message ClientSample { + message PeerConnectionSample { + message CodecStats { + optional string id = 1; + optional string mimeType = 2; + optional int32 payloadType = 3; + optional double timestamp = 4; + optional string transportId = 5; + optional string type = 6; + optional bytes appData = 7; + optional int32 channels = 8; + optional int32 clockRate = 9; + optional string sdpFmtpLine = 10; + } + message InboundRtpStats { + optional string id = 1; + optional string kind = 2; + optional int64 ssrc = 3; + optional int64 timestamp = 4; + optional bytes trackIdentifier = 5; + optional bytes appData = 6; + optional double audioLevel = 7; + optional int64 bytesReceived = 8; + optional string codecId = 9; + optional int32 concealedSamples = 10; + optional int32 concealmentEvents = 11; + optional int32 corruptionMeasurements = 12; + optional string decoderImplementation = 13; + optional double estimatedPlayoutTimestamp = 14; + optional int64 fecBytesReceived = 15; + optional int32 fecPacketsDiscarded = 16; + optional int32 fecPacketsReceived = 17; + optional int64 fecSsrc = 18; + optional int32 firCount = 19; + optional int32 frameHeight = 20; + optional int32 frameWidth = 21; + optional int32 framesAssembledFromMultiplePackets = 22; + optional int32 framesDecoded = 23; + optional int32 framesDropped = 24; + optional double framesPerSecond = 25; + optional int32 framesReceived = 26; + optional int32 framesRendered = 27; + optional int32 freezeCount = 28; + optional int64 headerBytesReceived = 29; + optional int32 insertedSamplesForDeceleration = 30; + optional double jitter = 31; + optional double jitterBufferDelay = 32; + optional int32 jitterBufferEmittedCount = 33; + optional double jitterBufferMinimumDelay = 34; + optional double jitterBufferTargetDelay = 35; + optional int32 keyFramesDecoded = 36; + optional double lastPacketReceivedTimestamp = 37; + optional string mid = 38; + optional int32 nackCount = 39; + optional int32 packetsDiscarded = 40; + optional int32 packetsLost = 41; + optional int32 packetsReceived = 42; + optional int32 pauseCount = 43; + optional string playoutId = 44; + optional int32 pliCount = 45; + optional bool powerEfficientDecoder = 46; + optional double qpSum = 47; + optional string remoteId = 48; + optional int32 removedSamplesForAcceleration = 49; + optional int64 retransmittedBytesReceived = 50; + optional int32 retransmittedPacketsReceived = 51; + optional int64 rtxSsrc = 52; + optional int32 silentConcealedSamples = 53; + optional double totalAssemblyTime = 54; + optional double totalAudioEnergy = 55; + optional double totalCorruptionProbability = 56; + optional double totalDecodeTime = 57; + optional double totalFreezesDuration = 58; + optional double totalInterFrameDelay = 59; + optional double totalPausesDuration = 60; + optional double totalProcessingDelay = 61; + optional double totalSamplesDuration = 62; + optional int32 totalSamplesReceived = 63; + optional double totalSquaredCorruptionProbability = 64; + optional double totalSquaredInterFrameDelay = 65; + optional string transportId = 66; + } + message RemoteInboundRtpStats { + optional string id = 1; + optional string kind = 2; + optional int64 ssrc = 3; + optional double timestamp = 4; + optional bytes appData = 5; + optional string codecId = 6; + optional double fractionLost = 7; + optional double jitter = 8; + optional string localId = 9; + optional int32 packetsLost = 10; + optional int32 packetsReceived = 11; + optional double roundTripTime = 12; + optional int32 roundTripTimeMeasurements = 13; + optional double totalRoundTripTime = 14; + optional string transportId = 15; + } + message OutboundRtpStats { + message QualityLimitationDurations { + optional double bandwidth = 1; + optional double cpu = 2; + optional double none = 3; + optional double other = 4; + } + optional string id = 1; + optional string kind = 2; + optional int64 ssrc = 3; + optional double timestamp = 4; + optional bool active = 5; + optional bytes appData = 6; + optional int32 bytesSent = 7; + optional string codecId = 8; + optional string encoderImplementation = 9; + optional int32 firCount = 10; + optional int32 frameHeight = 11; + optional int32 frameWidth = 12; + optional int32 framesEncoded = 13; + optional double framesPerSecond = 14; + optional int32 framesSent = 15; + optional int32 headerBytesSent = 16; + optional int32 hugeFramesSent = 17; + optional int32 keyFramesEncoded = 18; + optional string mediaSourceId = 19; + optional string mid = 20; + optional int32 nackCount = 21; + optional int32 packetsSent = 22; + optional int32 pliCount = 23; + optional bool powerEfficientEncoder = 24; + optional double qpSum = 25; + optional QualityLimitationDurations qualityLimitationDurations = 26; + optional string qualityLimitationReason = 27; + optional int32 qualityLimitationResolutionChanges = 28; + optional string remoteId = 29; + optional int32 retransmittedBytesSent = 30; + optional int32 retransmittedPacketsSent = 31; + optional string rid = 32; + optional int32 rtxSsrc = 33; + optional string scalabilityMode = 34; + optional double targetBitrate = 35; + optional double totalEncodeTime = 36; + optional int32 totalEncodedBytesTarget = 37; + optional double totalPacketSendDelay = 38; + optional string transportId = 39; + } + message RemoteOutboundRtpStats { + optional string id = 1; + optional string kind = 2; + optional int64 ssrc = 3; + optional double timestamp = 4; + optional bytes appData = 5; + optional int64 bytesSent = 6; + optional string codecId = 7; + optional string localId = 8; + optional int32 packetsSent = 9; + optional double remoteTimestamp = 10; + optional int32 reportsSent = 11; + optional double roundTripTime = 12; + optional int32 roundTripTimeMeasurements = 13; + optional double totalRoundTripTime = 14; + optional string transportId = 15; + } + message AudioSourceStats { + optional string id = 1; + optional string kind = 2; + optional double timestamp = 3; + optional bytes trackIdentifier = 4; + optional bytes appData = 5; + optional double audioLevel = 6; + optional double echoReturnLoss = 7; + optional double echoReturnLossEnhancement = 8; + optional double totalAudioEnergy = 9; + optional double totalSamplesDuration = 10; + } + message VideoSourceStats { + optional int32 frames = 1; + optional double framesPerSecond = 2; + optional int32 height = 3; + optional string id = 4; + optional string kind = 5; + optional double timestamp = 6; + optional bytes trackIdentifier = 7; + optional int32 width = 8; + optional bytes appData = 9; + } + message AudioPlayoutStats { + optional string id = 1; + optional string kind = 2; + optional double synthesizedSamplesDuration = 3; + optional int32 synthesizedSamplesEvents = 4; + optional double timestamp = 5; + optional double totalPlayoutDelay = 6; + optional int32 totalSamplesCount = 7; + optional double totalSamplesDuration = 8; + optional bytes appData = 9; + } + message PeerConnectionTransportStats { + optional int32 dataChannelsClosed = 1; + optional int32 dataChannelsOpened = 2; + optional string id = 3; + optional double timestamp = 4; + optional bytes appData = 5; + } + message DataChannelStats { + optional int64 bytesReceived = 1; + optional int64 bytesSent = 2; + optional int32 dataChannelIdentifier = 3; + optional string id = 4; + optional string label = 5; + optional int32 messagesReceived = 6; + optional int32 messagesSent = 7; + optional string protocol = 8; + optional string state = 9; + optional double timestamp = 10; + optional bytes appData = 11; + } + message IceTransportStats { + optional int64 bytesReceived = 1; + optional int64 bytesSent = 2; + optional string dtlsCipher = 3; + optional string dtlsRole = 4; + optional string dtlsState = 5; + optional string iceLocalUsernameFragment = 6; + optional string iceRole = 7; + optional string iceState = 8; + optional string id = 9; + optional string localCertificateId = 10; + optional int32 packetsReceived = 11; + optional int32 packetsSent = 12; + optional string remoteCertificateId = 13; + optional int32 selectedCandidatePairChanges = 14; + optional string selectedCandidatePairId = 15; + optional string srtpCipher = 16; + optional double timestamp = 17; + optional string tlsVersion = 18; + optional bytes appData = 19; + } + message IceCandidateStats { + optional string candidateType = 1; + optional string foundation = 2; + optional string id = 3; + optional int32 port = 4; + optional int64 priority = 5; + optional string protocol = 6; + optional string relatedAddress = 7; + optional int32 relatedPort = 8; + optional string relayProtocol = 9; + optional string tcpType = 10; + optional double timestamp = 11; + optional string transportId = 12; + optional string url = 13; + optional string usernameFragment = 14; + optional string address = 15; + optional bytes appData = 16; + } + message IceCandidatePairStats { + enum IceCandidatePairStatsEnum { + /* For state */ + NEW = 0; + INPROGRESS = 1; + FAILED = 2; + SUCCEEDED = 3; + } + optional double availableIncomingBitrate = 1; + optional double availableOutgoingBitrate = 2; + optional int64 bytesDiscardedOnSend = 3; + optional int64 bytesReceived = 4; + optional int64 bytesSent = 5; + optional int32 consentRequestsSent = 6; + optional double currentRoundTripTime = 7; + optional string id = 8; + optional double lastPacketReceivedTimestamp = 9; + optional double lastPacketSentTimestamp = 10; + optional string localCandidateId = 11; + optional bool nominated = 12; + optional int32 packetsDiscardedOnSend = 13; + optional int32 packetsReceived = 14; + optional int32 packetsSent = 15; + optional string remoteCandidateId = 16; + optional int32 requestsReceived = 17; + optional int32 requestsSent = 18; + optional int32 responsesReceived = 19; + optional int32 responsesSent = 20; + optional double timestamp = 21; + optional double totalRoundTripTime = 22; + optional string transportId = 23; + optional bytes appData = 24; + optional IceCandidatePairStatsEnum state = 25; + } + message CertificateStats { + optional string base64Certificate = 1; + optional string fingerprint = 2; + optional string fingerprintAlgorithm = 3; + optional string id = 4; + optional double timestamp = 5; + optional bytes appData = 6; + optional string issuerCertificateId = 7; + } + repeated AudioPlayoutStats audioPlayouts = 1; + repeated AudioSourceStats audioSources = 2; + repeated CertificateStats certificates = 3; + repeated CodecStats codecs = 4; + repeated DataChannelStats dataChannels = 5; + repeated IceCandidatePairStats iceCandidatePairs = 6; + repeated IceCandidateStats iceCandidates = 7; + repeated IceTransportStats iceTransports = 8; + repeated InboundRtpStats inboundRtps = 9; + repeated OutboundRtpStats outboundRtps = 10; + repeated PeerConnectionTransportStats peerConnectionTransports = 11; + repeated RemoteInboundRtpStats remoteInboundRtps = 12; + repeated RemoteOutboundRtpStats remoteOutboundRtps = 13; + repeated VideoSourceStats videoSources = 14; + optional bytes peerConnectionId = 15; + optional bytes appData = 16; + } + message ClientEvent { + optional string type = 1; + optional string payload = 2; + optional bytes peerConnectionId = 3; + optional int64 ssrc = 4; + optional int64 timestamp = 5; + optional bytes trackId = 6; + } + message ClientMetaData { + optional string type = 1; + optional string payload = 2; + optional bytes peerConnectionId = 3; + optional int64 ssrc = 4; + optional int64 timestamp = 5; + optional bytes trackId = 6; + } + message ExtensionStat { + optional string payload = 1; + optional string type = 2; + } + repeated ClientEvent clientEvents = 1; + repeated ClientMetaData clientMetaItems = 2; + repeated ExtensionStat extensionStats = 3; + repeated PeerConnectionSample peerConnections = 4; + optional bytes clientId = 5; + optional int64 timestamp = 6; + optional bytes appData = 7; + optional bytes callId = 8; +} \ No newline at end of file diff --git a/outputs/proto/ProtobufSamples.proto b/outputs/proto/ProtobufSamples.proto deleted file mode 100644 index 0dca631b..00000000 --- a/outputs/proto/ProtobufSamples.proto +++ /dev/null @@ -1,578 +0,0 @@ -syntax = "proto2"; - -package org.observertc.schemas.protobuf; - -/** -* Schema Version: 2.2.12 -*/ -message Samples { - message Controls { - optional string accessClaim = 1; - optional bool close = 2; - } - message ClientSample { - message Engine { - optional string name = 1; - optional string version = 2; - } - message Platform { - optional string model = 1; - optional string type = 2; - optional string vendor = 3; - } - message Browser { - optional string name = 1; - optional string version = 2; - } - message OperationSystem { - optional string name = 1; - optional string version = 2; - optional string versionName = 3; - } - message MediaDevice { - optional string id = 1; - optional string kind = 2; - optional string label = 3; - } - message ExtensionStat { - required string payload = 1; - required string type = 2; - } - message CustomCallEvent { - required string name = 1; - optional string attachments = 2; - optional string mediaTrackId = 3; - optional string message = 4; - optional string peerConnectionId = 5; - optional int64 timestamp = 6; - optional string value = 7; - } - message CustomObserverEvent { - required string name = 1; - optional string attachments = 2; - optional string mediaTrackId = 3; - optional string message = 4; - optional int64 timestamp = 5; - } - message DataChannel { - required string peerConnectionId = 1; - optional int64 bytesReceived = 2; - optional int64 bytesSent = 3; - optional int32 dataChannelIdentifier = 4; - optional string label = 5; - optional int32 messageReceived = 6; - optional int32 messageSent = 7; - optional string protocol = 8; - optional string state = 9; - } - message PeerConnectionTransport { - required string peerConnectionId = 1; - required string transportId = 2; - optional int64 bytesReceived = 3; - optional int64 bytesSent = 4; - optional string dtlsCipher = 5; - optional string dtlsRole = 6; - optional string dtlsState = 7; - optional string iceLocalUsernameFragment = 8; - optional string iceRole = 9; - optional string iceState = 10; - optional string label = 11; - optional string localCertificateId = 12; - optional int32 packetsReceived = 13; - optional int32 packetsSent = 14; - optional string remoteCertificateId = 15; - optional int32 selectedCandidatePairChanges = 16; - optional string selectedCandidatePairId = 17; - optional string srtpCipher = 18; - optional string tlsGroup = 19; - optional string tlsVersion = 20; - } - message IceCandidatePair { - required string candidatePairId = 1; - required string peerConnectionId = 2; - optional double availableIncomingBitrate = 3; - optional double availableOutgoingBitrate = 4; - optional int64 bytesDiscardedOnSend = 5; - optional int64 bytesReceived = 6; - optional int64 bytesSent = 7; - optional int32 consentRequestsSent = 8; - optional double currentRoundTripTime = 9; - optional string label = 10; - optional int64 lastPacketReceivedTimestamp = 11; - optional int64 lastPacketSentTimestamp = 12; - optional string localCandidateId = 13; - optional bool nominated = 14; - optional int32 packetsDiscardedOnSend = 15; - optional int32 packetsReceived = 16; - optional int32 packetsSent = 17; - optional string remoteCandidateId = 18; - optional int32 requestsReceived = 19; - optional int32 requestsSent = 20; - optional int32 responsesReceived = 21; - optional int32 responsesSent = 22; - optional string state = 23; - optional double totalRoundTripTime = 24; - optional string transportId = 25; - } - message MediaSourceStat { - optional double audioLevel = 1; - optional double droppedSamplesDuration = 2; - optional int32 droppedSamplesEvents = 3; - optional double echoReturnLoss = 4; - optional double echoReturnLossEnhancement = 5; - optional int32 frames = 6; - optional double framesPerSecond = 7; - optional int32 height = 8; - optional string kind = 9; - optional bool relayedSource = 10; - optional double totalAudioEnergy = 11; - optional double totalCaptureDelay = 12; - optional double totalSamplesCaptured = 13; - optional double totalSamplesDuration = 14; - optional string trackIdentifier = 15; - optional int32 width = 16; - } - message MediaCodecStats { - optional int32 channels = 1; - optional int32 clockRate = 2; - optional string codecType = 3; - optional string mimeType = 4; - optional string payloadType = 5; - optional string sdpFmtpLine = 6; - } - message Certificate { - optional string base64Certificate = 1; - optional string fingerprint = 2; - optional string fingerprintAlgorithm = 3; - optional string issuerCertificateId = 4; - } - message InboundAudioTrack { - required int64 ssrc = 1; - optional double audioLevel = 2; - optional int64 bytesReceived = 3; - optional int64 bytesSent = 4; - optional int32 concealedSamples = 5; - optional int32 concealmentEvents = 6; - optional string decoderImplementation = 7; - optional int64 estimatedPlayoutTimestamp = 8; - optional int32 fecPacketsDiscarded = 9; - optional int32 fecPacketsReceived = 10; - optional int64 headerBytesReceived = 11; - optional int32 insertedSamplesForDeceleration = 12; - optional double jitter = 13; - optional double jitterBufferDelay = 14; - optional int32 jitterBufferEmittedCount = 15; - optional double jitterBufferMinimumDelay = 16; - optional double jitterBufferTargetDelay = 17; - optional int64 lastPacketReceivedTimestamp = 18; - optional int32 nackCount = 19; - optional int32 packetsDiscarded = 20; - optional int32 packetsLost = 21; - optional int32 packetsReceived = 22; - optional int32 packetsSent = 23; - optional string peerConnectionId = 24; - optional string remoteClientId = 25; - optional int64 remoteTimestamp = 26; - optional int32 removedSamplesForAcceleration = 27; - optional int32 reportsSent = 28; - optional double roundTripTime = 29; - optional int32 roundTripTimeMeasurements = 30; - optional string sfuSinkId = 31; - optional string sfuStreamId = 32; - optional int32 silentConcealedSamples = 33; - optional double synthesizedSamplesDuration = 34; - optional int32 synthesizedSamplesEvents = 35; - optional double totalAudioEnergy = 36; - optional double totalPlayoutDelay = 37; - optional double totalProcessingDelay = 38; - optional double totalRoundTripTime = 39; - optional int32 totalSamplesCount = 40; - optional double totalSamplesDuration = 41; - optional int32 totalSamplesReceived = 42; - optional string trackId = 43; - } - message InboundVideoTrack { - required int64 ssrc = 1; - optional int64 bytesReceived = 2; - optional int64 bytesSent = 3; - optional string decoderImplementation = 4; - optional int64 estimatedPlayoutTimestamp = 5; - optional int32 fecPacketsDiscarded = 6; - optional int32 fecPacketsReceived = 7; - optional int32 firCount = 8; - optional int32 frameHeight = 9; - optional int32 frameWidth = 10; - optional int32 framesDecoded = 11; - optional int32 framesDropped = 12; - optional double framesPerSecond = 13; - optional int32 framesReceived = 14; - optional int64 headerBytesReceived = 15; - optional double jitter = 16; - optional double jitterBufferDelay = 17; - optional int32 jitterBufferEmittedCount = 18; - optional double jitterBufferMinimumDelay = 19; - optional double jitterBufferTargetDelay = 20; - optional int32 keyFramesDecoded = 21; - optional int64 lastPacketReceivedTimestamp = 22; - optional int32 nackCount = 23; - optional int32 packetsDiscarded = 24; - optional int32 packetsLost = 25; - optional int32 packetsReceived = 26; - optional int32 packetsSent = 27; - optional string peerConnectionId = 28; - optional int32 pliCount = 29; - optional int64 qpSum = 30; - optional string remoteClientId = 31; - optional int64 remoteTimestamp = 32; - optional int32 reportsSent = 33; - optional double roundTripTime = 34; - optional int32 roundTripTimeMeasurements = 35; - optional string sfuSinkId = 36; - optional string sfuStreamId = 37; - optional double totalDecodeTime = 38; - optional double totalInterFrameDelay = 39; - optional double totalProcessingDelay = 40; - optional double totalRoundTripTime = 41; - optional double totalSquaredInterFrameDelay = 42; - optional string trackId = 43; - } - message OutboundAudioTrack { - required int64 ssrc = 1; - optional bool active = 2; - optional double audioLevel = 3; - optional double averageRtcpInterval = 4; - optional int64 bytesSent = 5; - optional double droppedSamplesDuration = 6; - optional int32 droppedSamplesEvents = 7; - optional double echoReturnLoss = 8; - optional double echoReturnLossEnhancement = 9; - optional string encoderImplementation = 10; - optional double fractionLost = 11; - optional int64 headerBytesSent = 12; - optional double jitter = 13; - optional int32 nackCount = 14; - optional int32 packetsLost = 15; - optional int32 packetsReceived = 16; - optional int32 packetsSent = 17; - optional string peerConnectionId = 18; - optional bool relayedSource = 19; - optional int64 retransmittedBytesSent = 20; - optional int32 retransmittedPacketsSent = 21; - optional string rid = 22; - optional double roundTripTime = 23; - optional int32 roundTripTimeMeasurements = 24; - optional string sfuStreamId = 25; - optional int32 targetBitrate = 26; - optional double totalAudioEnergy = 27; - optional double totalCaptureDelay = 28; - optional int64 totalEncodedBytesTarget = 29; - optional double totalPacketSendDelay = 30; - optional double totalRoundTripTime = 31; - optional double totalSamplesCaptured = 32; - optional double totalSamplesDuration = 33; - optional string trackId = 34; - } - message OutboundVideoTrack { - required int64 ssrc = 1; - optional bool active = 2; - optional double averageRtcpInterval = 3; - optional int64 bytesSent = 4; - optional string encoderImplementation = 5; - optional int32 firCount = 6; - optional double fractionLost = 7; - optional int32 frameHeight = 8; - optional int32 frameWidth = 9; - optional int32 frames = 10; - optional int32 framesDropped = 11; - optional int32 framesEncoded = 12; - optional double framesPerSecond = 13; - optional int32 framesSent = 14; - optional int64 headerBytesSent = 15; - optional int32 height = 16; - optional int32 hugeFramesSent = 17; - optional double jitter = 18; - optional int32 keyFramesEncoded = 19; - optional int32 nackCount = 20; - optional int32 packetsLost = 21; - optional int32 packetsReceived = 22; - optional int32 packetsSent = 23; - optional string peerConnectionId = 24; - optional int32 pliCount = 25; - optional int64 qpSum = 26; - optional double qualityLimitationDurationBandwidth = 27; - optional double qualityLimitationDurationCPU = 28; - optional double qualityLimitationDurationNone = 29; - optional double qualityLimitationDurationOther = 30; - optional string qualityLimitationReason = 31; - optional int32 qualityLimitationResolutionChanges = 32; - optional bool relayedSource = 33; - optional int64 retransmittedBytesSent = 34; - optional int32 retransmittedPacketsSent = 35; - optional string rid = 36; - optional double roundTripTime = 37; - optional int32 roundTripTimeMeasurements = 38; - optional string sfuStreamId = 39; - optional int32 targetBitrate = 40; - optional double totalEncodeTime = 41; - optional int64 totalEncodedBytesTarget = 42; - optional double totalPacketSendDelay = 43; - optional double totalRoundTripTime = 44; - optional string trackId = 45; - optional int32 width = 46; - } - message IceLocalCandidate { - optional string address = 1; - optional string candidateType = 2; - optional string id = 3; - optional string peerConnectionId = 4; - optional int32 port = 5; - optional int64 priority = 6; - optional string protocol = 7; - optional string relayProtocol = 8; - optional string url = 9; - } - message IceRemoteCandidate { - optional string address = 1; - optional string candidateType = 2; - optional string id = 3; - optional string peerConnectionId = 4; - optional int32 port = 5; - optional int64 priority = 6; - optional string protocol = 7; - optional string relayProtocol = 8; - optional string url = 9; - } - repeated Certificate certificates = 1; - repeated MediaCodecStats codecs = 2; - repeated CustomCallEvent customCallEvents = 3; - repeated CustomObserverEvent customObserverEvents = 4; - repeated DataChannel dataChannels = 5; - repeated ExtensionStat extensionStats = 6; - repeated IceCandidatePair iceCandidatePairs = 7; - repeated IceLocalCandidate iceLocalCandidates = 8; - repeated IceRemoteCandidate iceRemoteCandidates = 9; - repeated string iceServers = 10; - repeated InboundAudioTrack inboundAudioTracks = 11; - repeated InboundVideoTrack inboundVideoTracks = 12; - repeated string localSDPs = 13; - repeated string mediaConstraints = 14; - repeated MediaDevice mediaDevices = 15; - repeated MediaSourceStat mediaSources = 16; - repeated OutboundAudioTrack outboundAudioTracks = 17; - repeated OutboundVideoTrack outboundVideoTracks = 18; - repeated PeerConnectionTransport pcTransports = 19; - repeated string userMediaErrors = 20; - required string clientId = 21; - required int64 timestamp = 22; - optional Browser browser = 23; - optional string callId = 24; - optional Engine engine = 25; - optional string marker = 26; - optional OperationSystem os = 27; - optional Platform platform = 28; - optional string roomId = 29; - optional int32 sampleSeq = 30; - optional int32 timeZoneOffsetInHours = 31; - optional string userId = 32; - } - message SfuSample { - message CustomSfuEvent { - required string name = 1; - optional string attachments = 2; - optional string message = 3; - optional string sfuSinkId = 4; - optional string sfuStreamId = 5; - optional int64 timestamp = 6; - optional string transportId = 7; - optional string value = 8; - } - message SfuTransport { - required string transportId = 1; - optional string dtlsState = 2; - optional string iceRole = 3; - optional string iceState = 4; - optional bool internal = 5; - optional string localAddress = 6; - optional int32 localPort = 7; - optional bool noReport = 8; - optional string protocol = 9; - optional string remoteAddress = 10; - optional int32 remotePort = 11; - optional int64 rtpBytesReceived = 12; - optional int64 rtpBytesSent = 13; - optional int32 rtpPacketsLost = 14; - optional int32 rtpPacketsReceived = 15; - optional int32 rtpPacketsSent = 16; - optional int64 rtxBytesReceived = 17; - optional int64 rtxBytesSent = 18; - optional int32 rtxPacketsDiscarded = 19; - optional int32 rtxPacketsLost = 20; - optional int32 rtxPacketsReceived = 21; - optional int32 rtxPacketsSent = 22; - optional int64 sctpBytesReceived = 23; - optional int64 sctpBytesSent = 24; - optional int32 sctpPacketsReceived = 25; - optional int32 sctpPacketsSent = 26; - optional string sctpState = 27; - } - message SfuInboundRtpPad { - required string padId = 1; - required int64 ssrc = 2; - required string streamId = 3; - required string transportId = 4; - optional int64 bytesReceived = 5; - optional int32 clockRate = 6; - optional int32 fecPacketsDiscarded = 7; - optional int32 fecPacketsReceived = 8; - optional int32 firCount = 9; - optional double fractionLost = 10; - optional int32 framesDecoded = 11; - optional int32 framesReceived = 12; - optional bool internal = 13; - optional double jitter = 14; - optional int32 keyFramesDecoded = 15; - optional string mediaType = 16; - optional string mimeType = 17; - optional int32 nackCount = 18; - optional bool noReport = 19; - optional int32 packetsDiscarded = 20; - optional int32 packetsDuplicated = 21; - optional int32 packetsFailedDecryption = 22; - optional int32 packetsLost = 23; - optional int32 packetsReceived = 24; - optional int32 packetsRepaired = 25; - optional int32 payloadType = 26; - optional int32 pliCount = 27; - optional string rid = 28; - optional double roundTripTime = 29; - optional int32 rtcpRrSent = 30; - optional int32 rtcpSrReceived = 31; - optional int32 rtxPacketsDiscarded = 32; - optional int32 rtxPacketsReceived = 33; - optional int64 rtxSsrc = 34; - optional string sdpFmtpLine = 35; - optional int32 sliCount = 36; - optional int32 targetBitrate = 37; - optional bool voiceActivityFlag = 38; - } - message SfuOutboundRtpPad { - required string padId = 1; - required string sinkId = 2; - required int64 ssrc = 3; - required string streamId = 4; - required string transportId = 5; - optional int64 bytesSent = 6; - optional string callId = 7; - optional string clientId = 8; - optional int32 clockRate = 9; - optional int32 fecPacketsDiscarded = 10; - optional int32 fecPacketsSent = 11; - optional int32 firCount = 12; - optional double fractionLost = 13; - optional int32 framesEncoded = 14; - optional int32 framesSent = 15; - optional bool internal = 16; - optional double jitter = 17; - optional int32 keyFramesEncoded = 18; - optional string mediaType = 19; - optional string mimeType = 20; - optional int32 nackCount = 21; - optional bool noReport = 22; - optional int32 packetsDiscarded = 23; - optional int32 packetsDuplicated = 24; - optional int32 packetsFailedEncryption = 25; - optional int32 packetsLost = 26; - optional int32 packetsRetransmitted = 27; - optional int32 packetsSent = 28; - optional int32 payloadType = 29; - optional int32 pliCount = 30; - optional string rid = 31; - optional double roundTripTime = 32; - optional int32 rtcpRrReceived = 33; - optional int32 rtcpSrSent = 34; - optional int32 rtxPacketsDiscarded = 35; - optional int32 rtxPacketsSent = 36; - optional int64 rtxSsrc = 37; - optional string sdpFmtpLine = 38; - optional int32 sliCount = 39; - optional int32 targetBitrate = 40; - optional string trackId = 41; - optional bool voiceActivityFlag = 42; - } - message SfuSctpChannel { - required string channelId = 1; - required string streamId = 2; - required string transportId = 3; - optional int64 bytesReceived = 4; - optional int64 bytesSent = 5; - optional bool internal = 6; - optional string label = 7; - optional int32 messageReceived = 8; - optional int32 messageSent = 9; - optional bool noReport = 10; - optional string protocol = 11; - optional double sctpCongestionWindow = 12; - optional int32 sctpMtu = 13; - optional double sctpReceiverWindow = 14; - optional double sctpSmoothedRoundTripTime = 15; - optional int32 sctpUnackData = 16; - } - message SfuExtensionStats { - required string payload = 1; - required string type = 2; - } - repeated CustomSfuEvent customSfuEvents = 1; - repeated SfuExtensionStats extensionStats = 2; - repeated SfuInboundRtpPad inboundRtpPads = 3; - repeated SfuOutboundRtpPad outboundRtpPads = 4; - repeated SfuSctpChannel sctpChannels = 5; - repeated SfuTransport transports = 6; - required string sfuId = 7; - required int64 timestamp = 8; - optional string marker = 9; - optional int32 timeZoneOffsetInHours = 10; - } - message TurnSample { - message TurnPeerAllocation { - required string peerId = 1; - required string relayedAddress = 2; - required int32 relayedPort = 3; - required string sessionId = 4; - required string transportProtocol = 5; - optional string peerAddress = 6; - optional int32 peerPort = 7; - optional int64 receivedBytes = 8; - optional int32 receivedPackets = 9; - optional int32 receivingBitrate = 10; - optional int32 sendingBitrate = 11; - optional int64 sentBytes = 12; - optional int32 sentPackets = 13; - } - message TurnSession { - required string sessionId = 1; - optional string clientAddress = 2; - optional string clientId = 3; - optional int32 clientPort = 4; - optional int64 nonceExpirationTime = 5; - optional string realm = 6; - optional int64 receivedBytes = 7; - optional int32 receivedPackets = 8; - optional int32 receivingBitrate = 9; - optional int32 sendingBitrate = 10; - optional int64 sentBytes = 11; - optional int32 sentPackets = 12; - optional string serverAddress = 13; - optional int32 serverPort = 14; - optional int64 started = 15; - optional string transportProtocol = 16; - optional string username = 17; - } - repeated TurnPeerAllocation allocations = 1; - repeated TurnSession sessions = 2; - required string serverId = 3; - } - repeated ClientSample clientSamples = 1; - repeated SfuSample sfuSamples = 2; - repeated TurnSample turnSamples = 3; - optional Controls controls = 4; -} \ No newline at end of file diff --git a/outputs/proto/ProtobufSamplesV3.proto b/outputs/proto/ProtobufSamplesV3.proto deleted file mode 100644 index e28ba982..00000000 --- a/outputs/proto/ProtobufSamplesV3.proto +++ /dev/null @@ -1,624 +0,0 @@ -syntax = "proto3"; - -package org.observertc.schemas.protobuf; - -/** -* Schema Version: 2.2.12 -*/ -message Samples { - message Controls { - string accessClaim = 1; - bool close = 2; - } - message ClientSample { - message Engine { - string name = 1; - string version = 2; - } - message Platform { - string model = 1; - string type = 2; - string vendor = 3; - } - message Browser { - string name = 1; - string version = 2; - } - message OperationSystem { - string name = 1; - string version = 2; - string versionName = 3; - } - message MediaDevice { - enum MediaDeviceEnum { - /* For kind */ - VIDEOINPUT = 0; - AUDIOINPUT = 1; - AUDIOOUTPUT = 2; - } - string id = 1; - MediaDeviceEnum kind = 2; - string label = 3; - } - message ExtensionStat { - string payload = 1; - string type = 2; - } - message CustomCallEvent { - string name = 1; - string attachments = 2; - string mediaTrackId = 3; - string message = 4; - bytes peerConnectionId = 5; - int64 timestamp = 6; - string value = 7; - } - message CustomObserverEvent { - string name = 1; - string attachments = 2; - string mediaTrackId = 3; - string message = 4; - int64 timestamp = 5; - } - message DataChannel { - bytes peerConnectionId = 1; - int64 bytesReceived = 2; - int64 bytesSent = 3; - int32 dataChannelIdentifier = 4; - string label = 5; - int32 messageReceived = 6; - int32 messageSent = 7; - string protocol = 8; - string state = 9; - } - message PeerConnectionTransport { - enum PeerConnectionTransportEnum { - /* For dtlsRole */ - CLIENT = 0; - SERVER = 1; - UNKNOWN = 2; - } - bytes peerConnectionId = 1; - string transportId = 2; - int64 bytesReceived = 3; - int64 bytesSent = 4; - string dtlsCipher = 5; - PeerConnectionTransportEnum dtlsRole = 6; - string dtlsState = 7; - string iceLocalUsernameFragment = 8; - string iceRole = 9; - string iceState = 10; - string label = 11; - string localCertificateId = 12; - int32 packetsReceived = 13; - int32 packetsSent = 14; - string remoteCertificateId = 15; - int32 selectedCandidatePairChanges = 16; - string selectedCandidatePairId = 17; - string srtpCipher = 18; - string tlsGroup = 19; - string tlsVersion = 20; - } - message IceCandidatePair { - string candidatePairId = 1; - bytes peerConnectionId = 2; - double availableIncomingBitrate = 3; - double availableOutgoingBitrate = 4; - int64 bytesDiscardedOnSend = 5; - int64 bytesReceived = 6; - int64 bytesSent = 7; - int32 consentRequestsSent = 8; - double currentRoundTripTime = 9; - string label = 10; - int64 lastPacketReceivedTimestamp = 11; - int64 lastPacketSentTimestamp = 12; - string localCandidateId = 13; - bool nominated = 14; - int32 packetsDiscardedOnSend = 15; - int32 packetsReceived = 16; - int32 packetsSent = 17; - string remoteCandidateId = 18; - int32 requestsReceived = 19; - int32 requestsSent = 20; - int32 responsesReceived = 21; - int32 responsesSent = 22; - string state = 23; - double totalRoundTripTime = 24; - string transportId = 25; - } - message MediaSourceStat { - enum MediaSourceStatEnum { - /* For kind */ - AUDIO = 0; - VIDEO = 1; - } - double audioLevel = 1; - double droppedSamplesDuration = 2; - int32 droppedSamplesEvents = 3; - double echoReturnLoss = 4; - double echoReturnLossEnhancement = 5; - int32 frames = 6; - double framesPerSecond = 7; - int32 height = 8; - MediaSourceStatEnum kind = 9; - bool relayedSource = 10; - double totalAudioEnergy = 11; - double totalCaptureDelay = 12; - double totalSamplesCaptured = 13; - double totalSamplesDuration = 14; - bytes trackIdentifier = 15; - int32 width = 16; - } - message MediaCodecStats { - enum MediaCodecStatsEnum { - /* For codecType */ - ENCODE = 0; - DECODE = 1; - } - int32 channels = 1; - int32 clockRate = 2; - MediaCodecStatsEnum codecType = 3; - string mimeType = 4; - string payloadType = 5; - string sdpFmtpLine = 6; - } - message Certificate { - string base64Certificate = 1; - string fingerprint = 2; - string fingerprintAlgorithm = 3; - string issuerCertificateId = 4; - } - message InboundAudioTrack { - int64 ssrc = 1; - double audioLevel = 2; - int64 bytesReceived = 3; - int64 bytesSent = 4; - int32 concealedSamples = 5; - int32 concealmentEvents = 6; - string decoderImplementation = 7; - int64 estimatedPlayoutTimestamp = 8; - int32 fecPacketsDiscarded = 9; - int32 fecPacketsReceived = 10; - int64 headerBytesReceived = 11; - int32 insertedSamplesForDeceleration = 12; - double jitter = 13; - double jitterBufferDelay = 14; - int32 jitterBufferEmittedCount = 15; - double jitterBufferMinimumDelay = 16; - double jitterBufferTargetDelay = 17; - int64 lastPacketReceivedTimestamp = 18; - int32 nackCount = 19; - int32 packetsDiscarded = 20; - int32 packetsLost = 21; - int32 packetsReceived = 22; - int32 packetsSent = 23; - bytes peerConnectionId = 24; - bytes remoteClientId = 25; - int64 remoteTimestamp = 26; - int32 removedSamplesForAcceleration = 27; - int32 reportsSent = 28; - double roundTripTime = 29; - int32 roundTripTimeMeasurements = 30; - bytes sfuSinkId = 31; - bytes sfuStreamId = 32; - int32 silentConcealedSamples = 33; - double synthesizedSamplesDuration = 34; - int32 synthesizedSamplesEvents = 35; - double totalAudioEnergy = 36; - double totalPlayoutDelay = 37; - double totalProcessingDelay = 38; - double totalRoundTripTime = 39; - int32 totalSamplesCount = 40; - double totalSamplesDuration = 41; - int32 totalSamplesReceived = 42; - bytes trackId = 43; - } - message InboundVideoTrack { - int64 ssrc = 1; - int64 bytesReceived = 2; - int64 bytesSent = 3; - string decoderImplementation = 4; - int64 estimatedPlayoutTimestamp = 5; - int32 fecPacketsDiscarded = 6; - int32 fecPacketsReceived = 7; - int32 firCount = 8; - int32 frameHeight = 9; - int32 frameWidth = 10; - int32 framesDecoded = 11; - int32 framesDropped = 12; - double framesPerSecond = 13; - int32 framesReceived = 14; - int64 headerBytesReceived = 15; - double jitter = 16; - double jitterBufferDelay = 17; - int32 jitterBufferEmittedCount = 18; - double jitterBufferMinimumDelay = 19; - double jitterBufferTargetDelay = 20; - int32 keyFramesDecoded = 21; - int64 lastPacketReceivedTimestamp = 22; - int32 nackCount = 23; - int32 packetsDiscarded = 24; - int32 packetsLost = 25; - int32 packetsReceived = 26; - int32 packetsSent = 27; - bytes peerConnectionId = 28; - int32 pliCount = 29; - int64 qpSum = 30; - bytes remoteClientId = 31; - int64 remoteTimestamp = 32; - int32 reportsSent = 33; - double roundTripTime = 34; - int32 roundTripTimeMeasurements = 35; - bytes sfuSinkId = 36; - bytes sfuStreamId = 37; - double totalDecodeTime = 38; - double totalInterFrameDelay = 39; - double totalProcessingDelay = 40; - double totalRoundTripTime = 41; - double totalSquaredInterFrameDelay = 42; - bytes trackId = 43; - } - message OutboundAudioTrack { - int64 ssrc = 1; - bool active = 2; - double audioLevel = 3; - double averageRtcpInterval = 4; - int64 bytesSent = 5; - double droppedSamplesDuration = 6; - int32 droppedSamplesEvents = 7; - double echoReturnLoss = 8; - double echoReturnLossEnhancement = 9; - string encoderImplementation = 10; - double fractionLost = 11; - int64 headerBytesSent = 12; - double jitter = 13; - int32 nackCount = 14; - int32 packetsLost = 15; - int32 packetsReceived = 16; - int32 packetsSent = 17; - bytes peerConnectionId = 18; - bool relayedSource = 19; - int64 retransmittedBytesSent = 20; - int32 retransmittedPacketsSent = 21; - string rid = 22; - double roundTripTime = 23; - int32 roundTripTimeMeasurements = 24; - bytes sfuStreamId = 25; - int32 targetBitrate = 26; - double totalAudioEnergy = 27; - double totalCaptureDelay = 28; - int64 totalEncodedBytesTarget = 29; - double totalPacketSendDelay = 30; - double totalRoundTripTime = 31; - double totalSamplesCaptured = 32; - double totalSamplesDuration = 33; - bytes trackId = 34; - } - message OutboundVideoTrack { - int64 ssrc = 1; - bool active = 2; - double averageRtcpInterval = 3; - int64 bytesSent = 4; - string encoderImplementation = 5; - int32 firCount = 6; - double fractionLost = 7; - int32 frameHeight = 8; - int32 frameWidth = 9; - int32 frames = 10; - int32 framesDropped = 11; - int32 framesEncoded = 12; - double framesPerSecond = 13; - int32 framesSent = 14; - int64 headerBytesSent = 15; - int32 height = 16; - int32 hugeFramesSent = 17; - double jitter = 18; - int32 keyFramesEncoded = 19; - int32 nackCount = 20; - int32 packetsLost = 21; - int32 packetsReceived = 22; - int32 packetsSent = 23; - bytes peerConnectionId = 24; - int32 pliCount = 25; - int64 qpSum = 26; - double qualityLimitationDurationBandwidth = 27; - double qualityLimitationDurationCPU = 28; - double qualityLimitationDurationNone = 29; - double qualityLimitationDurationOther = 30; - string qualityLimitationReason = 31; - int32 qualityLimitationResolutionChanges = 32; - bool relayedSource = 33; - int64 retransmittedBytesSent = 34; - int32 retransmittedPacketsSent = 35; - string rid = 36; - double roundTripTime = 37; - int32 roundTripTimeMeasurements = 38; - bytes sfuStreamId = 39; - int32 targetBitrate = 40; - double totalEncodeTime = 41; - int64 totalEncodedBytesTarget = 42; - double totalPacketSendDelay = 43; - double totalRoundTripTime = 44; - bytes trackId = 45; - int32 width = 46; - } - message IceLocalCandidate { - enum IceLocalCandidateEnum { - /* For protocol */ - TCP = 0; - UDP = 1; - /* For relayProtocol */ - TLS = 2; - } - string address = 1; - string candidateType = 2; - string id = 3; - bytes peerConnectionId = 4; - int32 port = 5; - int64 priority = 6; - IceLocalCandidateEnum protocol = 7; - IceLocalCandidateEnum relayProtocol = 8; - string url = 9; - } - message IceRemoteCandidate { - enum IceRemoteCandidateEnum { - /* For protocol */ - TCP = 0; - UDP = 1; - /* For relayProtocol */ - TLS = 2; - } - string address = 1; - string candidateType = 2; - string id = 3; - bytes peerConnectionId = 4; - int32 port = 5; - int64 priority = 6; - IceRemoteCandidateEnum protocol = 7; - IceRemoteCandidateEnum relayProtocol = 8; - string url = 9; - } - repeated Certificate certificates = 1; - repeated MediaCodecStats codecs = 2; - repeated CustomCallEvent customCallEvents = 3; - repeated CustomObserverEvent customObserverEvents = 4; - repeated DataChannel dataChannels = 5; - repeated ExtensionStat extensionStats = 6; - repeated IceCandidatePair iceCandidatePairs = 7; - repeated IceLocalCandidate iceLocalCandidates = 8; - repeated IceRemoteCandidate iceRemoteCandidates = 9; - repeated string iceServers = 10; - repeated InboundAudioTrack inboundAudioTracks = 11; - repeated InboundVideoTrack inboundVideoTracks = 12; - repeated string localSDPs = 13; - repeated string mediaConstraints = 14; - repeated MediaDevice mediaDevices = 15; - repeated MediaSourceStat mediaSources = 16; - repeated OutboundAudioTrack outboundAudioTracks = 17; - repeated OutboundVideoTrack outboundVideoTracks = 18; - repeated PeerConnectionTransport pcTransports = 19; - repeated string userMediaErrors = 20; - bytes clientId = 21; - int64 timestamp = 22; - Browser browser = 23; - bytes callId = 24; - Engine engine = 25; - string marker = 26; - OperationSystem os = 27; - Platform platform = 28; - string roomId = 29; - int32 sampleSeq = 30; - int32 timeZoneOffsetInHours = 31; - string userId = 32; - } - message SfuSample { - message CustomSfuEvent { - string name = 1; - string attachments = 2; - string message = 3; - bytes sfuSinkId = 4; - bytes sfuStreamId = 5; - int64 timestamp = 6; - string transportId = 7; - string value = 8; - } - message SfuTransport { - string transportId = 1; - string dtlsState = 2; - string iceRole = 3; - string iceState = 4; - bool internal = 5; - string localAddress = 6; - int32 localPort = 7; - bool noReport = 8; - string protocol = 9; - string remoteAddress = 10; - int32 remotePort = 11; - int64 rtpBytesReceived = 12; - int64 rtpBytesSent = 13; - int32 rtpPacketsLost = 14; - int32 rtpPacketsReceived = 15; - int32 rtpPacketsSent = 16; - int64 rtxBytesReceived = 17; - int64 rtxBytesSent = 18; - int32 rtxPacketsDiscarded = 19; - int32 rtxPacketsLost = 20; - int32 rtxPacketsReceived = 21; - int32 rtxPacketsSent = 22; - int64 sctpBytesReceived = 23; - int64 sctpBytesSent = 24; - int32 sctpPacketsReceived = 25; - int32 sctpPacketsSent = 26; - string sctpState = 27; - } - message SfuInboundRtpPad { - enum SfuInboundRtpPadEnum { - /* For mediaType */ - AUDIO = 0; - VIDEO = 1; - } - bytes padId = 1; - int64 ssrc = 2; - bytes streamId = 3; - string transportId = 4; - int64 bytesReceived = 5; - int32 clockRate = 6; - int32 fecPacketsDiscarded = 7; - int32 fecPacketsReceived = 8; - int32 firCount = 9; - double fractionLost = 10; - int32 framesDecoded = 11; - int32 framesReceived = 12; - bool internal = 13; - double jitter = 14; - int32 keyFramesDecoded = 15; - SfuInboundRtpPadEnum mediaType = 16; - string mimeType = 17; - int32 nackCount = 18; - bool noReport = 19; - int32 packetsDiscarded = 20; - int32 packetsDuplicated = 21; - int32 packetsFailedDecryption = 22; - int32 packetsLost = 23; - int32 packetsReceived = 24; - int32 packetsRepaired = 25; - int32 payloadType = 26; - int32 pliCount = 27; - string rid = 28; - double roundTripTime = 29; - int32 rtcpRrSent = 30; - int32 rtcpSrReceived = 31; - int32 rtxPacketsDiscarded = 32; - int32 rtxPacketsReceived = 33; - int64 rtxSsrc = 34; - string sdpFmtpLine = 35; - int32 sliCount = 36; - int32 targetBitrate = 37; - bool voiceActivityFlag = 38; - } - message SfuOutboundRtpPad { - enum SfuOutboundRtpPadEnum { - /* For mediaType */ - AUDIO = 0; - VIDEO = 1; - } - bytes padId = 1; - bytes sinkId = 2; - int64 ssrc = 3; - bytes streamId = 4; - string transportId = 5; - int64 bytesSent = 6; - bytes callId = 7; - bytes clientId = 8; - int32 clockRate = 9; - int32 fecPacketsDiscarded = 10; - int32 fecPacketsSent = 11; - int32 firCount = 12; - double fractionLost = 13; - int32 framesEncoded = 14; - int32 framesSent = 15; - bool internal = 16; - double jitter = 17; - int32 keyFramesEncoded = 18; - SfuOutboundRtpPadEnum mediaType = 19; - string mimeType = 20; - int32 nackCount = 21; - bool noReport = 22; - int32 packetsDiscarded = 23; - int32 packetsDuplicated = 24; - int32 packetsFailedEncryption = 25; - int32 packetsLost = 26; - int32 packetsRetransmitted = 27; - int32 packetsSent = 28; - int32 payloadType = 29; - int32 pliCount = 30; - string rid = 31; - double roundTripTime = 32; - int32 rtcpRrReceived = 33; - int32 rtcpSrSent = 34; - int32 rtxPacketsDiscarded = 35; - int32 rtxPacketsSent = 36; - int64 rtxSsrc = 37; - string sdpFmtpLine = 38; - int32 sliCount = 39; - int32 targetBitrate = 40; - bytes trackId = 41; - bool voiceActivityFlag = 42; - } - message SfuSctpChannel { - bytes channelId = 1; - bytes streamId = 2; - string transportId = 3; - int64 bytesReceived = 4; - int64 bytesSent = 5; - bool internal = 6; - string label = 7; - int32 messageReceived = 8; - int32 messageSent = 9; - bool noReport = 10; - string protocol = 11; - double sctpCongestionWindow = 12; - int32 sctpMtu = 13; - double sctpReceiverWindow = 14; - double sctpSmoothedRoundTripTime = 15; - int32 sctpUnackData = 16; - } - message SfuExtensionStats { - string payload = 1; - string type = 2; - } - repeated CustomSfuEvent customSfuEvents = 1; - repeated SfuExtensionStats extensionStats = 2; - repeated SfuInboundRtpPad inboundRtpPads = 3; - repeated SfuOutboundRtpPad outboundRtpPads = 4; - repeated SfuSctpChannel sctpChannels = 5; - repeated SfuTransport transports = 6; - bytes sfuId = 7; - int64 timestamp = 8; - string marker = 9; - int32 timeZoneOffsetInHours = 10; - } - message TurnSample { - message TurnPeerAllocation { - string peerId = 1; - string relayedAddress = 2; - int32 relayedPort = 3; - string sessionId = 4; - string transportProtocol = 5; - string peerAddress = 6; - int32 peerPort = 7; - int64 receivedBytes = 8; - int32 receivedPackets = 9; - int32 receivingBitrate = 10; - int32 sendingBitrate = 11; - int64 sentBytes = 12; - int32 sentPackets = 13; - } - message TurnSession { - string sessionId = 1; - string clientAddress = 2; - bytes clientId = 3; - int32 clientPort = 4; - int64 nonceExpirationTime = 5; - string realm = 6; - int64 receivedBytes = 7; - int32 receivedPackets = 8; - int32 receivingBitrate = 9; - int32 sendingBitrate = 10; - int64 sentBytes = 11; - int32 sentPackets = 12; - string serverAddress = 13; - int32 serverPort = 14; - int64 started = 15; - string transportProtocol = 16; - string username = 17; - } - repeated TurnPeerAllocation allocations = 1; - repeated TurnSession sessions = 2; - string serverId = 3; - } - repeated ClientSample clientSamples = 1; - repeated SfuSample sfuSamples = 2; - repeated TurnSample turnSamples = 3; - Controls controls = 4; -} \ No newline at end of file diff --git a/outputs/proto/ProtobufSamplesV3Optional.proto b/outputs/proto/ProtobufSamplesV3Optional.proto deleted file mode 100644 index efa1795c..00000000 --- a/outputs/proto/ProtobufSamplesV3Optional.proto +++ /dev/null @@ -1,624 +0,0 @@ -syntax = "proto3"; - -package org.observertc.schemas.protobuf; - -/** -* Schema Version: 2.2.12 -*/ -message Samples { - message Controls { - optional string accessClaim = 1; - optional bool close = 2; - } - message ClientSample { - message Engine { - optional string name = 1; - optional string version = 2; - } - message Platform { - optional string model = 1; - optional string type = 2; - optional string vendor = 3; - } - message Browser { - optional string name = 1; - optional string version = 2; - } - message OperationSystem { - optional string name = 1; - optional string version = 2; - optional string versionName = 3; - } - message MediaDevice { - enum MediaDeviceEnum { - /* For kind */ - VIDEOINPUT = 0; - AUDIOINPUT = 1; - AUDIOOUTPUT = 2; - } - optional string id = 1; - optional MediaDeviceEnum kind = 2; - optional string label = 3; - } - message ExtensionStat { - optional string payload = 1; - optional string type = 2; - } - message CustomCallEvent { - optional string name = 1; - optional string attachments = 2; - optional string mediaTrackId = 3; - optional string message = 4; - optional bytes peerConnectionId = 5; - optional int64 timestamp = 6; - optional string value = 7; - } - message CustomObserverEvent { - optional string name = 1; - optional string attachments = 2; - optional string mediaTrackId = 3; - optional string message = 4; - optional int64 timestamp = 5; - } - message DataChannel { - optional bytes peerConnectionId = 1; - optional int64 bytesReceived = 2; - optional int64 bytesSent = 3; - optional int32 dataChannelIdentifier = 4; - optional string label = 5; - optional int32 messageReceived = 6; - optional int32 messageSent = 7; - optional string protocol = 8; - optional string state = 9; - } - message PeerConnectionTransport { - enum PeerConnectionTransportEnum { - /* For dtlsRole */ - CLIENT = 0; - SERVER = 1; - UNKNOWN = 2; - } - optional bytes peerConnectionId = 1; - optional string transportId = 2; - optional int64 bytesReceived = 3; - optional int64 bytesSent = 4; - optional string dtlsCipher = 5; - optional PeerConnectionTransportEnum dtlsRole = 6; - optional string dtlsState = 7; - optional string iceLocalUsernameFragment = 8; - optional string iceRole = 9; - optional string iceState = 10; - optional string label = 11; - optional string localCertificateId = 12; - optional int32 packetsReceived = 13; - optional int32 packetsSent = 14; - optional string remoteCertificateId = 15; - optional int32 selectedCandidatePairChanges = 16; - optional string selectedCandidatePairId = 17; - optional string srtpCipher = 18; - optional string tlsGroup = 19; - optional string tlsVersion = 20; - } - message IceCandidatePair { - optional string candidatePairId = 1; - optional bytes peerConnectionId = 2; - optional double availableIncomingBitrate = 3; - optional double availableOutgoingBitrate = 4; - optional int64 bytesDiscardedOnSend = 5; - optional int64 bytesReceived = 6; - optional int64 bytesSent = 7; - optional int32 consentRequestsSent = 8; - optional double currentRoundTripTime = 9; - optional string label = 10; - optional int64 lastPacketReceivedTimestamp = 11; - optional int64 lastPacketSentTimestamp = 12; - optional string localCandidateId = 13; - optional bool nominated = 14; - optional int32 packetsDiscardedOnSend = 15; - optional int32 packetsReceived = 16; - optional int32 packetsSent = 17; - optional string remoteCandidateId = 18; - optional int32 requestsReceived = 19; - optional int32 requestsSent = 20; - optional int32 responsesReceived = 21; - optional int32 responsesSent = 22; - optional string state = 23; - optional double totalRoundTripTime = 24; - optional string transportId = 25; - } - message MediaSourceStat { - enum MediaSourceStatEnum { - /* For kind */ - AUDIO = 0; - VIDEO = 1; - } - optional double audioLevel = 1; - optional double droppedSamplesDuration = 2; - optional int32 droppedSamplesEvents = 3; - optional double echoReturnLoss = 4; - optional double echoReturnLossEnhancement = 5; - optional int32 frames = 6; - optional double framesPerSecond = 7; - optional int32 height = 8; - optional MediaSourceStatEnum kind = 9; - optional bool relayedSource = 10; - optional double totalAudioEnergy = 11; - optional double totalCaptureDelay = 12; - optional double totalSamplesCaptured = 13; - optional double totalSamplesDuration = 14; - optional bytes trackIdentifier = 15; - optional int32 width = 16; - } - message MediaCodecStats { - enum MediaCodecStatsEnum { - /* For codecType */ - ENCODE = 0; - DECODE = 1; - } - optional int32 channels = 1; - optional int32 clockRate = 2; - optional MediaCodecStatsEnum codecType = 3; - optional string mimeType = 4; - optional string payloadType = 5; - optional string sdpFmtpLine = 6; - } - message Certificate { - optional string base64Certificate = 1; - optional string fingerprint = 2; - optional string fingerprintAlgorithm = 3; - optional string issuerCertificateId = 4; - } - message InboundAudioTrack { - optional int64 ssrc = 1; - optional double audioLevel = 2; - optional int64 bytesReceived = 3; - optional int64 bytesSent = 4; - optional int32 concealedSamples = 5; - optional int32 concealmentEvents = 6; - optional string decoderImplementation = 7; - optional int64 estimatedPlayoutTimestamp = 8; - optional int32 fecPacketsDiscarded = 9; - optional int32 fecPacketsReceived = 10; - optional int64 headerBytesReceived = 11; - optional int32 insertedSamplesForDeceleration = 12; - optional double jitter = 13; - optional double jitterBufferDelay = 14; - optional int32 jitterBufferEmittedCount = 15; - optional double jitterBufferMinimumDelay = 16; - optional double jitterBufferTargetDelay = 17; - optional int64 lastPacketReceivedTimestamp = 18; - optional int32 nackCount = 19; - optional int32 packetsDiscarded = 20; - optional int32 packetsLost = 21; - optional int32 packetsReceived = 22; - optional int32 packetsSent = 23; - optional bytes peerConnectionId = 24; - optional bytes remoteClientId = 25; - optional int64 remoteTimestamp = 26; - optional int32 removedSamplesForAcceleration = 27; - optional int32 reportsSent = 28; - optional double roundTripTime = 29; - optional int32 roundTripTimeMeasurements = 30; - optional bytes sfuSinkId = 31; - optional bytes sfuStreamId = 32; - optional int32 silentConcealedSamples = 33; - optional double synthesizedSamplesDuration = 34; - optional int32 synthesizedSamplesEvents = 35; - optional double totalAudioEnergy = 36; - optional double totalPlayoutDelay = 37; - optional double totalProcessingDelay = 38; - optional double totalRoundTripTime = 39; - optional int32 totalSamplesCount = 40; - optional double totalSamplesDuration = 41; - optional int32 totalSamplesReceived = 42; - optional bytes trackId = 43; - } - message InboundVideoTrack { - optional int64 ssrc = 1; - optional int64 bytesReceived = 2; - optional int64 bytesSent = 3; - optional string decoderImplementation = 4; - optional int64 estimatedPlayoutTimestamp = 5; - optional int32 fecPacketsDiscarded = 6; - optional int32 fecPacketsReceived = 7; - optional int32 firCount = 8; - optional int32 frameHeight = 9; - optional int32 frameWidth = 10; - optional int32 framesDecoded = 11; - optional int32 framesDropped = 12; - optional double framesPerSecond = 13; - optional int32 framesReceived = 14; - optional int64 headerBytesReceived = 15; - optional double jitter = 16; - optional double jitterBufferDelay = 17; - optional int32 jitterBufferEmittedCount = 18; - optional double jitterBufferMinimumDelay = 19; - optional double jitterBufferTargetDelay = 20; - optional int32 keyFramesDecoded = 21; - optional int64 lastPacketReceivedTimestamp = 22; - optional int32 nackCount = 23; - optional int32 packetsDiscarded = 24; - optional int32 packetsLost = 25; - optional int32 packetsReceived = 26; - optional int32 packetsSent = 27; - optional bytes peerConnectionId = 28; - optional int32 pliCount = 29; - optional int64 qpSum = 30; - optional bytes remoteClientId = 31; - optional int64 remoteTimestamp = 32; - optional int32 reportsSent = 33; - optional double roundTripTime = 34; - optional int32 roundTripTimeMeasurements = 35; - optional bytes sfuSinkId = 36; - optional bytes sfuStreamId = 37; - optional double totalDecodeTime = 38; - optional double totalInterFrameDelay = 39; - optional double totalProcessingDelay = 40; - optional double totalRoundTripTime = 41; - optional double totalSquaredInterFrameDelay = 42; - optional bytes trackId = 43; - } - message OutboundAudioTrack { - optional int64 ssrc = 1; - optional bool active = 2; - optional double audioLevel = 3; - optional double averageRtcpInterval = 4; - optional int64 bytesSent = 5; - optional double droppedSamplesDuration = 6; - optional int32 droppedSamplesEvents = 7; - optional double echoReturnLoss = 8; - optional double echoReturnLossEnhancement = 9; - optional string encoderImplementation = 10; - optional double fractionLost = 11; - optional int64 headerBytesSent = 12; - optional double jitter = 13; - optional int32 nackCount = 14; - optional int32 packetsLost = 15; - optional int32 packetsReceived = 16; - optional int32 packetsSent = 17; - optional bytes peerConnectionId = 18; - optional bool relayedSource = 19; - optional int64 retransmittedBytesSent = 20; - optional int32 retransmittedPacketsSent = 21; - optional string rid = 22; - optional double roundTripTime = 23; - optional int32 roundTripTimeMeasurements = 24; - optional bytes sfuStreamId = 25; - optional int32 targetBitrate = 26; - optional double totalAudioEnergy = 27; - optional double totalCaptureDelay = 28; - optional int64 totalEncodedBytesTarget = 29; - optional double totalPacketSendDelay = 30; - optional double totalRoundTripTime = 31; - optional double totalSamplesCaptured = 32; - optional double totalSamplesDuration = 33; - optional bytes trackId = 34; - } - message OutboundVideoTrack { - optional int64 ssrc = 1; - optional bool active = 2; - optional double averageRtcpInterval = 3; - optional int64 bytesSent = 4; - optional string encoderImplementation = 5; - optional int32 firCount = 6; - optional double fractionLost = 7; - optional int32 frameHeight = 8; - optional int32 frameWidth = 9; - optional int32 frames = 10; - optional int32 framesDropped = 11; - optional int32 framesEncoded = 12; - optional double framesPerSecond = 13; - optional int32 framesSent = 14; - optional int64 headerBytesSent = 15; - optional int32 height = 16; - optional int32 hugeFramesSent = 17; - optional double jitter = 18; - optional int32 keyFramesEncoded = 19; - optional int32 nackCount = 20; - optional int32 packetsLost = 21; - optional int32 packetsReceived = 22; - optional int32 packetsSent = 23; - optional bytes peerConnectionId = 24; - optional int32 pliCount = 25; - optional int64 qpSum = 26; - optional double qualityLimitationDurationBandwidth = 27; - optional double qualityLimitationDurationCPU = 28; - optional double qualityLimitationDurationNone = 29; - optional double qualityLimitationDurationOther = 30; - optional string qualityLimitationReason = 31; - optional int32 qualityLimitationResolutionChanges = 32; - optional bool relayedSource = 33; - optional int64 retransmittedBytesSent = 34; - optional int32 retransmittedPacketsSent = 35; - optional string rid = 36; - optional double roundTripTime = 37; - optional int32 roundTripTimeMeasurements = 38; - optional bytes sfuStreamId = 39; - optional int32 targetBitrate = 40; - optional double totalEncodeTime = 41; - optional int64 totalEncodedBytesTarget = 42; - optional double totalPacketSendDelay = 43; - optional double totalRoundTripTime = 44; - optional bytes trackId = 45; - optional int32 width = 46; - } - message IceLocalCandidate { - enum IceLocalCandidateEnum { - /* For protocol */ - TCP = 0; - UDP = 1; - /* For relayProtocol */ - TLS = 2; - } - optional string address = 1; - optional string candidateType = 2; - optional string id = 3; - optional bytes peerConnectionId = 4; - optional int32 port = 5; - optional int64 priority = 6; - optional IceLocalCandidateEnum protocol = 7; - optional IceLocalCandidateEnum relayProtocol = 8; - optional string url = 9; - } - message IceRemoteCandidate { - enum IceRemoteCandidateEnum { - /* For protocol */ - TCP = 0; - UDP = 1; - /* For relayProtocol */ - TLS = 2; - } - optional string address = 1; - optional string candidateType = 2; - optional string id = 3; - optional bytes peerConnectionId = 4; - optional int32 port = 5; - optional int64 priority = 6; - optional IceRemoteCandidateEnum protocol = 7; - optional IceRemoteCandidateEnum relayProtocol = 8; - optional string url = 9; - } - repeated Certificate certificates = 1; - repeated MediaCodecStats codecs = 2; - repeated CustomCallEvent customCallEvents = 3; - repeated CustomObserverEvent customObserverEvents = 4; - repeated DataChannel dataChannels = 5; - repeated ExtensionStat extensionStats = 6; - repeated IceCandidatePair iceCandidatePairs = 7; - repeated IceLocalCandidate iceLocalCandidates = 8; - repeated IceRemoteCandidate iceRemoteCandidates = 9; - repeated string iceServers = 10; - repeated InboundAudioTrack inboundAudioTracks = 11; - repeated InboundVideoTrack inboundVideoTracks = 12; - repeated string localSDPs = 13; - repeated string mediaConstraints = 14; - repeated MediaDevice mediaDevices = 15; - repeated MediaSourceStat mediaSources = 16; - repeated OutboundAudioTrack outboundAudioTracks = 17; - repeated OutboundVideoTrack outboundVideoTracks = 18; - repeated PeerConnectionTransport pcTransports = 19; - repeated string userMediaErrors = 20; - optional bytes clientId = 21; - optional int64 timestamp = 22; - optional Browser browser = 23; - optional bytes callId = 24; - optional Engine engine = 25; - optional string marker = 26; - optional OperationSystem os = 27; - optional Platform platform = 28; - optional string roomId = 29; - optional int32 sampleSeq = 30; - optional int32 timeZoneOffsetInHours = 31; - optional string userId = 32; - } - message SfuSample { - message CustomSfuEvent { - optional string name = 1; - optional string attachments = 2; - optional string message = 3; - optional bytes sfuSinkId = 4; - optional bytes sfuStreamId = 5; - optional int64 timestamp = 6; - optional string transportId = 7; - optional string value = 8; - } - message SfuTransport { - optional string transportId = 1; - optional string dtlsState = 2; - optional string iceRole = 3; - optional string iceState = 4; - optional bool internal = 5; - optional string localAddress = 6; - optional int32 localPort = 7; - optional bool noReport = 8; - optional string protocol = 9; - optional string remoteAddress = 10; - optional int32 remotePort = 11; - optional int64 rtpBytesReceived = 12; - optional int64 rtpBytesSent = 13; - optional int32 rtpPacketsLost = 14; - optional int32 rtpPacketsReceived = 15; - optional int32 rtpPacketsSent = 16; - optional int64 rtxBytesReceived = 17; - optional int64 rtxBytesSent = 18; - optional int32 rtxPacketsDiscarded = 19; - optional int32 rtxPacketsLost = 20; - optional int32 rtxPacketsReceived = 21; - optional int32 rtxPacketsSent = 22; - optional int64 sctpBytesReceived = 23; - optional int64 sctpBytesSent = 24; - optional int32 sctpPacketsReceived = 25; - optional int32 sctpPacketsSent = 26; - optional string sctpState = 27; - } - message SfuInboundRtpPad { - enum SfuInboundRtpPadEnum { - /* For mediaType */ - AUDIO = 0; - VIDEO = 1; - } - optional bytes padId = 1; - optional int64 ssrc = 2; - optional bytes streamId = 3; - optional string transportId = 4; - optional int64 bytesReceived = 5; - optional int32 clockRate = 6; - optional int32 fecPacketsDiscarded = 7; - optional int32 fecPacketsReceived = 8; - optional int32 firCount = 9; - optional double fractionLost = 10; - optional int32 framesDecoded = 11; - optional int32 framesReceived = 12; - optional bool internal = 13; - optional double jitter = 14; - optional int32 keyFramesDecoded = 15; - optional SfuInboundRtpPadEnum mediaType = 16; - optional string mimeType = 17; - optional int32 nackCount = 18; - optional bool noReport = 19; - optional int32 packetsDiscarded = 20; - optional int32 packetsDuplicated = 21; - optional int32 packetsFailedDecryption = 22; - optional int32 packetsLost = 23; - optional int32 packetsReceived = 24; - optional int32 packetsRepaired = 25; - optional int32 payloadType = 26; - optional int32 pliCount = 27; - optional string rid = 28; - optional double roundTripTime = 29; - optional int32 rtcpRrSent = 30; - optional int32 rtcpSrReceived = 31; - optional int32 rtxPacketsDiscarded = 32; - optional int32 rtxPacketsReceived = 33; - optional int64 rtxSsrc = 34; - optional string sdpFmtpLine = 35; - optional int32 sliCount = 36; - optional int32 targetBitrate = 37; - optional bool voiceActivityFlag = 38; - } - message SfuOutboundRtpPad { - enum SfuOutboundRtpPadEnum { - /* For mediaType */ - AUDIO = 0; - VIDEO = 1; - } - optional bytes padId = 1; - optional bytes sinkId = 2; - optional int64 ssrc = 3; - optional bytes streamId = 4; - optional string transportId = 5; - optional int64 bytesSent = 6; - optional bytes callId = 7; - optional bytes clientId = 8; - optional int32 clockRate = 9; - optional int32 fecPacketsDiscarded = 10; - optional int32 fecPacketsSent = 11; - optional int32 firCount = 12; - optional double fractionLost = 13; - optional int32 framesEncoded = 14; - optional int32 framesSent = 15; - optional bool internal = 16; - optional double jitter = 17; - optional int32 keyFramesEncoded = 18; - optional SfuOutboundRtpPadEnum mediaType = 19; - optional string mimeType = 20; - optional int32 nackCount = 21; - optional bool noReport = 22; - optional int32 packetsDiscarded = 23; - optional int32 packetsDuplicated = 24; - optional int32 packetsFailedEncryption = 25; - optional int32 packetsLost = 26; - optional int32 packetsRetransmitted = 27; - optional int32 packetsSent = 28; - optional int32 payloadType = 29; - optional int32 pliCount = 30; - optional string rid = 31; - optional double roundTripTime = 32; - optional int32 rtcpRrReceived = 33; - optional int32 rtcpSrSent = 34; - optional int32 rtxPacketsDiscarded = 35; - optional int32 rtxPacketsSent = 36; - optional int64 rtxSsrc = 37; - optional string sdpFmtpLine = 38; - optional int32 sliCount = 39; - optional int32 targetBitrate = 40; - optional bytes trackId = 41; - optional bool voiceActivityFlag = 42; - } - message SfuSctpChannel { - optional bytes channelId = 1; - optional bytes streamId = 2; - optional string transportId = 3; - optional int64 bytesReceived = 4; - optional int64 bytesSent = 5; - optional bool internal = 6; - optional string label = 7; - optional int32 messageReceived = 8; - optional int32 messageSent = 9; - optional bool noReport = 10; - optional string protocol = 11; - optional double sctpCongestionWindow = 12; - optional int32 sctpMtu = 13; - optional double sctpReceiverWindow = 14; - optional double sctpSmoothedRoundTripTime = 15; - optional int32 sctpUnackData = 16; - } - message SfuExtensionStats { - optional string payload = 1; - optional string type = 2; - } - repeated CustomSfuEvent customSfuEvents = 1; - repeated SfuExtensionStats extensionStats = 2; - repeated SfuInboundRtpPad inboundRtpPads = 3; - repeated SfuOutboundRtpPad outboundRtpPads = 4; - repeated SfuSctpChannel sctpChannels = 5; - repeated SfuTransport transports = 6; - optional bytes sfuId = 7; - optional int64 timestamp = 8; - optional string marker = 9; - optional int32 timeZoneOffsetInHours = 10; - } - message TurnSample { - message TurnPeerAllocation { - optional string peerId = 1; - optional string relayedAddress = 2; - optional int32 relayedPort = 3; - optional string sessionId = 4; - optional string transportProtocol = 5; - optional string peerAddress = 6; - optional int32 peerPort = 7; - optional int64 receivedBytes = 8; - optional int32 receivedPackets = 9; - optional int32 receivingBitrate = 10; - optional int32 sendingBitrate = 11; - optional int64 sentBytes = 12; - optional int32 sentPackets = 13; - } - message TurnSession { - optional string sessionId = 1; - optional string clientAddress = 2; - optional bytes clientId = 3; - optional int32 clientPort = 4; - optional int64 nonceExpirationTime = 5; - optional string realm = 6; - optional int64 receivedBytes = 7; - optional int32 receivedPackets = 8; - optional int32 receivingBitrate = 9; - optional int32 sendingBitrate = 10; - optional int64 sentBytes = 11; - optional int32 sentPackets = 12; - optional string serverAddress = 13; - optional int32 serverPort = 14; - optional int64 started = 15; - optional string transportProtocol = 16; - optional string username = 17; - } - repeated TurnPeerAllocation allocations = 1; - repeated TurnSession sessions = 2; - optional string serverId = 3; - } - repeated ClientSample clientSamples = 1; - repeated SfuSample sfuSamples = 2; - repeated TurnSample turnSamples = 3; - optional Controls controls = 4; -} \ No newline at end of file diff --git a/outputs/sql/bigquery.sql b/outputs/sql/bigquery.sql index b739c22c..e69de29b 100644 --- a/outputs/sql/bigquery.sql +++ b/outputs/sql/bigquery.sql @@ -1,591 +0,0 @@ -CREATE TABLE observer.CallEventReport ( - serviceId STRING not null, - timestamp INT64 not null, - name STRING not null, - attachments STRING, - callId STRING, - clientId STRING, - marker STRING, - mediaTrackId STRING, - mediaUnitId STRING, - message STRING, - peerConnectionId STRING, - roomId STRING, - sampleSeq INT64, - sampleTimestamp INT64, - SSRC INT64, - userId STRING, - value STRING -) - -CREATE TABLE observer.CallMetaReport ( - serviceId STRING not null, - timestamp INT64 not null, - callId STRING, - clientId STRING, - marker STRING, - mediaUnitId STRING, - payload STRING, - peerConnectionId STRING, - roomId STRING, - sampleSeq INT64, - sampleTimestamp INT64, - type STRING, - userId STRING -) - -CREATE TABLE observer.ClientDataChannelReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - bytesReceived INT64, - bytesSent INT64, - label STRING, - marker STRING, - messagesReceived INT64, - messagesSent INT64, - peerConnectionLabel STRING, - protocol STRING, - roomId STRING, - state STRING, - userId STRING -) - -CREATE TABLE observer.ClientExtensionReport ( - serviceId STRING not null, - timestamp INT64 not null, - extensionType STRING not null, - callId STRING, - clientId STRING, - marker STRING, - mediaUnitId STRING, - payload STRING, - peerConnectionId STRING, - roomId STRING, - sampleSeq INT64, - userId STRING -) - -CREATE TABLE observer.IceCandidatePairReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - availableIncomingBitrate FLOAT64, - availableOutgoingBitrate FLOAT64, - bytesDiscardedOnSend INT64, - bytesReceived INT64, - bytesSent INT64, - candidatePairId STRING, - consentRequestsSent INT64, - currentRoundTripTime FLOAT64, - label STRING, - lastPacketReceivedTimestamp INT64, - lastPacketSentTimestamp INT64, - localCandidateId STRING, - marker STRING, - nominated BOOL, - packetsDiscardedOnSend INT64, - packetsReceived INT64, - packetsSent INT64, - remoteCandidateId STRING, - requestsReceived INT64, - requestsSent INT64, - responsesReceived INT64, - responsesSent INT64, - roomId STRING, - state STRING, - totalRoundTripTime FLOAT64, - transportId STRING, - userId STRING -) - -CREATE TABLE observer.InboundAudioTrackReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - ssrc INT64 not null, - audioLevel FLOAT64, - bytesReceived INT64, - bytesSent INT64, - concealedSamples INT64, - concealmentEvents INT64, - decoderImplementation STRING, - estimatedPlayoutTimestamp INT64, - fecPacketsDiscarded INT64, - fecPacketsReceived INT64, - headerBytesReceived INT64, - insertedSamplesForDeceleration INT64, - jitter FLOAT64, - jitterBufferDelay FLOAT64, - jitterBufferEmittedCount INT64, - jitterBufferMinimumDelay FLOAT64, - jitterBufferTargetDelay FLOAT64, - label STRING, - lastPacketReceivedTimestamp INT64, - marker STRING, - nackCount INT64, - packetsDiscarded INT64, - packetsLost INT64, - packetsReceived INT64, - packetsSent INT64, - remoteClientId STRING, - remotePeerConnectionId STRING, - remoteTimestamp INT64, - remoteTrackId STRING, - remoteUserId STRING, - removedSamplesForAcceleration INT64, - reportsSent INT64, - roomId STRING, - roundTripTime FLOAT64, - roundTripTimeMeasurements INT64, - sfuSinkId STRING, - sfuStreamId STRING, - silentConcealedSamples INT64, - synthesizedSamplesDuration FLOAT64, - synthesizedSamplesEvents INT64, - totalAudioEnergy FLOAT64, - totalPlayoutDelay FLOAT64, - totalProcessingDelay FLOAT64, - totalRoundTripTime FLOAT64, - totalSamplesCount INT64, - totalSamplesDuration FLOAT64, - totalSamplesReceived INT64, - trackId STRING, - userId STRING -) - -CREATE TABLE observer.InboundVideoTrackReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - ssrc INT64 not null, - bytesReceived INT64, - bytesSent INT64, - decoderImplementation STRING, - estimatedPlayoutTimestamp INT64, - fecPacketsDiscarded INT64, - fecPacketsReceived INT64, - firCount INT64, - frameHeight INT64, - framesDecoded INT64, - framesDropped INT64, - framesPerSecond FLOAT64, - framesReceived INT64, - frameWidth INT64, - headerBytesReceived INT64, - jitter FLOAT64, - jitterBufferDelay FLOAT64, - jitterBufferEmittedCount INT64, - jitterBufferMinimumDelay FLOAT64, - jitterBufferTargetDelay FLOAT64, - keyFramesDecoded INT64, - label STRING, - lastPacketReceivedTimestamp INT64, - marker STRING, - nackCount INT64, - packetsDiscarded INT64, - packetsLost INT64, - packetsReceived INT64, - packetsSent INT64, - pliCount INT64, - qpSum INT64, - remoteClientId STRING, - remotePeerConnectionId STRING, - remoteTimestamp INT64, - remoteTrackId STRING, - remoteUserId STRING, - reportsSent INT64, - roomId STRING, - roundTripTime FLOAT64, - roundTripTimeMeasurements INT64, - sfuSinkId STRING, - sfuStreamId STRING, - totalDecodeTime FLOAT64, - totalInterFrameDelay FLOAT64, - totalProcessingDelay FLOAT64, - totalRoundTripTime FLOAT64, - totalSquaredInterFrameDelay FLOAT64, - trackId STRING, - userId STRING -) - -CREATE TABLE observer.ObserverEventReport ( - serviceId STRING not null, - timestamp INT64 not null, - callId STRING not null, - name STRING not null, - attachments STRING, - clientId STRING, - marker STRING, - mediaUnitId STRING, - message STRING, - peerConnectionId STRING, - roomId STRING, - sampleSeq INT64, - sampleTimestamp INT64, - userId STRING, - value STRING -) - -CREATE TABLE observer.OutboundAudioTrackReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - ssrc INT64 not null, - active BOOL, - audioLevel FLOAT64, - averageRtcpInterval FLOAT64, - bytesSent INT64, - droppedSamplesDuration FLOAT64, - droppedSamplesEvents INT64, - echoReturnLoss FLOAT64, - echoReturnLossEnhancement FLOAT64, - encoderImplementation STRING, - fractionLost FLOAT64, - headerBytesSent INT64, - jitter FLOAT64, - label STRING, - marker STRING, - nackCount INT64, - packetsLost INT64, - packetsReceived INT64, - packetsSent INT64, - relayedSource BOOL, - retransmittedBytesSent INT64, - retransmittedPacketsSent INT64, - rid STRING, - roomId STRING, - roundTripTime FLOAT64, - roundTripTimeMeasurements INT64, - sfuStreamId STRING, - targetBitrate INT64, - totalAudioEnergy FLOAT64, - totalCaptureDelay FLOAT64, - totalEncodedBytesTarget INT64, - totalPacketSendDelay FLOAT64, - totalRoundTripTime FLOAT64, - totalSamplesCaptured FLOAT64, - totalSamplesDuration FLOAT64, - trackId STRING, - userId STRING -) - -CREATE TABLE observer.OutboundVideoTrackReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - sampleSeq INT64 not null, - ssrc INT64 not null, - active BOOL, - averageRtcpInterval FLOAT64, - bytesSent INT64, - encoderImplementation STRING, - firCount INT64, - fractionLost FLOAT64, - frameHeight INT64, - frames INT64, - framesDropped INT64, - framesEncoded INT64, - framesPerSecond FLOAT64, - framesSent INT64, - frameWidth INT64, - headerBytesSent INT64, - height INT64, - hugeFramesSent INT64, - jitter FLOAT64, - keyFramesEncoded INT64, - label STRING, - marker STRING, - nackCount INT64, - packetsLost INT64, - packetsReceived INT64, - packetsSent INT64, - pliCount INT64, - qpSum INT64, - qualityLimitationDurationBandwidth FLOAT64, - qualityLimitationDurationCPU FLOAT64, - qualityLimitationDurationNone FLOAT64, - qualityLimitationDurationOther FLOAT64, - qualityLimitationReason STRING, - qualityLimitationResolutionChanges INT64, - relayedSource BOOL, - retransmittedBytesSent INT64, - retransmittedPacketsSent INT64, - rid STRING, - roomId STRING, - roundTripTime FLOAT64, - roundTripTimeMeasurements INT64, - sfuStreamId STRING, - targetBitrate INT64, - totalEncodedBytesTarget INT64, - totalEncodeTime FLOAT64, - totalPacketSendDelay FLOAT64, - totalRoundTripTime FLOAT64, - trackId STRING, - userId STRING, - width INT64 -) - -CREATE TABLE observer.PeerConnectionTransportReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - timestamp INT64 not null, - callId STRING not null, - clientId STRING not null, - peerConnectionId STRING not null, - transportId STRING not null, - sampleSeq INT64 not null, - bytesReceived INT64, - bytesSent INT64, - dtlsCipher STRING, - dtlsRole STRING, - dtlsState STRING, - iceLocalUsernameFragment STRING, - iceRole STRING, - iceState STRING, - label STRING, - localCertificateId STRING, - marker STRING, - packetsReceived INT64, - packetsSent INT64, - remoteCertificateId STRING, - roomId STRING, - selectedCandidatePairChanges INT64, - selectedCandidatePairId STRING, - srtpCipher STRING, - tlsGroup STRING, - tlsVersion STRING, - userId STRING -) - -CREATE TABLE observer.Report ( - type STRING not null, - payload BYTES not null, - schemaVersion STRING -) - -CREATE TABLE observer.SfuEventReport ( - serviceId STRING not null, - timestamp INT64 not null, - name STRING not null, - attachments STRING, - callId STRING, - marker STRING, - mediaSinkId STRING, - mediaStreamId STRING, - mediaUnitId STRING, - message STRING, - rtpPadId STRING, - sctpStreamId STRING, - sfuId STRING, - transportId STRING, - value STRING -) - -CREATE TABLE observer.SfuExtensionReport ( - serviceId STRING not null, - timestamp INT64 not null, - extensionType STRING not null, - marker STRING, - mediaUnitId STRING, - payload STRING, - sfuId STRING -) - -CREATE TABLE observer.SfuInboundRtpPadReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - sfuId STRING not null, - timestamp INT64 not null, - transportId STRING not null, - sfuStreamId STRING not null, - rtpPadId STRING not null, - ssrc INT64 not null, - bytesReceived INT64, - callId STRING, - clientId STRING, - clockRate INT64, - fecPacketsDiscarded INT64, - fecPacketsReceived INT64, - firCount INT64, - fractionLost FLOAT64, - framesDecoded INT64, - framesReceived INT64, - internal BOOL, - jitter FLOAT64, - keyFramesDecoded INT64, - marker STRING, - mediaType STRING, - mimeType STRING, - nackCount INT64, - packetsDiscarded INT64, - packetsDuplicated INT64, - packetsFailedDecryption INT64, - packetsLost INT64, - packetsReceived INT64, - packetsRepaired INT64, - payloadType INT64, - pliCount INT64, - remoteRtpPadId STRING, - remoteSfuId STRING, - remoteSinkId STRING, - remoteTransportId STRING, - rid STRING, - roundTripTime FLOAT64, - rtcpRrSent INT64, - rtcpSrReceived INT64, - rtxPacketsDiscarded INT64, - rtxPacketsReceived INT64, - rtxSsrc INT64, - sdpFmtpLine STRING, - sliCount INT64, - targetBitrate INT64, - trackId STRING, - voiceActivityFlag BOOL -) - -CREATE TABLE observer.SfuMetaReport ( - serviceId STRING not null, - timestamp INT64 not null, - callId STRING, - marker STRING, - mediaSinkId STRING, - mediaStreamId STRING, - mediaUnitId STRING, - payload STRING, - rtpPadId STRING, - sctpStreamId STRING, - sfuId STRING, - transportId STRING, - type STRING -) - -CREATE TABLE observer.SfuOutboundRtpPadReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - sfuId STRING not null, - timestamp INT64 not null, - transportId STRING not null, - sfuStreamId STRING not null, - sfuSinkId STRING not null, - rtpPadId STRING not null, - ssrc INT64 not null, - bytesSent INT64, - callId STRING, - clientId STRING, - clockRate INT64, - fecPacketsDiscarded INT64, - fecPacketsSent INT64, - firCount INT64, - framesEncoded INT64, - framesSent INT64, - internal BOOL, - keyFramesEncoded INT64, - marker STRING, - mediaType STRING, - mimeType STRING, - nackCount INT64, - packetsDiscarded INT64, - packetsDuplicated INT64, - packetsFailedEncryption INT64, - packetsLost INT64, - packetsRetransmitted INT64, - packetsSent INT64, - payloadType INT64, - pliCount INT64, - rid STRING, - roundTripTime FLOAT64, - rtcpRrReceived INT64, - rtcpSrSent INT64, - rtxPacketsDiscarded INT64, - rtxPacketsSent INT64, - rtxSsrc INT64, - sdpFmtpLine STRING, - sliCount INT64, - targetBitrate INT64, - trackId STRING, - voiceActivityFlag BOOL -) - -CREATE TABLE observer.SfuSctpStreamReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - sfuId STRING not null, - timestamp INT64 not null, - transportId STRING not null, - streamId STRING not null, - bytesReceived INT64, - bytesSent INT64, - callId STRING, - internal BOOL, - label STRING, - marker STRING, - messageReceived INT64, - messageSent INT64, - protocol STRING, - roomId STRING, - sctpCongestionWindow FLOAT64, - sctpMtu INT64, - sctpReceiverWindow FLOAT64, - sctpSmoothedRoundTripTime FLOAT64, - sctpUnackData INT64 -) - -CREATE TABLE observer.SFUTransportReport ( - serviceId STRING not null, - mediaUnitId STRING not null, - sfuId STRING not null, - timestamp INT64 not null, - transportId STRING not null, - callId STRING, - dtlsState STRING, - iceRole STRING, - iceState STRING, - internal BOOL, - localAddress STRING, - localPort INT64, - marker STRING, - protocol STRING, - remoteAddress STRING, - remotePort INT64, - roomId STRING, - rtpBytesReceived INT64, - rtpBytesSent INT64, - rtpPacketsLost INT64, - rtpPacketsReceived INT64, - rtpPacketsSent INT64, - rtxBytesReceived INT64, - rtxBytesSent INT64, - rtxPacketsDiscarded INT64, - rtxPacketsLost INT64, - rtxPacketsReceived INT64, - rtxPacketsSent INT64, - sctpBytesReceived INT64, - sctpBytesSent INT64, - sctpPacketsReceived INT64, - sctpPacketsSent INT64, - sctpState STRING -) \ No newline at end of file diff --git a/outputs/sql/redshift.sql b/outputs/sql/redshift.sql index 72916f55..e69de29b 100644 --- a/outputs/sql/redshift.sql +++ b/outputs/sql/redshift.sql @@ -1,627 +0,0 @@ -create table IF NOT EXISTS call_event_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - name VARCHAR(65535) not null, - attachments VARCHAR(65535), - callid VARCHAR(254), - clientid VARCHAR(254), - marker VARCHAR(65535), - mediatrackid VARCHAR(1024), - mediaunitid VARCHAR(1024), - message VARCHAR(65535), - peerconnectionid VARCHAR(254), - roomid VARCHAR(1024), - sampleseq INTEGER, - sampletimestamp BIGINT, - ssrc BIGINT, - userid VARCHAR(1024), - value VARCHAR(65535) -) diststyle even; -ALTER TABLE call_event_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE call_event_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid); - -create table IF NOT EXISTS call_meta_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254), - clientid VARCHAR(254), - marker VARCHAR(65535), - mediaunitid VARCHAR(1024), - payload VARCHAR(65535), - peerconnectionid VARCHAR(254), - roomid VARCHAR(1024), - sampleseq INTEGER, - sampletimestamp BIGINT, - type VARCHAR(65535), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE call_meta_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE call_meta_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid); - -create table IF NOT EXISTS client_data_channel_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - bytesreceived BIGINT, - bytessent BIGINT, - label VARCHAR(65535), - marker VARCHAR(65535), - messagesreceived INTEGER, - messagessent INTEGER, - peerconnectionlabel VARCHAR(65535), - protocol VARCHAR(1024), - roomid VARCHAR(1024), - state VARCHAR(1024), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE client_data_channel_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE client_data_channel_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid); - -create table IF NOT EXISTS client_extension_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - extensiontype VARCHAR(65535) not null, - callid VARCHAR(254), - clientid VARCHAR(254), - marker VARCHAR(65535), - mediaunitid VARCHAR(1024), - payload VARCHAR(65535), - peerconnectionid VARCHAR(254), - roomid VARCHAR(1024), - sampleseq INTEGER, - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE client_extension_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE client_extension_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid); - -create table IF NOT EXISTS ice_candidate_pair_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - availableincomingbitrate REAL, - availableoutgoingbitrate REAL, - bytesdiscardedonsend BIGINT, - bytesreceived BIGINT, - bytessent BIGINT, - candidatepairid VARCHAR(1024), - consentrequestssent INTEGER, - currentroundtriptime REAL, - label VARCHAR(65535), - lastpacketreceivedtimestamp BIGINT, - lastpacketsenttimestamp BIGINT, - localcandidateid VARCHAR(1024), - marker VARCHAR(65535), - nominated BOOLEAN, - packetsdiscardedonsend INTEGER, - packetsreceived INTEGER, - packetssent INTEGER, - remotecandidateid VARCHAR(1024), - requestsreceived INTEGER, - requestssent INTEGER, - responsesreceived INTEGER, - responsessent INTEGER, - roomid VARCHAR(1024), - state VARCHAR(1024), - totalroundtriptime REAL, - transportid VARCHAR(254), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE ice_candidate_pair_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE ice_candidate_pair_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, transportid); - -create table IF NOT EXISTS inbound_audio_track_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - ssrc BIGINT not null, - audiolevel REAL, - bytesreceived BIGINT, - bytessent BIGINT, - concealedsamples INTEGER, - concealmentevents INTEGER, - decoderimplementation VARCHAR(65535), - estimatedplayouttimestamp BIGINT, - fecpacketsdiscarded INTEGER, - fecpacketsreceived INTEGER, - headerbytesreceived BIGINT, - insertedsamplesfordeceleration INTEGER, - jitter REAL, - jitterbufferdelay REAL, - jitterbufferemittedcount INTEGER, - jitterbufferminimumdelay REAL, - jitterbuffertargetdelay REAL, - label VARCHAR(65535), - lastpacketreceivedtimestamp BIGINT, - marker VARCHAR(65535), - nackcount INTEGER, - packetsdiscarded INTEGER, - packetslost INTEGER, - packetsreceived INTEGER, - packetssent INTEGER, - remoteclientid VARCHAR(1024), - remotepeerconnectionid VARCHAR(1024), - remotetimestamp BIGINT, - remotetrackid VARCHAR(1024), - remoteuserid VARCHAR(1024), - removedsamplesforacceleration INTEGER, - reportssent INTEGER, - roomid VARCHAR(1024), - roundtriptime REAL, - roundtriptimemeasurements INTEGER, - sfusinkid VARCHAR(254), - sfustreamid VARCHAR(254), - silentconcealedsamples INTEGER, - synthesizedsamplesduration REAL, - synthesizedsamplesevents INTEGER, - totalaudioenergy REAL, - totalplayoutdelay REAL, - totalprocessingdelay REAL, - totalroundtriptime REAL, - totalsamplescount INTEGER, - totalsamplesduration REAL, - totalsamplesreceived INTEGER, - trackid VARCHAR(254), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE inbound_audio_track_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE inbound_audio_track_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, sfusinkid, sfustreamid, trackid); - -create table IF NOT EXISTS inbound_video_track_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - ssrc BIGINT not null, - bytesreceived BIGINT, - bytessent BIGINT, - decoderimplementation VARCHAR(65535), - estimatedplayouttimestamp BIGINT, - fecpacketsdiscarded INTEGER, - fecpacketsreceived INTEGER, - fircount INTEGER, - frameheight INTEGER, - framesdecoded INTEGER, - framesdropped INTEGER, - framespersecond REAL, - framesreceived INTEGER, - framewidth INTEGER, - headerbytesreceived BIGINT, - jitter REAL, - jitterbufferdelay REAL, - jitterbufferemittedcount INTEGER, - jitterbufferminimumdelay REAL, - jitterbuffertargetdelay REAL, - keyframesdecoded INTEGER, - label VARCHAR(65535), - lastpacketreceivedtimestamp BIGINT, - marker VARCHAR(65535), - nackcount INTEGER, - packetsdiscarded INTEGER, - packetslost INTEGER, - packetsreceived INTEGER, - packetssent INTEGER, - plicount INTEGER, - qpsum BIGINT, - remoteclientid VARCHAR(1024), - remotepeerconnectionid VARCHAR(1024), - remotetimestamp BIGINT, - remotetrackid VARCHAR(1024), - remoteuserid VARCHAR(1024), - reportssent INTEGER, - roomid VARCHAR(1024), - roundtriptime REAL, - roundtriptimemeasurements INTEGER, - sfusinkid VARCHAR(254), - sfustreamid VARCHAR(254), - totaldecodetime REAL, - totalinterframedelay REAL, - totalprocessingdelay REAL, - totalroundtriptime REAL, - totalsquaredinterframedelay REAL, - trackid VARCHAR(254), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE inbound_video_track_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE inbound_video_track_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, sfusinkid, sfustreamid, trackid); - -create table IF NOT EXISTS observer_event_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - name VARCHAR(65535) not null, - attachments VARCHAR(65535), - clientid VARCHAR(254), - marker VARCHAR(65535), - mediaunitid VARCHAR(1024), - message VARCHAR(65535), - peerconnectionid VARCHAR(254), - roomid VARCHAR(1024), - sampleseq INTEGER, - sampletimestamp BIGINT, - userid VARCHAR(1024), - value VARCHAR(65535) -) diststyle even; -ALTER TABLE observer_event_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE observer_event_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid); - -create table IF NOT EXISTS outbound_audio_track_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - ssrc BIGINT not null, - active BOOLEAN, - audiolevel REAL, - averagertcpinterval REAL, - bytessent BIGINT, - droppedsamplesduration REAL, - droppedsamplesevents INTEGER, - echoreturnloss REAL, - echoreturnlossenhancement REAL, - encoderimplementation VARCHAR(65535), - fractionlost REAL, - headerbytessent BIGINT, - jitter REAL, - label VARCHAR(65535), - marker VARCHAR(65535), - nackcount INTEGER, - packetslost INTEGER, - packetsreceived INTEGER, - packetssent INTEGER, - relayedsource BOOLEAN, - retransmittedbytessent BIGINT, - retransmittedpacketssent INTEGER, - rid VARCHAR(65535), - roomid VARCHAR(1024), - roundtriptime REAL, - roundtriptimemeasurements INTEGER, - sfustreamid VARCHAR(254), - targetbitrate INTEGER, - totalaudioenergy REAL, - totalcapturedelay REAL, - totalencodedbytestarget BIGINT, - totalpacketsenddelay REAL, - totalroundtriptime REAL, - totalsamplescaptured REAL, - totalsamplesduration REAL, - trackid VARCHAR(254), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE outbound_audio_track_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE outbound_audio_track_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, sfustreamid, trackid); - -create table IF NOT EXISTS outbound_video_track_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - sampleseq INTEGER not null, - ssrc BIGINT not null, - active BOOLEAN, - averagertcpinterval REAL, - bytessent BIGINT, - encoderimplementation VARCHAR(65535), - fircount INTEGER, - fractionlost REAL, - frameheight INTEGER, - frames INTEGER, - framesdropped INTEGER, - framesencoded INTEGER, - framespersecond REAL, - framessent INTEGER, - framewidth INTEGER, - headerbytessent BIGINT, - height INTEGER, - hugeframessent INTEGER, - jitter REAL, - keyframesencoded INTEGER, - label VARCHAR(65535), - marker VARCHAR(65535), - nackcount INTEGER, - packetslost INTEGER, - packetsreceived INTEGER, - packetssent INTEGER, - plicount INTEGER, - qpsum BIGINT, - qualitylimitationdurationbandwidth REAL, - qualitylimitationdurationcpu REAL, - qualitylimitationdurationnone REAL, - qualitylimitationdurationother REAL, - qualitylimitationreason VARCHAR(65535), - qualitylimitationresolutionchanges INTEGER, - relayedsource BOOLEAN, - retransmittedbytessent BIGINT, - retransmittedpacketssent INTEGER, - rid VARCHAR(65535), - roomid VARCHAR(1024), - roundtriptime REAL, - roundtriptimemeasurements INTEGER, - sfustreamid VARCHAR(254), - targetbitrate INTEGER, - totalencodedbytestarget BIGINT, - totalencodetime REAL, - totalpacketsenddelay REAL, - totalroundtriptime REAL, - trackid VARCHAR(254), - userid VARCHAR(1024), - width INTEGER -) diststyle even; -ALTER TABLE outbound_video_track_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE outbound_video_track_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, sfustreamid, trackid); - -create table IF NOT EXISTS peer_connection_transport_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254) not null, - clientid VARCHAR(254) not null, - peerconnectionid VARCHAR(254) not null, - transportid VARCHAR(254) not null, - sampleseq INTEGER not null, - bytesreceived BIGINT, - bytessent BIGINT, - dtlscipher VARCHAR(65535), - dtlsrole VARCHAR(65535), - dtlsstate VARCHAR(1024), - icelocalusernamefragment VARCHAR(65535), - icerole VARCHAR(65535), - icestate VARCHAR(1024), - label VARCHAR(65535), - localcertificateid VARCHAR(1024), - marker VARCHAR(65535), - packetsreceived INTEGER, - packetssent INTEGER, - remotecertificateid VARCHAR(1024), - roomid VARCHAR(1024), - selectedcandidatepairchanges INTEGER, - selectedcandidatepairid VARCHAR(1024), - srtpcipher VARCHAR(65535), - tlsgroup VARCHAR(65535), - tlsversion VARCHAR(65535), - userid VARCHAR(1024) -) diststyle even; -ALTER TABLE peer_connection_transport_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE peer_connection_transport_report ALTER COMPOUND SORTKEY (callid, clientid, peerconnectionid, transportid); - -create table IF NOT EXISTS report ( - type VARCHAR(65535) not null, - payload VARCHAR(4096) not null, - schemaversion VARCHAR(65535) -) diststyle even; - -create table IF NOT EXISTS sfu_event_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - name VARCHAR(65535) not null, - attachments VARCHAR(65535), - callid VARCHAR(254), - marker VARCHAR(65535), - mediasinkid VARCHAR(1024), - mediastreamid VARCHAR(1024), - mediaunitid VARCHAR(1024), - message VARCHAR(65535), - rtppadid VARCHAR(1024), - sctpstreamid VARCHAR(1024), - sfuid VARCHAR(254), - transportid VARCHAR(254), - value VARCHAR(65535) -) diststyle even; -ALTER TABLE sfu_event_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_event_report ALTER COMPOUND SORTKEY (callid, sfuid, transportid); - -create table IF NOT EXISTS sfu_extension_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - extensiontype VARCHAR(65535) not null, - marker VARCHAR(65535), - mediaunitid VARCHAR(1024), - payload VARCHAR(65535), - sfuid VARCHAR(254) -) diststyle even; -ALTER TABLE sfu_extension_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_extension_report ALTER COMPOUND SORTKEY (sfuid); - -create table IF NOT EXISTS sfu_inbound_rtp_pad_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - sfuid VARCHAR(254) not null, - timestamp BIGINT not null, - transportid VARCHAR(254) not null, - sfustreamid VARCHAR(254) not null, - rtppadid VARCHAR(1024) not null, - ssrc BIGINT not null, - bytesreceived BIGINT, - callid VARCHAR(254), - clientid VARCHAR(254), - clockrate INTEGER, - fecpacketsdiscarded INTEGER, - fecpacketsreceived INTEGER, - fircount INTEGER, - fractionlost REAL, - framesdecoded INTEGER, - framesreceived INTEGER, - internal BOOLEAN, - jitter REAL, - keyframesdecoded INTEGER, - marker VARCHAR(65535), - mediatype VARCHAR(65535), - mimetype VARCHAR(65535), - nackcount INTEGER, - packetsdiscarded INTEGER, - packetsduplicated INTEGER, - packetsfaileddecryption INTEGER, - packetslost INTEGER, - packetsreceived INTEGER, - packetsrepaired INTEGER, - payloadtype INTEGER, - plicount INTEGER, - remotertppadid VARCHAR(1024), - remotesfuid VARCHAR(1024), - remotesinkid VARCHAR(1024), - remotetransportid VARCHAR(1024), - rid VARCHAR(65535), - roundtriptime REAL, - rtcprrsent INTEGER, - rtcpsrreceived INTEGER, - rtxpacketsdiscarded INTEGER, - rtxpacketsreceived INTEGER, - rtxssrc BIGINT, - sdpfmtpline VARCHAR(65535), - slicount INTEGER, - targetbitrate INTEGER, - trackid VARCHAR(254), - voiceactivityflag BOOLEAN -) diststyle even; -ALTER TABLE sfu_inbound_rtp_pad_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_inbound_rtp_pad_report ALTER COMPOUND SORTKEY (sfuid, transportid, sfustreamid, callid, clientid, trackid); - -create table IF NOT EXISTS sfu_meta_report ( - serviceid VARCHAR(1024) not null, - timestamp BIGINT not null, - callid VARCHAR(254), - marker VARCHAR(65535), - mediasinkid VARCHAR(1024), - mediastreamid VARCHAR(1024), - mediaunitid VARCHAR(1024), - payload VARCHAR(65535), - rtppadid VARCHAR(1024), - sctpstreamid VARCHAR(1024), - sfuid VARCHAR(254), - transportid VARCHAR(254), - type VARCHAR(65535) -) diststyle even; -ALTER TABLE sfu_meta_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_meta_report ALTER COMPOUND SORTKEY (callid, sfuid, transportid); - -create table IF NOT EXISTS sfu_outbound_rtp_pad_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - sfuid VARCHAR(254) not null, - timestamp BIGINT not null, - transportid VARCHAR(254) not null, - sfustreamid VARCHAR(254) not null, - sfusinkid VARCHAR(254) not null, - rtppadid VARCHAR(1024) not null, - ssrc BIGINT not null, - bytessent BIGINT, - callid VARCHAR(254), - clientid VARCHAR(254), - clockrate INTEGER, - fecpacketsdiscarded INTEGER, - fecpacketssent INTEGER, - fircount INTEGER, - framesencoded INTEGER, - framessent INTEGER, - internal BOOLEAN, - keyframesencoded INTEGER, - marker VARCHAR(65535), - mediatype VARCHAR(65535), - mimetype VARCHAR(65535), - nackcount INTEGER, - packetsdiscarded INTEGER, - packetsduplicated INTEGER, - packetsfailedencryption INTEGER, - packetslost INTEGER, - packetsretransmitted INTEGER, - packetssent INTEGER, - payloadtype INTEGER, - plicount INTEGER, - rid VARCHAR(65535), - roundtriptime REAL, - rtcprrreceived INTEGER, - rtcpsrsent INTEGER, - rtxpacketsdiscarded INTEGER, - rtxpacketssent INTEGER, - rtxssrc BIGINT, - sdpfmtpline VARCHAR(65535), - slicount INTEGER, - targetbitrate INTEGER, - trackid VARCHAR(254), - voiceactivityflag BOOLEAN -) diststyle even; -ALTER TABLE sfu_outbound_rtp_pad_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_outbound_rtp_pad_report ALTER COMPOUND SORTKEY (sfuid, transportid, sfustreamid, sfusinkid, callid, clientid, trackid); - -create table IF NOT EXISTS sfu_sctp_stream_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - sfuid VARCHAR(254) not null, - timestamp BIGINT not null, - transportid VARCHAR(254) not null, - streamid VARCHAR(254) not null, - bytesreceived BIGINT, - bytessent BIGINT, - callid VARCHAR(254), - internal BOOLEAN, - label VARCHAR(65535), - marker VARCHAR(65535), - messagereceived INTEGER, - messagesent INTEGER, - protocol VARCHAR(1024), - roomid VARCHAR(1024), - sctpcongestionwindow REAL, - sctpmtu INTEGER, - sctpreceiverwindow REAL, - sctpsmoothedroundtriptime REAL, - sctpunackdata INTEGER -) diststyle even; -ALTER TABLE sfu_sctp_stream_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_sctp_stream_report ALTER COMPOUND SORTKEY (sfuid, transportid, streamid, callid); - -create table IF NOT EXISTS sfu_transport_report ( - serviceid VARCHAR(1024) not null, - mediaunitid VARCHAR(1024) not null, - sfuid VARCHAR(254) not null, - timestamp BIGINT not null, - transportid VARCHAR(254) not null, - callid VARCHAR(254), - dtlsstate VARCHAR(1024), - icerole VARCHAR(65535), - icestate VARCHAR(1024), - internal BOOLEAN, - localaddress VARCHAR(65535), - localport INTEGER, - marker VARCHAR(65535), - protocol VARCHAR(1024), - remoteaddress VARCHAR(65535), - remoteport INTEGER, - roomid VARCHAR(1024), - rtpbytesreceived BIGINT, - rtpbytessent BIGINT, - rtppacketslost INTEGER, - rtppacketsreceived INTEGER, - rtppacketssent INTEGER, - rtxbytesreceived BIGINT, - rtxbytessent BIGINT, - rtxpacketsdiscarded INTEGER, - rtxpacketslost INTEGER, - rtxpacketsreceived INTEGER, - rtxpacketssent INTEGER, - sctpbytesreceived BIGINT, - sctpbytessent BIGINT, - sctppacketsreceived INTEGER, - sctppacketssent INTEGER, - sctpstate VARCHAR(1024) -) diststyle even; -ALTER TABLE sfu_transport_report ALTER diststyle KEY DISTKEY serviceid; -ALTER TABLE sfu_transport_report ALTER COMPOUND SORTKEY (sfuid, transportid, callid); \ No newline at end of file diff --git a/outputs/typescript/CallEventReport.ts b/outputs/typescript/CallEventReport.ts deleted file mode 100644 index 84c3474a..00000000 --- a/outputs/typescript/CallEventReport.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** -* Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. -*/ -export type CallEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The unique identifier of the media track - */ - mediaTrackId?: string; - - /** - * The SSRC identifier of the RTP stream a trackId belongs to - */ - SSRC?: number; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/outputs/typescript/CallMetaReport.ts b/outputs/typescript/CallMetaReport.ts deleted file mode 100644 index 2a92d2bd..00000000 --- a/outputs/typescript/CallMetaReport.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Metadata belongs to a call and can be useful -*/ -export type CallMetaReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} diff --git a/outputs/typescript/ClientDataChannelReport.ts b/outputs/typescript/ClientDataChannelReport.ts deleted file mode 100644 index b94454a6..00000000 --- a/outputs/typescript/ClientDataChannelReport.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** -* A Report created for PeerConnection Data Channel. -*/ -export type ClientDataChannelReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label for the peer connection - */ - peerConnectionLabel?: string; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol used for the data channel - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; - - /** - * Represents the total number of API message events sent - */ - messagesSent?: number; - - /** - * Represents the total number of payload bytes sent on the corresponded data channel - */ - bytesSent?: number; - - /** - * Represents the total number of API message events received on the corresponded data channel - */ - messagesReceived?: number; - - /** - * Represents the total number of payload bytes received on the corresponded data channel - */ - bytesReceived?: number; - -} diff --git a/outputs/typescript/ClientExtensionReport.ts b/outputs/typescript/ClientExtensionReport.ts deleted file mode 100644 index 402ced10..00000000 --- a/outputs/typescript/ClientExtensionReport.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** -* A Report created for Extended provided arbitrary data. -*/ -export type ClientExtensionReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - payload?: string; - -} diff --git a/outputs/typescript/ClientSample.ts b/outputs/typescript/ClientSample.ts new file mode 100644 index 00000000..7722bdcc --- /dev/null +++ b/outputs/typescript/ClientSample.ts @@ -0,0 +1,1608 @@ + +export const schemaVersion = "3.0.0"; + +/** +* The WebRTC app provided custom stats payload +*/ +export type ExtensionStat = { + /** + * The type of the extension stats the custom app provides + */ + type: string; + + /** + * The payload of the extension stats the custom app provides + */ + payload: string; + +} + +/** +* A list of additional client events. +*/ +export type ClientMetaData = { + /** + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + */ + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; + + /** + * The identifier of the media track related to the event, if applicable. + */ + trackId?: string; + + /** + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. + */ + ssrc?: number; + + /** + * The timestamp in epoch format when the event was generated. + */ + timestamp?: number; + +} + +/** +* A list of additional client events. +*/ +export type ClientEvent = { + /** + * The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + */ + type: string; + + /** + * The value associated with the event, if applicable. + */ + payload?: string; + + /** + * The unique identifier of the peer connection for which the event was generated. + */ + peerConnectionId?: string; + + /** + * The identifier of the media track related to the event, if applicable. + */ + trackId?: string; + + /** + * The SSRC (Synchronization Source) identifier associated with the event, if applicable. + */ + ssrc?: number; + + /** + * The timestamp in epoch format when the event was generated. + */ + timestamp?: number; + +} + +/** +* Certificates +*/ +export type CertificateStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The fingerprint of the certificate. + */ + fingerprint: string; + + /** + * The algorithm used for the fingerprint (e.g., 'SHA-256'). + */ + fingerprintAlgorithm: string; + + /** + * The certificate encoded in base64 format. + */ + base64Certificate: string; + + /** + * The certificate ID of the issuer (nullable). + */ + issuerCertificateId: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Candidate Pair Stats +*/ +export type IceCandidatePairStats = { + /** + * The unique identifier for this RTCStats object. + */ + id: string; + + /** + * The timestamp of when the stats were recorded, in seconds. + */ + timestamp: number; + + /** + * The transport id of the connection this candidate pair belongs to. + */ + transportId: string; + + /** + * The ID of the local ICE candidate in this pair. + */ + localCandidateId: string; + + /** + * The ID of the remote ICE candidate in this pair. + */ + remoteCandidateId: string; + + /** + * The number of packets sent using this candidate pair. + */ + packetsSent: number; + + /** + * The number of packets received using this candidate pair. + */ + packetsReceived: number; + + /** + * The total number of bytes sent using this candidate pair. + */ + bytesSent: number; + + /** + * The total number of bytes received using this candidate pair. + */ + bytesReceived: number; + + /** + * The timestamp of the last packet sent using this candidate pair. + */ + lastPacketSentTimestamp: number; + + /** + * The timestamp of the last packet received using this candidate pair. + */ + lastPacketReceivedTimestamp: number; + + /** + * The total round trip time (RTT) for this candidate pair in seconds. + */ + totalRoundTripTime: number; + + /** + * The current round trip time (RTT) for this candidate pair in seconds. + */ + currentRoundTripTime: number; + + /** + * The available outgoing bitrate (in bits per second) for this candidate pair. + */ + availableOutgoingBitrate: number; + + /** + * The available incoming bitrate (in bits per second) for this candidate pair. + */ + availableIncomingBitrate: number; + + /** + * The number of ICE connection requests received by this candidate pair. + */ + requestsReceived: number; + + /** + * The number of ICE connection requests sent by this candidate pair. + */ + requestsSent: number; + + /** + * The number of ICE connection responses received by this candidate pair. + */ + responsesReceived: number; + + /** + * The number of ICE connection responses sent by this candidate pair. + */ + responsesSent: number; + + /** + * The number of ICE connection consent requests sent by this candidate pair. + */ + consentRequestsSent: number; + + /** + * The number of packets discarded while attempting to send via this candidate pair. + */ + packetsDiscardedOnSend: number; + + /** + * The total number of bytes discarded while attempting to send via this candidate pair. + */ + bytesDiscardedOnSend: number; + + state?: "new" | "inProgress" | "failed" | "succeeded"; + /** + * Whether this candidate pair has been nominated. + */ + nominated?: boolean; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Candidate Stats +*/ +export type IceCandidateStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The transport ID associated with the ICE candidate. + */ + transportId: string; + + /** + * The IP address of the ICE candidate (nullable). + */ + address: string; + + /** + * The port number of the ICE candidate. + */ + port: number; + + /** + * The transport protocol used by the candidate (e.g., 'udp', 'tcp'). + */ + protocol: string; + + /** + * The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). + */ + candidateType: string; + + /** + * The priority of the ICE candidate. + */ + priority: number; + + /** + * The URL of the ICE candidate. + */ + url: string; + + /** + * The protocol used for the relay (e.g., 'tcp', 'udp'). + */ + relayProtocol: string; + + /** + * A string representing the foundation for the ICE candidate. + */ + foundation: string; + + /** + * The related address for the ICE candidate (if any). + */ + relatedAddress: string; + + /** + * The related port for the ICE candidate (if any). + */ + relatedPort: number; + + /** + * The username fragment for the ICE candidate. + */ + usernameFragment: string; + + /** + * The TCP type of the ICE candidate (e.g., 'active', 'passive'). + */ + tcpType: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* ICE Transport Stats +*/ +export type IceTransportStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The number of packets sent. + */ + packetsSent: number; + + /** + * The number of packets received. + */ + packetsReceived: number; + + /** + * The number of bytes sent. + */ + bytesSent: number; + + /** + * The number of bytes received. + */ + bytesReceived: number; + + /** + * The ICE role (e.g., 'controlling', 'controlled'). + */ + iceRole: string; + + /** + * The local username fragment for ICE. + */ + iceLocalUsernameFragment: string; + + /** + * The DTLS transport state (e.g., 'new', 'connecting', 'connected'). + */ + dtlsState: string; + + /** + * The ICE transport state (e.g., 'new', 'checking', 'connected'). + */ + iceState: string; + + /** + * The ID of the selected ICE candidate pair. + */ + selectedCandidatePairId: string; + + /** + * The ID of the local certificate. + */ + localCertificateId: string; + + /** + * The ID of the remote certificate. + */ + remoteCertificateId: string; + + /** + * The TLS version used for encryption. + */ + tlsVersion: string; + + /** + * The DTLS cipher suite used. + */ + dtlsCipher: string; + + /** + * The role in the DTLS handshake (e.g., 'client', 'server'). + */ + dtlsRole: string; + + /** + * The SRTP cipher used for encryption. + */ + srtpCipher: string; + + /** + * The number of changes to the selected ICE candidate pair. + */ + selectedCandidatePairChanges: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Data Channels Stats +*/ +export type DataChannelStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The label of the data channel. + */ + label: string; + + /** + * The protocol of the data channel. + */ + protocol: string; + + /** + * The identifier for the data channel. + */ + dataChannelIdentifier: number; + + /** + * The state of the data channel (e.g., 'open', 'closed'). + */ + state: string; + + /** + * The number of messages sent on the data channel. + */ + messagesSent: number; + + /** + * The number of bytes sent on the data channel. + */ + bytesSent: number; + + /** + * The number of messages received on the data channel. + */ + messagesReceived: number; + + /** + * The number of bytes received on the data channel. + */ + bytesReceived: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* PeerConnection Transport Stats +*/ +export type PeerConnectionTransportStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The number of data channels opened. + */ + dataChannelsOpened: number; + + /** + * The number of data channels closed. + */ + dataChannelsClosed: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Audio Playout Stats +*/ +export type AudioPlayoutStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The duration of synthesized audio samples. + */ + synthesizedSamplesDuration: number; + + /** + * The number of synthesized audio samples events. + */ + synthesizedSamplesEvents: number; + + /** + * The total duration of all audio samples. + */ + totalSamplesDuration: number; + + /** + * The total delay experienced during audio playout. + */ + totalPlayoutDelay: number; + + /** + * The total count of audio samples. + */ + totalSamplesCount: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Video Source Stats +*/ +export type VideoSourceStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The identifier of the media track. + */ + trackIdentifier: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The width of the video. + */ + width: number; + + /** + * The height of the video. + */ + height: number; + + /** + * The total number of frames. + */ + frames: number; + + /** + * The frames per second of the video. + */ + framesPerSecond: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Audio Source Stats +*/ +export type AudioSourceStats = { + /** + * The timestamp of the stat. + */ + timestamp: number; + + /** + * A unique identifier for the stat. + */ + id: string; + + /** + * The identifier of the media track. + */ + trackIdentifier: string; + + /** + * The kind of media (audio/video). + */ + kind: string; + + /** + * The current audio level. + */ + audioLevel?: number; + + /** + * The total audio energy. + */ + totalAudioEnergy?: number; + + /** + * The total duration of audio samples. + */ + totalSamplesDuration?: number; + + /** + * The echo return loss. + */ + echoReturnLoss?: number; + + /** + * The enhancement of echo return loss. + */ + echoReturnLossEnhancement?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Remote Outbound RTPs +*/ +export type RemoteOutboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets sent on this stream. + */ + packetsSent?: number; + + /** + * The total number of bytes sent on this stream. + */ + bytesSent?: number; + + /** + * The ID of the local object corresponding to this stream. + */ + localId?: string; + + /** + * The remote timestamp for this stats object in DOMHighResTimeStamp format. + */ + remoteTimestamp?: number; + + /** + * The total number of reports sent on this stream. + */ + reportsSent?: number; + + /** + * The current estimated round-trip time for this stream in seconds. + */ + roundTripTime?: number; + + /** + * The total round-trip time for this stream in seconds. + */ + totalRoundTripTime?: number; + + /** + * The total number of round-trip time measurements for this stream. + */ + roundTripTimeMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* The duration of quality limitation reasons categorized by type. +*/ +export type QualityLimitationDurations = { + /** + * Duration of no quality limitation in seconds. + */ + none: number; + + /** + * Duration of CPU-based quality limitation in seconds. + */ + cpu: number; + + /** + * Duration of bandwidth-based quality limitation in seconds. + */ + bandwidth: number; + + /** + * Duration of other quality limitation reasons in seconds. + */ + other: number; + +} + +/** +* Outbound RTPs +*/ +export type OutboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The duration of quality limitation reasons categorized by type. + */ + qualityLimitationDurations: QualityLimitationDurations; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets sent on this stream. + */ + packetsSent?: number; + + /** + * The total number of bytes sent on this stream. + */ + bytesSent?: number; + + /** + * The media ID associated with this RTP stream. + */ + mid?: string; + + /** + * The ID of the media source associated with this stream. + */ + mediaSourceId?: string; + + /** + * The ID of the remote object corresponding to this stream. + */ + remoteId?: string; + + /** + * The RID value of the RTP stream. + */ + rid?: string; + + /** + * The total number of header bytes sent on this stream. + */ + headerBytesSent?: number; + + /** + * The number of retransmitted packets sent on this stream. + */ + retransmittedPacketsSent?: number; + + /** + * The number of retransmitted bytes sent on this stream. + */ + retransmittedBytesSent?: number; + + /** + * The SSRC for the RTX stream, if applicable. + */ + rtxSsrc?: number; + + /** + * The target bitrate for this RTP stream in bits per second. + */ + targetBitrate?: number; + + /** + * The total target encoded bytes for this stream. + */ + totalEncodedBytesTarget?: number; + + /** + * The width of the frames sent in pixels. + */ + frameWidth?: number; + + /** + * The height of the frames sent in pixels. + */ + frameHeight?: number; + + /** + * The number of frames sent per second. + */ + framesPerSecond?: number; + + /** + * The total number of frames sent on this stream. + */ + framesSent?: number; + + /** + * The total number of huge frames sent on this stream. + */ + hugeFramesSent?: number; + + /** + * The total number of frames encoded on this stream. + */ + framesEncoded?: number; + + /** + * The total number of key frames encoded on this stream. + */ + keyFramesEncoded?: number; + + /** + * The sum of QP values for all frames encoded on this stream. + */ + qpSum?: number; + + /** + * The total time spent encoding frames on this stream in seconds. + */ + totalEncodeTime?: number; + + /** + * The total delay for packets sent on this stream in seconds. + */ + totalPacketSendDelay?: number; + + /** + * The reason for any quality limitation on this stream. + */ + qualityLimitationReason?: string; + + /** + * The number of resolution changes due to quality limitations. + */ + qualityLimitationResolutionChanges?: number; + + /** + * The total number of NACK packets sent on this stream. + */ + nackCount?: number; + + /** + * The total number of FIR packets sent on this stream. + */ + firCount?: number; + + /** + * The total number of PLI packets sent on this stream. + */ + pliCount?: number; + + /** + * The implementation of the encoder used for this stream. + */ + encoderImplementation?: string; + + /** + * Indicates whether the encoder is power efficient. + */ + powerEfficientEncoder?: boolean; + + /** + * Indicates whether this stream is actively sending data. + */ + active?: boolean; + + /** + * The scalability mode of the encoder used for this stream. + */ + scalabilityMode?: string; + + /** + * Additional information attached to this stats. + */ + appData?: Record; + +} + +/** +* Remote Inbound RTPs +*/ +export type RemoteInboundRtpStats = { + /** + * The timestamp for this stats object in DOMHighResTimeStamp format. + */ + timestamp: number; + + /** + * The unique identifier for this stats object. + */ + id: string; + + /** + * The SSRC identifier of the RTP stream. + */ + ssrc: number; + + /** + * The type of media ('audio' or 'video'). + */ + kind: string; + + /** + * The ID of the transport used for this stream. + */ + transportId?: string; + + /** + * The ID of the codec used for this stream. + */ + codecId?: string; + + /** + * The total number of packets received on this stream. + */ + packetsReceived?: number; + + /** + * The total number of packets lost on this stream. + */ + packetsLost?: number; + + /** + * The jitter value for this stream in seconds. + */ + jitter?: number; + + /** + * The ID of the local object corresponding to this remote stream. + */ + localId?: string; + + /** + * The most recent RTT measurement for this stream in seconds. + */ + roundTripTime?: number; + + /** + * The cumulative RTT for all packets on this stream in seconds. + */ + totalRoundTripTime?: number; + + /** + * The fraction of packets lost on this stream, calculated over a time interval. + */ + fractionLost?: number; + + /** + * The total number of RTT measurements for this stream. + */ + roundTripTimeMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Inbound RTPs +*/ +export type InboundRtpStats = { + /** + * The time the stats were collected, in high-resolution time. + */ + timestamp: number; + + /** + * Unique identifier of the stats object. + */ + id: string; + + /** + * Synchronization source identifier of the RTP stream. + */ + ssrc: number; + + /** + * Kind of the media (e.g., 'audio' or 'video'). + */ + kind: string; + + /** + * Identifier for the media track associated with the RTP stream. + */ + trackIdentifier: string; + + /** + * ID of the transport associated with the RTP stream. + */ + transportId?: string; + + /** + * ID of the codec used for the RTP stream. + */ + codecId?: string; + + /** + * Number of packets received on the RTP stream. + */ + packetsReceived?: number; + + /** + * Number of packets lost on the RTP stream. + */ + packetsLost?: number; + + /** + * Jitter of the RTP stream in seconds. + */ + jitter?: number; + + /** + * The MediaStream ID of the RTP stream. + */ + mid?: string; + + /** + * Remote stats object ID associated with the RTP stream. + */ + remoteId?: string; + + /** + * Number of frames decoded. + */ + framesDecoded?: number; + + /** + * Number of keyframes decoded. + */ + keyFramesDecoded?: number; + + /** + * Number of frames rendered. + */ + framesRendered?: number; + + /** + * Number of frames dropped. + */ + framesDropped?: number; + + /** + * Width of the decoded video frames. + */ + frameWidth?: number; + + /** + * Height of the decoded video frames. + */ + frameHeight?: number; + + /** + * Frame rate in frames per second. + */ + framesPerSecond?: number; + + /** + * Sum of the Quantization Parameter values for decoded frames. + */ + qpSum?: number; + + /** + * Total time spent decoding in seconds. + */ + totalDecodeTime?: number; + + /** + * Sum of inter-frame delays in seconds. + */ + totalInterFrameDelay?: number; + + /** + * Sum of squared inter-frame delays in seconds. + */ + totalSquaredInterFrameDelay?: number; + + /** + * Number of times playback was paused. + */ + pauseCount?: number; + + /** + * Total duration of pauses in seconds. + */ + totalPausesDuration?: number; + + /** + * Number of times playback was frozen. + */ + freezeCount?: number; + + /** + * Total duration of freezes in seconds. + */ + totalFreezesDuration?: number; + + /** + * Timestamp of the last packet received. + */ + lastPacketReceivedTimestamp?: number; + + /** + * Total header bytes received. + */ + headerBytesReceived?: number; + + /** + * Total packets discarded. + */ + packetsDiscarded?: number; + + /** + * Total bytes received from FEC. + */ + fecBytesReceived?: number; + + /** + * Total packets received from FEC. + */ + fecPacketsReceived?: number; + + /** + * Total FEC packets discarded. + */ + fecPacketsDiscarded?: number; + + /** + * Total bytes received on the RTP stream. + */ + bytesReceived?: number; + + /** + * Number of NACKs sent. + */ + nackCount?: number; + + /** + * Number of Full Intra Requests sent. + */ + firCount?: number; + + /** + * Number of Picture Loss Indications sent. + */ + pliCount?: number; + + /** + * Total processing delay in seconds. + */ + totalProcessingDelay?: number; + + /** + * Estimated timestamp of playout. + */ + estimatedPlayoutTimestamp?: number; + + /** + * Total jitter buffer delay in seconds. + */ + jitterBufferDelay?: number; + + /** + * Target delay for the jitter buffer in seconds. + */ + jitterBufferTargetDelay?: number; + + /** + * Number of packets emitted from the jitter buffer. + */ + jitterBufferEmittedCount?: number; + + /** + * Minimum delay of the jitter buffer in seconds. + */ + jitterBufferMinimumDelay?: number; + + /** + * Total audio samples received. + */ + totalSamplesReceived?: number; + + /** + * Number of concealed audio samples. + */ + concealedSamples?: number; + + /** + * Number of silent audio samples concealed. + */ + silentConcealedSamples?: number; + + /** + * Number of audio concealment events. + */ + concealmentEvents?: number; + + /** + * Number of audio samples inserted for deceleration. + */ + insertedSamplesForDeceleration?: number; + + /** + * Number of audio samples removed for acceleration. + */ + removedSamplesForAcceleration?: number; + + /** + * Audio level in the range [0.0, 1.0]. + */ + audioLevel?: number; + + /** + * Total audio energy in the stream. + */ + totalAudioEnergy?: number; + + /** + * Total duration of all received audio samples in seconds. + */ + totalSamplesDuration?: number; + + /** + * Total number of frames received. + */ + framesReceived?: number; + + /** + * Decoder implementation used for decoding frames. + */ + decoderImplementation?: string; + + /** + * Playout identifier for the RTP stream. + */ + playoutId?: string; + + /** + * Indicates if the decoder is power-efficient. + */ + powerEfficientDecoder?: boolean; + + /** + * Number of frames assembled from multiple packets. + */ + framesAssembledFromMultiplePackets?: number; + + /** + * Total assembly time for frames in seconds. + */ + totalAssemblyTime?: number; + + /** + * Number of retransmitted packets received. + */ + retransmittedPacketsReceived?: number; + + /** + * Number of retransmitted bytes received. + */ + retransmittedBytesReceived?: number; + + /** + * SSRC of the retransmission stream. + */ + rtxSsrc?: number; + + /** + * SSRC of the FEC stream. + */ + fecSsrc?: number; + + /** + * Total corruption probability of packets. + */ + totalCorruptionProbability?: number; + + /** + * Total squared corruption probability of packets. + */ + totalSquaredCorruptionProbability?: number; + + /** + * Number of corruption measurements. + */ + corruptionMeasurements?: number; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* Codec items +*/ +export type CodecStats = { + /** + * The timestamp when the stats were generated. + */ + timestamp: number; + + /** + * The type of the stats. + */ + type: string; + + /** + * The unique identifier for the stats object. + */ + id: string; + + /** + * The payload type of the codec. + */ + payloadType: number; + + /** + * The identifier of the transport associated with the codec. + */ + transportId: string; + + /** + * The MIME type of the codec. + */ + mimeType: string; + + /** + * The clock rate of the codec in Hz. + */ + clockRate?: number; + + /** + * The number of audio channels for the codec, if applicable. + */ + channels?: number; + + /** + * The SDP format-specific parameters line for the codec. + */ + sdpFmtpLine?: string; + + /** + * Additional information attached to this stats + */ + appData?: Record; + +} + +/** +* docs +*/ +export type PeerConnectionSample = { + /** + * Unique identifier of the stats object. + */ + peerConnectionId: string; + + /** + * Additional information attached to this sample + */ + appData?: Record; + + /** + * Codec items + */ + codecs?: CodecStats[]; + + /** + * Inbound RTPs + */ + inboundRtps?: InboundRtpStats[]; + + /** + * Remote Inbound RTPs + */ + remoteInboundRtps?: RemoteInboundRtpStats[]; + + /** + * Outbound RTPs + */ + outboundRtps?: OutboundRtpStats[]; + + /** + * Remote Outbound RTPs + */ + remoteOutboundRtps?: RemoteOutboundRtpStats[]; + + /** + * Audio Source Stats + */ + audioSources?: AudioSourceStats[]; + + /** + * Video Source Stats + */ + videoSources?: VideoSourceStats[]; + + /** + * Audio Playout Stats + */ + audioPlayouts?: AudioPlayoutStats[]; + + /** + * PeerConnection Transport Stats + */ + peerConnectionTransports?: PeerConnectionTransportStats[]; + + /** + * Data Channels Stats + */ + dataChannels?: DataChannelStats[]; + + /** + * ICE Transport Stats + */ + iceTransports?: IceTransportStats[]; + + /** + * ICE Candidate Stats + */ + iceCandidates?: IceCandidateStats[]; + + /** + * ICE Candidate Pair Stats + */ + iceCandidatePairs?: IceCandidatePairStats[]; + + /** + * Certificates + */ + certificates?: CertificateStats[]; + +} + +/** +* docs +*/ +export type ClientSample = { + /** + * Unique id of the client providing samples. + */ + clientId: string; + + /** + * The timestamp the sample is created in GMT + */ + timestamp: number; + + /** + * the unique identifier of the call or session + */ + callId?: string; + + /** + * Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) + */ + appData?: Record; + + /** + * Samples taken PeerConnections + */ + peerConnections?: PeerConnectionSample[]; + + /** + * A list of additional client events. + */ + clientEvents?: ClientEvent[]; + + /** + * A list of additional client events. + */ + clientMetaItems?: ClientMetaData[]; + + /** + * The WebRTC app provided custom stats payload + */ + extensionStats?: ExtensionStat[]; + +} diff --git a/outputs/typescript/IceCandidatePairReport.ts b/outputs/typescript/IceCandidatePairReport.ts deleted file mode 100644 index 09bf92e9..00000000 --- a/outputs/typescript/IceCandidatePairReport.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** -* A Report created for ICE candidate pairs -*/ -export type IceCandidatePairReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * The unique identifier of the peer connection - */ - candidatePairId?: string; - - /** - * The identifier of the transport the ice candidate pair is negotiated on - */ - transportId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at local side - */ - localCandidateId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at remote side - */ - remoteCandidateId?: string; - - /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport - */ - state?: string; - - /** - * indicate if the ice candidate pair is nominated or not - */ - nominated?: boolean; - - /** - * The total number of packets sent using the last selected candidate pair over the corresponded transport - */ - packetsSent?: number; - - /** - * The total number of packets received using the last selected candidate pair over the corresponded transport - */ - packetsReceived?: number; - - /** - * The total number of bytes sent using the last selected candidate pair over the corresponded transport - */ - bytesSent?: number; - - /** - * The total number of bytes received using the last selected candidate pair over the corresponded transport - */ - bytesReceived?: number; - - /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport - */ - totalRoundTripTime?: number; - - /** - * Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport - */ - currentRoundTripTime?: number; - - /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport - */ - availableOutgoingBitrate?: number; - - /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport - */ - availableIncomingBitrate?: number; - - /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport - */ - requestsReceived?: number; - - /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport - */ - requestsSent?: number; - - /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport - */ - responsesReceived?: number; - - /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport - */ - responsesSent?: number; - - /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport - */ - consentRequestsSent?: number; - - /** - * Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - packetsDiscardedOnSend?: number; - - /** - * Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - bytesDiscardedOnSend?: number; - -} diff --git a/outputs/typescript/InboundAudioTrackReport.ts b/outputs/typescript/InboundAudioTrackReport.ts deleted file mode 100644 index 29f8dc3b..00000000 --- a/outputs/typescript/InboundAudioTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Inbound Audio Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} diff --git a/outputs/typescript/InboundVideoTrackReport.ts b/outputs/typescript/InboundVideoTrackReport.ts deleted file mode 100644 index a2e712ed..00000000 --- a/outputs/typescript/InboundVideoTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Inbound Video Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponded RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameHeight?: number; - - /** - * The frame per seconds of the video sent by the remote source on the corresponded RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream - */ - qpSum?: number; - - /** - * The total tiem spent on decoding video on the corresponded RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay - */ - totalInterFrameDelay?: number; - - /** - * The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponded RTP stream. - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} diff --git a/outputs/typescript/ObserverEventReport.ts b/outputs/typescript/ObserverEventReport.ts deleted file mode 100644 index 6b005bdc..00000000 --- a/outputs/typescript/ObserverEventReport.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** -* A report created for observer generated events -*/ -export type ObserverEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The name of the event - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/outputs/typescript/OutboundAudioTrackReport.ts b/outputs/typescript/OutboundAudioTrackReport.ts deleted file mode 100644 index c653f70a..00000000 --- a/outputs/typescript/OutboundAudioTrackReport.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** -* A Report created for Outbound Audio Tracks. A combination of Audio source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source. - */ - echoReturnLossEnhancement?: number; - - /** - * . The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} diff --git a/outputs/typescript/OutboundVideoTrackReport.ts b/outputs/typescript/OutboundVideoTrackReport.ts deleted file mode 100644 index 42b9158d..00000000 --- a/outputs/typescript/OutboundVideoTrackReport.ts +++ /dev/null @@ -1,285 +0,0 @@ -/** -* A Report created for Outbound Video Tracks. A combination of Video source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame width the media encoder targeted - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponded media source - */ - framesPerSecond?: number; - - /** - * TThe total number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponded RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponded RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occured ont he corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} diff --git a/outputs/typescript/PeerConnectionTransportReport.ts b/outputs/typescript/PeerConnectionTransportReport.ts deleted file mode 100644 index 1969f3f3..00000000 --- a/outputs/typescript/PeerConnectionTransportReport.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** -* A Report created for Client PeerConnection Transport. -*/ -export type PeerConnectionTransportReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The identifier of the transport the ICE candidate pair is negotiated on - */ - transportId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * Represents the total number of packets sent on the corresponded transport - */ - packetsSent?: number; - - /** - * Represents the total number of packets received on the corresponded transport - */ - packetsReceived?: number; - - /** - * Represents the total amount of bytes sent on the corresponded transport - */ - bytesSent?: number; - - /** - * Represents the total amount of bytes received on the corresponded transport - */ - bytesReceived?: number; - - /** - * Represent the current role of ICE under DTLS Transport - */ - iceRole?: string; - - /** - * Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport - */ - iceLocalUsernameFragment?: string; - - /** - * Represents the current state of DTLS for the peer connection transport layer - */ - dtlsState?: string; - - /** - * The role this host plays in DTLS negotiations - */ - dtlsRole?: string; - - /** - * The identifier of the candidate pair the transport currently uses - */ - selectedCandidatePairId?: string; - - /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - */ - iceState?: string; - - /** - * If DTLS negotiated it gives the id of the local certificate - */ - localCertificateId?: string; - - /** - * If DTLS negotiated it gives the id of the remote certificate - */ - remoteCertificateId?: string; - - /** - * Represents the version number of the TLS used in the corresponded transport - */ - tlsVersion?: string; - - /** - * Represents the name of the DTLS cipher used in the corresponded transport - */ - dtlsCipher?: string; - - /** - * Represents the name of the SRTP cipher used in the corresponded transport - */ - srtpCipher?: string; - - /** - * Represents the name of the IANA TLS Supported Groups used in the corresponded transport - */ - tlsGroup?: string; - - /** - * The total number of candidate pair changes over the peer connection - */ - selectedCandidatePairChanges?: number; - -} diff --git a/outputs/typescript/Report.ts b/outputs/typescript/Report.ts deleted file mode 100644 index 2acb639e..00000000 --- a/outputs/typescript/Report.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** -* A multiplexed Report object wraps an encoded report in bytes format -*/ -export type Report = { - /** - * The type of the report - */ - type: string; - - /** - * The payload of contans the actual report - */ - payload: string; - - /** - * The version of the schema the payload holds - */ - schemaVersion?: string; - -} diff --git a/outputs/typescript/ReportTypes.ts b/outputs/typescript/ReportTypes.ts deleted file mode 100644 index e5d4cc64..00000000 --- a/outputs/typescript/ReportTypes.ts +++ /dev/null @@ -1,2791 +0,0 @@ -/** - * Schema Version: 2.2.12 - */ -/** -* Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples. -*/ -export type CallEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The unique identifier of the media track - */ - mediaTrackId?: string; - - /** - * The SSRC identifier of the RTP stream a trackId belongs to - */ - SSRC?: number; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} - -/** -* Metadata belongs to a call and can be useful -*/ -export type CallMetaReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} - -/** -* A Report created for PeerConnection Data Channel. -*/ -export type ClientDataChannelReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label for the peer connection - */ - peerConnectionLabel?: string; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol used for the data channel - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; - - /** - * Represents the total number of API message events sent - */ - messagesSent?: number; - - /** - * Represents the total number of payload bytes sent on the corresponded data channel - */ - bytesSent?: number; - - /** - * Represents the total number of API message events received on the corresponded data channel - */ - messagesReceived?: number; - - /** - * Represents the total number of payload bytes received on the corresponded data channel - */ - bytesReceived?: number; - -} - -/** -* A Report created for Extended provided arbitrary data. -*/ -export type ClientExtensionReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - payload?: string; - -} - -/** -* A Report created for ICE candidate pairs -*/ -export type IceCandidatePairReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * The unique identifier of the peer connection - */ - candidatePairId?: string; - - /** - * The identifier of the transport the ice candidate pair is negotiated on - */ - transportId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at local side - */ - localCandidateId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected at remote side - */ - remoteCandidateId?: string; - - /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport - */ - state?: string; - - /** - * indicate if the ice candidate pair is nominated or not - */ - nominated?: boolean; - - /** - * The total number of packets sent using the last selected candidate pair over the corresponded transport - */ - packetsSent?: number; - - /** - * The total number of packets received using the last selected candidate pair over the corresponded transport - */ - packetsReceived?: number; - - /** - * The total number of bytes sent using the last selected candidate pair over the corresponded transport - */ - bytesSent?: number; - - /** - * The total number of bytes received using the last selected candidate pair over the corresponded transport - */ - bytesReceived?: number; - - /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport - */ - totalRoundTripTime?: number; - - /** - * Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport - */ - currentRoundTripTime?: number; - - /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport - */ - availableOutgoingBitrate?: number; - - /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport - */ - availableIncomingBitrate?: number; - - /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport - */ - requestsReceived?: number; - - /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport - */ - requestsSent?: number; - - /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport - */ - responsesReceived?: number; - - /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport - */ - responsesSent?: number; - - /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport - */ - consentRequestsSent?: number; - - /** - * Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - packetsDiscardedOnSend?: number; - - /** - * Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - */ - bytesDiscardedOnSend?: number; - -} - -/** -* A Report created for Inbound Audio Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} - -/** -* A Report created for Inbound Video Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements -*/ -export type InboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream the media from - */ - sfuStreamId?: string; - - /** - * The id of the sink the Sfu streamed the media out - */ - sfuSinkId?: string; - - /** - * The id of the remote track this inbound track is originated from - */ - remoteTrackId?: string; - - /** - * The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - */ - remoteUserId?: string; - - /** - * The observer matched remote client Id - */ - remoteClientId?: string; - - /** - * The observer matched remote Peer Connection Id - */ - remotePeerConnectionId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponded RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponded RTP stream - */ - frameHeight?: number; - - /** - * The frame per seconds of the video sent by the remote source on the corresponded RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream - */ - qpSum?: number; - - /** - * The total tiem spent on decoding video on the corresponded RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay - */ - totalInterFrameDelay?: number; - - /** - * The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponded RTP stream. - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} - -/** -* A report created for observer generated events -*/ -export type ObserverEventReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The name of the event - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The generated unique identifier of the client - */ - clientId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The timestamp of the sample the event related to - */ - sampleTimestamp?: number; - - /** - * The sequence number of the sample the event may related to - */ - sampleSeq?: number; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} - -/** -* A Report created for Outbound Audio Tracks. A combination of Audio source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundAudioTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source. - */ - echoReturnLossEnhancement?: number; - - /** - * . The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} - -/** -* A Report created for Outbound Video Tracks. A combination of Video source, Codec metadata carrying outbound and remote inbound RTP stat measurements -*/ -export type OutboundVideoTrackReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is labeled with - */ - label?: string; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The id of the Sfu stream corresponds to the outbound track - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame width the media encoder targeted - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponded media source - */ - framesPerSecond?: number; - - /** - * TThe total number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponded RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponded RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occured ont he corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} - -/** -* A Report created for Client PeerConnection Transport. -*/ -export type PeerConnectionTransportReport = { - /** - * The unique identifier of the service - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the call - */ - callId: string; - - /** - * The generated unique identifier of the client - */ - clientId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The identifier of the transport the ICE candidate pair is negotiated on - */ - transportId: string; - - /** - * The sequence number of the sample the report is generated from - */ - sampleSeq: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * webrtc app provided user identifier - */ - userId?: string; - - /** - * The webrtc app provided label the peer connection is marked with - */ - label?: string; - - /** - * Represents the total number of packets sent on the corresponded transport - */ - packetsSent?: number; - - /** - * Represents the total number of packets received on the corresponded transport - */ - packetsReceived?: number; - - /** - * Represents the total amount of bytes sent on the corresponded transport - */ - bytesSent?: number; - - /** - * Represents the total amount of bytes received on the corresponded transport - */ - bytesReceived?: number; - - /** - * Represent the current role of ICE under DTLS Transport - */ - iceRole?: string; - - /** - * Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport - */ - iceLocalUsernameFragment?: string; - - /** - * Represents the current state of DTLS for the peer connection transport layer - */ - dtlsState?: string; - - /** - * The role this host plays in DTLS negotiations - */ - dtlsRole?: string; - - /** - * The identifier of the candidate pair the transport currently uses - */ - selectedCandidatePairId?: string; - - /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - */ - iceState?: string; - - /** - * If DTLS negotiated it gives the id of the local certificate - */ - localCertificateId?: string; - - /** - * If DTLS negotiated it gives the id of the remote certificate - */ - remoteCertificateId?: string; - - /** - * Represents the version number of the TLS used in the corresponded transport - */ - tlsVersion?: string; - - /** - * Represents the name of the DTLS cipher used in the corresponded transport - */ - dtlsCipher?: string; - - /** - * Represents the name of the SRTP cipher used in the corresponded transport - */ - srtpCipher?: string; - - /** - * Represents the name of the IANA TLS Supported Groups used in the corresponded transport - */ - tlsGroup?: string; - - /** - * The total number of candidate pair changes over the peer connection - */ - selectedCandidatePairChanges?: number; - -} - -/** -* A multiplexed Report object wraps an encoded report in bytes format -*/ -export type Report = { - /** - * The type of the report - */ - type: string; - - /** - * The payload of contans the actual report - */ - payload: string; - - /** - * The version of the schema the payload holds - */ - schemaVersion?: string; - -} - -/** -* Events happened in calls. -*/ -export type SfuEventReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} - -/** -* A Report created for Extended provided arbitrary data. -*/ -export type SfuExtensionReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * the human readable message of the event - */ - payload?: string; - -} - -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuInboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSfuId?: string; - - /** - * only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteTransportId?: string; - - /** - * only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSinkId?: string; - - /** - * only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad - */ - remoteRtpPadId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets received on the corresponded RTP stream. - */ - packetsReceived?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. - */ - packetsRepaired?: number; - - /** - * The total number of packets failed to be decrypted on the corresponded RTP stream. - */ - packetsFailedDecryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets received on the corresponded RTP stream. - */ - fecPacketsReceived?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes received on the corresponded RTP stream. - */ - bytesReceived?: number; - - /** - * The total number of SR reports received by the corresponded RTP stream - */ - rtcpSrReceived?: number; - - /** - * The total number of RR reports sent on the corresponded RTP stream - */ - rtcpRrSent?: number; - - /** - * If rtx packets are sent or received on the same stream then this number indicates how may has been sent - */ - rtxPacketsReceived?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames received on the corresponded RTP stream - */ - framesReceived?: number; - - /** - * Indicate the number of frames the Sfu has been decoded - */ - framesDecoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been decoded - */ - keyFramesDecoded?: number; - - /** - * The calculated fractionLost of the stream - */ - fractionLost?: number; - - /** - * The calculated jitter of the stream - */ - jitter?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} - -/** -* Metadata belongs to SFUs -*/ -export type SfuMetaReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * The type of the meta data reported for the peer connection - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} - -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuOutboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * Unique identifier of the Sfu sink the event is related to - */ - sfuSinkId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets sent on the corresponded RTP stream. - */ - packetsSent?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets retransmitted on the corresponded RTP stream. - */ - packetsRetransmitted?: number; - - /** - * The total number of packets failed to be encrypted on the corresponded RTP stream. - */ - packetsFailedEncryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets sent on the corresponded RTP stream. - */ - fecPacketsSent?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes sent on the corresponded RTP stream. - */ - bytesSent?: number; - - /** - * The total number of SR reports sent by the corresponded RTP stream - */ - rtcpSrSent?: number; - - /** - * The total number of RR reports received on the corresponded RTP stream - */ - rtcpRrReceived?: number; - - /** - * If rtx packets sent on the same stream then this number indicates how may has been sent - */ - rtxPacketsSent?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * Indicate the number of frames the Sfu has been encoded - */ - framesEncoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} - -/** -* A Report created for SCTP streams going through the SFU -*/ -export type SfuSctpStreamReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * The id of the sctp stream - */ - streamId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sctp channel is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The label of the sctp stream - */ - label?: string; - - /** - * The protocol used to establish an sctp stream - */ - protocol?: string; - - /** - * The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. - */ - sctpSmoothedRoundTripTime?: number; - - /** - * The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. - */ - sctpCongestionWindow?: number; - - /** - * The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. - */ - sctpReceiverWindow?: number; - - /** - * The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. - */ - sctpMtu?: number; - - /** - * The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. - */ - sctpUnackData?: number; - - /** - * The number of message received on the corresponded SCTP stream. - */ - messageReceived?: number; - - /** - * The number of message sent on the corresponded SCTP stream. - */ - messageSent?: number; - - /** - * The number of bytes received on the corresponded SCTP stream. - */ - bytesReceived?: number; - - /** - * The number of bytes sent on the corresponded SCTP stream. - */ - bytesSent?: number; - -} - -/** -* A Report created for SFU Transport layer typically created to transfer RTP/SCTP/RTX streams to another client, SFU, MCU, or processing module. -*/ -export type SFUTransportReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the transport - */ - transportId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu transport is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCDtlsTransport. - */ - dtlsState?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCIceTransport - */ - iceState?: string; - - /** - * Represents the the current value of the SCTP state of the transport of the SFU - */ - sctpState?: string; - - /** - * Represent the current value of the role SFU takes place in ICE - */ - iceRole?: string; - - /** - * The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - localAddress?: string; - - /** - * The local port number - */ - localPort?: number; - - /** - * The protocol used by the transport - */ - protocol?: string; - - /** - * The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - remoteAddress?: string; - - /** - * The remote port number - */ - remotePort?: number; - - /** - * The total amount of RTP bytes received on this transport - */ - rtpBytesReceived?: number; - - /** - * The total amount of RTP bytes sent on this transport - */ - rtpBytesSent?: number; - - /** - * The total amount of RTP packets received on this transport - */ - rtpPacketsReceived?: number; - - /** - * The total amount of RTP packets sent on this transport - */ - rtpPacketsSent?: number; - - /** - * The total amount of RTP packets lost on this transport - */ - rtpPacketsLost?: number; - - /** - * The total amount of RTX bytes received on this transport - */ - rtxBytesReceived?: number; - - /** - * The total amount of RTX bytes sent on this transport - */ - rtxBytesSent?: number; - - /** - * The total amount of RTX packets received on this transport - */ - rtxPacketsReceived?: number; - - /** - * The total amount of RTX packets sent on this transport - */ - rtxPacketsSent?: number; - - /** - * The total amount of RTX packets lost on this transport - */ - rtxPacketsLost?: number; - - /** - * The total amount of RTX packets discarded on this transport - */ - rtxPacketsDiscarded?: number; - - /** - * The total amount of SCTP bytes received on this transport - */ - sctpBytesReceived?: number; - - /** - * The total amount of SCTP bytes sent on this transport - */ - sctpBytesSent?: number; - - /** - * The total amount of SCTP packets received on this transport - */ - sctpPacketsReceived?: number; - - /** - * The total amount of SCTP packets sent on this transport - */ - sctpPacketsSent?: number; - -} diff --git a/outputs/typescript/SFUTransportReport.ts b/outputs/typescript/SFUTransportReport.ts deleted file mode 100644 index 1678de88..00000000 --- a/outputs/typescript/SFUTransportReport.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** -* A Report created for SFU Transport layer typically created to transfer RTP/SCTP/RTX streams to another client, SFU, MCU, or processing module. -*/ -export type SFUTransportReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The generated unique identifier of the transport - */ - transportId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu transport is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCDtlsTransport. - */ - dtlsState?: string; - - /** - * Represent the current value of the state attribute of the underlying RTCIceTransport - */ - iceState?: string; - - /** - * Represents the the current value of the SCTP state of the transport of the SFU - */ - sctpState?: string; - - /** - * Represent the current value of the role SFU takes place in ICE - */ - iceRole?: string; - - /** - * The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - localAddress?: string; - - /** - * The local port number - */ - localPort?: number; - - /** - * The protocol used by the transport - */ - protocol?: string; - - /** - * The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - */ - remoteAddress?: string; - - /** - * The remote port number - */ - remotePort?: number; - - /** - * The total amount of RTP bytes received on this transport - */ - rtpBytesReceived?: number; - - /** - * The total amount of RTP bytes sent on this transport - */ - rtpBytesSent?: number; - - /** - * The total amount of RTP packets received on this transport - */ - rtpPacketsReceived?: number; - - /** - * The total amount of RTP packets sent on this transport - */ - rtpPacketsSent?: number; - - /** - * The total amount of RTP packets lost on this transport - */ - rtpPacketsLost?: number; - - /** - * The total amount of RTX bytes received on this transport - */ - rtxBytesReceived?: number; - - /** - * The total amount of RTX bytes sent on this transport - */ - rtxBytesSent?: number; - - /** - * The total amount of RTX packets received on this transport - */ - rtxPacketsReceived?: number; - - /** - * The total amount of RTX packets sent on this transport - */ - rtxPacketsSent?: number; - - /** - * The total amount of RTX packets lost on this transport - */ - rtxPacketsLost?: number; - - /** - * The total amount of RTX packets discarded on this transport - */ - rtxPacketsDiscarded?: number; - - /** - * The total amount of SCTP bytes received on this transport - */ - sctpBytesReceived?: number; - - /** - * The total amount of SCTP bytes sent on this transport - */ - sctpBytesSent?: number; - - /** - * The total amount of SCTP packets received on this transport - */ - sctpPacketsReceived?: number; - - /** - * The total amount of SCTP packets sent on this transport - */ - sctpPacketsSent?: number; - -} diff --git a/outputs/typescript/Samples.ts b/outputs/typescript/Samples.ts index 0da37a91..95ddfaa2 100644 --- a/outputs/typescript/Samples.ts +++ b/outputs/typescript/Samples.ts @@ -1,5 +1,5 @@ -export const schemaVersion = "2.2.12"; +export const schemaVersion = "3.0.0"; /** * Session data @@ -941,1747 +941,6 @@ export type SfuSample = { } -/** -* List of remote ICE candidates -*/ -export type IceRemoteCandidate = { - /** - * Refers to the peer connection the local candidate belongs to - */ - peerConnectionId?: string; - - /** - * The unique identifier of the local candidate - */ - id?: string; - - /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) - */ - address?: string; - - /** - * The port number of the local endpoint the ICE uses - */ - port?: number; - - /** - * The protocol for the ICE - */ - protocol?: "tcp" | "udp"; - - /** - * The type of the local candidate - */ - candidateType?: string; - - /** - * The priority of the local candidate - */ - priority?: number; - - /** - * The url of the ICE server - */ - url?: string; - - /** - * The relay protocol the local candidate uses - */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} - -/** -* List of local ICE candidates -*/ -export type IceLocalCandidate = { - /** - * Refers to the peer connection the local candidate belongs to - */ - peerConnectionId?: string; - - /** - * The unique identifier of the local candidate - */ - id?: string; - - /** - * The address of the local endpoint (Ipv4, Ipv6, FQDN) - */ - address?: string; - - /** - * The port number of the local endpoint the ICE uses - */ - port?: number; - - /** - * The protocol for the ICE - */ - protocol?: "tcp" | "udp"; - - /** - * The type of the local candidate - */ - candidateType?: string; - - /** - * The priority of the local candidate - */ - priority?: number; - - /** - * The url of the ICE server - */ - url?: string; - - /** - * The relay protocol the local candidate uses - */ - relayProtocol?: "tcp" | "udp" | "tls"; - -} - -/** -* List of compound measurements related to outbound video tracks -*/ -export type OutboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The frame width in pixels of the frames targeted by the media encoder - */ - frameWidth?: number; - - /** - * The frame height in pixels of the frames targeted by the media encoder - */ - frameHeight?: number; - - /** - * The encoded number of frames in the last second on the corresponding media source - */ - framesPerSecond?: number; - - /** - * The total number of frames sent on the corresponding RTP stream - */ - framesSent?: number; - - /** - * The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream - */ - hugeFramesSent?: number; - - /** - * The total number of frames encoded by the media source - */ - framesEncoded?: number; - - /** - * The total number of keyframes encoded on the corresponding RTP stream - */ - keyFramesEncoded?: number; - - /** - * The sum of the QP the media encoder provided on the corresponding RTP stream. - */ - qpSum?: number; - - /** - * The total time in seconds spent in encoding media frames for the corresponding RTP stream. - */ - totalEncodeTime?: number; - - /** - * Time elapsed in seconds when the RTC connection has not limited the quality - */ - qualityLimitationDurationNone?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of CPU - */ - qualityLimitationDurationCPU?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - */ - qualityLimitationDurationBandwidth?: number; - - /** - * Time elapsed in seconds the RTC connection had a limitation because of Other factor - */ - qualityLimitationDurationOther?: number; - - /** - * Indicate a reason for the quality limitation of the corresponded synchronization source - */ - qualityLimitationReason?: string; - - /** - * The total number of resolution changes occurred on the corresponded RTP stream due to quality changes - */ - qualityLimitationResolutionChanges?: number; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream - */ - pliCount?: number; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream - */ - framesDropped?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originated from the media source - */ - frames?: number; - -} - -/** -* List of compound measurements related to outbound audio tracks -*/ -export type OutboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The id of the SFU stream this track is related to - */ - sfuStreamId?: string; - - /** - * The total number of packets sent on the corresponded synchronization source - */ - packetsSent?: number; - - /** - * The total number of bytes sent on the corresponded synchronization source - */ - bytesSent?: number; - - /** - * The rid encoding parameter of the corresponded synchronization source - */ - rid?: string; - - /** - * Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - */ - headerBytesSent?: number; - - /** - * Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - */ - retransmittedPacketsSent?: number; - - /** - * Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - */ - retransmittedBytesSent?: number; - - /** - * Reflects the current encoder target in bits per second. - */ - targetBitrate?: number; - - /** - * The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - */ - totalEncodedBytesTarget?: number; - - /** - * The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - */ - totalPacketSendDelay?: number; - - /** - * The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - */ - averageRtcpInterval?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * Indicate the name of the encoder implementation library - */ - encoderImplementation?: string; - - /** - * Indicates whether this RTP stream is configured to be sent or disabled - */ - active?: boolean; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - */ - roundTripTime?: number; - - /** - * The sum of RTT measurements belongs to the corresponded synchronization source - */ - totalRoundTripTime?: number; - - /** - * The receiver reported fractional lost belongs to the corresponded synchronization source - */ - fractionLost?: number; - - /** - * The total number of calculated RR measurements received on this source - */ - roundTripTimeMeasurements?: number; - - /** - * True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - */ - relayedSource?: boolean; - - /** - * Represents the audio level reported by the media source - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Represents the echo cancellation in decibels corresponded to the media source. - */ - echoReturnLoss?: number; - - /** - * Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - -} - -/** -* List of compound measurements related to inbound video tracks -*/ -export type InboundVideoTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The id of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote clientId the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The id of the SFU stream this track is sinked from - */ - sfuStreamId?: string; - - /** - * The id of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponded synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponded synchronization source - */ - packetsLost?: number; - - /** - * The corresponded synchronization source reported jitter - */ - jitter?: number; - - /** - * The number of frames dropped prior to decode or missing chunks - */ - framesDropped?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets missed the playout point and therefore discarded by the jitterbuffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponded synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * The total number of frames decoded on the corresponded RTP stream - */ - framesDecoded?: number; - - /** - * The total number of keyframes decoded on the corresponding RTP stream - */ - keyFramesDecoded?: number; - - /** - * The width of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameWidth?: number; - - /** - * The height of the frame of the video sent by the remote source on the corresponding RTP stream - */ - frameHeight?: number; - - /** - * The frame rate of the video sent by the remote source on the corresponding RTP stream - */ - framesPerSecond?: number; - - /** - * The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream - */ - qpSum?: number; - - /** - * The total time spent on decoding video on the corresponding RTP stream - */ - totalDecodeTime?: number; - - /** - * The total interframe delay on the corresponding RTP stream - */ - totalInterFrameDelay?: number; - - /** - * The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays - */ - totalSquaredInterFrameDelay?: number; - - /** - * The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream - */ - pliCount?: number; - - /** - * The total number of frames received on the corresponding RTP stream - */ - framesReceived?: number; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - -} - -/** -* List of compound measurements related to inbound audio tracks -*/ -export type InboundAudioTrack = { - /** - * The RTP SSRC field - */ - ssrc: number; - - /** - * The ID of the track - */ - trackId?: string; - - /** - * The unique generated identifier of the peer connection the inbound audio track belongs to - */ - peerConnectionId?: string; - - /** - * The remote client ID the source outbound track belongs to - */ - remoteClientId?: string; - - /** - * The ID of the SFU stream this track is synced from - */ - sfuStreamId?: string; - - /** - * The ID of the sink this track belongs to in the SFU - */ - sfuSinkId?: string; - - /** - * The total number of packets received on the corresponding synchronization source - */ - packetsReceived?: number; - - /** - * The total number of bytes received on the corresponding synchronization source - */ - packetsLost?: number; - - /** - * The corresponding synchronization source reported jitter - */ - jitter?: number; - - /** - * Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - */ - headerBytesReceived?: number; - - /** - * The total number of packets that missed the playout point and were therefore discarded by the jitter buffer - */ - packetsDiscarded?: number; - - /** - * Total number of FEC packets received over the corresponding synchronization source (ssrc) - */ - fecPacketsReceived?: number; - - /** - * Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - fecPacketsDiscarded?: number; - - /** - * Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - */ - bytesReceived?: number; - - /** - * Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) - */ - nackCount?: number; - - /** - * The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded - */ - totalProcessingDelay?: number; - - /** - * The estimated playout time of the corresponding synchronization source - */ - estimatedPlayoutTimestamp?: number; - - /** - * The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. - */ - jitterBufferDelay?: number; - - /** - * This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - */ - jitterBufferTargetDelay?: number; - - /** - * The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) - */ - jitterBufferEmittedCount?: number; - - /** - * This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - */ - jitterBufferMinimumDelay?: number; - - /** - * The total number of audio samples received on the corresponded RTP stream - */ - totalSamplesReceived?: number; - - /** - * The total number of samples decoded by the media decoder from the corresponded RTP stream - */ - concealedSamples?: number; - - /** - * The total number of samples concealed from the corresponded RTP stream - */ - silentConcealedSamples?: number; - - /** - * The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - */ - concealmentEvents?: number; - - /** - * The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - */ - insertedSamplesForDeceleration?: number; - - /** - * The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - */ - removedSamplesForAcceleration?: number; - - /** - * The current audio level - */ - audioLevel?: number; - - /** - * Represents the energy level reported by the media source - */ - totalAudioEnergy?: number; - - /** - * Represents the total duration of the audio samples the media source actually transconverted in seconds - */ - totalSamplesDuration?: number; - - /** - * Indicate the name of the decoder implementation library - */ - decoderImplementation?: string; - - /** - * Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - */ - packetsSent?: number; - - /** - * Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - */ - bytesSent?: number; - - /** - * The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - */ - remoteTimestamp?: number; - - /** - * The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - */ - reportsSent?: number; - - /** - * Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - */ - roundTripTime?: number; - - /** - * Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - */ - totalRoundTripTime?: number; - - /** - * Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - */ - roundTripTimeMeasurements?: number; - - /** - * This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - */ - synthesizedSamplesDuration?: number; - - /** - * The number of synthesized samples events. - */ - synthesizedSamplesEvents?: number; - - /** - * The playout delay includes the delay from being emitted to the actual time of playout on the device - */ - totalPlayoutDelay?: number; - - /** - * When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout - */ - totalSamplesCount?: number; - -} - -/** -* List of certificates the client provided -*/ -export type Certificate = { - /** - * The fingerprint of the certificate. - */ - fingerprint?: string; - - /** - * The hash function used to generate the fingerprint. - */ - fingerprintAlgorithm?: string; - - /** - * The DER encoded base-64 representation of the certificate. - */ - base64Certificate?: string; - - /** - * The ID of the next certificate in the certificate chain - */ - issuerCertificateId?: string; - -} - -/** -* List of codec the client has -*/ -export type MediaCodecStats = { - /** - * Payload type used in the RTP encoding/decoding process. - */ - payloadType?: string; - - /** - * Indicates the role of the codec (encode or decode) - */ - codecType?: "encode" | "decode"; - - /** - * The MIME type of the media, e.g., audio/opus. - */ - mimeType?: string; - - /** - * The clock rate used in RTP transport to generate the timestamp for the carried frames - */ - clockRate?: number; - - /** - * Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented - */ - channels?: number; - - /** - * The SDP line determines the codec - */ - sdpFmtpLine?: string; - -} - -/** -* WebRTC App provided information related to the operation system the client uses. -*/ -export type MediaSourceStat = { - /** - * The unique identifier of the corresponding media track - */ - trackIdentifier?: string; - - /** - * The type of the media the MediaSource produces. - */ - kind?: "audio" | "video"; - - /** - * Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. - */ - relayedSource?: boolean; - - /** - * The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. - */ - audioLevel?: number; - - /** - * The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy - */ - totalAudioEnergy?: number; - - /** - * The duration of the audio type media source - */ - totalSamplesDuration?: number; - - /** - * if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLoss?: number; - - /** - * www.itu.int/rec/T-REC-G.168-201504-I/en - */ - echoReturnLossEnhancement?: number; - - /** - * The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - */ - droppedSamplesDuration?: number; - - /** - * A counter increases every time a sample is dropped after a non-dropped sample - */ - droppedSamplesEvents?: number; - - /** - * Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - */ - totalCaptureDelay?: number; - - /** - * The total number of captured samples reaching the audio source - */ - totalSamplesCaptured?: number; - - /** - * The width, in pixels, of the last frame originating from the media source - */ - width?: number; - - /** - * The height, in pixels, of the last frame originating from the media source - */ - height?: number; - - /** - * The total number of frames originating from the media source - */ - frames?: number; - - /** - * The number of frames originating from the media source in the last second - */ - framesPerSecond?: number; - -} - -/** -* Candidate pair stats -*/ -export type IceCandidatePair = { - /** - * The unique identifier of the peer connection - */ - candidatePairId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The label associated with the peer connection - */ - label?: string; - - /** - * The identifier of the transport the ice candidate pair is negotiated on - */ - transportId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected on the local side - */ - localCandidateId?: string; - - /** - * The unique identifier of the candidate the negotiated pair is selected on the remote side - */ - remoteCandidateId?: string; - - /** - * The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport - */ - state?: string; - - /** - * Indicates if the ice candidate pair is nominated or not - */ - nominated?: boolean; - - /** - * The total number of packets sent using the last selected candidate pair over the corresponding transport - */ - packetsSent?: number; - - /** - * The total number of packets received using the last selected candidate pair over the corresponding transport - */ - packetsReceived?: number; - - /** - * The total number of bytes sent using the last selected candidate pair over the corresponding transport - */ - bytesSent?: number; - - /** - * The total number of bytes received using the last selected candidate pair over the corresponding transport - */ - bytesReceived?: number; - - /** - * Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketSentTimestamp?: number; - - /** - * Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - */ - lastPacketReceivedTimestamp?: number; - - /** - * Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport - */ - totalRoundTripTime?: number; - - /** - * Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport - */ - currentRoundTripTime?: number; - - /** - * The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport - */ - availableOutgoingBitrate?: number; - - /** - * The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport - */ - availableIncomingBitrate?: number; - - /** - * Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport - */ - requestsReceived?: number; - - /** - * Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport - */ - requestsSent?: number; - - /** - * Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport - */ - responsesReceived?: number; - - /** - * Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport - */ - responsesSent?: number; - - /** - * Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport - */ - consentRequestsSent?: number; - - /** - * Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - */ - packetsDiscardedOnSend?: number; - - /** - * Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - */ - bytesDiscardedOnSend?: number; - -} - -/** -* Transport stats of Peer Connection -*/ -export type PeerConnectionTransport = { - /** - * The identifier of the transport the ICE candidate pair is negotiated on - */ - transportId: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId: string; - - /** - * The label associated with the peer connection - */ - label?: string; - - /** - * Represents the total number of packets sent on the corresponding transport - */ - packetsSent?: number; - - /** - * Represents the total number of packets received on the corresponding transport - */ - packetsReceived?: number; - - /** - * Represents the total amount of bytes sent on the corresponding transport - */ - bytesSent?: number; - - /** - * Represents the total amount of bytes received on the corresponding transport - */ - bytesReceived?: number; - - /** - * Represents the current role of ICE under DTLS Transport - */ - iceRole?: string; - - /** - * Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport - */ - iceLocalUsernameFragment?: string; - - /** - * Represents the current state of DTLS for the peer connection transport layer - */ - dtlsState?: string; - - /** - * The identifier of the candidate pair the transport currently uses - */ - selectedCandidatePairId?: string; - - /** - * Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - */ - iceState?: string; - - /** - * If DTLS negotiated, it gives the ID of the local certificate - */ - localCertificateId?: string; - - /** - * If DTLS negotiated, it gives the ID of the remote certificate - */ - remoteCertificateId?: string; - - /** - * Represents the version number of the TLS used in the corresponding transport - */ - tlsVersion?: string; - - /** - * Represents the name of the DTLS cipher used in the corresponding transport - */ - dtlsCipher?: string; - - /** - * The role this host plays in DTLS negotiations - */ - dtlsRole?: "client" | "server" | "unknown"; - - /** - * Represents the name of the SRTP cipher used in the corresponding transport - */ - srtpCipher?: string; - - /** - * Represents the name of the IANA TLS Supported Groups used in the corresponding transport - */ - tlsGroup?: string; - - /** - * The total number of candidate pair changes over the peer connection - */ - selectedCandidatePairChanges?: number; - -} - -/** -* Measurements about the data channels currently available on peer connections -*/ -export type DataChannel = { - /** - * The id of the peer connection the data channel is assigned to - */ - peerConnectionId: string; - - /** - * The id of the data channel assigned by the peer connection when it is opened - */ - dataChannelIdentifier?: number; - - /** - * The label of the data channel - */ - label?: string; - - /** - * The protocol the data channel utilizes - */ - protocol?: string; - - /** - * The state of the data channel - */ - state?: string; - - /** - * The total number of messages sent on the data channel - */ - messageSent?: number; - - /** - * The total number of bytes sent on the data channel - */ - bytesSent?: number; - - /** - * The total number of messages received on the data channel - */ - messageReceived?: number; - - /** - * The total number of bytes received on the data channel - */ - bytesReceived?: number; - -} - -/** -* User provided custom observer events -*/ -export type CustomObserverEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} - -/** -* User provided custom call events -*/ -export type CustomCallEvent = { - /** - * the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - */ - name: string; - - /** - * the value of the event - */ - value?: string; - - /** - * The unique identifier of the peer connection - */ - peerConnectionId?: string; - - /** - * The identifier of the media track the event is related to - */ - mediaTrackId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * Additional attachment relevant for the event - */ - attachments?: string; - - /** - * The EPOCH timestamp the event is generated - */ - timestamp?: number; - -} - -/** -* The WebRTC app provided custom stats payload -*/ -export type ExtensionStat = { - /** - * The type of the extension stats the custom app provides - */ - type: string; - - /** - * The payload of the extension stats the custom app provides - */ - payload: string; - -} - -/** -* The WebRTC app provided list of the media devices the client has. -*/ -export type MediaDevice = { - /** - * the provided id of the media input / output - */ - id?: string; - - /** - * The media kind of the media device - */ - kind?: "videoinput" | "audioinput" | "audiooutput"; - - /** - * The name of the device - */ - label?: string; - -} - -/** -* WebRTC App provided information related to the operating system the client uses. -*/ -export type OperationSystem = { - /** - * The name of the operating system (e.g., Linux) the WebRTC app uses - */ - name?: string; - - /** - * The version of the operating system - */ - version?: string; - - /** - * The name of the version of the operating system - */ - versionName?: string; - -} - -/** -* WebRTC App provided information related to the browser the client uses. -*/ -export type Browser = { - /** - * The name of the operating system (e.g., Linux) the WebRTC app uses - */ - name?: string; - - /** - * The version of the operating system - */ - version?: string; - -} - -/** -* WebRTC App provided information related to the platform the client uses. -*/ -export type Platform = { - /** - * The name of the platform - */ - type?: string; - - /** - * The name of the vendor - */ - vendor?: string; - - /** - * The name of the model - */ - model?: string; - -} - -/** -* WebRTC App provided information related to the engine the client uses. -*/ -export type Engine = { - /** - * The name of the Engine - */ - name?: string; - - /** - * The version of the engine - */ - version?: string; - -} - -/** -* docs -*/ -export type ClientSample = { - /** - * Unique id of the client providing samples. Must be a valid UUID. - */ - clientId: string; - - /** - * The timestamp the sample is created in GMT - */ - timestamp: number; - - /** - * If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. - */ - callId?: string; - - /** - * The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. - */ - sampleSeq?: number; - - /** - * The WebRTC app configured room id the client joined for the call. - */ - roomId?: string; - - /** - * The WebRTC app configured human-readable user id the client is joined. - */ - userId?: string; - - /** - * WebRTC App provided information related to the engine the client uses. - */ - engine?: Engine; - - /** - * WebRTC App provided information related to the platform the client uses. - */ - platform?: Platform; - - /** - * WebRTC App provided information related to the browser the client uses. - */ - browser?: Browser; - - /** - * WebRTC App provided information related to the operating system the client uses. - */ - os?: OperationSystem; - - /** - * The WebRTC app provided list of the media constraints the client has. - */ - mediaConstraints?: string[]; - - /** - * The WebRTC app provided list of the media devices the client has. - */ - mediaDevices?: MediaDevice[]; - - /** - * The WebRTC app provided list of user media errors the client has. - */ - userMediaErrors?: string[]; - - /** - * The WebRTC app provided custom stats payload - */ - extensionStats?: ExtensionStat[]; - - /** - * User provided custom call events - */ - customCallEvents?: CustomCallEvent[]; - - /** - * User provided custom observer events - */ - customObserverEvents?: CustomObserverEvent[]; - - /** - * The WebRTC app provided list of ICE servers the client used. - */ - iceServers?: string[]; - - /** - * The local part of the Signal Description Protocol to establish connections - */ - localSDPs?: string[]; - - /** - * Measurements about the data channels currently available on peer connections - */ - dataChannels?: DataChannel[]; - - /** - * Transport stats of Peer Connection - */ - pcTransports?: PeerConnectionTransport[]; - - /** - * Candidate pair stats - */ - iceCandidatePairs?: IceCandidatePair[]; - - /** - * WebRTC App provided information related to the operation system the client uses. - */ - mediaSources?: MediaSourceStat[]; - - /** - * List of codec the client has - */ - codecs?: MediaCodecStats[]; - - /** - * List of certificates the client provided - */ - certificates?: Certificate[]; - - /** - * List of compound measurements related to inbound audio tracks - */ - inboundAudioTracks?: InboundAudioTrack[]; - - /** - * List of compound measurements related to inbound video tracks - */ - inboundVideoTracks?: InboundVideoTrack[]; - - /** - * List of compound measurements related to outbound audio tracks - */ - outboundAudioTracks?: OutboundAudioTrack[]; - - /** - * List of compound measurements related to outbound video tracks - */ - outboundVideoTracks?: OutboundVideoTrack[]; - - /** - * List of local ICE candidates - */ - iceLocalCandidates?: IceLocalCandidate[]; - - /** - * List of remote ICE candidates - */ - iceRemoteCandidates?: IceRemoteCandidate[]; - - /** - * The offset from GMT in hours - */ - timeZoneOffsetInHours?: number; - - /** - * Special marker for the samples - */ - marker?: string; - -} - /** * Additional control flags indicate various operation has to be performed */ @@ -2707,11 +966,6 @@ export type Samples = { */ controls?: Controls; - /** - * Samples taken from the client - */ - clientSamples?: ClientSample[]; - /** * Samples taken from an Sfu */ diff --git a/outputs/typescript/SfuEventReport.ts b/outputs/typescript/SfuEventReport.ts deleted file mode 100644 index 6e444a82..00000000 --- a/outputs/typescript/SfuEventReport.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** -* Events happened in calls. -*/ -export type SfuEventReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED - */ - name: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * the human readable message of the event - */ - message?: string; - - /** - * the value of the event - */ - value?: string; - - /** - * attachment the event may created with - */ - attachments?: string; - -} diff --git a/outputs/typescript/SfuExtensionReport.ts b/outputs/typescript/SfuExtensionReport.ts deleted file mode 100644 index 7c5aed0d..00000000 --- a/outputs/typescript/SfuExtensionReport.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** -* A Report created for Extended provided arbitrary data. -*/ -export type SfuExtensionReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The name of the event - */ - extensionType: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * the human readable message of the event - */ - payload?: string; - -} diff --git a/outputs/typescript/SfuInboundRtpPadReport.ts b/outputs/typescript/SfuInboundRtpPadReport.ts deleted file mode 100644 index d258e22f..00000000 --- a/outputs/typescript/SfuInboundRtpPadReport.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuInboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSfuId?: string; - - /** - * only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteTransportId?: string; - - /** - * only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad - */ - remoteSinkId?: string; - - /** - * only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad - */ - remoteRtpPadId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets received on the corresponded RTP stream. - */ - packetsReceived?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. - */ - packetsRepaired?: number; - - /** - * The total number of packets failed to be decrypted on the corresponded RTP stream. - */ - packetsFailedDecryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets received on the corresponded RTP stream. - */ - fecPacketsReceived?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes received on the corresponded RTP stream. - */ - bytesReceived?: number; - - /** - * The total number of SR reports received by the corresponded RTP stream - */ - rtcpSrReceived?: number; - - /** - * The total number of RR reports sent on the corresponded RTP stream - */ - rtcpRrSent?: number; - - /** - * If rtx packets are sent or received on the same stream then this number indicates how may has been sent - */ - rtxPacketsReceived?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames received on the corresponded RTP stream - */ - framesReceived?: number; - - /** - * Indicate the number of frames the Sfu has been decoded - */ - framesDecoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been decoded - */ - keyFramesDecoded?: number; - - /** - * The calculated fractionLost of the stream - */ - fractionLost?: number; - - /** - * The calculated jitter of the stream - */ - jitter?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} diff --git a/outputs/typescript/SfuMetaReport.ts b/outputs/typescript/SfuMetaReport.ts deleted file mode 100644 index b22e3bed..00000000 --- a/outputs/typescript/SfuMetaReport.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Metadata belongs to SFUs -*/ -export type SfuMetaReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The media unit id the report belongs to - */ - mediaUnitId?: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * The generated unique identifier of the SFU - */ - sfuId?: string; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * SFU provided transport identifier - */ - transportId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaStreamId?: string; - - /** - * Unique identifier of the SFU stream id the rtp pad belongs to - */ - mediaSinkId?: string; - - /** - * Unique identifier of the SCTP stream the event is related to - */ - sctpStreamId?: string; - - /** - * Unique identifier of the Sfu Pad the event is related to - */ - rtpPadId?: string; - - /** - * The type of the meta data reported for the peer connection - */ - type?: string; - - /** - * The payload for the metadata reported for the peeer connection - */ - payload?: string; - -} diff --git a/outputs/typescript/SfuOutboundRtpPadReport.ts b/outputs/typescript/SfuOutboundRtpPadReport.ts deleted file mode 100644 index 7bb83e74..00000000 --- a/outputs/typescript/SfuOutboundRtpPadReport.ts +++ /dev/null @@ -1,225 +0,0 @@ -/** -* A Report created for RTP streams going through the SFU -*/ -export type SfuOutboundRtpPadReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * Unique identifier of the Sfu stream the event is related to - */ - sfuStreamId: string; - - /** - * Unique identifier of the Sfu sink the event is related to - */ - sfuSinkId: string; - - /** - * The id of RTP pad. - */ - rtpPadId: string; - - /** - * The synchronization source id of the RTP stream - */ - ssrc: number; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - */ - internal?: boolean; - - /** - * The callId the event belongs to - */ - callId?: string; - - /** - * If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - */ - clientId?: string; - - /** - * The id of the track the RTP stream related to at the client side - */ - trackId?: string; - - /** - * the type of the media the stream carries ("audio" or "video") - */ - mediaType?: string; - - /** - * The payload type field of the RTP header - */ - payloadType?: number; - - /** - * The negotiated mimeType in the SDP - */ - mimeType?: string; - - /** - * The clock rate of the media source the RTP header carries - */ - clockRate?: number; - - /** - * The actual SDP line from the negotiation related to this RTP stream - */ - sdpFmtpLine?: string; - - /** - * The rid parameter of the corresponded RTP stream - */ - rid?: string; - - /** - * If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - */ - rtxSsrc?: number; - - /** - * he bitrate the corresponded stream targets. - */ - targetBitrate?: number; - - /** - * The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - */ - voiceActivityFlag?: boolean; - - /** - * The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - */ - firCount?: number; - - /** - * The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - */ - pliCount?: number; - - /** - * The total number of negative acknowledgement received on the corresponded RTP stream. - */ - nackCount?: number; - - /** - * The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - */ - sliCount?: number; - - /** - * The total number of packets lost on the corresponded RTP stream. - */ - packetsLost?: number; - - /** - * The total number of packets sent on the corresponded RTP stream. - */ - packetsSent?: number; - - /** - * The total number of discarded packets on the corresponded RTP stream. - */ - packetsDiscarded?: number; - - /** - * The total number of packets retransmitted on the corresponded RTP stream. - */ - packetsRetransmitted?: number; - - /** - * The total number of packets failed to be encrypted on the corresponded RTP stream. - */ - packetsFailedEncryption?: number; - - /** - * The total number of duplicated packets appeared on the corresponded RTP stream. - */ - packetsDuplicated?: number; - - /** - * The total number of FEC packets sent on the corresponded RTP stream. - */ - fecPacketsSent?: number; - - /** - * The total number of FEC packets discarded on the corresponded RTP stream. - */ - fecPacketsDiscarded?: number; - - /** - * The total amount of payload bytes sent on the corresponded RTP stream. - */ - bytesSent?: number; - - /** - * The total number of SR reports sent by the corresponded RTP stream - */ - rtcpSrSent?: number; - - /** - * The total number of RR reports received on the corresponded RTP stream - */ - rtcpRrReceived?: number; - - /** - * If rtx packets sent on the same stream then this number indicates how may has been sent - */ - rtxPacketsSent?: number; - - /** - * If rtx packets are received on the same stream then this number indicates how may has been discarded - */ - rtxPacketsDiscarded?: number; - - /** - * The number of frames sent on the corresponded RTP stream - */ - framesSent?: number; - - /** - * Indicate the number of frames the Sfu has been encoded - */ - framesEncoded?: number; - - /** - * Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream - */ - keyFramesEncoded?: number; - - /** - * The calculated RTT of the stream - */ - roundTripTime?: number; - -} diff --git a/outputs/typescript/SfuSctpStreamReport.ts b/outputs/typescript/SfuSctpStreamReport.ts deleted file mode 100644 index 8e27ced1..00000000 --- a/outputs/typescript/SfuSctpStreamReport.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** -* A Report created for SCTP streams going through the SFU -*/ -export type SfuSctpStreamReport = { - /** - * The service id the report belongs to - */ - serviceId: string; - - /** - * The media unit id the report belongs to - */ - mediaUnitId: string; - - /** - * The provided unique identifier of the SFU - */ - sfuId: string; - - /** - * The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - */ - timestamp: number; - - /** - * The id of the transport the RTP stream uses. - */ - transportId: string; - - /** - * The id of the sctp stream - */ - streamId: string; - - /** - * The marker the originated sample is reported with - */ - marker?: string; - - /** - * Flag indicate if the sctp channel is used as an internal transport between SFUs - */ - internal?: boolean; - - /** - * The generated unique identifier of the call - */ - callId?: string; - - /** - * webrtc app provided room id - */ - roomId?: string; - - /** - * The label of the sctp stream - */ - label?: string; - - /** - * The protocol used to establish an sctp stream - */ - protocol?: string; - - /** - * The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. - */ - sctpSmoothedRoundTripTime?: number; - - /** - * The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. - */ - sctpCongestionWindow?: number; - - /** - * The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. - */ - sctpReceiverWindow?: number; - - /** - * The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. - */ - sctpMtu?: number; - - /** - * The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. - */ - sctpUnackData?: number; - - /** - * The number of message received on the corresponded SCTP stream. - */ - messageReceived?: number; - - /** - * The number of message sent on the corresponded SCTP stream. - */ - messageSent?: number; - - /** - * The number of bytes received on the corresponded SCTP stream. - */ - bytesReceived?: number; - - /** - * The number of bytes sent on the corresponded SCTP stream. - */ - bytesSent?: number; - -} diff --git a/package-lock.json b/package-lock.json index dbb1603c..907380fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,17 +15,22 @@ "json-schema-to-markdown": "^1.1.1", "protobufjs": "^6.11.2", "typedoc": "^0.22.12" + }, + "devDependencies": { + "@bufbuild/protoc-gen-es": "^1.0.0" } }, "node_modules/@bufbuild/protobuf": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.0.0.tgz", - "integrity": "sha512-oH3jHBrZ6to8Qf4zLg7O8KqSY42kQZNBRXJRMp5uSi0mqE4L8NbyMnZHeOsbXmTb0xpptRyH11LfS+KeVhXzAA==" + "integrity": "sha512-oH3jHBrZ6to8Qf4zLg7O8KqSY42kQZNBRXJRMp5uSi0mqE4L8NbyMnZHeOsbXmTb0xpptRyH11LfS+KeVhXzAA==", + "dev": true }, "node_modules/@bufbuild/protoc-gen-es": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.0.0.tgz", "integrity": "sha512-3NZzjw2hbeO7JFUZ70W4UOkaMyOC6hJfJP4uDczyWWTXoCr2TPDfPyLE2U8DBpKufneLS1YBhFJPPv4QvJkiPA==", + "dev": true, "dependencies": { "@bufbuild/protoplugin": "1.0.0" }, @@ -48,6 +53,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.0.0.tgz", "integrity": "sha512-L7z2/4MgP36QGEAh8T4OYrdMRv//LAw4gGpL8D3cziE21uP6FLzLKpIxJ4aJBoUyHyS53tpZMpb0djbxYDecFA==", + "dev": true, "dependencies": { "@bufbuild/protobuf": "1.0.0", "@typescript/vfs": "^1.4.0", @@ -122,6 +128,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.4.0.tgz", "integrity": "sha512-Pood7yv5YWMIX+yCHo176OnF8WUlKGImFG7XlsuH14Zb1YN5+dYD3uUtS7lqZtsH7tAveNUi2NzdpQCN0yRbaw==", + "dev": true, "dependencies": { "debug": "^4.1.1" } @@ -162,6 +169,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -257,7 +265,8 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/once": { "version": "1.4.0", @@ -276,10 +285,11 @@ } }, "node_modules/protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -368,12 +378,14 @@ "@bufbuild/protobuf": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.0.0.tgz", - "integrity": "sha512-oH3jHBrZ6to8Qf4zLg7O8KqSY42kQZNBRXJRMp5uSi0mqE4L8NbyMnZHeOsbXmTb0xpptRyH11LfS+KeVhXzAA==" + "integrity": "sha512-oH3jHBrZ6to8Qf4zLg7O8KqSY42kQZNBRXJRMp5uSi0mqE4L8NbyMnZHeOsbXmTb0xpptRyH11LfS+KeVhXzAA==", + "dev": true }, "@bufbuild/protoc-gen-es": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.0.0.tgz", "integrity": "sha512-3NZzjw2hbeO7JFUZ70W4UOkaMyOC6hJfJP4uDczyWWTXoCr2TPDfPyLE2U8DBpKufneLS1YBhFJPPv4QvJkiPA==", + "dev": true, "requires": { "@bufbuild/protoplugin": "1.0.0" } @@ -382,6 +394,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.0.0.tgz", "integrity": "sha512-L7z2/4MgP36QGEAh8T4OYrdMRv//LAw4gGpL8D3cziE21uP6FLzLKpIxJ4aJBoUyHyS53tpZMpb0djbxYDecFA==", + "dev": true, "requires": { "@bufbuild/protobuf": "1.0.0", "@typescript/vfs": "^1.4.0", @@ -456,6 +469,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.4.0.tgz", "integrity": "sha512-Pood7yv5YWMIX+yCHo176OnF8WUlKGImFG7XlsuH14Zb1YN5+dYD3uUtS7lqZtsH7tAveNUi2NzdpQCN0yRbaw==", + "dev": true, "requires": { "debug": "^4.1.1" } @@ -496,6 +510,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -568,7 +583,8 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "once": { "version": "1.4.0", @@ -584,9 +600,9 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", diff --git a/package.json b/package.json index 31239513..7a15d5af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schema-2.0", - "version": "2.0.0", + "version": "3.0.0", "description": "Generator scripts for Schema repository for ObserveRTC", "main": "index.js", "scripts": { @@ -24,5 +24,8 @@ "json-schema-to-markdown": "^1.1.1", "protobufjs": "^6.11.2", "typedoc": "^0.22.12" + }, + "devDependencies": { + "@bufbuild/protoc-gen-es": "^1.0.0" } } diff --git a/schemaList.md b/schemaList.md index 3277a32c..b3af639a 100644 --- a/schemaList.md +++ b/schemaList.md @@ -1,904 +1,319 @@ -CallEventReport - * **serviceId**: The unique identifier of the service - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **name**: The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **callId**: The generated unique identifier of the call - * **roomId**: webrtc app provided room id - * **clientId**: The generated unique identifier of the client - * **userId**: webrtc app provided user identifier - * **peerConnectionId**: The unique identifier of the peer connection - * **mediaTrackId**: The unique identifier of the media track - * **SSRC**: The SSRC identifier of the RTP stream a trackId belongs to - * **sampleTimestamp**: The timestamp of the sample the event related to - * **sampleSeq**: The sequence number of the sample the event may related to - * **message**: the human readable message of the event - * **value**: the value of the event - * **attachments**: attachment the event may created with -CallMetaReport - * **serviceId**: The unique identifier of the service - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **callId**: The generated unique identifier of the call - * **roomId**: webrtc app provided room id - * **clientId**: The generated unique identifier of the client - * **userId**: webrtc app provided user identifier - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleTimestamp**: The timestamp of the sample the event related to - * **sampleSeq**: The sequence number of the sample the event may related to - * **type**: The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP - * **payload**: The payload for the metadata reported for the peeer connection -ClientDataChannelReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **peerConnectionLabel**: The webrtc app provided label for the peer connection - * **label**: The label of the data channel - * **protocol**: The protocol used for the data channel - * **state**: The state of the data channel - * **messagesSent**: Represents the total number of API message events sent - * **bytesSent**: Represents the total number of payload bytes sent on the corresponded data channel - * **messagesReceived**: Represents the total number of API message events received on the corresponded data channel - * **bytesReceived**: Represents the total number of payload bytes received on the corresponded data channel -ClientExtensionReport - * **serviceId**: The unique identifier of the service - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **extensionType**: The name of the event - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **callId**: The generated unique identifier of the call - * **roomId**: webrtc app provided room id - * **clientId**: The generated unique identifier of the client - * **userId**: webrtc app provided user identifier - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the event may related to - * **payload**: the human readable message of the event -IceCandidatePairReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is marked with - * **candidatePairId**: The unique identifier of the peer connection - * **transportId**: The identifier of the transport the ice candidate pair is negotiated on - * **localCandidateId**: The unique identifier of the candidate the negotiated pair is selected at local side - * **remoteCandidateId**: The unique identifier of the candidate the negotiated pair is selected at remote side - * **state**: The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport - * **nominated**: indicate if the ice candidate pair is nominated or not - * **packetsSent**: The total number of packets sent using the last selected candidate pair over the corresponded transport - * **packetsReceived**: The total number of packets received using the last selected candidate pair over the corresponded transport - * **bytesSent**: The total number of bytes sent using the last selected candidate pair over the corresponded transport - * **bytesReceived**: The total number of bytes received using the last selected candidate pair over the corresponded transport - * **lastPacketSentTimestamp**: Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms) - * **totalRoundTripTime**: Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport - * **currentRoundTripTime**: Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport - * **availableOutgoingBitrate**: The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport - * **availableIncomingBitrate**: The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport - * **requestsReceived**: Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport - * **requestsSent**: Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport - * **responsesReceived**: Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport - * **responsesSent**: Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport - * **consentRequestsSent**: Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport - * **packetsDiscardedOnSend**: Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport - * **bytesDiscardedOnSend**: Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport -InboundAudioTrackReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **ssrc**: The RTP SSRC field - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is labeled with - * **trackId**: The id of the track - * **sfuStreamId**: The id of the Sfu stream the media from - * **sfuSinkId**: The id of the sink the Sfu streamed the media out - * **remoteTrackId**: The id of the remote track this inbound track is originated from - * **remoteUserId**: The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - * **remoteClientId**: The observer matched remote client Id - * **remotePeerConnectionId**: The observer matched remote Peer Connection Id - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - * **headerBytesReceived**: Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - * **packetsDiscarded**: The total number of packets missed the playout point and therefore discarded by the jitterbuffer - * **fecPacketsReceived**: Total number of FEC packets received over the corresponding synchronization source (ssrc) - * **fecPacketsDiscarded**: Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **bytesReceived**: Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - * **totalProcessingDelay**: The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - * **estimatedPlayoutTimestamp**: The estimated playout time of the corresponded synchronization source - * **jitterBufferDelay**: The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - * **jitterBufferTargetDelay**: This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - * **jitterBufferEmittedCount**: The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - * **jitterBufferMinimumDelay**: This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - * **totalSamplesReceived**: The total number of audio samples received on the corresponded RTP stream - * **concealedSamples**: The total number of samples decoded by the media decoder from the corresponded RTP stream - * **silentConcealedSamples**: The total number of samples concealed from the corresponded RTP stream - * **concealmentEvents**: The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - * **insertedSamplesForDeceleration**: The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - * **removedSamplesForAcceleration**: The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - * **audioLevel**: The current audio level - * **totalAudioEnergy**: Represents the energy level reported by the media source - * **totalSamplesDuration**: Represents the total duration of the audio samples the media source actually transconverted in seconds - * **decoderImplementation**: Indicate the name of the decoder implementation library - * **packetsSent**: Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - * **bytesSent**: Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - * **remoteTimestamp**: The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - * **reportsSent**: The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - * **roundTripTime**: Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - * **totalRoundTripTime**: Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - * **roundTripTimeMeasurements**: Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - * **synthesizedSamplesDuration**: This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - * **synthesizedSamplesEvents**: The number of synthesized samples events. - * **totalPlayoutDelay**: The playout delay includes the delay from being emitted to the actual time of playout on the device - * **totalSamplesCount**: When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout -InboundVideoTrackReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **ssrc**: The RTP SSRC field - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is labeled with - * **trackId**: The id of the track - * **sfuStreamId**: The id of the Sfu stream the media from - * **sfuSinkId**: The id of the sink the Sfu streamed the media out - * **remoteTrackId**: The id of the remote track this inbound track is originated from - * **remoteUserId**: The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it - * **remoteClientId**: The observer matched remote client Id - * **remotePeerConnectionId**: The observer matched remote Peer Connection Id - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **framesDropped**: The number of frames dropped prior to decode or missing chunks - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - * **headerBytesReceived**: Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - * **packetsDiscarded**: The total number of packets missed the playout point and therefore discarded by the jitterbuffer - * **fecPacketsReceived**: Total number of FEC packets received over the corresponding synchronization source (ssrc) - * **fecPacketsDiscarded**: Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **bytesReceived**: Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - * **totalProcessingDelay**: The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - * **estimatedPlayoutTimestamp**: The estimated playout time of the corresponded synchronization source - * **jitterBufferDelay**: The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - * **jitterBufferTargetDelay**: This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - * **jitterBufferEmittedCount**: The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - * **jitterBufferMinimumDelay**: This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - * **decoderImplementation**: Indicate the name of the decoder implementation library - * **framesDecoded**: The total number of frames decoded on the corresponded RTP stream - * **keyFramesDecoded**: The total number of keyframes decoded on the corresponded RTP stream - * **frameWidth**: The width of the frame of the video sent by the remote source on the corresponded RTP stream - * **frameHeight**: The height of the frame of the video sent by the remote source on the corresponded RTP stream - * **framesPerSecond**: The frame per seconds of the video sent by the remote source on the corresponded RTP stream - * **qpSum**: The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream - * **totalDecodeTime**: The total tiem spent on decoding video on the corresponded RTP stream - * **totalInterFrameDelay**: The total interframe delay - * **totalSquaredInterFrameDelay**: The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays - * **firCount**: The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - * **pliCount**: The total number of Picture Loss Indication sent on the corresponded RTP stream - * **framesReceived**: The total number of frames received on the corresponded RTP stream. - * **packetsSent**: Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - * **bytesSent**: Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - * **remoteTimestamp**: The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - * **reportsSent**: The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - * **roundTripTime**: Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - * **totalRoundTripTime**: Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - * **roundTripTimeMeasurements**: Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream -ObserverEventReport - * **serviceId**: The unique identifier of the service - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **name**: The name of the event - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **clientId**: The generated unique identifier of the client - * **userId**: webrtc app provided user identifier - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleTimestamp**: The timestamp of the sample the event related to - * **sampleSeq**: The sequence number of the sample the event may related to - * **message**: the human readable message of the event - * **value**: the value of the event - * **attachments**: attachment the event may created with -OutboundAudioTrackReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **ssrc**: The RTP SSRC field - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is labeled with - * **trackId**: The id of the track - * **sfuStreamId**: The id of the Sfu stream corresponds to the outbound track - * **packetsSent**: The total number of packets sent on the corresponded synchronization source - * **bytesSent**: The total number of bytes sent on the corresponded synchronization source - * **rid**: The rid encoding parameter of the corresponded synchronization source - * **headerBytesSent**: Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - * **retransmittedPacketsSent**: Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - * **retransmittedBytesSent**: Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - * **targetBitrate**: Reflects the current encoder target in bits per second. - * **totalEncodedBytesTarget**: The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - * **totalPacketSendDelay**: The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - * **averageRtcpInterval**: The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - * **encoderImplementation**: Indicate the name of the encoder implementation library - * **active**: Indicates whether this RTP stream is configured to be sent or disabled - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **roundTripTime**: RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - * **totalRoundTripTime**: The sum of RTT measurements belongs to the corresponded synchronization source - * **fractionLost**: The receiver reported fractional lost belongs to the corresponded synchronization source - * **roundTripTimeMeasurements**: The total number of calculated RR measurements received on this source - * **relayedSource**: True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - * **audioLevel**: Represents the audio level reported by the media source - * **totalAudioEnergy**: Represents the energy level reported by the media source - * **totalSamplesDuration**: Represents the total duration of the audio samples the media source actually transconverted in seconds - * **echoReturnLoss**: Represents the echo cancellation in decibels corresponded to the media source. - * **echoReturnLossEnhancement**: Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source. - * **droppedSamplesDuration**: . The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - * **droppedSamplesEvents**: A counter increases every time a sample is dropped after a non-dropped sample - * **totalCaptureDelay**: Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - * **totalSamplesCaptured**: The total number of captured samples reaching the audio source -OutboundVideoTrackReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **sampleSeq**: The sequence number of the sample the report is generated from - * **ssrc**: The RTP SSRC field - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is labeled with - * **trackId**: The id of the track - * **sfuStreamId**: The id of the Sfu stream corresponds to the outbound track - * **packetsSent**: The total number of packets sent on the corresponded synchronization source - * **bytesSent**: The total number of bytes sent on the corresponded synchronization source - * **rid**: The rid encoding parameter of the corresponded synchronization source - * **headerBytesSent**: Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - * **retransmittedPacketsSent**: Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - * **retransmittedBytesSent**: Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - * **targetBitrate**: Reflects the current encoder target in bits per second. - * **totalEncodedBytesTarget**: The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - * **totalPacketSendDelay**: The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - * **averageRtcpInterval**: The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - * **encoderImplementation**: Indicate the name of the encoder implementation library - * **active**: Indicates whether this RTP stream is configured to be sent or disabled - * **frameWidth**: The frame width in pixels of the frames targeted by the media encoder - * **frameHeight**: The frame width the media encoder targeted - * **framesPerSecond**: The encoded number of frames in the last second on the corresponded media source - * **framesSent**: TThe total number of frames sent on the corresponded RTP stream - * **hugeFramesSent**: The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream - * **framesEncoded**: The total number of frames encoded by the media source - * **keyFramesEncoded**: The total number of keyframes encoded on the corresponded RTP stream - * **qpSum**: The sum of the QP the media encoder provided on the corresponded RTP stream. - * **totalEncodeTime**: The total time in seconds spent in encoding media frames for the corresponded RTP stream. - * **qualityLimitationDurationNone**: Time elapsed in seconds when the RTC connection has not limited the quality - * **qualityLimitationDurationCPU**: Time elapsed in seconds the RTC connection had a limitation because of CPU - * **qualityLimitationDurationBandwidth**: Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - * **qualityLimitationDurationOther**: Time elapsed in seconds the RTC connection had a limitation because of Other factor - * **qualityLimitationReason**: Indicate a reason for the quality limitation of the corresponded synchronization source - * **qualityLimitationResolutionChanges**: The total number of resolution changes occured ont he corresponded RTP stream due to quality changes - * **firCount**: The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - * **pliCount**: The total number of Picture Loss Indication sent on the corresponded RTP stream - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **roundTripTime**: RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - * **totalRoundTripTime**: The sum of RTT measurements belongs to the corresponded synchronization source - * **fractionLost**: The receiver reported fractional lost belongs to the corresponded synchronization source - * **roundTripTimeMeasurements**: The total number of calculated RR measurements received on this source - * **framesDropped**: The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream - * **relayedSource**: True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - * **width**: The width, in pixels, of the last frame originating from the media source - * **height**: The height, in pixels, of the last frame originating from the media source - * **frames**: The total number of frames originated from the media source -PeerConnectionTransportReport - * **serviceId**: The unique identifier of the service - * **mediaUnitId**: The media unit id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **callId**: The generated unique identifier of the call - * **clientId**: The generated unique identifier of the client - * **peerConnectionId**: The unique identifier of the peer connection - * **transportId**: The identifier of the transport the ICE candidate pair is negotiated on - * **sampleSeq**: The sequence number of the sample the report is generated from - * **marker**: The marker the originated sample is reported with - * **roomId**: webrtc app provided room id - * **userId**: webrtc app provided user identifier - * **label**: The webrtc app provided label the peer connection is marked with - * **packetsSent**: Represents the total number of packets sent on the corresponded transport - * **packetsReceived**: Represents the total number of packets received on the corresponded transport - * **bytesSent**: Represents the total amount of bytes sent on the corresponded transport - * **bytesReceived**: Represents the total amount of bytes received on the corresponded transport - * **iceRole**: Represent the current role of ICE under DTLS Transport - * **iceLocalUsernameFragment**: Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport - * **dtlsState**: Represents the current state of DTLS for the peer connection transport layer - * **dtlsRole**: The role this host plays in DTLS negotiations - * **selectedCandidatePairId**: The identifier of the candidate pair the transport currently uses - * **iceState**: Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - * **localCertificateId**: If DTLS negotiated it gives the id of the local certificate - * **remoteCertificateId**: If DTLS negotiated it gives the id of the remote certificate - * **tlsVersion**: Represents the version number of the TLS used in the corresponded transport - * **dtlsCipher**: Represents the name of the DTLS cipher used in the corresponded transport - * **srtpCipher**: Represents the name of the SRTP cipher used in the corresponded transport - * **tlsGroup**: Represents the name of the IANA TLS Supported Groups used in the corresponded transport - * **selectedCandidatePairChanges**: The total number of candidate pair changes over the peer connection -Report - * **type**: The type of the report - * **payload**: The payload of contans the actual report - * **schemaVersion**: The version of the schema the payload holds -SfuEventReport - * **serviceId**: The service id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **name**: The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **sfuId**: The generated unique identifier of the SFU - * **callId**: The callId the event belongs to - * **transportId**: SFU provided transport identifier - * **mediaStreamId**: Unique identifier of the SFU stream id the rtp pad belongs to - * **mediaSinkId**: Unique identifier of the SFU stream id the rtp pad belongs to - * **sctpStreamId**: Unique identifier of the SCTP stream the event is related to - * **rtpPadId**: Unique identifier of the Sfu Pad the event is related to - * **message**: the human readable message of the event - * **value**: the value of the event - * **attachments**: attachment the event may created with -SfuExtensionReport - * **serviceId**: The service id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **extensionType**: The name of the event - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **sfuId**: The generated unique identifier of the SFU - * **payload**: the human readable message of the event -SfuInboundRtpPadReport - * **serviceId**: The service id the report belongs to - * **mediaUnitId**: The media unit id the report belongs to - * **sfuId**: The provided unique identifier of the SFU - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **transportId**: The id of the transport the RTP stream uses. - * **sfuStreamId**: Unique identifier of the Sfu stream the event is related to - * **rtpPadId**: The id of RTP pad. - * **ssrc**: The synchronization source id of the RTP stream - * **marker**: The marker the originated sample is reported with - * **internal**: Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - * **remoteSfuId**: only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad - * **remoteTransportId**: only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad - * **remoteSinkId**: only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad - * **remoteRtpPadId**: only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad - * **trackId**: The id of the track the RTP stream related to at the client side - * **clientId**: If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - * **callId**: The callId the event belongs to - * **mediaType**: the type of the media the stream carries ("audio" or "video") - * **payloadType**: The payload type field of the RTP header - * **mimeType**: The negotiated mimeType in the SDP - * **clockRate**: The clock rate of the media source the RTP header carries - * **sdpFmtpLine**: The actual SDP line from the negotiation related to this RTP stream - * **rid**: The rid parameter of the corresponded RTP stream - * **rtxSsrc**: If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - * **targetBitrate**: he bitrate the corresponded stream targets. - * **voiceActivityFlag**: The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - * **firCount**: The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - * **pliCount**: The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - * **nackCount**: The total number of negative acknowledgement received on the corresponded RTP stream. - * **sliCount**: The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - * **packetsLost**: The total number of packets lost on the corresponded RTP stream. - * **packetsReceived**: The total number of packets received on the corresponded RTP stream. - * **packetsDiscarded**: The total number of discarded packets on the corresponded RTP stream. - * **packetsRepaired**: The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream. - * **packetsFailedDecryption**: The total number of packets failed to be decrypted on the corresponded RTP stream. - * **packetsDuplicated**: The total number of duplicated packets appeared on the corresponded RTP stream. - * **fecPacketsReceived**: The total number of FEC packets received on the corresponded RTP stream. - * **fecPacketsDiscarded**: The total number of FEC packets discarded on the corresponded RTP stream. - * **bytesReceived**: The total amount of payload bytes received on the corresponded RTP stream. - * **rtcpSrReceived**: The total number of SR reports received by the corresponded RTP stream - * **rtcpRrSent**: The total number of RR reports sent on the corresponded RTP stream - * **rtxPacketsReceived**: If rtx packets are sent or received on the same stream then this number indicates how may has been sent - * **rtxPacketsDiscarded**: If rtx packets are received on the same stream then this number indicates how may has been discarded - * **framesReceived**: The number of frames received on the corresponded RTP stream - * **framesDecoded**: Indicate the number of frames the Sfu has been decoded - * **keyFramesDecoded**: Indicate the number of keyframes the Sfu has been decoded - * **fractionLost**: The calculated fractionLost of the stream - * **jitter**: The calculated jitter of the stream - * **roundTripTime**: The calculated RTT of the stream -SfuMetaReport - * **serviceId**: The service id the report belongs to - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **mediaUnitId**: The media unit id the report belongs to - * **marker**: The marker the originated sample is reported with - * **sfuId**: The generated unique identifier of the SFU - * **callId**: The callId the event belongs to - * **transportId**: SFU provided transport identifier - * **mediaStreamId**: Unique identifier of the SFU stream id the rtp pad belongs to - * **mediaSinkId**: Unique identifier of the SFU stream id the rtp pad belongs to - * **sctpStreamId**: Unique identifier of the SCTP stream the event is related to - * **rtpPadId**: Unique identifier of the Sfu Pad the event is related to - * **type**: The type of the meta data reported for the peer connection - * **payload**: The payload for the metadata reported for the peeer connection -SfuOutboundRtpPadReport - * **serviceId**: The service id the report belongs to - * **mediaUnitId**: The media unit id the report belongs to - * **sfuId**: The provided unique identifier of the SFU - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **transportId**: The id of the transport the RTP stream uses. - * **sfuStreamId**: Unique identifier of the Sfu stream the event is related to - * **sfuSinkId**: Unique identifier of the Sfu sink the event is related to - * **rtpPadId**: The id of RTP pad. - * **ssrc**: The synchronization source id of the RTP stream - * **marker**: The marker the originated sample is reported with - * **internal**: Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs - * **callId**: The callId the event belongs to - * **clientId**: If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to - * **trackId**: The id of the track the RTP stream related to at the client side - * **mediaType**: the type of the media the stream carries ("audio" or "video") - * **payloadType**: The payload type field of the RTP header - * **mimeType**: The negotiated mimeType in the SDP - * **clockRate**: The clock rate of the media source the RTP header carries - * **sdpFmtpLine**: The actual SDP line from the negotiation related to this RTP stream - * **rid**: The rid parameter of the corresponded RTP stream - * **rtxSsrc**: If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. - * **targetBitrate**: he bitrate the corresponded stream targets. - * **voiceActivityFlag**: The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through - * **firCount**: The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams - * **pliCount**: The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams - * **nackCount**: The total number of negative acknowledgement received on the corresponded RTP stream. - * **sliCount**: The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream - * **packetsLost**: The total number of packets lost on the corresponded RTP stream. - * **packetsSent**: The total number of packets sent on the corresponded RTP stream. - * **packetsDiscarded**: The total number of discarded packets on the corresponded RTP stream. - * **packetsRetransmitted**: The total number of packets retransmitted on the corresponded RTP stream. - * **packetsFailedEncryption**: The total number of packets failed to be encrypted on the corresponded RTP stream. - * **packetsDuplicated**: The total number of duplicated packets appeared on the corresponded RTP stream. - * **fecPacketsSent**: The total number of FEC packets sent on the corresponded RTP stream. - * **fecPacketsDiscarded**: The total number of FEC packets discarded on the corresponded RTP stream. - * **bytesSent**: The total amount of payload bytes sent on the corresponded RTP stream. - * **rtcpSrSent**: The total number of SR reports sent by the corresponded RTP stream - * **rtcpRrReceived**: The total number of RR reports received on the corresponded RTP stream - * **rtxPacketsSent**: If rtx packets sent on the same stream then this number indicates how may has been sent - * **rtxPacketsDiscarded**: If rtx packets are received on the same stream then this number indicates how may has been discarded - * **framesSent**: The number of frames sent on the corresponded RTP stream - * **framesEncoded**: Indicate the number of frames the Sfu has been encoded - * **keyFramesEncoded**: Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream - * **roundTripTime**: The calculated RTT of the stream -SfuSctpStreamReport - * **serviceId**: The service id the report belongs to - * **mediaUnitId**: The media unit id the report belongs to - * **sfuId**: The provided unique identifier of the SFU - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **transportId**: The id of the transport the RTP stream uses. - * **streamId**: The id of the sctp stream - * **marker**: The marker the originated sample is reported with - * **internal**: Flag indicate if the sctp channel is used as an internal transport between SFUs - * **callId**: The generated unique identifier of the call - * **roomId**: webrtc app provided room id - * **label**: The label of the sctp stream - * **protocol**: The protocol used to establish an sctp stream - * **sctpSmoothedRoundTripTime**: The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined. - * **sctpCongestionWindow**: The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458]. - * **sctpReceiverWindow**: The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458]. - * **sctpMtu**: The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458]. - * **sctpUnackData**: The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458]. - * **messageReceived**: The number of message received on the corresponded SCTP stream. - * **messageSent**: The number of message sent on the corresponded SCTP stream. - * **bytesReceived**: The number of bytes received on the corresponded SCTP stream. - * **bytesSent**: The number of bytes sent on the corresponded SCTP stream. -SFUTransportReport - * **serviceId**: The service id the report belongs to - * **mediaUnitId**: The media unit id the report belongs to - * **sfuId**: The provided unique identifier of the SFU - * **timestamp**: The timestamp when the corresponded data is generated for the report (UTC Epoch in ms) - * **transportId**: The generated unique identifier of the transport - * **marker**: The marker the originated sample is reported with - * **internal**: Flag indicate if the sfu transport is used as an internal transport between SFUs - * **callId**: The generated unique identifier of the call - * **roomId**: webrtc app provided room id - * **dtlsState**: Represent the current value of the state attribute of the underlying RTCDtlsTransport. - * **iceState**: Represent the current value of the state attribute of the underlying RTCIceTransport - * **sctpState**: Represents the the current value of the SCTP state of the transport of the SFU - * **iceRole**: Represent the current value of the role SFU takes place in ICE - * **localAddress**: The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - * **localPort**: The local port number - * **protocol**: The protocol used by the transport - * **remoteAddress**: The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN) - * **remotePort**: The remote port number - * **rtpBytesReceived**: The total amount of RTP bytes received on this transport - * **rtpBytesSent**: The total amount of RTP bytes sent on this transport - * **rtpPacketsReceived**: The total amount of RTP packets received on this transport - * **rtpPacketsSent**: The total amount of RTP packets sent on this transport - * **rtpPacketsLost**: The total amount of RTP packets lost on this transport - * **rtxBytesReceived**: The total amount of RTX bytes received on this transport - * **rtxBytesSent**: The total amount of RTX bytes sent on this transport - * **rtxPacketsReceived**: The total amount of RTX packets received on this transport - * **rtxPacketsSent**: The total amount of RTX packets sent on this transport - * **rtxPacketsLost**: The total amount of RTX packets lost on this transport - * **rtxPacketsDiscarded**: The total amount of RTX packets discarded on this transport - * **sctpBytesReceived**: The total amount of SCTP bytes received on this transport - * **sctpBytesSent**: The total amount of SCTP bytes sent on this transport - * **sctpPacketsReceived**: The total amount of SCTP packets received on this transport - * **sctpPacketsSent**: The total amount of SCTP packets sent on this transport -Controls - * **close**: Indicate that the server should close the connection - * **accessClaim**: Holds a new claim to process -Engine - * **name**: The name of the Engine - * **version**: The version of the engine -Platform - * **type**: The name of the platform - * **vendor**: The name of the vendor - * **model**: The name of the model -Browser - * **name**: The name of the operating system (e.g., Linux) the WebRTC app uses - * **version**: The version of the operating system -OperationSystem - * **name**: The name of the operating system (e.g., Linux) the WebRTC app uses - * **version**: The version of the operating system - * **versionName**: The name of the version of the operating system -MediaDevice - * **id**: the provided id of the media input / output - * **kind**: The media kind of the media device (Possible values are: videoinput,
audioinput,
audiooutput) - * **label**: The name of the device +CodecStats + * **timestamp**: The timestamp when the stats were generated. + * **type**: The type of the stats. + * **id**: The unique identifier for the stats object. + * **payloadType**: The payload type of the codec. + * **transportId**: The identifier of the transport associated with the codec. + * **mimeType**: The MIME type of the codec. + * **clockRate**: The clock rate of the codec in Hz. + * **channels**: The number of audio channels for the codec, if applicable. + * **sdpFmtpLine**: The SDP format-specific parameters line for the codec. + * **appData**: Additional information attached to this stats +InboundRtpStats + * **timestamp**: The time the stats were collected, in high-resolution time. + * **id**: Unique identifier of the stats object. + * **ssrc**: Synchronization source identifier of the RTP stream. + * **kind**: Kind of the media (e.g., 'audio' or 'video'). + * **trackIdentifier**: Identifier for the media track associated with the RTP stream. + * **transportId**: ID of the transport associated with the RTP stream. + * **codecId**: ID of the codec used for the RTP stream. + * **packetsReceived**: Number of packets received on the RTP stream. + * **packetsLost**: Number of packets lost on the RTP stream. + * **jitter**: Jitter of the RTP stream in seconds. + * **mid**: The MediaStream ID of the RTP stream. + * **remoteId**: Remote stats object ID associated with the RTP stream. + * **framesDecoded**: Number of frames decoded. + * **keyFramesDecoded**: Number of keyframes decoded. + * **framesRendered**: Number of frames rendered. + * **framesDropped**: Number of frames dropped. + * **frameWidth**: Width of the decoded video frames. + * **frameHeight**: Height of the decoded video frames. + * **framesPerSecond**: Frame rate in frames per second. + * **qpSum**: Sum of the Quantization Parameter values for decoded frames. + * **totalDecodeTime**: Total time spent decoding in seconds. + * **totalInterFrameDelay**: Sum of inter-frame delays in seconds. + * **totalSquaredInterFrameDelay**: Sum of squared inter-frame delays in seconds. + * **pauseCount**: Number of times playback was paused. + * **totalPausesDuration**: Total duration of pauses in seconds. + * **freezeCount**: Number of times playback was frozen. + * **totalFreezesDuration**: Total duration of freezes in seconds. + * **lastPacketReceivedTimestamp**: Timestamp of the last packet received. + * **headerBytesReceived**: Total header bytes received. + * **packetsDiscarded**: Total packets discarded. + * **fecBytesReceived**: Total bytes received from FEC. + * **fecPacketsReceived**: Total packets received from FEC. + * **fecPacketsDiscarded**: Total FEC packets discarded. + * **bytesReceived**: Total bytes received on the RTP stream. + * **nackCount**: Number of NACKs sent. + * **firCount**: Number of Full Intra Requests sent. + * **pliCount**: Number of Picture Loss Indications sent. + * **totalProcessingDelay**: Total processing delay in seconds. + * **estimatedPlayoutTimestamp**: Estimated timestamp of playout. + * **jitterBufferDelay**: Total jitter buffer delay in seconds. + * **jitterBufferTargetDelay**: Target delay for the jitter buffer in seconds. + * **jitterBufferEmittedCount**: Number of packets emitted from the jitter buffer. + * **jitterBufferMinimumDelay**: Minimum delay of the jitter buffer in seconds. + * **totalSamplesReceived**: Total audio samples received. + * **concealedSamples**: Number of concealed audio samples. + * **silentConcealedSamples**: Number of silent audio samples concealed. + * **concealmentEvents**: Number of audio concealment events. + * **insertedSamplesForDeceleration**: Number of audio samples inserted for deceleration. + * **removedSamplesForAcceleration**: Number of audio samples removed for acceleration. + * **audioLevel**: Audio level in the range [0.0, 1.0]. + * **totalAudioEnergy**: Total audio energy in the stream. + * **totalSamplesDuration**: Total duration of all received audio samples in seconds. + * **framesReceived**: Total number of frames received. + * **decoderImplementation**: Decoder implementation used for decoding frames. + * **playoutId**: Playout identifier for the RTP stream. + * **powerEfficientDecoder**: Indicates if the decoder is power-efficient. + * **framesAssembledFromMultiplePackets**: Number of frames assembled from multiple packets. + * **totalAssemblyTime**: Total assembly time for frames in seconds. + * **retransmittedPacketsReceived**: Number of retransmitted packets received. + * **retransmittedBytesReceived**: Number of retransmitted bytes received. + * **rtxSsrc**: SSRC of the retransmission stream. + * **fecSsrc**: SSRC of the FEC stream. + * **totalCorruptionProbability**: Total corruption probability of packets. + * **totalSquaredCorruptionProbability**: Total squared corruption probability of packets. + * **corruptionMeasurements**: Number of corruption measurements. + * **appData**: Additional information attached to this stats +RemoteInboundRtpStats + * **timestamp**: The timestamp for this stats object in DOMHighResTimeStamp format. + * **id**: The unique identifier for this stats object. + * **ssrc**: The SSRC identifier of the RTP stream. + * **kind**: The type of media ('audio' or 'video'). + * **transportId**: The ID of the transport used for this stream. + * **codecId**: The ID of the codec used for this stream. + * **packetsReceived**: The total number of packets received on this stream. + * **packetsLost**: The total number of packets lost on this stream. + * **jitter**: The jitter value for this stream in seconds. + * **localId**: The ID of the local object corresponding to this remote stream. + * **roundTripTime**: The most recent RTT measurement for this stream in seconds. + * **totalRoundTripTime**: The cumulative RTT for all packets on this stream in seconds. + * **fractionLost**: The fraction of packets lost on this stream, calculated over a time interval. + * **roundTripTimeMeasurements**: The total number of RTT measurements for this stream. + * **appData**: Additional information attached to this stats +OutboundRtpStats + * **timestamp**: The timestamp for this stats object in DOMHighResTimeStamp format. + * **id**: The unique identifier for this stats object. + * **ssrc**: The SSRC identifier of the RTP stream. + * **kind**: The type of media ('audio' or 'video'). + * **qualityLimitationDurations**: The duration of quality limitation reasons categorized by type. + * **transportId**: The ID of the transport used for this stream. + * **codecId**: The ID of the codec used for this stream. + * **packetsSent**: The total number of packets sent on this stream. + * **bytesSent**: The total number of bytes sent on this stream. + * **mid**: The media ID associated with this RTP stream. + * **mediaSourceId**: The ID of the media source associated with this stream. + * **remoteId**: The ID of the remote object corresponding to this stream. + * **rid**: The RID value of the RTP stream. + * **headerBytesSent**: The total number of header bytes sent on this stream. + * **retransmittedPacketsSent**: The number of retransmitted packets sent on this stream. + * **retransmittedBytesSent**: The number of retransmitted bytes sent on this stream. + * **rtxSsrc**: The SSRC for the RTX stream, if applicable. + * **targetBitrate**: The target bitrate for this RTP stream in bits per second. + * **totalEncodedBytesTarget**: The total target encoded bytes for this stream. + * **frameWidth**: The width of the frames sent in pixels. + * **frameHeight**: The height of the frames sent in pixels. + * **framesPerSecond**: The number of frames sent per second. + * **framesSent**: The total number of frames sent on this stream. + * **hugeFramesSent**: The total number of huge frames sent on this stream. + * **framesEncoded**: The total number of frames encoded on this stream. + * **keyFramesEncoded**: The total number of key frames encoded on this stream. + * **qpSum**: The sum of QP values for all frames encoded on this stream. + * **totalEncodeTime**: The total time spent encoding frames on this stream in seconds. + * **totalPacketSendDelay**: The total delay for packets sent on this stream in seconds. + * **qualityLimitationReason**: The reason for any quality limitation on this stream. + * **qualityLimitationResolutionChanges**: The number of resolution changes due to quality limitations. + * **nackCount**: The total number of NACK packets sent on this stream. + * **firCount**: The total number of FIR packets sent on this stream. + * **pliCount**: The total number of PLI packets sent on this stream. + * **encoderImplementation**: The implementation of the encoder used for this stream. + * **powerEfficientEncoder**: Indicates whether the encoder is power efficient. + * **active**: Indicates whether this stream is actively sending data. + * **scalabilityMode**: The scalability mode of the encoder used for this stream. + * **appData**: Additional information attached to this stats. +RemoteOutboundRtpStats + * **timestamp**: The timestamp for this stats object in DOMHighResTimeStamp format. + * **id**: The unique identifier for this stats object. + * **ssrc**: The SSRC identifier of the RTP stream. + * **kind**: The type of media ('audio' or 'video'). + * **transportId**: The ID of the transport used for this stream. + * **codecId**: The ID of the codec used for this stream. + * **packetsSent**: The total number of packets sent on this stream. + * **bytesSent**: The total number of bytes sent on this stream. + * **localId**: The ID of the local object corresponding to this stream. + * **remoteTimestamp**: The remote timestamp for this stats object in DOMHighResTimeStamp format. + * **reportsSent**: The total number of reports sent on this stream. + * **roundTripTime**: The current estimated round-trip time for this stream in seconds. + * **totalRoundTripTime**: The total round-trip time for this stream in seconds. + * **roundTripTimeMeasurements**: The total number of round-trip time measurements for this stream. + * **appData**: Additional information attached to this stats +AudioSourceStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **trackIdentifier**: The identifier of the media track. + * **kind**: The kind of media (audio/video). + * **audioLevel**: The current audio level. + * **totalAudioEnergy**: The total audio energy. + * **totalSamplesDuration**: The total duration of audio samples. + * **echoReturnLoss**: The echo return loss. + * **echoReturnLossEnhancement**: The enhancement of echo return loss. + * **appData**: Additional information attached to this stats +VideoSourceStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **trackIdentifier**: The identifier of the media track. + * **kind**: The kind of media (audio/video). + * **width**: The width of the video. + * **height**: The height of the video. + * **frames**: The total number of frames. + * **framesPerSecond**: The frames per second of the video. + * **appData**: Additional information attached to this stats +AudioPlayoutStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **kind**: The kind of media (audio/video). + * **synthesizedSamplesDuration**: The duration of synthesized audio samples. + * **synthesizedSamplesEvents**: The number of synthesized audio samples events. + * **totalSamplesDuration**: The total duration of all audio samples. + * **totalPlayoutDelay**: The total delay experienced during audio playout. + * **totalSamplesCount**: The total count of audio samples. + * **appData**: Additional information attached to this stats +PeerConnectionTransportStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **dataChannelsOpened**: The number of data channels opened. + * **dataChannelsClosed**: The number of data channels closed. + * **appData**: Additional information attached to this stats +DataChannelStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **label**: The label of the data channel. + * **protocol**: The protocol of the data channel. + * **dataChannelIdentifier**: The identifier for the data channel. + * **state**: The state of the data channel (e.g., 'open', 'closed'). + * **messagesSent**: The number of messages sent on the data channel. + * **bytesSent**: The number of bytes sent on the data channel. + * **messagesReceived**: The number of messages received on the data channel. + * **bytesReceived**: The number of bytes received on the data channel. + * **appData**: Additional information attached to this stats +IceTransportStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **packetsSent**: The number of packets sent. + * **packetsReceived**: The number of packets received. + * **bytesSent**: The number of bytes sent. + * **bytesReceived**: The number of bytes received. + * **iceRole**: The ICE role (e.g., 'controlling', 'controlled'). + * **iceLocalUsernameFragment**: The local username fragment for ICE. + * **dtlsState**: The DTLS transport state (e.g., 'new', 'connecting', 'connected'). + * **iceState**: The ICE transport state (e.g., 'new', 'checking', 'connected'). + * **selectedCandidatePairId**: The ID of the selected ICE candidate pair. + * **localCertificateId**: The ID of the local certificate. + * **remoteCertificateId**: The ID of the remote certificate. + * **tlsVersion**: The TLS version used for encryption. + * **dtlsCipher**: The DTLS cipher suite used. + * **dtlsRole**: The role in the DTLS handshake (e.g., 'client', 'server'). + * **srtpCipher**: The SRTP cipher used for encryption. + * **selectedCandidatePairChanges**: The number of changes to the selected ICE candidate pair. + * **appData**: Additional information attached to this stats +IceCandidateStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **transportId**: The transport ID associated with the ICE candidate. + * **address**: The IP address of the ICE candidate (nullable). + * **port**: The port number of the ICE candidate. + * **protocol**: The transport protocol used by the candidate (e.g., 'udp', 'tcp'). + * **candidateType**: The type of the ICE candidate (e.g., 'host', 'srflx', 'relay'). + * **priority**: The priority of the ICE candidate. + * **url**: The URL of the ICE candidate. + * **relayProtocol**: The protocol used for the relay (e.g., 'tcp', 'udp'). + * **foundation**: A string representing the foundation for the ICE candidate. + * **relatedAddress**: The related address for the ICE candidate (if any). + * **relatedPort**: The related port for the ICE candidate (if any). + * **usernameFragment**: The username fragment for the ICE candidate. + * **tcpType**: The TCP type of the ICE candidate (e.g., 'active', 'passive'). + * **appData**: Additional information attached to this stats +IceCandidatePairStats + * **id**: The unique identifier for this RTCStats object. + * **timestamp**: The timestamp of when the stats were recorded, in seconds. + * **transportId**: The transport id of the connection this candidate pair belongs to. + * **localCandidateId**: The ID of the local ICE candidate in this pair. + * **remoteCandidateId**: The ID of the remote ICE candidate in this pair. + * **packetsSent**: The number of packets sent using this candidate pair. + * **packetsReceived**: The number of packets received using this candidate pair. + * **bytesSent**: The total number of bytes sent using this candidate pair. + * **bytesReceived**: The total number of bytes received using this candidate pair. + * **lastPacketSentTimestamp**: The timestamp of the last packet sent using this candidate pair. + * **lastPacketReceivedTimestamp**: The timestamp of the last packet received using this candidate pair. + * **totalRoundTripTime**: The total round trip time (RTT) for this candidate pair in seconds. + * **currentRoundTripTime**: The current round trip time (RTT) for this candidate pair in seconds. + * **availableOutgoingBitrate**: The available outgoing bitrate (in bits per second) for this candidate pair. + * **availableIncomingBitrate**: The available incoming bitrate (in bits per second) for this candidate pair. + * **requestsReceived**: The number of ICE connection requests received by this candidate pair. + * **requestsSent**: The number of ICE connection requests sent by this candidate pair. + * **responsesReceived**: The number of ICE connection responses received by this candidate pair. + * **responsesSent**: The number of ICE connection responses sent by this candidate pair. + * **consentRequestsSent**: The number of ICE connection consent requests sent by this candidate pair. + * **packetsDiscardedOnSend**: The number of packets discarded while attempting to send via this candidate pair. + * **bytesDiscardedOnSend**: The total number of bytes discarded while attempting to send via this candidate pair. + * **state**: undefined (Possible values are: new,
inProgress,
failed,
succeeded) + * **nominated**: Whether this candidate pair has been nominated. + * **appData**: Additional information attached to this stats +CertificateStats + * **timestamp**: The timestamp of the stat. + * **id**: A unique identifier for the stat. + * **fingerprint**: The fingerprint of the certificate. + * **fingerprintAlgorithm**: The algorithm used for the fingerprint (e.g., 'SHA-256'). + * **base64Certificate**: The certificate encoded in base64 format. + * **issuerCertificateId**: The certificate ID of the issuer (nullable). + * **appData**: Additional information attached to this stats +PeerConnectionSample + * **peerConnectionId**: Unique identifier of the stats object. + * **appData**: Additional information attached to this sample + * **codecs**: Codec items + * **inboundRtps**: Inbound RTPs + * **remoteInboundRtps**: Remote Inbound RTPs + * **outboundRtps**: Outbound RTPs + * **remoteOutboundRtps**: Remote Outbound RTPs + * **audioSources**: Audio Source Stats + * **videoSources**: Video Source Stats + * **audioPlayouts**: Audio Playout Stats + * **peerConnectionTransports**: PeerConnection Transport Stats + * **dataChannels**: Data Channels Stats + * **iceTransports**: ICE Transport Stats + * **iceCandidates**: ICE Candidate Stats + * **iceCandidatePairs**: ICE Candidate Pair Stats + * **certificates**: Certificates +ClientEvent + * **type**: The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + * **payload**: The value associated with the event, if applicable. + * **peerConnectionId**: The unique identifier of the peer connection for which the event was generated. + * **trackId**: The identifier of the media track related to the event, if applicable. + * **ssrc**: The SSRC (Synchronization Source) identifier associated with the event, if applicable. + * **timestamp**: The timestamp in epoch format when the event was generated. +ClientMetaData + * **type**: The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.). + * **payload**: The value associated with the event, if applicable. + * **peerConnectionId**: The unique identifier of the peer connection for which the event was generated. + * **trackId**: The identifier of the media track related to the event, if applicable. + * **ssrc**: The SSRC (Synchronization Source) identifier associated with the event, if applicable. + * **timestamp**: The timestamp in epoch format when the event was generated. ExtensionStat * **type**: The type of the extension stats the custom app provides * **payload**: The payload of the extension stats the custom app provides -CustomCallEvent - * **name**: the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - * **value**: the value of the event - * **peerConnectionId**: The unique identifier of the peer connection - * **mediaTrackId**: The identifier of the media track the event is related to - * **message**: the human readable message of the event - * **attachments**: Additional attachment relevant for the event - * **timestamp**: The EPOCH timestamp the event is generated -CustomObserverEvent - * **name**: the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..) - * **mediaTrackId**: The identifier of the media track the event is related to - * **message**: the human readable message of the event - * **attachments**: Additional attachment relevant for the event - * **timestamp**: The EPOCH timestamp the event is generated -DataChannel - * **peerConnectionId**: The id of the peer connection the data channel is assigned to - * **dataChannelIdentifier**: The id of the data channel assigned by the peer connection when it is opened - * **label**: The label of the data channel - * **protocol**: The protocol the data channel utilizes - * **state**: The state of the data channel - * **messageSent**: The total number of messages sent on the data channel - * **bytesSent**: The total number of bytes sent on the data channel - * **messageReceived**: The total number of messages received on the data channel - * **bytesReceived**: The total number of bytes received on the data channel -PeerConnectionTransport - * **transportId**: The identifier of the transport the ICE candidate pair is negotiated on - * **peerConnectionId**: The unique identifier of the peer connection - * **label**: The label associated with the peer connection - * **packetsSent**: Represents the total number of packets sent on the corresponding transport - * **packetsReceived**: Represents the total number of packets received on the corresponding transport - * **bytesSent**: Represents the total amount of bytes sent on the corresponding transport - * **bytesReceived**: Represents the total amount of bytes received on the corresponding transport - * **iceRole**: Represents the current role of ICE under DTLS Transport - * **iceLocalUsernameFragment**: Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport - * **dtlsState**: Represents the current state of DTLS for the peer connection transport layer - * **selectedCandidatePairId**: The identifier of the candidate pair the transport currently uses - * **iceState**: Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer - * **localCertificateId**: If DTLS negotiated, it gives the ID of the local certificate - * **remoteCertificateId**: If DTLS negotiated, it gives the ID of the remote certificate - * **tlsVersion**: Represents the version number of the TLS used in the corresponding transport - * **dtlsCipher**: Represents the name of the DTLS cipher used in the corresponding transport - * **dtlsRole**: The role this host plays in DTLS negotiations (Possible values are: client,
server,
unknown) - * **srtpCipher**: Represents the name of the SRTP cipher used in the corresponding transport - * **tlsGroup**: Represents the name of the IANA TLS Supported Groups used in the corresponding transport - * **selectedCandidatePairChanges**: The total number of candidate pair changes over the peer connection -IceCandidatePair - * **candidatePairId**: The unique identifier of the peer connection - * **peerConnectionId**: The unique identifier of the peer connection - * **label**: The label associated with the peer connection - * **transportId**: The identifier of the transport the ice candidate pair is negotiated on - * **localCandidateId**: The unique identifier of the candidate the negotiated pair is selected on the local side - * **remoteCandidateId**: The unique identifier of the candidate the negotiated pair is selected on the remote side - * **state**: The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport - * **nominated**: Indicates if the ice candidate pair is nominated or not - * **packetsSent**: The total number of packets sent using the last selected candidate pair over the corresponding transport - * **packetsReceived**: The total number of packets received using the last selected candidate pair over the corresponding transport - * **bytesSent**: The total number of bytes sent using the last selected candidate pair over the corresponding transport - * **bytesReceived**: The total number of bytes received using the last selected candidate pair over the corresponding transport - * **lastPacketSentTimestamp**: Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms) - * **totalRoundTripTime**: Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport - * **currentRoundTripTime**: Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport - * **availableOutgoingBitrate**: The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport - * **availableIncomingBitrate**: The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport - * **requestsReceived**: Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport - * **requestsSent**: Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport - * **responsesReceived**: Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport - * **responsesSent**: Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport - * **consentRequestsSent**: Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport - * **packetsDiscardedOnSend**: Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport - * **bytesDiscardedOnSend**: Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport -MediaSourceStat - * **trackIdentifier**: The unique identifier of the corresponding media track - * **kind**: The type of the media the MediaSource produces. (Possible values are: audio,
video) - * **relayedSource**: Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media. - * **audioLevel**: The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov. - * **totalAudioEnergy**: The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy - * **totalSamplesDuration**: The duration of the audio type media source - * **echoReturnLoss**: if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en - * **echoReturnLossEnhancement**: www.itu.int/rec/T-REC-G.168-201504-I/en - * **droppedSamplesDuration**: The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - * **droppedSamplesEvents**: A counter increases every time a sample is dropped after a non-dropped sample - * **totalCaptureDelay**: Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - * **totalSamplesCaptured**: The total number of captured samples reaching the audio source - * **width**: The width, in pixels, of the last frame originating from the media source - * **height**: The height, in pixels, of the last frame originating from the media source - * **frames**: The total number of frames originating from the media source - * **framesPerSecond**: The number of frames originating from the media source in the last second -MediaCodecStats - * **payloadType**: Payload type used in the RTP encoding/decoding process. - * **codecType**: Indicates the role of the codec (encode or decode) (Possible values are: encode,
decode) - * **mimeType**: The MIME type of the media, e.g., audio/opus. - * **clockRate**: The clock rate used in RTP transport to generate the timestamp for the carried frames - * **channels**: Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented - * **sdpFmtpLine**: The SDP line determines the codec -Certificate - * **fingerprint**: The fingerprint of the certificate. - * **fingerprintAlgorithm**: The hash function used to generate the fingerprint. - * **base64Certificate**: The DER encoded base-64 representation of the certificate. - * **issuerCertificateId**: The ID of the next certificate in the certificate chain -InboundAudioTrack - * **ssrc**: The RTP SSRC field - * **trackId**: The ID of the track - * **peerConnectionId**: The unique generated identifier of the peer connection the inbound audio track belongs to - * **remoteClientId**: The remote client ID the source outbound track belongs to - * **sfuStreamId**: The ID of the SFU stream this track is synced from - * **sfuSinkId**: The ID of the sink this track belongs to in the SFU - * **packetsReceived**: The total number of packets received on the corresponding synchronization source - * **packetsLost**: The total number of bytes received on the corresponding synchronization source - * **jitter**: The corresponding synchronization source reported jitter - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc) - * **headerBytesReceived**: Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - * **packetsDiscarded**: The total number of packets that missed the playout point and were therefore discarded by the jitter buffer - * **fecPacketsReceived**: Total number of FEC packets received over the corresponding synchronization source (ssrc) - * **fecPacketsDiscarded**: Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - * **bytesReceived**: Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired. - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc) - * **totalProcessingDelay**: The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded - * **estimatedPlayoutTimestamp**: The estimated playout time of the corresponding synchronization source - * **jitterBufferDelay**: The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty. - * **jitterBufferTargetDelay**: This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - * **jitterBufferEmittedCount**: The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc) - * **jitterBufferMinimumDelay**: This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - * **totalSamplesReceived**: The total number of audio samples received on the corresponded RTP stream - * **concealedSamples**: The total number of samples decoded by the media decoder from the corresponded RTP stream - * **silentConcealedSamples**: The total number of samples concealed from the corresponded RTP stream - * **concealmentEvents**: The total number of concealed event emitted to the media codec by the corresponded jitterbuffer - * **insertedSamplesForDeceleration**: The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay) - * **removedSamplesForAcceleration**: The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay) - * **audioLevel**: The current audio level - * **totalAudioEnergy**: Represents the energy level reported by the media source - * **totalSamplesDuration**: Represents the total duration of the audio samples the media source actually transconverted in seconds - * **decoderImplementation**: Indicate the name of the decoder implementation library - * **packetsSent**: Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - * **bytesSent**: Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - * **remoteTimestamp**: The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - * **reportsSent**: The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - * **roundTripTime**: Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - * **totalRoundTripTime**: Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - * **roundTripTimeMeasurements**: Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream - * **synthesizedSamplesDuration**: This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized - * **synthesizedSamplesEvents**: The number of synthesized samples events. - * **totalPlayoutDelay**: The playout delay includes the delay from being emitted to the actual time of playout on the device - * **totalSamplesCount**: When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout -InboundVideoTrack - * **ssrc**: The RTP SSRC field - * **trackId**: The id of the track - * **peerConnectionId**: The unique generated identifier of the peer connection the inbound audio track belongs to - * **remoteClientId**: The remote clientId the source outbound track belongs to - * **sfuStreamId**: The id of the SFU stream this track is sinked from - * **sfuSinkId**: The id of the sink this track belongs to in the SFU - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **framesDropped**: The number of frames dropped prior to decode or missing chunks - * **lastPacketReceivedTimestamp**: Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc) - * **headerBytesReceived**: Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc) - * **packetsDiscarded**: The total number of packets missed the playout point and therefore discarded by the jitterbuffer - * **fecPacketsReceived**: Total number of FEC packets received over the corresponding synchronization source (ssrc) - * **fecPacketsDiscarded**: Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **bytesReceived**: Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired. - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc) - * **totalProcessingDelay**: The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded - * **estimatedPlayoutTimestamp**: The estimated playout time of the corresponded synchronization source - * **jitterBufferDelay**: The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity. - * **jitterBufferTargetDelay**: This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. - * **jitterBufferEmittedCount**: The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc) - * **jitterBufferMinimumDelay**: This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it - * **decoderImplementation**: Indicate the name of the decoder implementation library - * **framesDecoded**: The total number of frames decoded on the corresponded RTP stream - * **keyFramesDecoded**: The total number of keyframes decoded on the corresponding RTP stream - * **frameWidth**: The width of the frame of the video sent by the remote source on the corresponding RTP stream - * **frameHeight**: The height of the frame of the video sent by the remote source on the corresponding RTP stream - * **framesPerSecond**: The frame rate of the video sent by the remote source on the corresponding RTP stream - * **qpSum**: The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream - * **totalDecodeTime**: The total time spent on decoding video on the corresponding RTP stream - * **totalInterFrameDelay**: The total interframe delay on the corresponding RTP stream - * **totalSquaredInterFrameDelay**: The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays - * **firCount**: The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream - * **pliCount**: The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream - * **framesReceived**: The total number of frames received on the corresponding RTP stream - * **packetsSent**: Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source - * **bytesSent**: Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source - * **remoteTimestamp**: The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc) - * **reportsSent**: The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to - * **roundTripTime**: Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream - * **totalRoundTripTime**: Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream - * **roundTripTimeMeasurements**: Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream -OutboundAudioTrack - * **ssrc**: The RTP SSRC field - * **trackId**: The id of the track - * **peerConnectionId**: The unique generated identifier of the peer connection the inbound audio track belongs to - * **sfuStreamId**: The id of the SFU stream this track is related to - * **packetsSent**: The total number of packets sent on the corresponded synchronization source - * **bytesSent**: The total number of bytes sent on the corresponded synchronization source - * **rid**: The rid encoding parameter of the corresponded synchronization source - * **headerBytesSent**: Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - * **retransmittedPacketsSent**: Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - * **retransmittedBytesSent**: Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - * **targetBitrate**: Reflects the current encoder target in bits per second. - * **totalEncodedBytesTarget**: The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - * **totalPacketSendDelay**: The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - * **averageRtcpInterval**: The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - * **encoderImplementation**: Indicate the name of the encoder implementation library - * **active**: Indicates whether this RTP stream is configured to be sent or disabled - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **roundTripTime**: RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - * **totalRoundTripTime**: The sum of RTT measurements belongs to the corresponded synchronization source - * **fractionLost**: The receiver reported fractional lost belongs to the corresponded synchronization source - * **roundTripTimeMeasurements**: The total number of calculated RR measurements received on this source - * **relayedSource**: True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - * **audioLevel**: Represents the audio level reported by the media source - * **totalAudioEnergy**: Represents the energy level reported by the media source - * **totalSamplesDuration**: Represents the total duration of the audio samples the media source actually transconverted in seconds - * **echoReturnLoss**: Represents the echo cancellation in decibels corresponded to the media source. - * **echoReturnLossEnhancement**: Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source. - * **droppedSamplesDuration**: The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source - * **droppedSamplesEvents**: A counter increases every time a sample is dropped after a non-dropped sample - * **totalCaptureDelay**: Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source - * **totalSamplesCaptured**: The total number of captured samples reaching the audio source -OutboundVideoTrack - * **ssrc**: The RTP SSRC field - * **trackId**: The id of the track - * **peerConnectionId**: The unique generated identifier of the peer connection the inbound audio track belongs to - * **sfuStreamId**: The id of the SFU stream this track is related to - * **packetsSent**: The total number of packets sent on the corresponded synchronization source - * **bytesSent**: The total number of bytes sent on the corresponded synchronization source - * **rid**: The rid encoding parameter of the corresponded synchronization source - * **headerBytesSent**: Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc) - * **retransmittedPacketsSent**: Total number of retransmitted packets sent over the corresponding synchronization source (ssrc). - * **retransmittedBytesSent**: Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc). - * **targetBitrate**: Reflects the current encoder target in bits per second. - * **totalEncodedBytesTarget**: The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets - * **totalPacketSendDelay**: The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source - * **averageRtcpInterval**: The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc) - * **nackCount**: Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc) - * **encoderImplementation**: Indicate the name of the encoder implementation library - * **active**: Indicates whether this RTP stream is configured to be sent or disabled - * **frameWidth**: The frame width in pixels of the frames targeted by the media encoder - * **frameHeight**: The frame height in pixels of the frames targeted by the media encoder - * **framesPerSecond**: The encoded number of frames in the last second on the corresponding media source - * **framesSent**: The total number of frames sent on the corresponding RTP stream - * **hugeFramesSent**: The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream - * **framesEncoded**: The total number of frames encoded by the media source - * **keyFramesEncoded**: The total number of keyframes encoded on the corresponding RTP stream - * **qpSum**: The sum of the QP the media encoder provided on the corresponding RTP stream. - * **totalEncodeTime**: The total time in seconds spent in encoding media frames for the corresponding RTP stream. - * **qualityLimitationDurationNone**: Time elapsed in seconds when the RTC connection has not limited the quality - * **qualityLimitationDurationCPU**: Time elapsed in seconds the RTC connection had a limitation because of CPU - * **qualityLimitationDurationBandwidth**: Time elapsed in seconds the RTC connection had a limitation because of Bandwidth - * **qualityLimitationDurationOther**: Time elapsed in seconds the RTC connection had a limitation because of Other factor - * **qualityLimitationReason**: Indicate a reason for the quality limitation of the corresponded synchronization source - * **qualityLimitationResolutionChanges**: The total number of resolution changes occurred on the corresponded RTP stream due to quality changes - * **firCount**: The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream - * **pliCount**: The total number of Picture Loss Indication sent on the corresponded RTP stream - * **packetsReceived**: The total number of packets received on the corresponded synchronization source - * **packetsLost**: The total number of bytes received on the corresponded synchronization source - * **jitter**: The corresponded synchronization source reported jitter - * **roundTripTime**: RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source - * **totalRoundTripTime**: The sum of RTT measurements belongs to the corresponded synchronization source - * **fractionLost**: The receiver reported fractional lost belongs to the corresponded synchronization source - * **roundTripTimeMeasurements**: The total number of calculated RR measurements received on this source - * **framesDropped**: The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream - * **relayedSource**: True if the corresponded media source is remote, false otherwise (or null depending on browser and version) - * **width**: The width, in pixels, of the last frame originating from the media source - * **height**: The height, in pixels, of the last frame originating from the media source - * **frames**: The total number of frames originated from the media source -IceLocalCandidate - * **peerConnectionId**: Refers to the peer connection the local candidate belongs to - * **id**: The unique identifier of the local candidate - * **address**: The address of the local endpoint (Ipv4, Ipv6, FQDN) - * **port**: The port number of the local endpoint the ICE uses - * **protocol**: The protocol for the ICE (Possible values are: tcp,
udp) - * **candidateType**: The type of the local candidate - * **priority**: The priority of the local candidate - * **url**: The url of the ICE server - * **relayProtocol**: The relay protocol the local candidate uses (Possible values are: tcp,
udp,
tls) -IceRemoteCandidate - * **peerConnectionId**: Refers to the peer connection the local candidate belongs to - * **id**: The unique identifier of the local candidate - * **address**: The address of the local endpoint (Ipv4, Ipv6, FQDN) - * **port**: The port number of the local endpoint the ICE uses - * **protocol**: The protocol for the ICE (Possible values are: tcp,
udp) - * **candidateType**: The type of the local candidate - * **priority**: The priority of the local candidate - * **url**: The url of the ICE server - * **relayProtocol**: The relay protocol the local candidate uses (Possible values are: tcp,
udp,
tls) ClientSample - * **clientId**: Unique id of the client providing samples. Must be a valid UUID. + * **clientId**: Unique id of the client providing samples. * **timestamp**: The timestamp the sample is created in GMT - * **callId**: If provided, the server uses the given id to match clients in the same call. Must be a valid UUID. - * **sampleSeq**: The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented. - * **roomId**: The WebRTC app configured room id the client joined for the call. - * **userId**: The WebRTC app configured human-readable user id the client is joined. - * **engine**: WebRTC App provided information related to the engine the client uses. - * **platform**: WebRTC App provided information related to the platform the client uses. - * **browser**: WebRTC App provided information related to the browser the client uses. - * **os**: WebRTC App provided information related to the operating system the client uses. - * **mediaConstraints**: The WebRTC app provided list of the media constraints the client has. - * **mediaDevices**: The WebRTC app provided list of the media devices the client has. - * **userMediaErrors**: The WebRTC app provided list of user media errors the client has. + * **callId**: the unique identifier of the call or session + * **appData**: Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...) + * **peerConnections**: Samples taken PeerConnections + * **clientEvents**: A list of additional client events. + * **clientMetaItems**: A list of additional client events. * **extensionStats**: The WebRTC app provided custom stats payload - * **customCallEvents**: User provided custom call events - * **customObserverEvents**: User provided custom observer events - * **iceServers**: The WebRTC app provided list of ICE servers the client used. - * **localSDPs**: The local part of the Signal Description Protocol to establish connections - * **dataChannels**: Measurements about the data channels currently available on peer connections - * **pcTransports**: Transport stats of Peer Connection - * **iceCandidatePairs**: Candidate pair stats - * **mediaSources**: WebRTC App provided information related to the operation system the client uses. - * **codecs**: List of codec the client has - * **certificates**: List of certificates the client provided - * **inboundAudioTracks**: List of compound measurements related to inbound audio tracks - * **inboundVideoTracks**: List of compound measurements related to inbound video tracks - * **outboundAudioTracks**: List of compound measurements related to outbound audio tracks - * **outboundVideoTracks**: List of compound measurements related to outbound video tracks - * **iceLocalCandidates**: List of local ICE candidates - * **iceRemoteCandidates**: List of remote ICE candidates - * **timeZoneOffsetInHours**: The offset from GMT in hours - * **marker**: Special marker for the samples +Controls + * **close**: Indicate that the server should close the connection + * **accessClaim**: Holds a new claim to process CustomSfuEvent * **name**: the name of the event used as identifier. (e.g.: CLIENT_REJOINED, etc..) * **value**: the value of the event @@ -1087,6 +502,5 @@ TurnSample * **sessions**: Session data Samples * **controls**: Additional control flags indicate various operation has to be performed - * **clientSamples**: Samples taken from the client * **sfuSamples**: Samples taken from an Sfu * **turnSamples**: Samples taken from the TURN server \ No newline at end of file diff --git a/sources/reports/call-event-report.avsc b/sources/reports/call-event-report.avsc deleted file mode 100644 index 91b75168..00000000 --- a/sources/reports/call-event-report.avsc +++ /dev/null @@ -1,97 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "CallEventReport", - "namespace" : "org.observertc.schemas.reports.reports", - "doc" : "Observer created reports related to events (call started, call ended, client joined, etc...) indicated by the incoming samples.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Event helper field to identify source */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : ["null", "string"], - "default": null - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "mediaTrackId", - "doc": "The unique identifier of the media track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "SSRC", - "doc": "The SSRC identifier of the RTP stream a trackId belongs to", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sampleTimestamp", - "doc": "The timestamp of the sample the event related to", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the event may related to", - "type" : [ "null", "int" ], - "default" : null - }, - /* Event Report Fields */ - { - "name" : "name", - "doc": "The name of the event. Possible values are: CALL_STARTED, CALL_ENDED, CLIENT_JOINED, CLIENT_LEFT, PEER_CONNECTION_OPENED, PEER_CONNECTION_CLOSED, MEDIA_TRACK_ADDED, MEDIA_TRACK_REMOVED", - "type" : "string" - }, { - "name" : "message", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "value", - "doc": "the value of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "attachments", - "doc": "attachment the event may created with", - "type" : [ "null", "string" ], - "default" : null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/call-meta-report.avsc b/sources/reports/call-meta-report.avsc deleted file mode 100644 index a5e0a699..00000000 --- a/sources/reports/call-meta-report.avsc +++ /dev/null @@ -1,78 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "CallMetaReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "Metadata belongs to a call and can be useful", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Event helper field to identify source */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : ["null", "string"], - "default": null - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sampleTimestamp", - "doc": "The timestamp of the sample the event related to", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the event may related to", - "type" : [ "null", "int" ], - "default" : null - }, - /* Arbitrary data belongs to */ - { - "name" : "type", - "doc": "The type of the meta data. Possible values are: OPERATION_SYSTEM, ENGINE, PLATFORM, BROWSER, CERTIFICATE, CODEC, ICE_LOCAL_CANDIDATE, ICE_REMOTE_CANDIDATE, ICE_SERVER, MEDIA_CONSTRAINT, MEDIA_DEVICE, MEDIA_SOURCE, USER_MEDIA_ERROR, LOCAL_SDP", - "type" : ["null", "string"], - "default": null - }, { - "name" : "payload", - "doc": "The payload for the metadata reported for the peeer connection", - "type" : ["null", "string"], - "default": null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/client-data-channel-report.avsc b/sources/reports/client-data-channel-report.avsc deleted file mode 100644 index e298d4d1..00000000 --- a/sources/reports/client-data-channel-report.avsc +++ /dev/null @@ -1,101 +0,0 @@ -/* @revision: 2 */ -{ - "type" : "record", - "name" : "ClientDataChannelReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for PeerConnection Data Channel.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "peerConnectionLabel", - "doc": "The webrtc app provided label for the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Report Feilds */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Data Channel stats */ - { - "name" : "label", - "doc": "The label of the data channel", - "type" : ["null", "string"], - "default": null - }, { - "name" : "protocol", - "doc": "The protocol used for the data channel", - "type" : ["null", "string"], - "default": null - }, { - "name" : "state", - "doc": "The state of the data channel", - "type" : ["null", "string"], - "default": null - }, { - "name" : "messagesSent", - "doc": "Represents the total number of API message events sent", - "type" : ["null", "int"], - "default": null - }, { - "name" : "bytesSent", - "doc": "Represents the total number of payload bytes sent on the corresponded data channel", - "type" : ["null", "long"], - "default": null - }, { - "name" : "messagesReceived", - "doc": "Represents the total number of API message events received on the corresponded data channel", - "type" : ["null", "int"], - "default": null - }, { - "name" : "bytesReceived", - "doc": "Represents the total number of payload bytes received on the corresponded data channel", - "type" : ["null", "long"], - "default": null - } - /* Observer calculated values */ - ] -} \ No newline at end of file diff --git a/sources/reports/client-extension-report.avsc b/sources/reports/client-extension-report.avsc deleted file mode 100644 index 181edc54..00000000 --- a/sources/reports/client-extension-report.avsc +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type" : "record", - "name" : "ClientExtensionReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Extended provided arbitrary data.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Event helper field to identify source */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : ["null", "string"], - "default": null - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the event may related to", - "type" : [ "null", "int" ], - "default" : null - }, - /* Event Report Fields */ - { - "name" : "extensionType", - "doc": "The name of the event", - "type" : "string" - }, { - "name" : "payload", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - } -]} \ No newline at end of file diff --git a/sources/reports/ice-candidate-pair-report.avsc b/sources/reports/ice-candidate-pair-report.avsc deleted file mode 100644 index 3696ccb4..00000000 --- a/sources/reports/ice-candidate-pair-report.avsc +++ /dev/null @@ -1,181 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "IceCandidatePairReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for ICE candidate pairs", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is marked with", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* ICE Candidate Pair */ - { - "name": "candidatePairId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default": null - }, - { - "name" : "transportId", - "doc": "The identifier of the transport the ice candidate pair is negotiated on", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "localCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected at local side", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected at remote side", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "state", - "doc": "The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponded transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "nominated", - "doc": "indicate if the ice candidate pair is nominated or not", - "type" : [ "null", "boolean" ], - "default" : null - }, { - "name" : "packetsSent", - "doc": "The total number of packets sent using the last selected candidate pair over the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "packetsReceived", - "doc": "The total number of packets received using the last selected candidate pair over the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "bytesSent", - "doc": "The total number of bytes sent using the last selected candidate pair over the corresponded transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "bytesReceived", - "doc": "The total number of bytes received using the last selected candidate pair over the corresponded transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "lastPacketSentTimestamp", - "doc": "Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms)", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponded transport (UTC Epoch in ms)", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "totalRoundTripTime", - "doc": "Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponded transport", - "type" : [ "null", "double" ], - "default" : null - }, { - "name" : "currentRoundTripTime", - "doc": "Represents the last round trip time measurements in seconds based on STUN connectivity check over the corresponded transport", - "type" : [ "null", "double" ], - "default" : null - }, { - "name" : "availableOutgoingBitrate", - "doc": "The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponded transport", - "type" : [ "null", "double" ], - "default" : null - }, { - "name" : "availableIncomingBitrate", - "doc": "The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponded transport", - "type" : [ "null", "double" ], - "default" : null - }, { - "name" : "requestsReceived", - "doc": "Represents the total number of connectivity check requests received on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "requestsSent", - "doc": "Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "responsesReceived", - "doc": "Represents the total number of connectivity check responses received on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "responsesSent", - "doc": "Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "consentRequestsSent", - "doc": "Represents the total number of consent requests sent on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "packetsDiscardedOnSend", - "doc": "Total amount of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "bytesDiscardedOnSend", - "doc": "Total amount of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponded transport", - "type" : [ "null", "long" ], - "default" : null - } - ] -} \ No newline at end of file diff --git a/sources/reports/inbound-audio-track-report.avsc b/sources/reports/inbound-audio-track-report.avsc deleted file mode 100644 index b71ca0f0..00000000 --- a/sources/reports/inbound-audio-track-report.avsc +++ /dev/null @@ -1,299 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "InboundAudioTrackReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Inbound Audio Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements", - "fields" : [ - /* WebRTC App Resource Identifiers */ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is labeled with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "trackId", - "doc": "The id of the track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuStreamId", - "doc": "The id of the Sfu stream the media from", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuSinkId", - "doc": "The id of the sink the Sfu streamed the media out", - "type" : [ "null", "string" ], - "default" : null - }, - - /* Remote Identifier */ - { - "name" : "remoteTrackId", - "doc": "The id of the remote track this inbound track is originated from", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteUserId", - "doc": "The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteClientId", - "doc": "The observer matched remote client Id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remotePeerConnectionId", - "doc": "The observer matched remote Peer Connection Id", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Inbound RTP Audio specific fields */ - { - "name" : "ssrc", - "doc": "The RTP SSRC field", - "type" : "long" - }, { - "name" : "packetsReceived", - "doc" : "The total number of packets received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc" : "The total number of bytes received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitter", - "doc" : "The corresponded synchronization source reported jitter", - "type" : ["null", "double"], - "default" : null - }, - /* Inbound Audio Track Sample related fields */ - { - "name" : "lastPacketReceivedTimestamp", - "doc" : "Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "headerBytesReceived", - "doc" : "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "packetsDiscarded", - "doc" : "The total number of packets missed the playout point and therefore discarded by the jitterbuffer", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsReceived", - "doc" : "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsDiscarded", - "doc" : "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesReceived", - "doc" : "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "nackCount", - "doc" : "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "totalProcessingDelay", - "doc" : "The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "estimatedPlayoutTimestamp", - "doc" : "The estimated playout time of the corresponded synchronization source", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "jitterBufferDelay", - "doc" : "The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "jitterBufferTargetDelay", - "doc" : "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. ", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "jitterBufferEmittedCount", - "doc" : "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitterBufferMinimumDelay", - "doc" : "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type" : ["null", "double"], - "default" : null - }, - /* Audio specific fields */ - { - "name" : "totalSamplesReceived", - "doc" : "The total number of audio samples received on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "concealedSamples", - "doc" : "The total number of samples decoded by the media decoder from the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "silentConcealedSamples", - "doc" : "The total number of samples concealed from the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "concealmentEvents", - "doc" : "The total number of concealed event emitted to the media codec by the corresponded jitterbuffer", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "insertedSamplesForDeceleration", - "doc" : "The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "removedSamplesForAcceleration", - "doc" : "The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "audioLevel", - "doc" : "The current audio level", - "type" : ["null", "double"], - "default" : null - },{ - "name" : "totalAudioEnergy", - "doc" : "Represents the energy level reported by the media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalSamplesDuration", - "doc" : "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "decoderImplementation", - "doc" : "Indicate the name of the decoder implementation library", - "type" : ["null", "string"], - "default" : null - }, - { - "name" : "packetsSent", - "doc" : "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc" : "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "remoteTimestamp", - "doc" : "The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "reportsSent", - "doc" : "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "roundTripTime", - "doc" : "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalRoundTripTime", - "doc" : " Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTimeMeasurements", - "doc" : "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "synthesizedSamplesDuration", - "doc" : "This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "synthesizedSamplesEvents", - "doc" : "The number of synthesized samples events.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "totalPlayoutDelay", - "doc" : " The playout delay includes the delay from being emitted to the actual time of playout on the device", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalSamplesCount", - "doc" : "When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout", - "type" : ["null", "int"], - "default" : null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/inbound-video-track-report.avsc b/sources/reports/inbound-video-track-report.avsc deleted file mode 100644 index 4c776a72..00000000 --- a/sources/reports/inbound-video-track-report.avsc +++ /dev/null @@ -1,296 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "InboundVideoTrackReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Inbound Video Tracks. A combination of Codec metadata carrying inbound and remote outbound RTP stats measurements", - "fields" : [ - /* WebRTC App Resource Identifiers */ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is labeled with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "trackId", - "doc": "The id of the track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuStreamId", - "doc": "The id of the Sfu stream the media from", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuSinkId", - "doc": "The id of the sink the Sfu streamed the media out", - "type" : [ "null", "string" ], - "default" : null - }, - /* Remote Identifier */ - { - "name" : "remoteTrackId", - "doc": "The id of the remote track this inbound track is originated from", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteUserId", - "doc": "The webrtc app provided user id the track belongs to, or if the webrtc app did not provided the observer tried to match it", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteClientId", - "doc": "The observer matched remote client Id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remotePeerConnectionId", - "doc": "The observer matched remote Peer Connection Id", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Inbound Video Track Sample Fields */ - { - "name" : "ssrc", - "doc": "The RTP SSRC field", - "type" : "long" - }, { - "name" : "packetsReceived", - "doc" : "The total number of packets received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc" : "The total number of bytes received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitter", - "doc" : "The corresponded synchronization source reported jitter", - "type" : ["null", "double"], - "default" : null - }, - { - "name" : "framesDropped", - "doc" : "The number of frames dropped prior to decode or missing chunks", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "lastPacketReceivedTimestamp", - "doc" : "Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "headerBytesReceived", - "doc" : "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "packetsDiscarded", - "doc" : "The total number of packets missed the playout point and therefore discarded by the jitterbuffer", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsReceived", - "doc" : "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsDiscarded", - "doc" : "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesReceived", - "doc" : "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "nackCount", - "doc" : "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "totalProcessingDelay", - "doc" : "The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "estimatedPlayoutTimestamp", - "doc" : "The estimated playout time of the corresponded synchronization source", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "jitterBufferDelay", - "doc" : "The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "jitterBufferTargetDelay", - "doc" : "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. ", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "jitterBufferEmittedCount", - "doc" : "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitterBufferMinimumDelay", - "doc" : "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "decoderImplementation", - "doc" : "Indicate the name of the decoder implementation library", - "type" : ["null", "string"], - "default" : null - }, - { - "name" : "framesDecoded", - "doc" : "The total number of frames decoded on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "keyFramesDecoded", - "doc" : "The total number of keyframes decoded on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "frameWidth", - "doc" : "The width of the frame of the video sent by the remote source on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "frameHeight", - "doc" : "The height of the frame of the video sent by the remote source on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesPerSecond", - "doc" : "The frame per seconds of the video sent by the remote source on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qpSum", - "doc" : "The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponded RTP stream", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "totalDecodeTime", - "doc" : "The total tiem spent on decoding video on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalInterFrameDelay", - "doc" : "The total interframe delay", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalSquaredInterFrameDelay", - "doc" : "The total number of inter frame delay squere on the corresponded synchronization source (ssrc) Useful for variance calculation for interframe delays", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "firCount", - "doc" : "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "pliCount", - "doc" : "The total number of Picture Loss Indication sent on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesReceived", - "doc" : "The total number of frames received on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "packetsSent", - "doc" : "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc" : "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "remoteTimestamp", - "doc" : "The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "reportsSent", - "doc" : "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "roundTripTime", - "doc" : "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalRoundTripTime", - "doc" : " Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTimeMeasurements", - "doc" : "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - } - /* Observer calculated values */ -]} diff --git a/sources/reports/observer-event-report.avsc b/sources/reports/observer-event-report.avsc deleted file mode 100644 index 3f2e03e9..00000000 --- a/sources/reports/observer-event-report.avsc +++ /dev/null @@ -1,86 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "ObserverEventReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A report created for observer generated events", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Event helper field to identify source */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sampleTimestamp", - "doc": "The timestamp of the sample the event related to", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the event may related to", - "type" : [ "null", "int" ], - "default" : null - }, - /* Event Report Fields */ - { - "name" : "name", - "doc": "The name of the event", - "type" : "string" - }, { - "name" : "message", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "value", - "doc": "the value of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "attachments", - "doc": "attachment the event may created with", - "type" : [ "null", "string" ], - "default" : null - } - ] -} \ No newline at end of file diff --git a/sources/reports/outbound-audio-track-report.avsc b/sources/reports/outbound-audio-track-report.avsc deleted file mode 100644 index d8bca63d..00000000 --- a/sources/reports/outbound-audio-track-report.avsc +++ /dev/null @@ -1,233 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "OutboundAudioTrackReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Outbound Audio Tracks. A combination of Audio source, Codec metadata carrying outbound and remote inbound RTP stat measurements", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is labeled with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "trackId", - "doc": "The id of the track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuStreamId", - "doc": "The id of the Sfu stream corresponds to the outbound track", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Outbound Avudio Track Sample Fields */ - { - "name" : "ssrc", - "doc": "The RTP SSRC field", - "type" : "long" - }, { - "name" : "packetsSent", - "doc" : "The total number of packets sent on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc" : "The total number of bytes sent on the corresponded synchronization source", - "type" : ["null", "long"], - "default" : null - }, - { - "name" : "rid", - "doc" : " The rid encoding parameter of the corresponded synchronization source", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "headerBytesSent", - "doc" : "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "retransmittedPacketsSent", - "doc" : "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "retransmittedBytesSent", - "doc" : "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "targetBitrate", - "doc" : "Reflects the current encoder target in bits per second.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "totalEncodedBytesTarget", - "doc" : "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "totalPacketSendDelay", - "doc" : "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "averageRtcpInterval", - "doc" : "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "nackCount", - "doc" : "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "encoderImplementation", - "doc" : "Indicate the name of the encoder implementation library", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "active", - "doc" : "Indicates whether this RTP stream is configured to be sent or disabled", - "type" : ["null", "boolean"], - "default" : null - }, - { - "name" : "packetsReceived", - "doc" : "The total number of packets received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc" : "The total number of bytes received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitter", - "doc" : "The corresponded synchronization source reported jitter", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTime", - "doc" : "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalRoundTripTime", - "doc" : "The sum of RTT measurements belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "fractionLost", - "doc" : "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTimeMeasurements", - "doc" : "The total number of calculated RR measurements received on this source", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "relayedSource", - "doc" : "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type" : ["null", "boolean"], - "default" : null - }, - { - "name" : "audioLevel", - "doc" : "Represents the audio level reported by the media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalAudioEnergy", - "doc" : "Represents the energy level reported by the media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalSamplesDuration", - "doc" : "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "echoReturnLoss", - "doc" : "Represents the echo cancellation in decibels corresponded to the media source.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "echoReturnLossEnhancement", - "doc" : "Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is catched from the emdia source.", - "type" : ["null", "double"], - "default" : null - }, { - "name": "droppedSamplesDuration", - "type": ["null", "double"], - "doc": ". The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source", - "default": null - }, { - "name": "droppedSamplesEvents", - "type": ["null", "int"], - "doc": "A counter increases every time a sample is dropped after a non-dropped sample", - "default": null - }, { - "name": "totalCaptureDelay", - "type": ["null", "double"], - "doc": "Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source", - "default": null - }, { - "name": "totalSamplesCaptured", - "type": ["null", "double"], - "doc": "The total number of captured samples reaching the audio source", - "default": null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/outbound-video-track-report.avsc b/sources/reports/outbound-video-track-report.avsc deleted file mode 100644 index 9d3b30e6..00000000 --- a/sources/reports/outbound-video-track-report.avsc +++ /dev/null @@ -1,295 +0,0 @@ -/* @revision: 2 */ -{ - "type" : "record", - "name" : "OutboundVideoTrackReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Outbound Video Tracks. A combination of Video source, Codec metadata carrying outbound and remote inbound RTP stat measurements", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is labeled with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "trackId", - "doc": "The id of the track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuStreamId", - "doc": "The id of the Sfu stream corresponds to the outbound track", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Outbound Video Track Sample Fields */ - { - "name" : "ssrc", - "doc": "The RTP SSRC field", - "type" : "long" - }, { - "name" : "packetsSent", - "doc" : "The total number of packets sent on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc" : "The total number of bytes sent on the corresponded synchronization source", - "type" : ["null", "long"], - "default" : null - }, - { - "name" : "rid", - "doc" : " The rid encoding parameter of the corresponded synchronization source", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "headerBytesSent", - "doc" : "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "retransmittedPacketsSent", - "doc" : "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "retransmittedBytesSent", - "doc" : "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "targetBitrate", - "doc" : "Reflects the current encoder target in bits per second.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "totalEncodedBytesTarget", - "doc" : "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type" : ["null", "long"], - "default" : null - },{ - "name" : "totalPacketSendDelay", - "doc" : "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "averageRtcpInterval", - "doc" : "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "nackCount", - "doc" : "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "encoderImplementation", - "doc" : "Indicate the name of the encoder implementation library", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "active", - "doc" : "Indicates whether this RTP stream is configured to be sent or disabled", - "type" : ["null", "boolean"], - "default" : null - }, - { - "name" : "frameWidth", - "doc" : "The frame width in pixels of the frames targeted by the media encoder", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "frameHeight", - "doc" : "The frame width the media encoder targeted", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesPerSecond", - "doc" : "The encoded number of frames in the last second on the corresponded media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "framesSent", - "doc" : "TThe total number of frames sent on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "hugeFramesSent", - "doc" : "The total number of huge frames (avgFrameSize * 2.5) on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesEncoded", - "doc" : "The total number of frames encoded by the media source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "keyFramesEncoded", - "doc" : "The total number of keyframes encoded on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "qpSum", - "doc" : "The sum of the QP the media encoder provided on the corresponded RTP stream.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "totalEncodeTime", - "doc" : "The total time in seconds spent in encoding media frames for the corresponded RTP stream.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qualityLimitationDurationNone", - "doc" : "Time elapsed in seconds when the RTC connection has not limited the quality", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qualityLimitationDurationCPU", - "doc" : "Time elapsed in seconds the RTC connection had a limitation because of CPU", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qualityLimitationDurationBandwidth", - "doc" : "Time elapsed in seconds the RTC connection had a limitation because of Bandwidth", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qualityLimitationDurationOther", - "doc" : "Time elapsed in seconds the RTC connection had a limitation because of Other factor", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "qualityLimitationReason", - "doc" : "Indicate a reason for the quality limitation of the corresponded synchronization source", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "qualityLimitationResolutionChanges", - "doc" : "The total number of resolution changes occured ont he corresponded RTP stream due to quality changes", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "firCount", - "doc" : "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "pliCount", - "doc" : "The total number of Picture Loss Indication sent on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "packetsReceived", - "doc" : "The total number of packets received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc" : "The total number of bytes received on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "jitter", - "doc" : "The corresponded synchronization source reported jitter", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTime", - "doc" : "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalRoundTripTime", - "doc" : "The sum of RTT measurements belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "fractionLost", - "doc" : "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTimeMeasurements", - "doc" : "The total number of calculated RR measurements received on this source", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "framesDropped", - "doc" : "The total number of frames reported to be lost by the remote endpoit on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, - { - "name" : "relayedSource", - "doc" : "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type" : ["null", "boolean"], - "default" : null - }, - { - "name" : "width", - "doc" : "The width, in pixels, of the last frame originating from the media source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "height", - "doc" : "The height, in pixels, of the last frame originating from the media source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "frames", - "doc" : "The total number of frames originated from the media source", - "type" : ["null", "int"], - "default" : null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/peer-connection-transport-report.avsc b/sources/reports/peer-connection-transport-report.avsc deleted file mode 100644 index 433eaccf..00000000 --- a/sources/reports/peer-connection-transport-report.avsc +++ /dev/null @@ -1,154 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "PeerConnectionTransportReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Client PeerConnection Transport.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name": "transportId", - "doc": "The identifier of the transport the ICE candidate pair is negotiated on", - "type": "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is marked with", - "type" : [ "null", "string" ], - "default" : null - }, - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, - /* Transport stats */ - { - "name" : "packetsSent", - "doc": "Represents the total number of packets sent on the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "packetsReceived", - "doc": "Represents the total number of packets received on the corresponded transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "bytesSent", - "doc": "Represents the total amount of bytes sent on the corresponded transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "bytesReceived", - "doc": "Represents the total amount of bytes received on the corresponded transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "iceRole", - "doc": "Represent the current role of ICE under DTLS Transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "iceLocalUsernameFragment", - "doc": "Represent the current local username fragment used in message validation procedures for ICE under DTLS Transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "dtlsState", - "doc": "Represents the current state of DTLS for the peer connection transport layer", - "type" : [ "null", "string" ], - "default" : null - }, { - "name": "dtlsRole", - "doc": "The role this host plays in DTLS negotiations", - "type": ["null", "string"], - "default": null - }, { - "name" : "selectedCandidatePairId", - "doc": "The identifier of the candidate pair the transport currently uses", - "type" : [ "null", "string" ], - "default" : null -}, { - "name" : "iceState", - "doc": "Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer", - "type" : [ "null", "string" ], - "default" : null -}, { - "name" : "localCertificateId", - "doc": "If DTLS negotiated it gives the id of the local certificate", - "type" : [ "null", "string" ], - "default" : null -}, { - "name" : "remoteCertificateId", - "doc": "If DTLS negotiated it gives the id of the remote certificate", - "type" : [ "null", "string" ], - "default" : null -}, { - "name" : "tlsVersion", - "doc": "Represents the version number of the TLS used in the corresponded transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "dtlsCipher", - "doc": "Represents the name of the DTLS cipher used in the corresponded transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "srtpCipher", - "doc": "Represents the name of the SRTP cipher used in the corresponded transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "tlsGroup", - "doc": "Represents the name of the IANA TLS Supported Groups used in the corresponded transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "selectedCandidatePairChanges", - "doc": "The total number of candidate pair changes over the peer connection", - "type" : [ "null", "int" ], - "default" : null - } - ] -} \ No newline at end of file diff --git a/sources/reports/report.avsc b/sources/reports/report.avsc deleted file mode 100644 index 03700d1e..00000000 --- a/sources/reports/report.avsc +++ /dev/null @@ -1,25 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "Report", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A multiplexed Report object wraps an encoded report in bytes format", - "fields" : [ - { - "name": "type", - "doc": "The type of the report", - "type": "string" - }, - { - "name" : "schemaVersion", - "doc": "The version of the schema the payload holds", - "type" : ["null", "string"], - "default": null - }, - { - "name" : "payload", - "doc": "The payload of contans the actual report", - "type": "bytes" - /* "type" : ["@include-chunk call-event-report", "@include-chunk call-meta-report"] */ - } -]} \ No newline at end of file diff --git a/sources/reports/sfu-event-report.avsc b/sources/reports/sfu-event-report.avsc deleted file mode 100644 index 1921dc02..00000000 --- a/sources/reports/sfu-event-report.avsc +++ /dev/null @@ -1,88 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SfuEventReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "Events happened in calls.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Helper field to identify source */ - - { - "name" : "sfuId", - "doc": "The generated unique identifier of the SFU", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "callId", - "doc": "The callId the event belongs to", - "type" : ["null", "string"], - "default": null - }, { - "name" : "transportId", - "doc": "SFU provided transport identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "mediaStreamId", - "doc": "Unique identifier of the SFU stream id the rtp pad belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "mediaSinkId", - "doc": "Unique identifier of the SFU stream id the rtp pad belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sctpStreamId", - "doc": "Unique identifier of the SCTP stream the event is related to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "rtpPadId", - "doc": "Unique identifier of the Sfu Pad the event is related to", - "type" : [ "null", "string" ], - "default" : null - }, - /* Report Fields */ - { - "name" : "name", - "doc": "The name of the event. Possible values are: SFU_JOINED, SFU_LEFT, SFU_TRANSPORT_OPENED, SFU_TRANSPORT_CLOSED, SFU_RTP_STREAM_ADDED, SFU_RTP_STREAM_REMOVED", - "type" : "string" - }, { - "name" : "message", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "value", - "doc": "the value of the event", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "attachments", - "doc": "attachment the event may created with", - "type" : [ "null", "string" ], - "default" : null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/sfu-extension-report.avsc b/sources/reports/sfu-extension-report.avsc deleted file mode 100644 index e8fbee4d..00000000 --- a/sources/reports/sfu-extension-report.avsc +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type" : "record", - "name" : "SfuExtensionReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for Extended provided arbitrary data.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Helper field to identify source */ - { - "name" : "sfuId", - "doc": "The generated unique identifier of the SFU", - "type" : [ "null", "string" ], - "default" : null - }, - /* Event Report Fields */ - { - "name" : "extensionType", - "doc": "The name of the event", - "type" : "string" - }, { - "name" : "payload", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - } -]} \ No newline at end of file diff --git a/sources/reports/sfu-inbound-rtp-pad-report.avsc b/sources/reports/sfu-inbound-rtp-pad-report.avsc deleted file mode 100644 index 263e02c8..00000000 --- a/sources/reports/sfu-inbound-rtp-pad-report.avsc +++ /dev/null @@ -1,254 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SfuInboundRtpPadReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for RTP streams going through the SFU", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "sfuId", - "doc": "The provided unique identifier of the SFU", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "internal", - "doc": "Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs", - "type" : [ "null", "boolean" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Remote Identifier */ - { - "name" : "remoteSfuId", - "doc": "only added if it is internal. The id of the remote Sfu that outbound rtp pad matched with this internal inbound rtp pad", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteTransportId", - "doc": "only added if it is internal. The id of the remote transportId that outbound rtp pad matched with this internal inbound rtp pad", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteSinkId", - "doc": "only added if it is internal. The id of the remote sinkId that outbound rtp pad matched with this internal inbound rtp pad", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteRtpPadId", - "doc": "only added if it is internal. The id of the remote outbound rtp pad matched with this internal inbound rtp pad", - "type" : [ "null", "string" ], - "default" : null - }, - /* Report Fields */ - { - "name" : "transportId", - "doc": "The id of the transport the RTP stream uses.", - "type" : "string" - }, { - "name" : "sfuStreamId", - "doc": "Unique identifier of the Sfu stream the event is related to", - "type" : "string" - }, { - "name" : "rtpPadId", - "doc": "The id of RTP pad.", - "type" : "string" - }, { - "name" : "ssrc", - "doc": "The synchronization source id of the RTP stream", - "type" : "long" - }, { - "name" : "trackId", - "doc": "The id of the track the RTP stream related to at the client side", - "type" : ["null", "string"], - "default": null - }, { - "name" : "clientId", - "doc": "If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to", - "type" : ["null", "string"], - "default": null - }, { - "name" : "callId", - "doc": "The callId the event belongs to", - "type" : ["null", "string"], - "default": null - }, - /* RTP stats */ - { - "name" : "mediaType", - "doc": "the type of the media the stream carries (\"audio\" or \"video\")", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "payloadType", - "doc": "The payload type field of the RTP header", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "mimeType", - "doc": "The negotiated mimeType in the SDP", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "clockRate", - "doc": "The clock rate of the media source the RTP header carries", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "sdpFmtpLine", - "doc": "The actual SDP line from the negotiation related to this RTP stream", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "rid", - "doc": " The rid parameter of the corresponded RTP stream", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "rtxSsrc", - "doc": "If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. ", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "targetBitrate", - "doc": "he bitrate the corresponded stream targets.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "voiceActivityFlag", - "doc": "The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through", - "type" : ["null", "boolean"], - "default" : null - }, { - "name" : "firCount", - "doc": "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "pliCount", - "doc": "The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "nackCount", - "doc": "The total number of negative acknowledgement received on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "sliCount", - "doc": "The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc": "The total number of packets lost on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsReceived", - "doc": "The total number of packets received on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsDiscarded", - "doc": "The total number of discarded packets on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsRepaired", - "doc": "The total number of packets repaired by either retransmission or FEC on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsFailedDecryption", - "doc": "The total number of packets failed to be decrypted on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsDuplicated", - "doc": "The total number of duplicated packets appeared on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsReceived", - "doc": "The total number of FEC packets received on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsDiscarded", - "doc": "The total number of FEC packets discarded on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesReceived", - "doc": "The total amount of payload bytes received on the corresponded RTP stream.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "rtcpSrReceived", - "doc": "The total number of SR reports received by the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtcpRrSent", - "doc": "The total number of RR reports sent on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtxPacketsReceived", - "doc": "If rtx packets are sent or received on the same stream then this number indicates how may has been sent", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtxPacketsDiscarded", - "doc": "If rtx packets are received on the same stream then this number indicates how may has been discarded", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesReceived", - "doc": "The number of frames received on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesDecoded", - "doc": "Indicate the number of frames the Sfu has been decoded", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "keyFramesDecoded", - "doc": "Indicate the number of keyframes the Sfu has been decoded", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fractionLost", - "doc": "The calculated fractionLost of the stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "jitter", - "doc": "The calculated jitter of the stream", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "roundTripTime", - "doc": "The calculated RTT of the stream", - "type" : ["null", "double"], - "default" : null - } -] -} \ No newline at end of file diff --git a/sources/reports/sfu-meta-report.avsc b/sources/reports/sfu-meta-report.avsc deleted file mode 100644 index ba81ec48..00000000 --- a/sources/reports/sfu-meta-report.avsc +++ /dev/null @@ -1,78 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SfuMetaReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "Metadata belongs to SFUs", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Event helper field to identify source */ - { - "name" : "sfuId", - "doc": "The generated unique identifier of the SFU", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "callId", - "doc": "The callId the event belongs to", - "type" : ["null", "string"], - "default": null - }, { - "name" : "transportId", - "doc": "SFU provided transport identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "mediaStreamId", - "doc": "Unique identifier of the SFU stream id the rtp pad belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "mediaSinkId", - "doc": "Unique identifier of the SFU stream id the rtp pad belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sctpStreamId", - "doc": "Unique identifier of the SCTP stream the event is related to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "rtpPadId", - "doc": "Unique identifier of the Sfu Pad the event is related to", - "type" : [ "null", "string" ], - "default" : null - }, - /* Arbitrary data belongs to */ - { - "name" : "type", - "doc": "The type of the meta data reported for the peer connection", - "type" : ["null", "string"], - "default": null - }, { - "name" : "payload", - "doc": "The payload for the metadata reported for the peeer connection", - "type" : ["null", "string"], - "default": null - } - /* Observer calculated values */ -]} \ No newline at end of file diff --git a/sources/reports/sfu-outbound-rtp-pad-report.avsc b/sources/reports/sfu-outbound-rtp-pad-report.avsc deleted file mode 100644 index c705817d..00000000 --- a/sources/reports/sfu-outbound-rtp-pad-report.avsc +++ /dev/null @@ -1,228 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SfuOutboundRtpPadReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for RTP streams going through the SFU", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "sfuId", - "doc": "The provided unique identifier of the SFU", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "internal", - "doc": "Flag indicate if the sfu rtp pad is used as an internal rtp session between SFUs", - "type" : [ "null", "boolean" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, - /* Report Fields */ - { - "name" : "transportId", - "doc": "The id of the transport the RTP stream uses.", - "type" : "string" - }, { - "name" : "sfuStreamId", - "doc": "Unique identifier of the Sfu stream the event is related to", - "type" : "string" - }, { - "name" : "sfuSinkId", - "doc": "Unique identifier of the Sfu sink the event is related to", - "type" : "string" - }, { - "name" : "rtpPadId", - "doc": "The id of RTP pad.", - "type" : "string" - }, { - "name" : "ssrc", - "doc": "The synchronization source id of the RTP stream", - "type" : "long" - }, { - "name" : "callId", - "doc": "The callId the event belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "If the track id was provided by the Sfu, the observer can fill up the information of which client it belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "trackId", - "doc": "The id of the track the RTP stream related to at the client side", - "type" : [ "null", "string" ], - "default" : null - }, - - - /* RTP stats */ - { - "name" : "mediaType", - "doc": "the type of the media the stream carries (\"audio\" or \"video\")", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "payloadType", - "doc": "The payload type field of the RTP header", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "mimeType", - "doc": "The negotiated mimeType in the SDP", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "clockRate", - "doc": "The clock rate of the media source the RTP header carries", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "sdpFmtpLine", - "doc": "The actual SDP line from the negotiation related to this RTP stream", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "rid", - "doc": " The rid parameter of the corresponded RTP stream", - "type" : ["null", "string"], - "default" : null - }, { - "name" : "rtxSsrc", - "doc": "If RTX is negotiated as a separate stream, this is the SSRC of the RTX stream that is associated with this stream's ssrc. ", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "targetBitrate", - "doc": "he bitrate the corresponded stream targets.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "voiceActivityFlag", - "doc": "The RTP header V flag indicate of the activity of the media source by the media codec if the RTP transport ships it through", - "type" : ["null", "boolean"], - "default" : null - }, { - "name" : "firCount", - "doc": "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream. Only for Video streams", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "pliCount", - "doc": "The total number of Picture Loss Indication sent on the corresponded RTP stream. Only for Video streams", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "nackCount", - "doc": "The total number of negative acknowledgement received on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "sliCount", - "doc": "The total number of SLI indicator sent from the endpoint on the corresponded RTP stream. Only for Audio stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsLost", - "doc": "The total number of packets lost on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsSent", - "doc": "The total number of packets sent on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsDiscarded", - "doc": "The total number of discarded packets on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsRetransmitted", - "doc": "The total number of packets retransmitted on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsFailedEncryption", - "doc": "The total number of packets failed to be encrypted on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "packetsDuplicated", - "doc": "The total number of duplicated packets appeared on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsSent", - "doc": "The total number of FEC packets sent on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "fecPacketsDiscarded", - "doc": "The total number of FEC packets discarded on the corresponded RTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc": "The total amount of payload bytes sent on the corresponded RTP stream.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "rtcpSrSent", - "doc": "The total number of SR reports sent by the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtcpRrReceived", - "doc": "The total number of RR reports received on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtxPacketsSent", - "doc": "If rtx packets sent on the same stream then this number indicates how may has been sent", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "rtxPacketsDiscarded", - "doc": "If rtx packets are received on the same stream then this number indicates how may has been discarded", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesSent", - "doc": "The number of frames sent on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "framesEncoded", - "doc": "Indicate the number of frames the Sfu has been encoded", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "keyFramesEncoded", - "doc": "Indicate the number of keyframes the Sfu has been encoded on the corresponded RTP stream", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "roundTripTime", - "doc": "The calculated RTT of the stream", - "type" : ["null", "double"], - "default" : null - } -] -} \ No newline at end of file diff --git a/sources/reports/sfu-sctp-stream-report.avsc b/sources/reports/sfu-sctp-stream-report.avsc deleted file mode 100644 index 5b27302a..00000000 --- a/sources/reports/sfu-sctp-stream-report.avsc +++ /dev/null @@ -1,113 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SfuSctpStreamReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for SCTP streams going through the SFU", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "sfuId", - "doc": "The provided unique identifier of the SFU", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, { - "name" : "internal", - "doc": "Flag indicate if the sctp channel is used as an internal transport between SFUs", - "type" : [ "null", "boolean" ], - "default" : null - }, - /* Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "transportId", - "doc": "The id of the transport the RTP stream uses.", - "type" : "string" - }, { - "name" : "streamId", - "doc": "The id of the sctp stream", - "type" : "string" - }, - /* SCTP stats */ - { - "name" : "label", - "doc": "The label of the sctp stream", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "protocol", - "doc": "The protocol used to establish an sctp stream", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sctpSmoothedRoundTripTime", - "doc": "The latest smoothed round-trip time value, corresponding to spinfo_srtt defined in [RFC6458] but converted to seconds. If there has been no round-trip time measurements yet, this value is undefined.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "sctpCongestionWindow", - "doc": "The latest congestion window, corresponding to spinfo_cwnd defined in [RFC6458].", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "sctpReceiverWindow", - "doc": "The latest receiver window, corresponding to sstat_rwnd defined in [RFC6458].", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "sctpMtu", - "doc": "The latest maximum transmission unit, corresponding to spinfo_mtu defined in [RFC6458].", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "sctpUnackData", - "doc": "The number of unacknowledged DATA chunks, corresponding to sstat_unackdata defined in [RFC6458].", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "messageReceived", - "doc": "The number of message received on the corresponded SCTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "messageSent", - "doc": "The number of message sent on the corresponded SCTP stream.", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesReceived", - "doc": "The number of bytes received on the corresponded SCTP stream.", - "type" : ["null", "long"], - "default" : null - }, { - "name" : "bytesSent", - "doc": "The number of bytes sent on the corresponded SCTP stream.", - "type" : ["null", "long"], - "default" : null - }] -} \ No newline at end of file diff --git a/sources/reports/sfu-transport-report.avsc b/sources/reports/sfu-transport-report.avsc deleted file mode 100644 index 0c2e7e3f..00000000 --- a/sources/reports/sfu-transport-report.avsc +++ /dev/null @@ -1,182 +0,0 @@ -/* @revision: 1 */ -{ - "type" : "record", - "name" : "SFUTransportReport", - "namespace" : "org.observertc.schemas.reports", - "doc" : "A Report created for SFU Transport layer typically created to transfer RTP/SCTP/RTX streams to another client, SFU, MCU, or processing module.", - "fields" : [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The service id the report belongs to", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "sfuId", - "doc": "The provided unique identifier of the SFU", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, { - "name" : "internal", - "doc": "Flag indicate if the sfu transport is used as an internal transport between SFUs", - "type" : [ "null", "boolean" ], - "default" : null - }, - /* Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, - { - "name" : "transportId", - "doc": "The generated unique identifier of the transport", - "type" : "string" - }, - /* Transport stats */ - { - "name" : "dtlsState", - "doc": "Represent the current value of the state attribute of the underlying RTCDtlsTransport.", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "iceState", - "doc": "Represent the current value of the state attribute of the underlying RTCIceTransport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sctpState", - "doc": "Represents the the current value of the SCTP state of the transport of the SFU", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "iceRole", - "doc": "Represent the current value of the role SFU takes place in ICE", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "localAddress", - "doc": "The local address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN)", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "localPort", - "doc": "The local port number", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "protocol", - "doc": "The protocol used by the transport", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remoteAddress", - "doc": "The remote address of the ICE candidate selected for the transport (IPv4, IPv6, FQDN)", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "remotePort", - "doc": "The remote port number", - "type" : [ "null", "int" ], - "default" : null - }, -// !!!!!!!!!!!!! RTP !!!!!!!!!!!!!!!! - { - "name" : "rtpBytesReceived", - "doc": "The total amount of RTP bytes received on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "rtpBytesSent", - "doc": "The total amount of RTP bytes sent on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "rtpPacketsReceived", - "doc": "The total amount of RTP packets received on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "rtpPacketsSent", - "doc": "The total amount of RTP packets sent on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "rtpPacketsLost", - "doc": "The total amount of RTP packets lost on this transport", - "type" : [ "null", "int" ], - "default" : null - }, -// !!!!!!!!!!!!! RTX !!!!!!!!!!!!!!!! - { - "name" : "rtxBytesReceived", - "doc": "The total amount of RTX bytes received on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "rtxBytesSent", - "doc": "The total amount of RTX bytes sent on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "rtxPacketsReceived", - "doc": "The total amount of RTX packets received on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "rtxPacketsSent", - "doc": "The total amount of RTX packets sent on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "rtxPacketsLost", - "doc": "The total amount of RTX packets lost on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "rtxPacketsDiscarded", - "doc": "The total amount of RTX packets discarded on this transport", - "type" : [ "null", "int" ], - "default" : null - }, -// !!!!!!!!!!!!! SCTP !!!!!!!!!!!!!!!! - { - "name" : "sctpBytesReceived", - "doc": "The total amount of SCTP bytes received on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sctpBytesSent", - "doc": "The total amount of SCTP bytes sent on this transport", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sctpPacketsReceived", - "doc": "The total amount of SCTP packets received on this transport", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "sctpPacketsSent", - "doc": "The total amount of SCTP packets sent on this transport", - "type" : [ "null", "int" ], - "default" : null - } - ] -} \ No newline at end of file diff --git a/sources/reports/template.js b/sources/reports/template.js deleted file mode 100644 index 07550997..00000000 --- a/sources/reports/template.js +++ /dev/null @@ -1,218 +0,0 @@ -// report has: -// -- serviceId (req): string -// -- serviceName (opt): string, -// -- mediaUnitId (req): string -// -- timestamp (long): long -const ReportMetaFields = [ - /* Report MetaFields */ - { - "name" : "serviceId", - "doc": "The unique identifier of the service", - "type" : "string" - }, { - "name" : "mediaUnitId", - "doc": "The media unit id the report belongs to", - "type" : "string" - }, { - "name" : "marker", - "doc": "The marker the originated sample is reported with", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "timestamp", - "doc": "The timestamp when the corresponded data is generated for the report (UTC Epoch in ms)", - "type" : "long" - }, -] - - -// event report has: -// -- marker (opt): string -// -- callId (opt): string -// -- userId (opt): string -// -- roomId (opt): string -// -- name (req): string -// -- value (opt): string -// -- message (opt): string -// -- attachments (opt): string -// -- sampleSeq (opt): int -// -- sampleTimestamp (opt): long -const EventReportFields = [ - /* Event Report Fields */ - { - "name" : "marker", - "doc": "The marker the sample is marked with", - "type" : [ "null", "string" ], - "default" : null - }, - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, - { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sampleTimestamp", - "doc": "The timestamp of the sample the event related to", - "type" : [ "null", "long" ], - "default" : null - }, { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the event may related to", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "name", - "doc": "The name of the event", - "type" : "string" - }, { - "name" : "message", - "doc": "the human readable message of the event", - "type" : [ "null", "string" ], - "default" : null - }, - { - "name" : "value", - "doc": "the value of the event", - "type" : [ "null", "string" ], - "default" : null - }, - { - "name" : "attachments", - "doc": "attachment the event may created with", - "type" : [ "null", "string" ], - "default" : null - }, -] - -// meta report has -// -- type (req): string -// -- payload (opt): string -const MetaReportFields = [ - /* Meta Report Fields */ - { - "name" : "type", - "doc": "The type of the reported metadata", - "type" : "string" - }, { - "name" : "payload", - "doc": "the payload of the reported metadata", - "type" : [ "null", "string" ], - "default" : null - }, -] - -// pc report has -// -- callId (req): string -// -- roomId (opt): string -// -- clientId (req): string -// -- userId (opt): string -// -- peerConnectionId (req): string -// -- label (opt): string -const PcReportFields = [ - /* Peer Connection Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of the call", - "type" : "string" - }, { - "name" : "roomId", - "doc": "webrtc app provided room id", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of the client", - "type" : "string" - }, { - "name" : "userId", - "doc": "webrtc app provided user identifier", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type" : "string" - }, { - "name" : "label", - "doc": "The webrtc app provided label the peer connection is labeled with", - "type" : [ "null", "string" ], - "default" : null - }, -] - -// client report has -// -- callId (req): string -// -- roomId (opt): string -// -- clientId (req): string -// -- userId (opt): string -const ClientReportFields = [ - /* Client Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of a call the report belongs to", - "type" : "string" - }, { - "name" : "roomId", - "doc": "The provided room id name the report is made from", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "clientId", - "doc": "The generated unique identifier of a client the report belongs to", - "type" : "string" - }, { - "name" : "userId", - "doc": "The provided name of the user participating in the call", - "type" : [ "null", "string" ], - "default" : null - }, -] - -// call report has -// -- callId (req): string -// -- roomId (opt): string -const CallReportFields = [ - /* Call Report Fields */ - { - "name" : "callId", - "doc": "The generated unique identifier of a call the report belongs to", - "type" : "string" - }, { - "name" : "roomId", - "doc": "The provided room id name the report is made from", - "type" : [ "null", "string" ], - "default" : null - }, -] - -// sample related report -const SampleReportFields = [ - /* Sample Based Report Fields */ - { - "name" : "sampleSeq", - "doc": "The sequence number of the sample the report is generated from", - "type" : "int" - }, -] - -// observer report has \ No newline at end of file diff --git a/sources/samples/ClientSample.avsc b/sources/samples/ClientSample.avsc new file mode 100644 index 00000000..3541bedb --- /dev/null +++ b/sources/samples/ClientSample.avsc @@ -0,0 +1,103 @@ +{ + "name": "ClientSample", + "type": "record", + "doc": "docs", + "fields": [ + { + "name": "callId", + "doc": "the unique identifier of the call or session", + "type": ["null", "string"], + "default": null + }, + { + "name": "clientId", + "doc": "Unique id of the client providing samples.", + "type": "string" + }, + { + "name": "appData", + "doc": "Additional information attached to this sample (e.g.: roomId, userId, displayName, etc...)", + "type": ["null", "string"], + "default": null + }, + { + "name": "timestamp", + "doc": "The timestamp the sample is created in GMT", + "type": "long" + }, + { + "name" : "peerConnections", + "doc": "Samples taken PeerConnections", + "type" : ["null", { + "type": "array", + "items": "@include-chunk PeerConnectionSample" + }], + "default": null + }, + { + "name": "clientEvents", + "doc": "A list of additional client events.", + "type": ["null", { + "type": "array", + "items": { + "name": "ClientEvent", + "type": "record", + "fields": [ + {"name": "type", "doc": "The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).", "type": "string"}, + {"name": "payload", "doc": "The value associated with the event, if applicable.", "type": ["null", "string"], "default": null}, + {"name": "peerConnectionId", "doc": "The unique identifier of the peer connection for which the event was generated.", "type": ["null", "string"], "default": null}, + {"name": "trackId", "doc": "The identifier of the media track related to the event, if applicable.", "type": ["null", "string"], "default": null}, + {"name": "ssrc", "doc": "The SSRC (Synchronization Source) identifier associated with the event, if applicable.", "type": ["null", "long"], "default": null}, + {"name": "timestamp", "doc": "The timestamp in epoch format when the event was generated.", "type": ["null", "long"], "default": null} + ] + } + }], + "default": null + }, + + { + "name": "clientMetaItems", + "doc": "A list of additional client events.", + "type": ["null", { + "type": "array", + "items": { + "name": "ClientMetaData", + "type": "record", + "fields": [ + {"name": "type", "doc": "The name of the event used as an identifier (e.g., MEDIA_TRACK_MUTED, USER_REJOINED, etc.).", "type": "string"}, + {"name": "payload", "doc": "The value associated with the event, if applicable.", "type": ["null", "string"], "default": null}, + {"name": "peerConnectionId", "doc": "The unique identifier of the peer connection for which the event was generated.", "type": ["null", "string"], "default": null}, + {"name": "trackId", "doc": "The identifier of the media track related to the event, if applicable.", "type": ["null", "string"], "default": null}, + {"name": "ssrc", "doc": "The SSRC (Synchronization Source) identifier associated with the event, if applicable.", "type": ["null", "long"], "default": null}, + {"name": "timestamp", "doc": "The timestamp in epoch format when the event was generated.", "type": ["null", "long"], "default": null} + ] + } + }], + "default": null + }, + { + "name": "extensionStats", + "doc": "The WebRTC app provided custom stats payload", + "type": ["null", { + "type": "array", + "items": { + "name": "ExtensionStat", + "type": "record", + "fields": [ + { + "name": "type", + "type": "string", + "doc": "The type of the extension stats the custom app provides" + }, + { + "name": "payload", + "type": "string", + "doc": "The payload of the extension stats the custom app provides" + } + ] + } + }], + "default": null + } + ] +} \ No newline at end of file diff --git a/sources/samples/ClientSample.chunk.avsc b/sources/samples/ClientSample.chunk.avsc deleted file mode 100644 index 329b26c0..00000000 --- a/sources/samples/ClientSample.chunk.avsc +++ /dev/null @@ -1,2023 +0,0 @@ -{ - "name": "ClientSample", - "type": "record", - "doc": "docs", - "fields": [ - { - "name": "callId", - "doc": "If provided, the server uses the given id to match clients in the same call. Must be a valid UUID.", - "type": ["null", "string"], - "default": null - }, - { - "name": "clientId", - "doc": "Unique id of the client providing samples. Must be a valid UUID.", - "type": "string" - }, - { - "name": "sampleSeq", - "doc": "The sequence number a source assigns to the sample. Each time the source takes a sample at a client, this number should be monotonically incremented.", - "type": ["null", "int"], - "default": null - }, - { - "name": "roomId", - "doc": "The WebRTC app configured room id the client joined for the call.", - "type": ["null", "string"], - "default": null - }, - { - "name": "userId", - "doc": "The WebRTC app configured human-readable user id the client is joined.", - "type": ["null", "string"], - "default": null - }, { - "name": "engine", - "doc": "WebRTC App provided information related to the engine the client uses.", - "type": ["null", { - "name": "Engine", - "type": "record", - "fields": [ - { - "name": "name", - "type": ["null", "string"], - "doc": "The name of the Engine", - "default": null - }, - { - "name": "version", - "type": ["null", "string"], - "doc": "The version of the engine", - "default": null - } - ] - }], - "default": null - }, - { - "name": "platform", - "doc": "WebRTC App provided information related to the platform the client uses.", - "type": ["null", { - "name": "Platform", - "type": "record", - "fields": [ - { - "name": "type", - "type": ["null", "string"], - "doc": "The name of the platform", - "default": null - }, - { - "name": "vendor", - "type": ["null", "string"], - "doc": "The name of the vendor", - "default": null - }, - { - "name": "model", - "type": ["null", "string"], - "doc": "The name of the model", - "default": null - } - ] - }], - "default": null - }, - { - "name": "browser", - "doc": "WebRTC App provided information related to the browser the client uses.", - "type": ["null", { - "name": "Browser", - "type": "record", - "fields": [ - { - "name": "name", - "type": ["null", "string"], - "doc": "The name of the operating system (e.g., Linux) the WebRTC app uses", - "default": null - }, - { - "name": "version", - "type": ["null", "string"], - "doc": "The version of the operating system", - "default": null - } - ] - }], - "default": null - }, - { - "name": "os", - "doc": "WebRTC App provided information related to the operating system the client uses.", - "type": ["null", { - "name": "OperationSystem", - "type": "record", - "fields": [ - { - "name": "name", - "type": ["null", "string"], - "doc": "The name of the operating system (e.g., Linux) the WebRTC app uses", - "default": null - }, - { - "name": "version", - "type": ["null", "string"], - "doc": "The version of the operating system", - "default": null - }, - { - "name": "versionName", - "type": ["null", "string"], - "doc": "The name of the version of the operating system", - "default": null - } - ] - }], - "default": null - }, - { - "name": "mediaConstraints", - "doc": "The WebRTC app provided list of the media constraints the client has.", - "type": ["null", { - "type": "array", - "items": "string" - }], - "default": null - }, - { - "name": "mediaDevices", - "doc": "The WebRTC app provided list of the media devices the client has.", - "type": ["null", { - "type": "array", - "items": { - "name": "MediaDevice", - "type": "record", - "fields": [ - { - "name": "id", - "type": ["null", "string"], - "doc": "the provided id of the media input / output", - "default": null - }, - { - "name": "kind", - "doc": "The media kind of the media device", - "type": ["null", { - "type": "enum", - "name": "InputMediaDeviceKind", - "symbols": ["videoinput", "audioinput", "audiooutput"] - }], - "default": null - }, - { - "name": "label", - "type": ["null", "string"], - "doc": "The name of the device", - "default": null - } - ] - } - }], - "default": null - }, - { - "name": "userMediaErrors", - "doc": "The WebRTC app provided list of user media errors the client has.", - "type": ["null", { - "type": "array", - "items": "string" - }], - "default": null - }, - { - "name": "extensionStats", - "doc": "The WebRTC app provided custom stats payload", - "type": ["null", { - "type": "array", - "items": { - "name": "ExtensionStat", - "type": "record", - "fields": [ - { - "name": "type", - "type": "string", - "doc": "The type of the extension stats the custom app provides" - }, - { - "name": "payload", - "type": "string", - "doc": "The payload of the extension stats the custom app provides" - } - ] - } - }], - "default": null - }, { - "name": "customCallEvents", - "doc": "User provided custom call events", - "type": ["null", { - "type": "array", - "items": { - "name": "CustomCallEvent", - "type": "record", - "fields": [ - { - "name": "name", - "doc": "the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..)", - "type": "string" - }, - { - "name": "value", - "doc": "the value of the event", - "type": ["null", "string"], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": ["null", "string"], - "default": null - }, - { - "name": "mediaTrackId", - "doc": "The identifier of the media track the event is related to", - "type": ["null", "string"], - "default": null - }, - { - "name": "message", - "doc": "the human readable message of the event", - "type": ["null", "string"], - "default": null - }, - { - "name": "attachments", - "doc": "Additional attachment relevant for the event", - "type": ["null", "string"], - "default": null - }, - { - "name": "timestamp", - "doc": "The EPOCH timestamp the event is generated", - "type": ["null", "long"], - "default": null - } - ] - } - }], - "default": null - }, - { - "name": "customObserverEvents", - "doc": "User provided custom observer events", - "type": ["null", { - "type": "array", - "items": { - "name": "CustomObserverEvent", - "type": "record", - "fields": [ - { - "name": "name", - "doc": "the name of the event used as identifier. (e.g.: MEDIA_TRACK_MUTED, USER_REJOINED, etc..)", - "type": "string" - }, - { - "name": "mediaTrackId", - "doc": "The identifier of the media track the event is related to", - "type": ["null", "string"], - "default": null - }, - { - "name": "message", - "doc": "the human readable message of the event", - "type": ["null", "string"], - "default": null - }, - { - "name": "attachments", - "doc": "Additional attachment relevant for the event", - "type": ["null", "string"], - "default": null - }, - { - "name": "timestamp", - "doc": "The EPOCH timestamp the event is generated", - "type": ["null", "long"], - "default": null - } - ] - } - }], - "default": null - }, - { - "name": "iceServers", - "doc": "The WebRTC app provided list of ICE servers the client used.", - "type": ["null", { - "type": "array", - "items": "string" - }], - "default": null - }, { - "name": "localSDPs", - "doc": "The local part of the Signal Description Protocol to establish connections", - "type": ["null", { - "type": "array", - "items": "string" - }], - "default": null - }, - { - "name": "dataChannels", - "doc": "Measurements about the data channels currently available on peer connections", - "type": ["null", { - "type": "array", - "items": { - "name": "DataChannel", - "type": "record", - "fields": [ - { - "name": "peerConnectionId", - "type": "string", - "doc": "The id of the peer connection the data channel is assigned to" - }, - { - "name": "dataChannelIdentifier", - "type": ["null", "int"], - "doc": "The id of the data channel assigned by the peer connection when it is opened", - "default": null - }, - /** - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCDataChannelStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dcstats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - { - "name": "label", - "doc": "The label of the data channel", - "type": ["null", "string"], - "default": null - }, - { - "name": "protocol", - "doc": "The protocol the data channel utilizes", - "type": ["null", "string"], - "default": null - }, - { - "name": "state", - "doc": "The state of the data channel", - "type": ["null", "string"], - "default": null - }, - { - "name": "messageSent", - "doc": "The total number of messages sent on the data channel", - "type": ["null", "int"], - "default": null - }, - { - "name": "bytesSent", - "doc": "The total number of bytes sent on the data channel", - "type": ["null", "long"], - "default": null - }, - { - "name": "messageReceived", - "doc": "The total number of messages received on the data channel", - "type": ["null", "int"], - "default": null - }, - { - "name": "bytesReceived", - "doc": "The total number of bytes received on the data channel", - "type": ["null", "long"], - "default": null - } - ] - } - }], - "default": null - }, { - "name" : "pcTransports", - "doc": "Transport stats of Peer Connection", - "type" : ["null", { - "type": "array", - "items": { - "name": "PeerConnectionTransport", - "type": "record", - "fields": [{ - "name": "transportId", - "doc": "The identifier of the transport the ICE candidate pair is negotiated on", - "type": "string" - }, { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, { - "name": "label", - "doc": "The label associated with the peer connection", - "type": ["null", "string"], - "default": null - }, - /** - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCTransportStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtctransportstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - { - "name": "packetsSent", - "doc": "Represents the total number of packets sent on the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsReceived", - "doc": "Represents the total number of packets received on the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesSent", - "doc": "Represents the total amount of bytes sent on the corresponding transport", - "type": ["null", "long"], - "default": null - }, { - "name": "bytesReceived", - "doc": "Represents the total amount of bytes received on the corresponding transport", - "type": ["null", "long"], - "default": null - }, { - "name": "iceRole", - "doc": "Represents the current role of ICE under DTLS Transport", - "type": ["null", "string"], - "default": null - }, { - "name": "iceLocalUsernameFragment", - "doc": "Represents the current local username fragment used in message validation procedures for ICE under DTLS Transport", - "type": ["null", "string"], - "default": null - }, { - "name": "dtlsState", - "doc": "Represents the current state of DTLS for the peer connection transport layer", - "type": ["null", "string"], - "default": null - }, { - "name": "selectedCandidatePairId", - "doc": "The identifier of the candidate pair the transport currently uses", - "type": ["null", "string"], - "default": null - }, { - "name": "iceState", - "doc": "Represents the current transport state (RTCIceTransportState) of ICE for the peer connection transport layer", - "type": ["null", "string"], - "default": null - }, { - "name": "localCertificateId", - "doc": "If DTLS negotiated, it gives the ID of the local certificate", - "type": ["null", "string"], - "default": null - }, { - "name": "remoteCertificateId", - "doc": "If DTLS negotiated, it gives the ID of the remote certificate", - "type": ["null", "string"], - "default": null - }, { - "name": "tlsVersion", - "doc": "Represents the version number of the TLS used in the corresponding transport", - "type": ["null", "string"], - "default": null - }, { - "name": "dtlsCipher", - "doc": "Represents the name of the DTLS cipher used in the corresponding transport", - "type": ["null", "string"], - "default": null - }, { - "name": "dtlsRole", - "doc": "The role this host plays in DTLS negotiations", - "type": ["null", { - "type": "enum", - "name": "DtlsRole", - "symbols": ["client", "server", "unknown"] - }], - "default": null - }, { - "name": "srtpCipher", - "doc": "Represents the name of the SRTP cipher used in the corresponding transport", - "type": ["null", "string"], - "default": null - }, { - "name": "tlsGroup", - "doc": "Represents the name of the IANA TLS Supported Groups used in the corresponding transport", - "type": ["null", "string"], - "default": null - }, { - "name": "selectedCandidatePairChanges", - "doc": "The total number of candidate pair changes over the peer connection", - "type": ["null", "int"], - "default": null - } - ]} - }], - "default": null - }, { - "name" : "iceCandidatePairs", - "doc": "Candidate pair stats", - "type" : ["null", { - "type": "array", - "items": { - "name": "IceCandidatePair", - "type": "record", - "fields": [{ - "name": "candidatePairId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, { - "name": "peerConnectionId", - "doc": "The unique identifier of the peer connection", - "type": "string" - }, { - "name": "label", - "doc": "The label associated with the peer connection", - "type": ["null", "string"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCIceCandidatePairStats - * └-> https://www.w3.org/TR/webrtc-stats/#candidatepair-dict - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - */ - { - "name": "transportId", - "doc": "The identifier of the transport the ice candidate pair is negotiated on", - "type": ["null", "string"], - "default": null - }, { - "name": "localCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected on the local side", - "type": ["null", "string"], - "default": null - }, { - "name": "remoteCandidateId", - "doc": "The unique identifier of the candidate the negotiated pair is selected on the remote side", - "type": ["null", "string"], - "default": null - }, { - "name": "state", - "doc": "The state of ICE Candidate Pairs (RTCStatsIceState) on the corresponding transport", - "type": ["null", "string"], - "default": null - }, { - "name": "nominated", - "doc": "Indicates if the ice candidate pair is nominated or not", - "type": ["null", "boolean"], - "default": null - }, { - "name": "packetsSent", - "doc": "The total number of packets sent using the last selected candidate pair over the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsReceived", - "doc": "The total number of packets received using the last selected candidate pair over the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesSent", - "doc": "The total number of bytes sent using the last selected candidate pair over the corresponding transport", - "type": ["null", "long"], - "default": null - }, { - "name": "bytesReceived", - "doc": "The total number of bytes received using the last selected candidate pair over the corresponding transport", - "type": ["null", "long"], - "default": null - }, { - "name": "lastPacketSentTimestamp", - "doc": "Represents the timestamp at which the last packet was sent on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms)", - "type": ["null", "long"], - "default": null - }, { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the selected candidate pair, excluding STUN packets over the corresponding transport (UTC Epoch in ms)", - "type": ["null", "long"], - "default": null - }, { - "name": "totalRoundTripTime", - "doc": "Represents the sum of all round trip time measurements in seconds since the beginning of the session, based on STUN connectivity check over the corresponding transport", - "type": ["null", "double"], - "default": null - }, { - "name": "currentRoundTripTime", - "doc": "Represents the last round trip time measurement in seconds based on STUN connectivity check over the corresponding transport", - "type": ["null", "double"], - "default": null - }, { - "name": "availableOutgoingBitrate", - "doc": "The sum of the underlying cc algorithm provided outgoing bitrate for the RTP streams over the corresponding transport", - "type": ["null", "double"], - "default": null - }, { - "name": "availableIncomingBitrate", - "doc": "The sum of the underlying cc algorithm provided incoming bitrate for the RTP streams over the corresponding transport", - "type": ["null", "double"], - "default": null - }, { - "name": "requestsReceived", - "doc": "Represents the total number of connectivity check requests received on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "requestsSent", - "doc": "Represents the total number of connectivity check requests sent on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "responsesReceived", - "doc": "Represents the total number of connectivity check responses received on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "responsesSent", - "doc": "Represents the total number of connectivity check responses sent on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "consentRequestsSent", - "doc": "Represents the total number of consent requests sent on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsDiscardedOnSend", - "doc": "Total number of packets for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesDiscardedOnSend", - "doc": "Total number of bytes for this candidate pair that have been discarded due to socket errors on the selected candidate pair using the corresponding transport", - "type": ["null", "long"], - "default": null - } - ]} - }], - "default": null - }, { - "name" : "mediaSources", - "doc": "WebRTC App provided information related to the operation system the client uses.", - "type" : ["null", { - "type": "array", - "items": { - "name": "MediaSourceStat", - "type": "record", - "fields": [ - /** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCMediaSourceStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcmediasourcestats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "trackIdentifier", - "type": ["null", "string"], - "doc": "The unique identifier of the corresponding media track", - "default": null - }, { - "name": "kind", - "type": ["null", { - "type": "enum", - "name": "MediaSourceMediaKind", - "symbols": ["audio", "video"] - }], - "doc": "The type of the media the MediaSource produces.", - "default": null - }, { - "name": "relayedSource", - "type": ["null", "boolean"], - "doc": "Flag indicating if the media source is relayed or not, meaning the local endpoint is not the actual source of the media, but a proxy for that media.", - "default": null - }, - /** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCAudioSourceStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "audioLevel", - "type": ["null", "double"], - "doc": "The value is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov.", - "default": null - }, { - "name": "totalAudioEnergy", - "type": ["null", "double"], - "doc": "The audio energy of the media source. For calculation see www.w3.org/TR/webrtc-stats/#dom-rtcaudiosourcestats-totalaudioenergy", - "default": null - }, { - "name": "totalSamplesDuration", - "type": ["null", "double"], - "doc": "The duration of the audio type media source", - "default": null - }, { - "name": "echoReturnLoss", - "type": ["null", "double"], - "doc": "if echo cancellation is applied on the media source, then this number represents the loss calculation defined in www.itu.int/rec/T-REC-G.168-201504-I/en", - "default": null - }, { - "name": "echoReturnLossEnhancement", - "type": ["null", "double"], - "doc": "www.itu.int/rec/T-REC-G.168-201504-I/en", - "default": null - }, { - "name": "droppedSamplesDuration", - "type": ["null", "double"], - "doc": "The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source", - "default": null - }, { - "name": "droppedSamplesEvents", - "type": ["null", "int"], - "doc": "A counter increases every time a sample is dropped after a non-dropped sample", - "default": null - }, { - "name": "totalCaptureDelay", - "type": ["null", "double"], - "doc": "Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source", - "default": null - }, { - "name": "totalSamplesCaptured", - "type": ["null", "double"], - "doc": "The total number of captured samples reaching the audio source", - "default": null - }, - /** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCVideoSourceStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcvideosourcestats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "width", - "type": ["null", "int"], - "doc": "The width, in pixels, of the last frame originating from the media source", - "default": null - }, { - "name": "height", - "type": ["null", "int"], - "doc": "The height, in pixels, of the last frame originating from the media source", - "default": null - }, { - "name": "frames", - "type": ["null", "int"], - "doc": "The total number of frames originating from the media source", - "default": null - }, { - "name": "framesPerSecond", - "type": ["null", "double"], - "doc": "The number of frames originating from the media source in the last second", - "default": null - } - ]} - }], - "default": null - }, { - "name" : "codecs", - "doc": "List of codec the client has", - "type" : ["null", { - "type": "array", - "items": { - "name": "MediaCodecStats", - "type": "record", - "fields": [ - /** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCCodecStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtccodecstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "payloadType", - "type": ["null", "string"], - "doc": "Payload type used in the RTP encoding/decoding process.", - "default": null - }, { - "name": "codecType", - "type": ["null", { - "type": "enum", - "name": "CodecType", - "symbols": ["encode", "decode"] - }], - "doc": "Indicates the role of the codec (encode or decode)", - "default": null - }, { - "name": "mimeType", - "type": ["null", "string"], - "doc": "The MIME type of the media, e.g., audio/opus.", - "default": null - }, { - "name": "clockRate", - "type": ["null", "int"], - "doc": "The clock rate used in RTP transport to generate the timestamp for the carried frames", - "default": null - }, { - "name": "channels", - "type": ["null", "int"], - "doc": "Audio Only. Represents the number of channels an audio media source has. Only interesting if stereo is presented", - "default": null - }, { - "name": "sdpFmtpLine", - "type": ["null", "string"], - "doc": "The SDP line determines the codec", - "default": null - } - ]} - }], - "default": null - }, { - "name" : "certificates", - "doc": "List of certificates the client provided", - "type" : ["null", { - "type": "array", - "items": { - "name": "Certificate", - "type": "record", - "fields": [ - /** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCCodecStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtccodecstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "fingerprint", - "type": ["null", "string"], - "doc": "The fingerprint of the certificate.", - "default": null - }, { - "name": "fingerprintAlgorithm", - "type": ["null", "string"], - "doc": "The hash function used to generate the fingerprint.", - "default": null - }, { - "name": "base64Certificate", - "type": ["null", "string"], - "doc": "The DER encoded base-64 representation of the certificate.", - "default": null - }, { - "name": "issuerCertificateId", - "type": ["null", "string"], - "doc": "The ID of the next certificate in the certificate chain", - "default": null - } - ]} - }], - "default": null - }, { - "name" : "inboundAudioTracks", - "doc": "List of compound measurements related to inbound audio tracks", - "type" : ["null", { - "type": "array", - "items": { - "name": "InboundAudioTrack", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name": "trackId", - "doc": "The ID of the track", - "type": ["null", "string"], - "default": null - }, { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": ["null", "string"], - "default": null - }, { - "name": "remoteClientId", - "doc": "The remote client ID the source outbound track belongs to", - "type": ["null", "string"], - "default": null - }, { - "name": "sfuStreamId", - "doc": "The ID of the SFU stream this track is synced from", - "type": ["null", "string"], - "default": null - }, { - "name": "sfuSinkId", - "doc": "The ID of the sink this track belongs to in the SFU", - "type": ["null", "string"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCReceivedRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponding synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponding synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "jitter", - "doc": "The corresponding synchronization source reported jitter", - "type": ["null", "double"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCInboundRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the corresponding synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "headerBytesReceived", - "doc": "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "packetsDiscarded", - "doc": "The total number of packets that missed the playout point and were therefore discarded by the jitter buffer", - "type": ["null", "int"], - "default": null - }, { - "name": "fecPacketsReceived", - "doc": "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "fecPacketsDiscarded", - "doc": "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired.", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesReceived", - "doc": "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrival; 2) the target RTP packet has already been repaired.", - "type": ["null", "long"], - "default": null - }, { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponding synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "totalProcessingDelay", - "doc": "The total processing delay in seconds spent on buffering RTP packets from receipt until packets are decoded", - "type": ["null", "double"], - "default": null - }, { - "name": "estimatedPlayoutTimestamp", - "doc": "The estimated playout time of the corresponding synchronization source", - "type": ["null", "long"], - "default": null - }, { - "name": "jitterBufferDelay", - "doc": "The total time of RTP packets spent in the jitter buffer waiting for frame completion due to network uncertainty.", - "type": ["null", "double"], - "default": null - }, { - "name": "jitterBufferTargetDelay", - "doc": "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer.", - "type": ["null", "double"], - "default": null - }, { - "name": "jitterBufferEmittedCount", - "doc": "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponding synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "jitterBufferMinimumDelay", - "doc": "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type": ["null", "double"], - "default": null - }, - /* Audio specific fields */ - { - "name": "totalSamplesReceived", - "doc": "The total number of audio samples received on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "concealedSamples", - "doc": "The total number of samples decoded by the media decoder from the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "silentConcealedSamples", - "doc": "The total number of samples concealed from the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "concealmentEvents", - "doc": "The total number of concealed event emitted to the media codec by the corresponded jitterbuffer", - "type": ["null", "int"], - "default": null - }, { - "name": "insertedSamplesForDeceleration", - "doc": "The total number of samples inserted to decelarete the audio playout (happens when the jitterbuffer detects a shrinking buffer and need to increase the jitter buffer delay)", - "type": ["null", "int"], - "default": null - }, { - "name": "removedSamplesForAcceleration", - "doc": "The total number of samples inserted to accelerate the audio playout (happens when the jitterbuffer detects a growing buffer and need to shrink the jitter buffer delay)", - "type": ["null", "int"], - "default": null - }, { - "name": "audioLevel", - "doc": "The current audio level", - "type": ["null", "double"], - "default": null - }, { - "name": "totalAudioEnergy", - "doc": "Represents the energy level reported by the media source", - "type": ["null", "double"], - "default": null - }, { - "name": "totalSamplesDuration", - "doc": "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type": ["null", "double"], - "default": null - }, { - "name": "decoderImplementation", - "doc": "Indicate the name of the decoder implementation library", - "type": ["null", "string"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCRemoteOutboundRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "packetsSent", - "doc": "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesSent", - "doc": "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type": ["null", "long"], - "default": null - }, { - "name": "remoteTimestamp", - "doc": "The timestamp corresnponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "reportsSent", - "doc": "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type": ["null", "int"], - "default": null - }, - { - "name": "roundTripTime", - "doc": "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type": ["null", "double"], - "default": null - }, - { - "name": "totalRoundTripTime", - "doc": " Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type": ["null", "double"], - "default": null - }, - { - "name": "roundTripTimeMeasurements", - "doc": "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, - /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * Audio Playout Stats - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcaudioplayoutstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "synthesizedSamplesDuration", - "doc": "This metric can be used together with totalSamplesDuration to calculate the percentage of played out media being synthesized", - "type": ["null", "double"], - "default": null - }, - { - "name": "synthesizedSamplesEvents", - "doc": "The number of synthesized samples events.", - "type": ["null", "int"], - "default": null - }, - { - "name": "totalPlayoutDelay", - "doc": " The playout delay includes the delay from being emitted to the actual time of playout on the device", - "type": ["null", "double"], - "default": null - }, - { - "name": "totalSamplesCount", - "doc": "When audio samples are pulled by the playout device, this counter is incremented with the number of samples emitted for playout", - "type": ["null", "int"], - "default": null - } - - ]} - }], - "default": null - }, { - "name" : "inboundVideoTracks", - "doc": "List of compound measurements related to inbound video tracks", - "type" : ["null", { - "type": "array", - "items": { - "name": "InboundVideoTrack", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name": "trackId", - "doc": "The id of the track", - "type": ["null", "string"], - "default": null - }, - { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": ["null", "string"], - "default": null - }, - { - "name": "remoteClientId", - "doc": "The remote clientId the source outbound track belongs to", - "type": ["null", "string"], - "default": null - }, - { - "name": "sfuStreamId", - "doc": "The id of the SFU stream this track is sinked from", - "type": ["null", "string"], - "default": null - }, - { - "name": "sfuSinkId", - "doc": "The id of the sink this track belongs to in the SFU", - "type": ["null", "string"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCInboundRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, - { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, - { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": ["null", "double"], - "default": null - }, - /* Video Specific Fields */ - { - "name": "framesDropped", - "doc": "The number of frames dropped prior to decode or missing chunks", - "type": ["null", "int"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCInboundRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "lastPacketReceivedTimestamp", - "doc": "Represents the timestamp at which the last packet was received on the corresponded synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, - { - "name": "headerBytesReceived", - "doc": "Total number of RTP header and padding bytes received over the corresponding synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, - { - "name": "packetsDiscarded", - "doc": "The total number of packets missed the playout point and therefore discarded by the jitterbuffer", - "type": ["null", "int"], - "default": null - }, { - "name": "fecPacketsReceived", - "doc": "Total number of FEC packets received over the corresponding synchronization source (ssrc)", - "type": ["null", "int"], // field can be null or an integer - "default": null // default value is null - }, { - "name": "fecPacketsDiscarded", - "doc": "Total number of FEC packets discarded over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesReceived", - "doc": "Total number of bytes received over the corresponding synchronization source (ssrc) due to 1) late arrive; 2) the target RTP packet has already been repaired.", - "type": ["null", "long"], // field can be null or a long integer - "default": null - }, { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets sent and belongs to the corresponded synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "totalProcessingDelay", - "doc": "The total processing delay in seconds spend on buffering RTP packets from received up until packets are decoded", - "type": ["null", "double"], // field can be null or a double - "default": null - }, { - "name": "estimatedPlayoutTimestamp", - "doc": "The estimated playout time of the corresponded synchronization source", - "type": ["null", "long"], - "default": null - }, { - "name": "jitterBufferDelay", - "doc": "The total time of RTP packets spent in jitterbuffer waiting for frame completion due to network uncertenity.", - "type": ["null", "double"], - "default": null - }, { - "name": "jitterBufferTargetDelay", - "doc": "This value is increased by the target jitter buffer delay every time a sample is emitted by the jitter buffer. The added target is the target delay, in seconds, at the time that the sample was emitted from the jitter buffer. ", - "type": ["null", "double"], - "default": null - }, { - "name": "jitterBufferEmittedCount", - "doc": "The total number of audio samples or video frames that have come out of the jitter buffer on the corresponded synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "jitterBufferMinimumDelay", - "doc": "This metric is purely based on the network characteristics such as jitter and packet loss, and can be seen as the minimum obtainable jitter buffer delay if no external factors would affect it", - "type": ["null", "double"], - "default": null - }, { - "name": "decoderImplementation", - "doc": "Indicate the name of the decoder implementation library", - "type": ["null", "string"], - "default": null - }, - /* Video Specific Fields */ - { - "name": "framesDecoded", - "doc": "The total number of frames decoded on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "keyFramesDecoded", - "doc": "The total number of keyframes decoded on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "frameWidth", - "doc": "The width of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "frameHeight", - "doc": "The height of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "framesPerSecond", - "doc": "The frame rate of the video sent by the remote source on the corresponding RTP stream", - "type": ["null", "double"], - "default": null - }, { - "name": "qpSum", - "doc": "The QP sum (only interested in VP8,9) of the frame of the video sent by the remote source on the corresponding RTP stream", - "type": ["null", "long"], - "default": null - }, { - "name": "totalDecodeTime", - "doc": "The total time spent on decoding video on the corresponding RTP stream", - "type": ["null", "double"], - "default": null - }, { - "name": "totalInterFrameDelay", - "doc": "The total interframe delay on the corresponding RTP stream", - "type": ["null", "double"], - "default": null - }, { - "name": "totalSquaredInterFrameDelay", - "doc": "The total squared interframe delay on the corresponding synchronization source (ssrc). Useful for variance calculation for interframe delays", - "type": ["null", "double"], - "default": null - }, { - "name": "firCount", - "doc": "The total number of Full Intra Request (FIR) packets sent from this endpoint to the source on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "pliCount", - "doc": "The total number of Picture Loss Indication (PLI) packets sent on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "framesReceived", - "doc": "The total number of frames received on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCRemoteOutboundRtpStreamStats related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "packetsSent", - "doc": "Total number of RTP packets sent at the remote endpoint to this endpoint on this synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesSent", - "doc": "Total number of payload bytes sent at the remote endpoint to this endpoint on this synchronization source", - "type": ["null", "long"], - "default": null - }, { - "name": "remoteTimestamp", - "doc": "The timestamp corresponds to the time in UTC Epoch the remote endpoint reported the statistics belong to the sender side and correspond to the synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "reportsSent", - "doc": "The number of SR reports the remote endpoint sent corresponded to synchronization source (ssrc) this report belongs to", - "type": ["null", "int"], - "default": null - }, { - "name": "roundTripTime", - "doc": "Estimated round trip time for the SR reports based on DLRR reports on the corresponded RTP stream", - "type": ["null", "double"], - "default": null - }, { - "name": "totalRoundTripTime", - "doc": "Represents the cumulative sum of all round trip time measurements performed on the corresponded RTP stream", - "type": ["null", "double"], - "default": null - }, { - "name": "roundTripTimeMeasurements", - "doc": "Represents the total number of SR reports received with DLRR reports to be able to calculate the round trip time on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - } - ]} - }], - "default": null - }, { - "name" : "outboundAudioTracks", - "doc": "List of compound measurements related to outbound audio tracks", - "type" : ["null", { - "type": "array", - "items": { - "name": "OutboundAudioTrack", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name" : "trackId", - "doc": "The id of the track", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "peerConnectionId", - "doc": " The unique generated identifier of the peer connection the inbound audio track belongs to", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "sfuStreamId", - "doc": "The id of the SFU stream this track is related to", - "type" : [ "null", "string" ], - "default" : null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RtcSentRtpStreamStats - * └-> https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name" : "ssrc", - "doc": "The RTP SSRC field", - "type" : "long" - }, { - "name" : "packetsSent", - "doc" : "The total number of packets sent on the corresponded synchronization source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "bytesSent", - "doc" : "The total number of bytes sent on the corresponded synchronization source", - "type" : ["null", "long"], - "default" : null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - RtcOutboundRTPStreamStats - └-> https://www.w3.org/TR/webrtc-stats/#outboundrtpstats-dict* - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "rid", - "doc": "The rid encoding parameter of the corresponded synchronization source", - "type": ["null", "string"], - "default": null - }, { - "name": "headerBytesSent", - "doc": "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "retransmittedPacketsSent", - "doc": "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type": ["null", "int"], - "default": null - }, { - "name": "retransmittedBytesSent", - "doc": "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type": ["null", "long"], - "default": null - }, { - "name": "targetBitrate", - "doc": "Reflects the current encoder target in bits per second.", - "type": ["null", "int"], - "default": null - }, { - "name": "totalEncodedBytesTarget", - "doc": "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type": ["null", "long"], - "default": null - }, { - "name": "totalPacketSendDelay", - "doc": "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "averageRtcpInterval", - "doc": "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type": ["null", "double"], - "default": null - }, { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "encoderImplementation", - "doc": "Indicate the name of the encoder implementation library", - "type": ["null", "string"], - "default": null - }, { - "name": "active", - "doc": "Indicates whether this RTP stream is configured to be sent or disabled", - "type": ["null", "boolean"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * Remote Inbound RTP related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": ["null", "double"], - "default": null - }, { - "name": "roundTripTime", - "doc": "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "totalRoundTripTime", - "doc": "The sum of RTT measurements belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "fractionLost", - "doc": "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "roundTripTimeMeasurements", - "doc": "The total number of calculated RR measurements received on this source", - "type": ["null", "int"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * MediaSourceStat related fields - * └-> https://www.w3.org/TR/webrtc-stats/#mediasourcestats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name" : "relayedSource", - "doc" : "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type" : ["null", "boolean"], - "default" : null - }, { - /* Audio specific fields */ - "name" : "audioLevel", - "doc" : "Represents the audio level reported by the media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalAudioEnergy", - "doc" : "Represents the energy level reported by the media source", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "totalSamplesDuration", - "doc" : "Represents the total duration of the audio samples the media source actually transconverted in seconds", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "echoReturnLoss", - "doc" : "Represents the echo cancellation in decibels corresponded to the media source.", - "type" : ["null", "double"], - "default" : null - }, { - "name" : "echoReturnLossEnhancement", - "doc" : "Represents the echo cancellation in decibels added as a postprocessing by the library after the audio is caught from the media source.", - "type" : ["null", "double"], - "default" : null - }, { - "name": "droppedSamplesDuration", - "type": ["null", "double"], - "doc": "The total duration, in seconds, of samples produced by the device that got dropped before reaching the media source", - "default": null - }, { - "name": "droppedSamplesEvents", - "type": ["null", "int"], - "doc": "A counter increases every time a sample is dropped after a non-dropped sample", - "default": null - }, { - "name": "totalCaptureDelay", - "type": ["null", "double"], - "doc": "Total delay, in seconds, for each audio sample between the time the sample was emitted by the capture device and the sample reaching the source", - "default": null - }, { - "name": "totalSamplesCaptured", - "type": ["null", "double"], - "doc": "The total number of captured samples reaching the audio source", - "default": null - } - ]} - }], - "default": null - }, { - "name" : "outboundVideoTracks", - "doc": "List of compound measurements related to outbound video tracks", - "type" : ["null", { - "type": "array", - "items": { - "name": "OutboundVideoTrack", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name": "trackId", - "doc": "The id of the track", - "type": ["null", "string"], - "default": null - }, { - "name": "peerConnectionId", - "doc": "The unique generated identifier of the peer connection the inbound audio track belongs to", - "type": ["null", "string"], - "default": null - }, { - "name": "sfuStreamId", - "doc": "The id of the SFU stream this track is related to", - "type": ["null", "string"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RtcSentRtpStreamStats - * └-> https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "ssrc", - "doc": "The RTP SSRC field", - "type": "long" - }, { - "name": "packetsSent", - "doc": "The total number of packets sent on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "bytesSent", - "doc": "The total number of bytes sent on the corresponded synchronization source", - "type": ["null", "long"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RtcOutboundRTPStreamStats - * └-> https://www.w3.org/TR/webrtc-stats/#outboundrtpstats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "rid", - "doc": "The rid encoding parameter of the corresponded synchronization source", - "type": ["null", "string"], - "default": null - }, { - "name": "headerBytesSent", - "doc": "Total number of RTP header and padding bytes sent over the corresponding synchronization source (ssrc)", - "type": ["null", "long"], - "default": null - }, { - "name": "retransmittedPacketsSent", - "doc": "Total number of retransmitted packets sent over the corresponding synchronization source (ssrc).", - "type": ["null", "int"], - "default": null - }, { - "name": "retransmittedBytesSent", - "doc": "Total number of retransmitted bytes sent over the corresponding synchronization source (ssrc).", - "type": ["null", "long"], - "default": null - }, { - "name": "targetBitrate", - "doc": "Reflects the current encoder target in bits per second.", - "type": ["null", "int"], - "default": null - }, { - "name": "totalEncodedBytesTarget", - "doc": "The total number of bytes of RTP coherent frames encoded completly depending on the frame size the encoder targets", - "type": ["null", "long"], - "default": null - }, { - "name": "totalPacketSendDelay", - "doc": "The total number of delay packets buffered at the sender side in seconds over the corresponding synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "averageRtcpInterval", - "doc": "The average RTCP interval between two consecutive compound RTCP packets sent for the corresponding synchronization source (ssrc)", - "type": ["null", "double"], - "default": null - }, { - "name": "nackCount", - "doc": "Count the total number of Negative ACKnowledgement (NACK) packets received over the corresponding synchronization source (ssrc)", - "type": ["null", "int"], - "default": null - }, { - "name": "encoderImplementation", - "doc": "Indicate the name of the encoder implementation library", - "type": ["null", "string"], - "default": null - }, { - "name": "active", - "doc": "Indicates whether this RTP stream is configured to be sent or disabled", - "type": ["null", "boolean"], - "default": null - }, - /* Video specific fields */ - { - "name": "frameWidth", - "doc": "The frame width in pixels of the frames targeted by the media encoder", - "type": ["null", "int"], - "default": null - }, { - "name": "frameHeight", - "doc": "The frame height in pixels of the frames targeted by the media encoder", - "type": ["null", "int"], - "default": null - }, { - "name": "framesPerSecond", - "doc": "The encoded number of frames in the last second on the corresponding media source", - "type": ["null", "double"], - "default": null - }, { - "name": "framesSent", - "doc": "The total number of frames sent on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "hugeFramesSent", - "doc": "The total number of huge frames (avgFrameSize * 2.5) on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "framesEncoded", - "doc": "The total number of frames encoded by the media source", - "type": ["null", "int"], - "default": null - }, { - "name": "keyFramesEncoded", - "doc": "The total number of keyframes encoded on the corresponding RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "qpSum", - "doc": "The sum of the QP the media encoder provided on the corresponding RTP stream.", - "type": ["null", "long"], - "default": null - }, { - "name": "totalEncodeTime", - "doc": "The total time in seconds spent in encoding media frames for the corresponding RTP stream.", - "type": ["null", "double"], - "default": null - }, { - "name": "qualityLimitationDurationNone", - "doc": "Time elapsed in seconds when the RTC connection has not limited the quality", - "type": ["null", "double"], - "default": null - }, { - "name": "qualityLimitationDurationCPU", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of CPU", - "type": ["null", "double"], - "default": null - }, { - "name": "qualityLimitationDurationBandwidth", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of Bandwidth", - "type": ["null", "double"], - "default": null - }, { - "name": "qualityLimitationDurationOther", - "doc": "Time elapsed in seconds the RTC connection had a limitation because of Other factor", - "type": ["null", "double"], - "default": null - }, { - "name": "qualityLimitationReason", - "doc": "Indicate a reason for the quality limitation of the corresponded synchronization source", - "type": ["null", "string"], - "default": null - }, { - "name": "qualityLimitationResolutionChanges", - "doc": "The total number of resolution changes occurred on the corresponded RTP stream due to quality changes", - "type": ["null", "int"], - "default": null - }, { - "name": "firCount", - "doc": "The total number FIR packets sent from this endpoint to the source on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, { - "name": "pliCount", - "doc": "The total number of Picture Loss Indication sent on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * Remote Inbound RTP related fields - * └-> https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name": "packetsReceived", - "doc": "The total number of packets received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "packetsLost", - "doc": "The total number of bytes received on the corresponded synchronization source", - "type": ["null", "int"], - "default": null - }, { - "name": "jitter", - "doc": "The corresponded synchronization source reported jitter", - "type": ["null", "double"], - "default": null - }, { - "name": "roundTripTime", - "doc": "RTT measurement in seconds based on (most likely) SR, and RR belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "totalRoundTripTime", - "doc": "The sum of RTT measurements belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "fractionLost", - "doc": "The receiver reported fractional lost belongs to the corresponded synchronization source", - "type": ["null", "double"], - "default": null - }, { - "name": "roundTripTimeMeasurements", - "doc": "The total number of calculated RR measurements received on this source", - "type": ["null", "int"], - "default": null - }, - /* Video specific fields */ - { - "name": "framesDropped", - "doc": "The total number of frames reported to be lost by the remote endpoint on the corresponded RTP stream", - "type": ["null", "int"], - "default": null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * MediaSourceStat related fields - * └-> https://www.w3.org/TR/webrtc-stats/#mediasourcestats-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name" : "relayedSource", - "doc" : "True if the corresponded media source is remote, false otherwise (or null depending on browser and version)", - "type" : ["null", "boolean"], - "default" : null - }, - /* Video specific fields */ - { - "name" : "width", - "doc" : "The width, in pixels, of the last frame originating from the media source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "height", - "doc" : "The height, in pixels, of the last frame originating from the media source", - "type" : ["null", "int"], - "default" : null - }, { - "name" : "frames", - "doc" : "The total number of frames originated from the media source", - "type" : ["null", "int"], - "default" : null - } - ]} - }], - "default": null - }, { - "name" : "iceLocalCandidates", - "doc": "List of local ICE candidates", - "type" : ["null", { - "type": "array", - "items": { - "name": "IceLocalCandidate", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name" : "peerConnectionId", - "doc": "Refers to the peer connection the local candidate belongs to", - "type" : [ "null", "string"], - "default" : null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCIceCandidateStats - * └-> https://www.w3.org/TR/webrtc-stats/#icecandidate-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name" : "id", - "doc": "The unique identifier of the local candidate", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "address", - "doc": "The address of the local endpoint (Ipv4, Ipv6, FQDN)", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "port", - "doc": "The port number of the local endpoint the ICE uses", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "protocol", - "doc": "The protocol for the ICE", - "type" : [ "null", { - "type": "enum", - "name": "LocalCandidateProtocol", - "symbols": ["tcp", "udp"] - }], - "default" : null - }, { - "name" : "candidateType", - "doc": "The type of the local candidate", - "type" : [ "null", "string"], - "default" : null - }, { - "name" : "priority", - "doc": "The priority of the local candidate", - "type" : [ "null", "long"], - "default" : null - }, { - "name" : "url", - "doc": "The url of the ICE server", - "type" : [ "null", "string"], - "default" : null - }, { - "name" : "relayProtocol", - "doc": "The relay protocol the local candidate uses", - "type" : [ "null", { - "type": "enum", - "name": "LocalCandidateRelayProtocol", - "symbols": ["tcp", "udp", "tls"] - }], - "default" : null - } - - ]} - }], - "default": null - }, { - "name" : "iceRemoteCandidates", - "doc": "List of remote ICE candidates", - "type" : ["null", { - "type": "array", - "items": { - "name": "IceRemoteCandidate", - "type": "record", - "fields": [ - /* - * Fields for identification - */ - { - "name" : "peerConnectionId", - "doc": "Refers to the peer connection the local candidate belongs to", - "type" : [ "null", "string"], - "default" : null - }, - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * RTCIceCandidateStats - * └-> https://www.w3.org/TR/webrtc-stats/#icecandidate-dict* - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - { - "name" : "id", - "doc": "The unique identifier of the local candidate", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "address", - "doc": "The address of the local endpoint (Ipv4, Ipv6, FQDN)", - "type" : [ "null", "string" ], - "default" : null - }, { - "name" : "port", - "doc": "The port number of the local endpoint the ICE uses", - "type" : [ "null", "int" ], - "default" : null - }, { - "name" : "protocol", - "doc": "The protocol for the ICE", - "type" : [ "null", { - "type": "enum", - "name": "RemoteCandidateProtocol", - "symbols": ["tcp", "udp"] - }], - "default" : null - }, { - "name" : "candidateType", - "doc": "The type of the local candidate", - "type" : [ "null", "string"], - "default" : null - }, { - "name" : "priority", - "doc": "The priority of the local candidate", - "type" : [ "null", "long"], - "default" : null - }, { - "name" : "url", - "doc": "The url of the ICE server", - "type" : [ "null", "string"], - "default" : null - }, { - "name" : "relayProtocol", - "doc": "The relay protocol the local candidate uses", - "type" : [ "null", { - "type": "enum", - "name": "RemoteCandidateRelayProtocol", - "symbols": ["tcp", "udp", "tls"] - }], - "default" : null - } - - ]} - }], - "default": null - }, { - "name": "timestamp", - "doc": "The timestamp the sample is created in GMT", - "type": "long" - }, { - "name": "timeZoneOffsetInHours", - "doc": "The offset from GMT in hours", - "type": ["null", "int"], - "default": null - }, { - "name": "marker", - "doc": "Special marker for the samples", - "type": ["null", "string"], - "default": null - } - ] -} \ No newline at end of file diff --git a/sources/samples/PeerConnectionSample.chunk.avsc b/sources/samples/PeerConnectionSample.chunk.avsc new file mode 100644 index 00000000..107978dc --- /dev/null +++ b/sources/samples/PeerConnectionSample.chunk.avsc @@ -0,0 +1,542 @@ +{ + "name": "PeerConnectionSample", + "type": "record", + "doc": "docs", + "fields": [ + { + "name": "peerConnectionId", + "type": "string", + "doc": "Unique identifier of the stats object." + }, + { + "name": "appData", + "doc": "Additional information attached to this sample", + "type": ["null", "string"], + "default": null + }, + { + "name": "codecs", + "doc": "Codec items", + "type": ["null", { + "type": "array", + "items": { + "type": "record", + "name": "CodecStats", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp when the stats were generated."}, + {"name": "type", "type": "string", "doc": "The type of the stats."}, + {"name": "id", "type": "string", "doc": "The unique identifier for the stats object."}, + {"name": "payloadType", "type": "int", "doc": "The payload type of the codec."}, + {"name": "transportId", "type": "string", "doc": "The identifier of the transport associated with the codec."}, + {"name": "mimeType", "type": "string", "doc": "The MIME type of the codec."}, + {"name": "clockRate", "type": ["null", "int"], "default": null, "doc": "The clock rate of the codec in Hz."}, + {"name": "channels", "type": ["null", "int"], "default": null, "doc": "The number of audio channels for the codec, if applicable."}, + {"name": "sdpFmtpLine", "type": ["null", "string"], "default": null, "doc": "The SDP format-specific parameters line for the codec."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + + }], + "default": null + }, + + { + "name": "inboundRtps", + "doc": "Inbound RTPs", + "type": ["null", { + "type": "array", + "items": { + "name": "InboundRtpStats", + "type": "record", + "fields": [ + { "name": "timestamp", "type": "long", "doc": "The time the stats were collected, in high-resolution time." }, + { "name": "id", "type": "string", "doc": "Unique identifier of the stats object." }, + { "name": "ssrc", "type": "long", "doc": "Synchronization source identifier of the RTP stream." }, + { "name": "kind", "type": "string", "doc": "Kind of the media (e.g., 'audio' or 'video')." }, + { "name": "transportId", "type": ["null", "string"], "default": null, "doc": "ID of the transport associated with the RTP stream." }, + { "name": "codecId", "type": ["null", "string"], "default": null, "doc": "ID of the codec used for the RTP stream." }, + { "name": "packetsReceived", "type": ["null", "int"], "default": null, "doc": "Number of packets received on the RTP stream." }, + { "name": "packetsLost", "type": ["null", "int"], "default": null, "doc": "Number of packets lost on the RTP stream." }, + { "name": "jitter", "type": ["null", "double"], "default": null, "doc": "Jitter of the RTP stream in seconds." }, + { "name": "trackIdentifier", "type": "string", "doc": "Identifier for the media track associated with the RTP stream." }, + { "name": "mid", "type": ["null", "string"], "default": null, "doc": "The MediaStream ID of the RTP stream." }, + { "name": "remoteId", "type": ["null", "string"], "default": null, "doc": "Remote stats object ID associated with the RTP stream." }, + { "name": "framesDecoded", "type": ["null", "int"], "default": null, "doc": "Number of frames decoded." }, + { "name": "keyFramesDecoded", "type": ["null", "int"], "default": null, "doc": "Number of keyframes decoded." }, + { "name": "framesRendered", "type": ["null", "int"], "default": null, "doc": "Number of frames rendered." }, + { "name": "framesDropped", "type": ["null", "int"], "default": null, "doc": "Number of frames dropped." }, + { "name": "frameWidth", "type": ["null", "int"], "default": null, "doc": "Width of the decoded video frames." }, + { "name": "frameHeight", "type": ["null", "int"], "default": null, "doc": "Height of the decoded video frames." }, + { "name": "framesPerSecond", "type": ["null", "double"], "default": null, "doc": "Frame rate in frames per second." }, + { "name": "qpSum", "type": ["null", "double"], "default": null, "doc": "Sum of the Quantization Parameter values for decoded frames." }, + { "name": "totalDecodeTime", "type": ["null", "double"], "default": null, "doc": "Total time spent decoding in seconds." }, + { "name": "totalInterFrameDelay", "type": ["null", "double"], "default": null, "doc": "Sum of inter-frame delays in seconds." }, + { "name": "totalSquaredInterFrameDelay", "type": ["null", "double"], "default": null, "doc": "Sum of squared inter-frame delays in seconds." }, + { "name": "pauseCount", "type": ["null", "int"], "default" : null, "doc": "Number of times playback was paused." }, + { "name": "totalPausesDuration", "type": ["null", "double"], "default": null, "doc": "Total duration of pauses in seconds." }, + { "name": "freezeCount", "type": ["null", "int"], "default": null, "doc": "Number of times playback was frozen." }, + { "name": "totalFreezesDuration", "type": ["null", "double"], "default": null, "doc": "Total duration of freezes in seconds." }, + { "name": "lastPacketReceivedTimestamp", "type": ["null", "double"], "default": null, "doc": "Timestamp of the last packet received." }, + { "name": "headerBytesReceived", "type": ["null", "long"], "default": null, "doc": "Total header bytes received." }, + { "name": "packetsDiscarded", "type": ["null", "int"], "default": null, "doc": "Total packets discarded." }, + { "name": "fecBytesReceived", "type": ["null", "long"], "default": null, "doc": "Total bytes received from FEC." }, + { "name": "fecPacketsReceived", "type": ["null", "int"], "default": null, "doc": "Total packets received from FEC." }, + { "name": "fecPacketsDiscarded", "type": ["null", "int"], "default": null, "doc": "Total FEC packets discarded." }, + { "name": "bytesReceived", "type": ["null", "long"], "default": null, "doc": "Total bytes received on the RTP stream." }, + { "name": "nackCount", "type": ["null", "int"], "default": null, "doc": "Number of NACKs sent." }, + { "name": "firCount", "type": ["null", "int"], "default": null, "doc": "Number of Full Intra Requests sent." }, + { "name": "pliCount", "type": ["null", "int"], "default": null, "doc": "Number of Picture Loss Indications sent." }, + { "name": "totalProcessingDelay", "type": ["null", "double"], "default": null, "doc": "Total processing delay in seconds." }, + { "name": "estimatedPlayoutTimestamp", "type": ["null", "double"], "default": null, "doc": "Estimated timestamp of playout." }, + { "name": "jitterBufferDelay", "type": ["null", "double"], "default": null, "doc": "Total jitter buffer delay in seconds." }, + { "name": "jitterBufferTargetDelay", "type": ["null", "double"], "default": null, "doc": "Target delay for the jitter buffer in seconds." }, + { "name": "jitterBufferEmittedCount", "type": ["null", "int"], "default": null, "doc": "Number of packets emitted from the jitter buffer." }, + { "name": "jitterBufferMinimumDelay", "type": ["null", "double"], "default": null, "doc": "Minimum delay of the jitter buffer in seconds." }, + { "name": "totalSamplesReceived", "type": ["null", "int"], "default": null, "doc": "Total audio samples received." }, + { "name": "concealedSamples", "type": ["null", "int"], "default": null, "doc": "Number of concealed audio samples." }, + { "name": "silentConcealedSamples", "type": ["null", "int"], "default": null, "doc": "Number of silent audio samples concealed." }, + { "name": "concealmentEvents", "type": ["null", "int"], "default": null, "doc": "Number of audio concealment events." }, + { "name": "insertedSamplesForDeceleration", "type": ["null", "int"], "default": null, "doc": "Number of audio samples inserted for deceleration." }, + { "name": "removedSamplesForAcceleration", "type": ["null", "int"], "default": null, "doc": "Number of audio samples removed for acceleration." }, + { "name": "audioLevel", "type": ["null", "double"], "default": null, "doc": "Audio level in the range [0.0, 1.0]." }, + { "name": "totalAudioEnergy", "type": ["null", "double"], "default": null, "doc": "Total audio energy in the stream." }, + { "name": "totalSamplesDuration", "type": ["null", "double"], "default": null, "doc": "Total duration of all received audio samples in seconds." }, + { "name": "framesReceived", "type": ["null", "int"], "default": null, "doc": "Total number of frames received." }, + { "name": "decoderImplementation", "type": ["null", "string"], "default": null, "doc": "Decoder implementation used for decoding frames." }, + { "name": "playoutId", "type": ["null", "string"], "default": null, "doc": "Playout identifier for the RTP stream." }, + { "name": "powerEfficientDecoder", "type": ["null", "boolean"], "default": null, "doc": "Indicates if the decoder is power-efficient." }, + { "name": "framesAssembledFromMultiplePackets", "type": ["null", "int"], "default": null, "doc": "Number of frames assembled from multiple packets." }, + { "name": "totalAssemblyTime", "type": ["null", "double"], "default": null, "doc": "Total assembly time for frames in seconds." }, + { "name": "retransmittedPacketsReceived", "type": ["null", "int"], "default": null, "doc": "Number of retransmitted packets received." }, + { "name": "retransmittedBytesReceived", "type": ["null", "long"], "default": null, "doc": "Number of retransmitted bytes received." }, + { "name": "rtxSsrc", "type": ["null", "long"], "default": null, "doc": "SSRC of the retransmission stream." }, + { "name": "fecSsrc", "type": ["null", "long"], "default": null, "doc": "SSRC of the FEC stream." }, + { "name": "totalCorruptionProbability", "type": ["null", "double"], "default": null, "doc": "Total corruption probability of packets." }, + { "name": "totalSquaredCorruptionProbability", "type": ["null", "double"], "default": null, "doc": "Total squared corruption probability of packets." }, + { "name": "corruptionMeasurements", "type": ["null", "int"], "default": null, "doc": "Number of corruption measurements." }, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "remoteInboundRtps", + "doc": "Remote Inbound RTPs", + "type": ["null", { + "type": "array", + "items": { + "name": "RemoteInboundRtpStats", + "type": "record", + "fields": [ + { "name": "timestamp", "type": "double", "doc": "The timestamp for this stats object in DOMHighResTimeStamp format." }, + { "name": "id", "type": "string", "doc": "The unique identifier for this stats object." }, + { "name": "ssrc", "type": "long", "doc": "The SSRC identifier of the RTP stream." }, + { "name": "kind", "type": "string", "doc": "The type of media ('audio' or 'video')." }, + { "name": "transportId", "type": ["null", "string"], "default": null, "doc": "The ID of the transport used for this stream." }, + { "name": "codecId", "type": ["null", "string"], "default": null, "doc": "The ID of the codec used for this stream." }, + { "name": "packetsReceived", "type": ["null", "int"], "default": null, "doc": "The total number of packets received on this stream." }, + { "name": "packetsLost", "type": ["null", "int"], "default": null, "doc": "The total number of packets lost on this stream." }, + { "name": "jitter", "type": ["null", "double"], "default": null, "doc": "The jitter value for this stream in seconds." }, + { "name": "localId", "type": ["null", "string"], "default": null, "doc": "The ID of the local object corresponding to this remote stream." }, + { "name": "roundTripTime", "type": ["null", "double"], "default": null, "doc": "The most recent RTT measurement for this stream in seconds." }, + { "name": "totalRoundTripTime", "type": ["null", "double"], "default": null, "doc": "The cumulative RTT for all packets on this stream in seconds." }, + { "name": "fractionLost", "type": ["null", "double"], "default": null, "doc": "The fraction of packets lost on this stream, calculated over a time interval." }, + { "name": "roundTripTimeMeasurements", "type": ["null", "int"], "default": null, "doc": "The total number of RTT measurements for this stream." }, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "outboundRtps", + "doc": "Outbound RTPs", + "type": ["null", { + "type": "array", + "items": { + "name": "OutboundRtpStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp for this stats object in DOMHighResTimeStamp format."}, + {"name": "id", "type": "string", "doc": "The unique identifier for this stats object."}, + {"name": "ssrc", "type": "long", "doc": "The SSRC identifier of the RTP stream."}, + {"name": "kind", "type": "string", "doc": "The type of media ('audio' or 'video')."}, + {"name": "transportId", "type": ["null", "string"], "default": null, "doc": "The ID of the transport used for this stream."}, + {"name": "codecId", "type": ["null", "string"], "default": null, "doc": "The ID of the codec used for this stream."}, + {"name": "packetsSent", "type": ["null", "int"], "default": null, "doc": "The total number of packets sent on this stream."}, + {"name": "bytesSent", "type": ["null", "int"], "default": null, "doc": "The total number of bytes sent on this stream."}, + {"name": "mid", "type": ["null", "string"], "default": null, "doc": "The media ID associated with this RTP stream."}, + {"name": "mediaSourceId", "type": ["null", "string"], "default": null, "doc": "The ID of the media source associated with this stream."}, + {"name": "remoteId", "type": ["null", "string"], "default": null, "doc": "The ID of the remote object corresponding to this stream."}, + {"name": "rid", "type": ["null", "string"], "default": null, "doc": "The RID value of the RTP stream."}, + {"name": "headerBytesSent", "type": ["null", "int"], "default": null, "doc": "The total number of header bytes sent on this stream."}, + {"name": "retransmittedPacketsSent", "type": ["null", "int"], "default": null, "doc": "The number of retransmitted packets sent on this stream."}, + {"name": "retransmittedBytesSent", "type": ["null", "int"], "default": null, "doc": "The number of retransmitted bytes sent on this stream."}, + {"name": "rtxSsrc", "type": ["null", "int"], "default": null, "doc": "The SSRC for the RTX stream, if applicable."}, + {"name": "targetBitrate", "type": ["null", "double"], "default": null, "doc": "The target bitrate for this RTP stream in bits per second."}, + {"name": "totalEncodedBytesTarget", "type": ["null", "int"], "default": null, "doc": "The total target encoded bytes for this stream."}, + {"name": "frameWidth", "type": ["null", "int"], "default": null, "doc": "The width of the frames sent in pixels."}, + {"name": "frameHeight", "type": ["null", "int"], "default": null, "doc": "The height of the frames sent in pixels."}, + {"name": "framesPerSecond", "type": ["null", "double"], "default": null, "doc": "The number of frames sent per second."}, + {"name": "framesSent", "type": ["null", "int"], "default": null, "doc": "The total number of frames sent on this stream."}, + {"name": "hugeFramesSent", "type": ["null", "int"], "default": null, "doc": "The total number of huge frames sent on this stream."}, + {"name": "framesEncoded", "type": ["null", "int"], "default": null, "doc": "The total number of frames encoded on this stream."}, + {"name": "keyFramesEncoded", "type": ["null", "int"], "default": null, "doc": "The total number of key frames encoded on this stream."}, + {"name": "qpSum", "type": ["null", "double"], "default": null, "doc": "The sum of QP values for all frames encoded on this stream."}, + {"name": "totalEncodeTime", "type": ["null", "double"], "default": null, "doc": "The total time spent encoding frames on this stream in seconds."}, + {"name": "totalPacketSendDelay", "type": ["null", "double"], "default": null, "doc": "The total delay for packets sent on this stream in seconds."}, + {"name": "qualityLimitationReason", "type": ["null", "string"], "default": null, "doc": "The reason for any quality limitation on this stream."}, + {"name": "qualityLimitationResolutionChanges", "type": ["null", "int"], "default": null, "doc": "The number of resolution changes due to quality limitations."}, + {"name": "nackCount", "type": ["null", "int"], "default": null, "doc": "The total number of NACK packets sent on this stream."}, + {"name": "firCount", "type": ["null", "int"], "default": null, "doc": "The total number of FIR packets sent on this stream."}, + {"name": "pliCount", "type": ["null", "int"], "default": null, "doc": "The total number of PLI packets sent on this stream."}, + {"name": "encoderImplementation", "type": ["null", "string"], "default": null, "doc": "The implementation of the encoder used for this stream."}, + {"name": "powerEfficientEncoder", "type": ["null", "boolean"], "default": null, "doc": "Indicates whether the encoder is power efficient."}, + {"name": "active", "type": ["null", "boolean"], "default": null, "doc": "Indicates whether this stream is actively sending data."}, + {"name": "scalabilityMode", "type": ["null", "string"], "default": null, "doc": "The scalability mode of the encoder used for this stream."}, + {"name": "qualityLimitationDurations", "type": ["null", { + "type": "record", + "name": "QualityLimitationDurations", + "fields": [ + {"name": "none", "type": "double", "doc": "Duration of no quality limitation in seconds."}, + {"name": "cpu", "type": "double", "doc": "Duration of CPU-based quality limitation in seconds."}, + {"name": "bandwidth", "type": "double", "doc": "Duration of bandwidth-based quality limitation in seconds."}, + {"name": "other", "type": "double", "doc": "Duration of other quality limitation reasons in seconds."} + ] + }], "doc": "The duration of quality limitation reasons categorized by type."}, + {"name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats."} + ] + } + }], + "default": null + }, + + { + "name": "remoteOutboundRtps", + "doc": "Remote Outbound RTPs", + "type": ["null", { + "type": "array", + "items": { + "name": "RemoteOutboundRtpStats", + "type": "record", + "fields": [ + { "name": "timestamp", "type": "double", "doc": "The timestamp for this stats object in DOMHighResTimeStamp format." }, + { "name": "id", "type": "string", "doc": "The unique identifier for this stats object." }, + { "name": "ssrc", "type": "long", "doc": "The SSRC identifier of the RTP stream." }, + { "name": "kind", "type": "string", "doc": "The type of media ('audio' or 'video')." }, + { "name": "transportId", "type": ["null", "string"], "default": null, "doc": "The ID of the transport used for this stream." }, + { "name": "codecId", "type": ["null", "string"], "default": null, "doc": "The ID of the codec used for this stream." }, + { "name": "packetsSent", "type": ["null", "int"], "default": null, "doc": "The total number of packets sent on this stream." }, + { "name": "bytesSent", "type": ["null", "long"], "default": null, "doc": "The total number of bytes sent on this stream." }, + { "name": "localId", "type": ["null", "string"], "default": null, "doc": "The ID of the local object corresponding to this stream." }, + { "name": "remoteTimestamp", "type": ["null", "double"], "default": null, "doc": "The remote timestamp for this stats object in DOMHighResTimeStamp format." }, + { "name": "reportsSent", "type": ["null", "int"], "default": null, "doc": "The total number of reports sent on this stream." }, + { "name": "roundTripTime", "type": ["null", "double"], "default": null, "doc": "The current estimated round-trip time for this stream in seconds." }, + { "name": "totalRoundTripTime", "type": ["null", "double"], "default": null, "doc": "The total round-trip time for this stream in seconds." }, + { "name": "roundTripTimeMeasurements", "type": ["null", "int"], "default": null, "doc": "The total number of round-trip time measurements for this stream." }, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + + { + "name": "audioSources", + "doc": "Audio Source Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "AudioSourceStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "trackIdentifier", "type": "string", "doc": "The identifier of the media track."}, + {"name": "kind", "type": "string", "doc": "The kind of media (audio/video)."}, + {"name": "audioLevel", "type": ["null", "double"], "default": null, "doc": "The current audio level."}, + {"name": "totalAudioEnergy", "type": ["null", "double"], "default": null, "doc": "The total audio energy."}, + {"name": "totalSamplesDuration", "type": ["null", "double"], "default": null, "doc": "The total duration of audio samples."}, + {"name": "echoReturnLoss", "type": ["null", "double"], "default": null, "doc": "The echo return loss."}, + {"name": "echoReturnLossEnhancement", "type": ["null", "double"], "default": null, "doc": "The enhancement of echo return loss."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "videoSources", + "doc": "Video Source Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "VideoSourceStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "trackIdentifier", "type": "string", "doc": "The identifier of the media track."}, + {"name": "kind", "type": "string", "doc": "The kind of media (audio/video)."}, + {"name": "width", "type": "int", "doc": "The width of the video."}, + {"name": "height", "type": "int", "doc": "The height of the video."}, + {"name": "frames", "type": "int", "doc": "The total number of frames."}, + {"name": "framesPerSecond", "type": "double", "doc": "The frames per second of the video."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "audioPlayouts", + "doc": "Audio Playout Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "AudioPlayoutStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "kind", "type": "string", "doc": "The kind of media (audio/video)."}, + {"name": "synthesizedSamplesDuration", "type": "double", "doc": "The duration of synthesized audio samples."}, + {"name": "synthesizedSamplesEvents", "type": "int", "doc": "The number of synthesized audio samples events."}, + {"name": "totalSamplesDuration", "type": "double", "doc": "The total duration of all audio samples."}, + {"name": "totalPlayoutDelay", "type": "double", "doc": "The total delay experienced during audio playout."}, + {"name": "totalSamplesCount", "type": "int", "doc": "The total count of audio samples."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "peerConnectionTransports", + "doc": "PeerConnection Transport Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "PeerConnectionTransportStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "dataChannelsOpened", "type": "int", "doc": "The number of data channels opened."}, + {"name": "dataChannelsClosed", "type": "int", "doc": "The number of data channels closed."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "dataChannels", + "doc": "Data Channels Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "DataChannelStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "label", "type": "string", "doc": "The label of the data channel."}, + {"name": "protocol", "type": "string", "doc": "The protocol of the data channel."}, + {"name": "dataChannelIdentifier", "type": "int", "doc": "The identifier for the data channel."}, + {"name": "state", "type": "string", "doc": "The state of the data channel (e.g., 'open', 'closed')."}, + {"name": "messagesSent", "type": "int", "doc": "The number of messages sent on the data channel."}, + {"name": "bytesSent", "type": "long", "doc": "The number of bytes sent on the data channel."}, + {"name": "messagesReceived", "type": "int", "doc": "The number of messages received on the data channel."}, + {"name": "bytesReceived", "type": "long", "doc": "The number of bytes received on the data channel."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "iceTransports", + "doc": "ICE Transport Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "IceTransportStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "packetsSent", "type": "int", "doc": "The number of packets sent."}, + {"name": "packetsReceived", "type": "int", "doc": "The number of packets received."}, + {"name": "bytesSent", "type": "long", "doc": "The number of bytes sent."}, + {"name": "bytesReceived", "type": "long", "doc": "The number of bytes received."}, + {"name": "iceRole", "type": "string", "doc": "The ICE role (e.g., 'controlling', 'controlled')."}, + {"name": "iceLocalUsernameFragment", "type": "string", "doc": "The local username fragment for ICE."}, + {"name": "dtlsState", "type": "string", "doc": "The DTLS transport state (e.g., 'new', 'connecting', 'connected')."}, + {"name": "iceState", "type": "string", "doc": "The ICE transport state (e.g., 'new', 'checking', 'connected')."}, + {"name": "selectedCandidatePairId", "type": "string", "doc": "The ID of the selected ICE candidate pair."}, + {"name": "localCertificateId", "type": "string", "doc": "The ID of the local certificate."}, + {"name": "remoteCertificateId", "type": "string", "doc": "The ID of the remote certificate."}, + {"name": "tlsVersion", "type": "string", "doc": "The TLS version used for encryption."}, + {"name": "dtlsCipher", "type": "string", "doc": "The DTLS cipher suite used."}, + {"name": "dtlsRole", "type": "string", "doc": "The role in the DTLS handshake (e.g., 'client', 'server')."}, + {"name": "srtpCipher", "type": "string", "doc": "The SRTP cipher used for encryption."}, + {"name": "selectedCandidatePairChanges", "type": "int", "doc": "The number of changes to the selected ICE candidate pair."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + + { + "name": "iceCandidates", + "doc": "ICE Candidate Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "IceCandidateStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "transportId", "type": "string", "doc": "The transport ID associated with the ICE candidate."}, + {"name": "address", "type": ["null", "string"], "doc": "The IP address of the ICE candidate (nullable)."}, + {"name": "port", "type": "int", "doc": "The port number of the ICE candidate."}, + {"name": "protocol", "type": "string", "doc": "The transport protocol used by the candidate (e.g., 'udp', 'tcp')."}, + {"name": "candidateType", "type": "string", "doc": "The type of the ICE candidate (e.g., 'host', 'srflx', 'relay')."}, + {"name": "priority", "type": "long", "doc": "The priority of the ICE candidate."}, + {"name": "url", "type": "string", "doc": "The URL of the ICE candidate."}, + {"name": "relayProtocol", "type": "string", "doc": "The protocol used for the relay (e.g., 'tcp', 'udp')."}, + {"name": "foundation", "type": "string", "doc": "A string representing the foundation for the ICE candidate."}, + {"name": "relatedAddress", "type": "string", "doc": "The related address for the ICE candidate (if any)."}, + {"name": "relatedPort", "type": "int", "doc": "The related port for the ICE candidate (if any)."}, + {"name": "usernameFragment", "type": "string", "doc": "The username fragment for the ICE candidate."}, + {"name": "tcpType", "type": "string", "doc": "The TCP type of the ICE candidate (e.g., 'active', 'passive')."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + + { + "name": "iceCandidatePairs", + "doc": "ICE Candidate Pair Stats", + "type": ["null", { + "type": "array", + "items": { + "name": "IceCandidatePairStats", + "type": "record", + "fields": [ + { "name": "id", "type": "string", "doc": "The unique identifier for this RTCStats object." }, + { "name": "timestamp", "type": "double", "doc": "The timestamp of when the stats were recorded, in seconds." }, + { "name": "transportId", "type": "string", "doc": "The transport id of the connection this candidate pair belongs to." }, + { "name": "localCandidateId", "type": "string", "doc": "The ID of the local ICE candidate in this pair." }, + { "name": "remoteCandidateId", "type": "string", "doc": "The ID of the remote ICE candidate in this pair." }, + { "name": "state", "type": ["null", { + "type": "enum", + "name": "RTCStatsIceCandidatePairState", + "symbols": ["new", "inProgress", "failed", "succeeded"] , + "doc": "The state of the ICE candidate pair." + }], + "default": null + }, + { "name": "nominated", "type": "boolean", "default": false, "doc": "Whether this candidate pair has been nominated." }, + { "name": "packetsSent", "type": "int", "doc": "The number of packets sent using this candidate pair." }, + { "name": "packetsReceived", "type": "int", "doc": "The number of packets received using this candidate pair." }, + { "name": "bytesSent", "type": "long", "doc": "The total number of bytes sent using this candidate pair." }, + { "name": "bytesReceived", "type": "long", "doc": "The total number of bytes received using this candidate pair." }, + { "name": "lastPacketSentTimestamp", "type": "double", "doc": "The timestamp of the last packet sent using this candidate pair." }, + { "name": "lastPacketReceivedTimestamp", "type": "double", "doc": "The timestamp of the last packet received using this candidate pair." }, + { "name": "totalRoundTripTime", "type": "double", "doc": "The total round trip time (RTT) for this candidate pair in seconds." }, + { "name": "currentRoundTripTime", "type": "double", "doc": "The current round trip time (RTT) for this candidate pair in seconds." }, + { "name": "availableOutgoingBitrate", "type": "double", "doc": "The available outgoing bitrate (in bits per second) for this candidate pair." }, + { "name": "availableIncomingBitrate", "type": "double", "doc": "The available incoming bitrate (in bits per second) for this candidate pair." }, + { "name": "requestsReceived", "type": "int", "doc": "The number of ICE connection requests received by this candidate pair." }, + { "name": "requestsSent", "type": "int", "doc": "The number of ICE connection requests sent by this candidate pair." }, + { "name": "responsesReceived", "type": "int", "doc": "The number of ICE connection responses received by this candidate pair." }, + { "name": "responsesSent", "type": "int", "doc": "The number of ICE connection responses sent by this candidate pair." }, + { "name": "consentRequestsSent", "type": "int", "doc": "The number of ICE connection consent requests sent by this candidate pair." }, + { "name": "packetsDiscardedOnSend", "type": "int", "doc": "The number of packets discarded while attempting to send via this candidate pair." }, + { "name": "bytesDiscardedOnSend", "type": "long", "doc": "The total number of bytes discarded while attempting to send via this candidate pair." }, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + }, + + { + "name": "certificates", + "doc": "Certificates", + "type": ["null", { + "type": "array", + "items": { + "name": "CertificateStats", + "type": "record", + "fields": [ + {"name": "timestamp", "type": "double", "doc": "The timestamp of the stat."}, + {"name": "id", "type": "string", "doc": "A unique identifier for the stat."}, + {"name": "fingerprint", "type": "string", "doc": "The fingerprint of the certificate."}, + {"name": "fingerprintAlgorithm", "type": "string", "doc": "The algorithm used for the fingerprint (e.g., 'SHA-256')."}, + {"name": "base64Certificate", "type": "string", "doc": "The certificate encoded in base64 format."}, + {"name": "issuerCertificateId", "type": ["null", "string"], "doc": "The certificate ID of the issuer (nullable)."}, + /** + * Custom fields + */ + { "name": "appData", "type": ["null", "string"], "default": null, "doc": "Additional information attached to this stats" } + ] + } + }], + "default": null + } + ] +} \ No newline at end of file diff --git a/sources/samples/samples.avsc b/sources/samples/samples.avsc index 7a4bc5fd..c75d4351 100644 --- a/sources/samples/samples.avsc +++ b/sources/samples/samples.avsc @@ -26,15 +26,6 @@ }], "default": null }, - { - "name": "clientSamples", - "doc": "Samples taken from the client", - "type": ["null", { - "type": "array", - "items": "@include-chunk ClientSample" - }], - "default": null - }, { "name" : "sfuSamples", "doc": "Samples taken from an Sfu", diff --git a/sources/version.txt b/sources/version.txt index c45a01da..56fea8a0 100644 --- a/sources/version.txt +++ b/sources/version.txt @@ -1 +1 @@ -2.2.12 \ No newline at end of file +3.0.0 \ No newline at end of file diff --git a/sources/w3c/W3cStatsIdentifiers.ts b/sources/w3c/W3cStatsIdentifiers.ts index 63bfd3e1..ad0fc647 100644 --- a/sources/w3c/W3cStatsIdentifiers.ts +++ b/sources/w3c/W3cStatsIdentifiers.ts @@ -3,9 +3,8 @@ type RtcStatsVersion = { } export const version: RtcStatsVersion = { - date: new Date("2022-09-21"), + date: new Date("2024-11-07"), } - export enum StatsType { codec = "codec", inboundRtp = "inbound-rtp", @@ -35,7 +34,7 @@ export enum StatsType { receiver = "receiver", sctpTransport = "sctp-transport", iceServer = "ice-server", -}; +} // https://www.w3.org/TR/webrtc-stats/#summary // export type CodecStats = RtcCodecStats; @@ -92,7 +91,9 @@ export interface RtcReceivedRtpStreamStats extends RtcRtpStreamStats { packetsReceived?: number; packetsLost?: number; jitter?: number; - framesDropped?: number; // only video + + // Deprecated somewhere 2023 + // framesDropped?: number; // only video // Deprecated 2022-09-21 // --------------------- @@ -152,6 +153,24 @@ export interface RtcInboundRtpStreamStats extends RtcReceivedRtpStreamStats { framesReceived?: number; // only video decoderImplementation?: string; playoutId?: string; + + framesRendered?: number; // only video + framesDropped?: number; // only video + pauseCount?: number; // only video + totalPausesDuration?: number; // only video + freezeCount?: number; // only video + totalFreezesDuration?: number; // only video + fecBytesReceived?: number; + powerEfficientDecoder?: boolean; // only video + framesAssembledFromMultiplePackets?: number; // only video + totalAssemblyTime?: number; // only video + retransmittedPacketsReceived?: number; + retransmittedBytesReceived?: number; + rtxSsrc?: number; // only video + fecSsrc?: number; // only video + totalCorruptionProbability?: number; // only video + totalSquaredCorruptionProbability?: number; // only video + corruptionMeasurements?: number; // only video // Deprecated 2022-09-21, but kept for backward compatibility receiverId?: string; @@ -171,16 +190,17 @@ export interface RtcInboundRtpStreamStats extends RtcReceivedRtpStreamStats { } + // RTCRemoteInboundRtpStreamStats (https://www.w3.org/TR/webrtc-stats/#remoteinboundrtpstats-dict*) export interface RtcRemoteInboundRtpStreamStats extends RtcReceivedRtpStreamStats { - localId?: string; - roundTripTime?: number; - totalRoundTripTime?: number; - fractionLost?: number; - roundTripTimeMeasurements?: number; + localId?: string; // 20241107 + roundTripTime?: number; // 20241107 + totalRoundTripTime?: number; // 20241107 + fractionLost?: number; // 20241107 + roundTripTimeMeasurements?: number; // 20241107 // Deprecated 2022-09-21 - // reportsReceived?: number; + // reportsReceived?: number; // Commented out as per structure above } // RTCSentRtpStreamStats (https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict*) @@ -229,6 +249,11 @@ export interface RtcOutboundRTPStreamStats extends RtcSentRtpStreamStats { encoderImplementation?: string; active?: boolean; + // added 20241107 + rtxSsrc: number; + powerEfficientEncoder: boolean; + scalabilityMode: string; + // Deprecated, but due to backward compatibility it is kept here senderId?: string; @@ -265,7 +290,8 @@ export interface RtcMediaSourceStats extends RtcStats { trackIdentifier: string; kind: RtcMediaKind; - relayedSource?: boolean; + // Deprecated 2024-11-07 + // relayedSource?: boolean; } // RTCAudioSourceStats (https://www.w3.org/TR/webrtc-stats/#audiosourcestats-dict*) @@ -276,9 +302,24 @@ export interface RtcAudioSourceStats extends RtcMediaHandlerStats { echoReturnLoss?: number; // audio only echoReturnLossEnhancement?: number; // audio only + /** + * @deprecated 2024-11-07 + */ droppedSamplesDuration?: number; + + /** + * @deprecated 2024-11-07 + */ droppedSamplesEvents?: number; + + /** + * @deprecated 2024-11-07 + */ totalCaptureDelay?: number; + + /** + * @deprecated 2024-11-07 + */ totalSamplesCaptured?: number; } @@ -364,6 +405,7 @@ export interface RtcAudioReceiverStats extends RtcAudioHandlerStats { } export interface RTCAudioPlayoutStats extends RtcStats { + kind?: RtcMediaKind; synthesizedSamplesDuration?: number; synthesizedSamplesEvents?: number; totalSamplesDuration?: number; @@ -446,6 +488,12 @@ export interface RtcIceCandidateStats extends RtcStats { priority?: number; url?: string; relayProtocol?: RtcRelayProtocol; + + foundation?: string; + relatedAddress?: string; + relatedPort?: number; + usernameFragment?: string; + tcpType?: RTCIceTcpCandidateType; } export type RtcStatsIceCandidatePairState = "failed" | "cancelled" | "frozen" | "inprogress" | "succeeded" | "waiting"; diff --git a/yarn.lock b/yarn.lock index 05a85689..210b724f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -210,9 +210,9 @@ path-is-absolute@^1.0.0: integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= protobufjs@^6.11.2: - version "6.11.2" - resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz" - integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== + version "6.11.4" + resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz" + integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -248,7 +248,7 @@ typedoc@^0.22.12: minimatch "^3.0.4" shiki "^0.10.0" -"typescript@4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x", typescript@4.5.2: +typescript@4.5.2: version "4.5.2" resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz" integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==