Fix FullScreen crash in Webapp
[platform/framework/web/chromium-efl.git] / media / remoting / remoting_constants.h
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.
4
5 #ifndef MEDIA_REMOTING_REMOTING_CONSTANTS_H_
6 #define MEDIA_REMOTING_REMOTING_CONSTANTS_H_
7
8 namespace media::remoting {
9
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";
13
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;
18
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;
24
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;
28
29 }  // namespace media::remoting
30
31 #endif  // MEDIA_REMOTING_REMOTING_CONSTANTS_H_