Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
webrtc-issue-detector
Advanced tools
WebRTC diagnostic tool that detects issues with network or user devices
Diagnostic tool for WebRTC applications that analyzes WebRTC getStats() result in realtime and generates a report on possible issues.
yarn add webrtc-issue-detector
import WebRTCIssueDetector from 'webrtc-issue-detector';
// create it before the first instance of RTCPeerConnection is created
const webRtcIssueDetector = new WebRTCIssueDetector({
onIssues: (issues) => issues.map((issue) => {
console.log('Issues type:', issue.type); // eg. "network"
console.log('Issues reason:', issue.reason); // eg. "outbound-network-throughput"
console.log('Issues reason:', issue.debug); // eg. "packetLoss: 12%, jitter: 230, rtt: 150"
}),
onNetworkScoresUpdated: (scores) => {
console.log('Inbound network score', scores.inbound); // eg. 3.7
console.log('Outbound network score', scores.outbound); // eg. 4.5
}
});
// start collecting getStats() and detecting issues
webRtcIssueDetector.watchNewPeerConnections();
import WebRTCIssueDetector, {
QualityLimitationsIssueDetector,
FramesDroppedIssueDetector,
FramesEncodedSentIssueDetector,
InboundNetworkIssueDetector,
OutboundNetworkIssueDetector,
NetworkMediaSyncIssueDetector,
AvailableOutgoingBitrateIssueDetector,
VideoCodecMismatchDetector,
CompositeRTCStatsParser,
WebRTCIssueEmitter,
NetworkScoresCalculator,
PeriodicWebRTCStatsReporter,
RTCStatsParser,
} from 'webrtc-issue-detector';
new WebRTCIssueDetector({
issueEmitter: new WebRTCIssueEmitter(),
networkScoresCalculator: new NetworkScoresCalculator(),
detectors: [
new QualityLimitationsIssueDetector(),
new FramesDroppedIssueDetector(),
new FramesEncodedSentIssueDetector(),
new InboundNetworkIssueDetector(),
new OutboundNetworkIssueDetector(),
new NetworkMediaSyncIssueDetector(),
new AvailableOutgoingBitrateIssueDetector(),
new VideoCodecMismatchDetector(),
],
statsReporter: new PeriodicWebRTCStatsReporter({
compositeStatsParser,
getStatsInterval: 5000,
}),
onIssues: params.onIssues,
onNetworkScoresUpdated: params.onNetworkScoresUpdated,
ignoreSSRCList: params.ignoreSSRCList,
compositeStatsParser,
logger,
});
Detects issues with outgoing network connection.
{
type: 'network',
reason: 'outbound-network-throughput',
debug: '...'
}
Detects issues with decoder.
{
type: 'cpu',
reason: 'decoder-cpu-throttling',
debug: '...'
}
Detects issues with outbound network throughput.
{
type: 'network',
reason: 'outbound-network-throughput',
debug: '...'
}
Detects issues with inbound network connection.
{
type: 'network',
reason: 'inbound-network-quality' | 'inbound-network-media-latency' | 'network-media-sync-failure',
iceCandidate: 'ice-candidate-id'
debug: '...'
}
Also can detect server side issues if there is high RTT and jitter is ok.
{
type: 'server',
reason: 'server-issue',
iceCandidate: 'ice-candidate-id'
debug: '...'
}
Detects issues with audio syncronization.
{
type: 'network',
reason: 'network-media-sync-failure',
ssrc: '...'
debug: '...'
}
Detects issues with outbound network connection.
{
type: 'network',
reason: 'outbound-network-quality' | 'outbound-network-media-latency',
iceCandidate: 'ice-candidate-id'
debug: '...'
}
Detects issues with encoder and outbound network. Based on native qualitiLimitationReason.
{
type: 'cpu',
reason: 'encoder-cpu-throttling',
ssrc: '...'
debug: '...'
}
{
type: 'network',
reason: 'outbound-network-throughput',
ssrc: '...'
debug: '...'
}
Detects issues with decoding stream.
{
type: 'stream',
reason: 'codec-mismatch',
ssrc: '...',
trackIdentifier: '...',
debug: '...'
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
WebRTC diagnostic tool that detects issues with network or user devices
The npm package webrtc-issue-detector receives a total of 5,648 weekly downloads. As such, webrtc-issue-detector popularity was classified as popular.
We found that webrtc-issue-detector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.