v150 · WebRTC
Bug-report companion
When a user reports a broken call, you want the browser's diagnostics and your app's context lined up. Start a session with allowUpload: true so the user can share the log with the browser vendor, attach structured metadata, and stamp the returned session ID onto your bug report. The spec caps metadata at 5 entries with keys/values ≤ 100 characters — exceed it and Chromium currently rejects with a RangeError (rtc.cc), while the WICG spec mandates a TypeError — a live spec/implementation divergence this demo surfaces as-is. Chromium measures the limit in UTF-8 bytes, so non-ASCII metadata can trip it sooner than the JavaScript character count below suggests.
navigator.rtc is not available in this browser.Launch Chrome 150+ with
--enable-blink-features=RTCDiagnosticLogging, or enable
chrome://flags/#enable-experimental-web-platform-features and reload over HTTPS/localhost.
The start button calls the real API and shows exactly what it returns.
Bug report — auto-stamped with the session ID
rtc-log: (none yet)
Start a session to generate a bug-report stub.
const id = await navigator.rtc.startDiagnosticLogging({
allowUpload: true, // user may share the log with the vendor
metadata: { // ≤ 5 entries, keys/values ≤ 100 chars
app: "acme-meet",
version: "4.7.1",
callId: "c-88213",
},
});
fileBugReport({ rtcDiagnosticId: id }); // attach ID, like a crash ID
see also
- Logging lifecycle — start / finish / cancel
- Capability & policy probe — the enterprise-policy gate
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗