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 player instead of pausing it. |
| 23 Pepper, |
| 24 // Type indicating that a player cannot be controlled. MediaSession wil ignore |
| 25 // this player. |
| 26 Uncontrollable |
| 27 }; |
| 28 |
| 29 // Utility function for deciding the MediaContentType of a player based on its |
| 30 // duration. |
| 31 MEDIA_EXPORT MediaContentType |
| 32 DurationToMediaContentType(base::TimeDelta duration); |
| 33 |
| 34 } // namespace media |
| 35 |
| 36 #endif // MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ |
OLD | NEW |