1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_REMOTING_REMOTING_CONSTANTS_H_
6 #define MEDIA_REMOTING_REMOTING_CONSTANTS_H_
8 namespace media::remoting {
10 // The src attribute for remoting media should use the URL with this scheme.
11 // The URL format is "media-remoting:<id>", e.g. "media-remoting:test".
12 constexpr char kRemotingScheme[] = "media-remoting";
14 // The minimum media element duration that is allowed for media remoting. Note
15 // that RendererController needs at least `kPixelRateCalInSec` to calculate the
16 // pixel rate before remoting can start.
17 constexpr double kMinRemotingMediaDurationInSec = 15;
19 // The minimum media element duration that is allowed for switching from
20 // mirroring to media remoting by bringing the video to fullscreen mode.
21 // Frequent switching into and out of media remoting for short-duration media
22 // can feel "janky" to the user.
23 constexpr double kMinMediaDurationForSwitchingToRemotingInSec = 60;
25 // The duration to wait and calculate the pixel rate of the media element and to
26 // ensure that all preconditions are held stable before starting media remoting.
27 constexpr double kPixelRateCalInSec = 5;
29 } // namespace media::remoting
31 #endif // MEDIA_REMOTING_REMOTING_CONSTANTS_H_