Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: media/base/media_content_type.h

Issue 2475473002: Implement one-shot audio focus inside MediaSession (Closed)
Patch Set: fixed a case where removing the last one-shot player Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ 5 #ifndef MEDIA_BASE_MEDIA_CONTENT_TYPE_H_
6 #define MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ 6 #define MEDIA_BASE_MEDIA_CONTENT_TYPE_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/base/media_export.h" 9 #include "media/base/media_export.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 // The content type of a media player, which will be used by MediaSession to 13 // The content type of a media player, which will be used by MediaSession to
14 // control its players. 14 // control its players.
15 enum class MediaContentType { 15 enum class MediaContentType {
16 // Type indicating that a player is persistent, which needs to take audio 16 // Type indicating that a player is persistent, which needs to take audio
17 // focus to play. 17 // focus to play.
18 Persistent, 18 Persistent,
19 // Type indicating that a player only plays a transient sound. 19 // Type indicating that a player only plays a transient sound.
20 Transient, 20 Transient,
21 // Type indicating that a player is a Pepper instance. MediaSession may duck 21 // Type indicating that a player is a Pepper instance. MediaSession may duck
22 // the player instead of pausing it. 22 // the player instead of pausing it.
23 Pepper, 23 Pepper,
24 // Type indicating that a player cannot be controlled. MediaSession wil ignore 24 // Type indicating that a player cannot be controlled. MediaSession will take
25 // this player. 25 // audio focus when the player joins but will not let it respond to audio
26 Uncontrollable 26 // focus changes.
27 OneShot,
28 // The maximum number of media content types.
29 Max = OneShot,
27 }; 30 };
28 31
29 // Utility function for deciding the MediaContentType of a player based on its 32 // Utility function for deciding the MediaContentType of a player based on its
30 // duration. 33 // duration.
31 MEDIA_EXPORT MediaContentType 34 MEDIA_EXPORT MediaContentType
32 DurationToMediaContentType(base::TimeDelta duration); 35 DurationToMediaContentType(base::TimeDelta duration);
33 36
34 } // namespace media 37 } // namespace media
35 38
36 #endif // MEDIA_BASE_MEDIA_CONTENT_TYPE_H_ 39 #endif // MEDIA_BASE_MEDIA_CONTENT_TYPE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698