webrtc-issue-detector
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -38,8 +38,8 @@ import PeriodicWebRTCStatsReporter from './parser/PeriodicWebRTCStatsReporter'; | ||
export declare type WebRTCIssueDetectorConstructorParams = { | ||
issueEmitter: WebRTCIssueEmitter; | ||
networkScoresCalculator: INetworkScoresCalculator; | ||
detectors: IssueDetector[]; | ||
compositeStatsParser: CompositeStatsParser; | ||
statsReporter: PeriodicWebRTCStatsReporter; | ||
logger: Logger; | ||
issueEmitter?: WebRTCIssueEmitter; | ||
networkScoresCalculator?: INetworkScoresCalculator; | ||
detectors?: IssueDetector[]; | ||
compositeStatsParser?: CompositeStatsParser; | ||
statsReporter?: PeriodicWebRTCStatsReporter; | ||
logger?: Logger; | ||
onIssues?: (payload: IssueDetectorResult) => void; | ||
@@ -46,0 +46,0 @@ onNetworkScoresUpdated?: (payload: NetworkScores) => void; |
{ | ||
"name": "webrtc-issue-detector", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "WebRTC diagnostic tool that detects issues with network or user devices", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle-cjs.js", |
@@ -42,2 +42,5 @@ # webrtc-issue-detector | ||
### Configure | ||
By default, WebRTCIssueDetector can be created with minimum of mandatory constructor parameters. But it's possible to override most of them. | ||
```typescript | ||
@@ -53,13 +56,10 @@ import WebRTCIssueDetector, { | ||
VideoCodecMismatchDetector, | ||
CompositeRTCStatsParser, | ||
WebRTCIssueEmitter, | ||
NetworkScoresCalculator, | ||
PeriodicWebRTCStatsReporter, | ||
RTCStatsParser, | ||
} from 'webrtc-issue-detector'; | ||
new WebRTCIssueDetector({ | ||
issueEmitter: new WebRTCIssueEmitter(), | ||
networkScoresCalculator: new NetworkScoresCalculator(), | ||
detectors: [ | ||
const widWithDefaultConstructorArgs = new WebRTCIssueDetector(); | ||
// or you can fully customize WebRTCIssueDetector with constructor arguments | ||
const widWithCustomConstructorArgs = new WebRTCIssueDetector({ | ||
detectors: [ // you are free to change the detectors list according to your needs | ||
new QualityLimitationsIssueDetector(), | ||
@@ -74,11 +74,12 @@ new FramesDroppedIssueDetector(), | ||
], | ||
statsReporter: new PeriodicWebRTCStatsReporter({ | ||
compositeStatsParser, | ||
getStatsInterval: 5000, | ||
}), | ||
onIssues: params.onIssues, | ||
onNetworkScoresUpdated: params.onNetworkScoresUpdated, | ||
ignoreSSRCList: params.ignoreSSRCList, | ||
compositeStatsParser, | ||
logger, | ||
getStatsInterval: 10_000, // set custom stats parsing interval | ||
onIssues: (payload: IssueDetectorResult) => { | ||
// your custom callback for detected issues handling | ||
}, | ||
onNetworkScoresUpdated: (payload: NetworkScores) => { | ||
// your custom callback for networks score updates handling | ||
}, | ||
ignoreSSRCList: [ | ||
// in case you need to skip some ssrc from parsing, add its numbers to the array | ||
], | ||
}); | ||
@@ -92,6 +93,6 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'outbound-network-throughput', | ||
debug: '...' | ||
debug: '...', | ||
} | ||
@@ -103,6 +104,6 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'cpu', | ||
reason: 'decoder-cpu-throttling', | ||
debug: '...' | ||
debug: '...', | ||
} | ||
@@ -114,6 +115,6 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'outbound-network-throughput', | ||
debug: '...' | ||
debug: '...', | ||
} | ||
@@ -125,7 +126,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'inbound-network-quality' | 'inbound-network-media-latency' | 'network-media-sync-failure', | ||
iceCandidate: 'ice-candidate-id' | ||
debug: '...' | ||
iceCandidate: 'ice-candidate-id', | ||
debug: '...', | ||
} | ||
@@ -136,7 +137,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'server', | ||
reason: 'server-issue', | ||
iceCandidate: 'ice-candidate-id' | ||
debug: '...' | ||
iceCandidate: 'ice-candidate-id', | ||
debug: '...', | ||
} | ||
@@ -148,7 +149,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'network-media-sync-failure', | ||
ssrc: '...' | ||
debug: '...' | ||
ssrc: '...', | ||
debug: '...', | ||
} | ||
@@ -160,7 +161,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'outbound-network-quality' | 'outbound-network-media-latency', | ||
iceCandidate: 'ice-candidate-id' | ||
debug: '...' | ||
iceCandidate: 'ice-candidate-id', | ||
debug: '...', | ||
} | ||
@@ -172,7 +173,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'cpu', | ||
reason: 'encoder-cpu-throttling', | ||
ssrc: '...' | ||
debug: '...' | ||
ssrc: '...', | ||
debug: '...', | ||
} | ||
@@ -182,7 +183,7 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'network', | ||
reason: 'outbound-network-throughput', | ||
ssrc: '...' | ||
debug: '...' | ||
ssrc: '...', | ||
debug: '...', | ||
} | ||
@@ -194,3 +195,3 @@ ``` | ||
```js | ||
{ | ||
const issue = { | ||
type: 'stream', | ||
@@ -200,3 +201,3 @@ reason: 'codec-mismatch', | ||
trackIdentifier: '...', | ||
debug: '...' | ||
debug: '...', | ||
} | ||
@@ -203,0 +204,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72060
205