// 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.
// For more information, see the explainer at
// https://github.com/webscreens/site-initiated-mirroring/blob/main/explainer.md
// Indicates the preferred tradeoff between low latency and smooth streaming.
// The actual behavior is implementation specific. Only applies to mirroring
// sources.
// TODO(crbug.com/600726): Set RuntimeEnabled here if support is ever added for
// enums (currently it is a no-op).
enum CaptureLatency {
"default",
// Having a smooth stream is prioritized over having a low latency.
"high",
// Having a low latency is prioritized over having a smooth stream.
"low",
};
// Indicates where the audio playback should occur. Only applies to mirroring
// sources.
// TODO(crbug.com/600726): Set RuntimeEnabled here if support is ever added for
// enums (currently it is a no-op).
enum AudioPlaybackDestination {
"receiver",
"controller",
};
// TODO(crbug.com/600726): Set RuntimeEnabled here if support is ever added for
// enums (currently it is a no-op).
enum PresentationSourceType {
"url",
"mirroring",
};
dictionary PresentationSource {
required PresentationSourceType type;
// Used if `type` is "url".
USVString? url;
// Used if `type` is "mirroring".
CaptureLatency? latencyHint;
AudioPlaybackDestination? audioPlayback;
};