Skip to content

Phase 3: Implement GetUserMedia with full constraint handling #51

Open

Description

@General-Fault

Implement MediaDevices::GetUserMedia(MediaStreamConstraints). Handle both simple (bool audio/video) and advanced (detailed constraints) modes. Marshal constraints to native format. Create audio/video sources and return MediaStream with tracks.

Dependencies: Phase 2

Files to modify:

  • WebRtcInterop/Media/MediaDevices.h/cpp

Activity

  1. General-Fault commented on Jun 5, 2026

    @General-Fault
    OwnerAuthor

    Status update from merged PR #57 (#57):

    Implemented in this phase:

    • MediaDevices::GetUserMedia(...) now creates native local streams and adds requested audio/video tracks.
    • Audio path uses CreateAudioSource(AudioOptions) + CreateAudioTrack(...).
    • Video path now uses camera-backed capture (CameraVideoSource) with capability fallback startup tiers.
    • Validation/error behavior improved for missing requested device kinds and track creation failures.

    Still pending for this issue (full scope):

    • Full marshalling and enforcement of detailed MediaStreamConstraints.AudioConstraints / VideoConstraints.
    • Constraint-driven device/source selection semantics beyond bool-kind request handling.

    Plan update:

    1. Implement full constraints marshalling/application path in MediaDevices (kind + detailed constraints).
    2. Align failure taxonomy with Media Capture expectation where constraints are unsatisfiable.
    3. Add/extend interop tests around advanced constraint flows.

    Related follow-ups:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions