Skip to content

Add bounded MediaDevices enumeration and constraints surface #773

Description

@wieslawsoltes

Parent: #770
Native transport/provider: SceneTech/AppScene#289, #290, #292
Capability ledger: #263

Focused scope

Add the first browser-facing microphone slice for unchanged Code OSS:

  • install branded MediaDevices and MediaDeviceInfo objects on secure top-level realms;
  • implement bounded promise-based enumerateDevices() through the existing typed native host request/completion queue;
  • carry only the document security origin in the request and accept a strict versioned JSON media-device payload with fixed byte/device/string limits;
  • expose getSupportedConstraints() for the exact audio constraints used by Code OSS;
  • expose getUserMedia() as an explicit NotSupportedError until the capture/track child lands, preventing synthetic-success claims;
  • preserve request cancellation across navigation/realm teardown and reject denied/malformed/oversized host responses with browser-shaped errors;
  • add WPT-derived/browser-oracle and native host ABI regression contracts without patching VS Code OSS.

Gates

Cover branding, descriptors, same-object navigator.mediaDevices, ordering, permission-redacted labels supplied by the host, bounds, malformed payloads, denial, queue pressure, stale completion and navigation teardown. Execution is deferred under the current throughput directive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions