Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@testrtc/watchrtc-sdk
Advanced tools
watchRTC enables application developers to collect, track and analyze telemetry and metrics of real users on any WebRTC application.
This is done by including our watchRTC SDK which connects to the testRTC backend and collects the relevant data.
yarn add @testrtc/watchrtc-sdk
npm install @testrtc/watchrtc-sdk
<script src="https://unpkg.com/@testrtc/watchrtc-sdk/lib/index.js"></script>
Before any of your WebRTC javascript code, you need to include and initialize our SDK.
The watchRTC.init() needs to take place prior to including or loading any 3rd party SDKs that interact with WebRTC - failing to do so may hinder our ability to collect data.
Use the following initialization sequence:
const watchRTC = require("@testrtc/watchrtc-sdk");
watchRTC.init();
import watchRTC from "@testrtc/watchrtc-sdk";
watchRTC.init();
with CDN
<!DOCTYPE html>
<html lang="en">
<head>
<title>watchRT SDK</title>
</head>
<body>
<script src="https://unpkg.com/@testrtc/watchrtc-sdk/lib/index.js"></script>
<script>
watchRTC.init();
</script>
</body>
</html>
This will transparently modify the RTCPeerConnection objects, allowing it to connect to the watchRTC backend service transparently to your application. The watchRTC parameter is needed to make this connection.
var pc = new RTCPeerConnection({
...,
watchrtc:{
rtcApiKey: "watchRTC API key",
rtcRoomId: "identifier for the session",
rtcPeerId: "identifier for the current peer",
rtcTags: ["tag1", "tag2", "tag3"]
}
});
Instead of calling
watchRTC.init();
you can use next approach - this is useful when you don't have a direct/easy access to the RTCPeerConnection object:
watchRTC.init({
rtcApiKey: "watchRTC API key",
rtcRoomId: "identifier for the session",
rtcPeerId: "identifier for the current peer",
rtcTags: ["tag1", "tag2", "tag3"],
});
You also can use watchRTC.setConfig
function to set watchRTC configuration after calling init() and before the creation of RTCPeerConnection objects:
watchRTC.setConfig({
rtcApiKey: "watchRTC API key",
rtcRoomId: "identifier for the session",
rtcPeerId: "identifier for the current peer",
rtcTags: ["tag1", "tag2", "tag3"],
});
This will override peerconnection and will use those values.
You can use watchRTC.disableDataCollection()
and watchRTC.disableDataCollection()
to control what data you want to send.
https://github.com/testRTC/sample-Twilio-video-app-React-TypeScript-watchRTC
FAQs
Monitor your WebRTC application by collecting WebRTC statistics from end users
The npm package @testrtc/watchrtc-sdk receives a total of 3,312 weekly downloads. As such, @testrtc/watchrtc-sdk popularity was classified as popular.
We found that @testrtc/watchrtc-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.