Skip to content

Commit

Permalink
Version 2.2.0 (#34)
Browse files Browse the repository at this point in the history
 * Add CustomCallEvent to ClientSample
 * Add CustomObserverEvent to clientSample
 * Add SfuCustomEvent to SfuSamples
  • Loading branch information
balazskreith authored Nov 20, 2022
1 parent 19b477f commit 5ede081
Show file tree
Hide file tree
Showing 23 changed files with 1,506 additions and 246 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/release-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
publish-npm:
Expand All @@ -20,15 +23,26 @@ jobs:
run: yarn
working-directory: ${{env.working-directory}}

# - name: publish
# run: npm publish --access public
# working-directory: ${{env.working-directory}}
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Setup Custom Contexts
working-directory: ${{env.working-directory}}
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
echo "##[set-output name=version;]$(cat ./package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')"
id: job_context

- name: Make snapshot version
if: steps.job_context.outputs.branch != 'main'
working-directory: ${{env.working-directory}}
run: |
npm version ${{ steps.job_context.outputs.version }}-SNAPSHOT.${{ github.sha }}
- name: Publish
working-directory: ${{env.working-directory}}
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --ignore-scripts --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


22 changes: 17 additions & 5 deletions .github/workflows/release-monitorlib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
publish-npm:
Expand All @@ -20,11 +23,20 @@ jobs:
run: yarn
working-directory: ${{env.working-directory}}

# - name: publish
# run: npm publish --access public
# working-directory: ${{env.working-directory}}
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Setup Custom Contexts
working-directory: ${{env.working-directory}}
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
echo "##[set-output name=version;]$(cat ./package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')"
id: job_context

- name: Make snapshot version
if: steps.job_context.outputs.branch != 'main'
working-directory: ${{env.working-directory}}
run: |
npm version ${{ steps.job_context.outputs.version }}-SNAPSHOT.${{ github.sha }}
- name: Publish
working-directory: ${{env.working-directory}}
run: |
Expand Down
44 changes: 44 additions & 0 deletions npm-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Javascript bindings for ObserveRTC schemas
* [SfuOutboundRtpPad](#SfuOutboundRtpPad)
* [SfuInboundRtpPad](#SfuInboundRtpPad)
* [SfuTransport](#SfuTransport)
* [CustomSfuEvent](#CustomSfuEvent)
* [SfuSample](#SfuSample)
* [IceRemoteCandidate](#IceRemoteCandidate)
* [IceLocalCandidate](#IceLocalCandidate)
Expand All @@ -43,6 +44,8 @@ Javascript bindings for ObserveRTC schemas
* [IceCandidatePair](#IceCandidatePair)
* [PeerConnectionTransport](#PeerConnectionTransport)
* [DataChannel](#DataChannel)
* [CustomObserverEvent](#CustomObserverEvent)
* [CustomCallEvent](#CustomCallEvent)
* [ExtensionStat](#ExtensionStat)
* [MediaDevice](#MediaDevice)
* [OperationSystem](#OperationSystem)
Expand Down Expand Up @@ -834,6 +837,30 @@ 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


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


Expand Down Expand Up @@ -1190,6 +1217,8 @@ mediaConstraints | The WebRTC app provided List of the media constraints the cli
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 call events
iceServers | The WebRTC app provided List of ICE server the client used.
localSDPs | The local part of the Signal Description Protocol to establish connections
dataChannels | Measurements about the data channels currently avaialble on peer connections
Expand All @@ -1207,6 +1236,20 @@ iceRemoteCandidates | List of remote ICE candidates
timeZoneOffsetInHours | The offset from GMT in hours
marker | Special marker for the samples

## CustomSfuEvent


Field | Description
--- | ---
name (**Mandatory**) | the name of the event used as identifier. (e.g.: CLIENT_REJOINED, etc..)
value | the value of the event
transportId | The unique identifier of the sfu transport the event is related to
sfuStreamId | The identifier of the sfu stream the event is related to
sfuSinkId | The identifier of the sfu sink 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

## SfuTransport


Expand Down Expand Up @@ -1372,6 +1415,7 @@ sfuId (**Mandatory**) | Unique generated id for the sfu samples are originated f
timestamp (**Mandatory**) | The timestamp the sample is created in GMT
timeZoneOffsetInHours | The offset from GMT in hours
marker | Special marker for the samples
customSfuEvents | User provided custom call events
transports | The Sfu Transports obtained measurements
inboundRtpPads | The Sfu Inbound Rtp Pad obtained measurements
outboundRtpPads | The Sfu Outbound Rtp Pad obtained measurements
Expand Down
6 changes: 2 additions & 4 deletions npm-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@observertc/schemas",
"version": "2.1.9",
"version": "2.2.0",
"description": "ObserveRTC Library for Schemas",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -9,9 +9,7 @@
},
"scripts": {
"prepare": "npm run build",
"build": "tsc",
"version": "npm run format && git add -A src",
"postversion": "git push && git push --tags"
"build": "tsc"
},
"keywords": [
"webrtc",
Expand Down
2 changes: 1 addition & 1 deletion npm-lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ export { jsonDescriptor as ProtobufSamplesJson } from "./samples/ProtobufSamples
export { schema as ProtobufSamplesV3 } from "./samples/ProtobufSamplesV3";
export { jsonDescriptor as ProtobufSamplesV3Json } from "./samples/ProtobufSamplesV3Json";
export * as W3CStats from "./w3c/W3cStatsIdentifiers";
export const version = "2.1.9";
export const version = "2.2.0";
103 changes: 66 additions & 37 deletions npm-lib/src/samples/ProtobufSamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ message Samples {
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;
Expand Down Expand Up @@ -326,36 +342,48 @@ message Samples {
}
repeated Certificate certificates = 1;
repeated MediaCodecStats codecs = 2;
repeated DataChannel dataChannels = 3;
repeated ExtensionStat extensionStats = 4;
repeated IceCandidatePair iceCandidatePairs = 5;
repeated IceLocalCandidate iceLocalCandidates = 6;
repeated IceRemoteCandidate iceRemoteCandidates = 7;
repeated string iceServers = 8;
repeated InboundAudioTrack inboundAudioTracks = 9;
repeated InboundVideoTrack inboundVideoTracks = 10;
repeated string localSDPs = 11;
repeated string mediaConstraints = 12;
repeated MediaDevice mediaDevices = 13;
repeated MediaSourceStat mediaSources = 14;
repeated OutboundAudioTrack outboundAudioTracks = 15;
repeated OutboundVideoTrack outboundVideoTracks = 16;
repeated PeerConnectionTransport pcTransports = 17;
repeated string userMediaErrors = 18;
required string clientId = 19;
required int64 timestamp = 20;
optional Browser browser = 21;
optional string callId = 22;
optional Engine engine = 23;
optional string marker = 24;
optional OperationSystem os = 25;
optional Platform platform = 26;
optional string roomId = 27;
optional int32 sampleSeq = 28;
optional int32 timeZoneOffsetInHours = 29;
optional string userId = 30;
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;
Expand Down Expand Up @@ -491,15 +519,16 @@ message Samples {
required string payload = 1;
required string type = 2;
}
repeated SfuExtensionStats extensionStats = 1;
repeated SfuInboundRtpPad inboundRtpPads = 2;
repeated SfuOutboundRtpPad outboundRtpPads = 3;
repeated SfuSctpChannel sctpChannels = 4;
repeated SfuTransport transports = 5;
required string sfuId = 6;
required int64 timestamp = 7;
optional string marker = 8;
optional int32 timeZoneOffsetInHours = 9;
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 {
Expand Down
Loading

0 comments on commit 5ede081

Please sign in to comment.