Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Add JS doc and bump version (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-stasiak authored Mar 12, 2024
1 parent 071dfd0 commit 8fd0b29
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 12 deletions.
44 changes: 38 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jellyfish-dev/ts-client-sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "Typescript client library for Jellyfish.",
"license": "Apache-2.0",
"author": "Membrane Team",
Expand Down Expand Up @@ -62,7 +62,7 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@jellyfish-dev/membrane-webrtc-js": "^0.7.0",
"@jellyfish-dev/membrane-webrtc-js": "^0.7.1",
"events": "^3.3.0",
"ts-proto": "^1.165.0",
"typed-emitter": "^2.1.0"
Expand Down
13 changes: 13 additions & 0 deletions src/JellyfishClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,19 @@ export class JellyfishClient<PeerMetadata, TrackMetadata> extends (EventEmitter
this.status = "initialized";
}

/**
* Retrieves statistics related to the RTCPeerConnection.
* These statistics provide insights into the performance and status of the connection.
*
* @return {Promise<RTCStatsReport>}
*
* @external RTCPeerConnection#getStats()
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/getStats | MDN Web Docs: RTCPeerConnection.getStats()}
*/
public async getStatistics(selector?: MediaStreamTrack | null): Promise<RTCStatsReport> {
return (await this.webrtc?.getStatistics(selector)) ?? new Map();
}

/**
* Returns a snapshot of currently received remote tracks.
*
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz"
integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==

"@jellyfish-dev/membrane-webrtc-js@^0.7.0":
version "0.7.0"
resolved "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.7.0.tgz"
integrity sha512-FEYpL52W1QekhPiv88hJY/0mlZwGu6cWWH/xvjgf1pehCXiyqYv6icIBRsYqRLdgmivVFTaUbQTLIv4Yn7RKYw==
"@jellyfish-dev/membrane-webrtc-js@^0.7.1":
version "0.7.1"
resolved "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.7.1.tgz"
integrity sha512-hcxXJoDt4B+/qRL2Y6dEySAa+hXIwboJTJfrUU2iMulL0HyXkRnSNyy2Fwi+evweDfyKecAM4T1HsX2tgG15Tw==
dependencies:
events "^3.3.0"
typed-emitter "^2.1.0"
Expand Down

0 comments on commit 8fd0b29

Please sign in to comment.