OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
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_BASE_MEDIA_CONTENT_TYPE_H_ | |
6 #define MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ | |
7 | |
8 #include "base/time/time.h" | |
9 #include "media/base/media_export.h" | |
10 | |
11 namespace media { | |
12 | |
13 // The content type of a media player, which will be used by MediaSession to | |
14 // control its players. | |
15 enum class MediaContentType { | |
16 // Type indicating that a player is persistent, which needs to take audio | |
17 // focus to play. | |
18 Persistent, | |
19 // Type indicating that a player only plays a transient sound. | |
20 Transient, | |
21 // Type indicating that a player is a Pepper instance. MediaSession may duck | |
22 // the | |
23 // player instead of pausing it. | |
mlamouri (slow - plz ping)
2016/08/23 13:19:04
style: you seem to
break lines
too
often
:)
Zhiqiang Zhang (Slow)
2016/08/26 10:26:20
Done.
| |
24 Pepper, | |
25 // Type indicating that a player cannot be controlled. MediaSession wil ignore | |
26 // this player. | |
27 Uncontrollable | |
28 }; | |
29 | |
30 // Utility function for deciding whether a player is treated as Content type | |
Tom Sepez
2016/08/25 19:25:32
nit: for deciding the MediaContentType of a player
Zhiqiang Zhang (Slow)
2016/08/26 10:26:20
Done.
| |
31 // based on its duration. | |
32 MEDIA_EXPORT MediaContentType | |
33 DurationToMediaContentType(base::TimeDelta duration); | |
34 | |
35 } // namespace media | |
36 | |
37 #endif // MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ | |
OLD | NEW |