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.

Session options

metadata (record<string, string>)

KeyValue

Configure metadata and start a session.

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

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗