chromium/third_party/blink/renderer/modules/breakout_box/video_track_generator.idl

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// See spec in developement at
// https://w3c.github.io/mediacapture-transform/

[
    Exposed(Window VideoTrackGeneratorInWindow),
    // Don't expose in worker even under a flag until the implementation
    // is far enough along to be considered secure.
    // TODO(https://crbug.com/1300528): Implement for worker.
    // The syntax for separate flags for window and worker is:
    //   Exposed(Window VideoTrackGeneratorInWindow, Worker VideoTrackGeneratorInWorker),
   RuntimeEnabled=VideoTrackGenerator
]
interface VideoTrackGenerator {
  [CallWith=ScriptState, RaisesException,
   MeasureAs=VideoTrackGenerator
  ]
  constructor();
  [CallWith=ScriptState] readonly attribute WritableStream writable;
  attribute boolean muted;
  readonly attribute MediaStreamTrack track;
};