OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/time/time.h" |
| 11 |
| 12 namespace media_router { |
| 13 |
| 14 // Represents the current state of a media content. |
| 15 struct MediaStatus { |
| 16 public: |
| 17 MediaStatus(); |
| 18 MediaStatus(const MediaStatus& other); |
| 19 ~MediaStatus(); |
| 20 |
| 21 MediaStatus& operator=(const MediaStatus& other); |
| 22 bool operator==(const MediaStatus& other) const; |
| 23 |
| 24 // The main title of the media. For example, in a MediaStatus representing |
| 25 // a YouTube Cast session, this could be the title of the video. |
| 26 std::string title; |
| 27 |
| 28 // Text describing the status of the media, or a secondary title. For example, |
| 29 // in a MediaStatus representing a YouTube Cast session, this could be |
| 30 // "YouTube". |
| 31 std::string status; |
| 32 |
| 33 // If this is true, the media can be played and paused. |
| 34 bool can_play_pause = false; |
| 35 |
| 36 // If this is true, the media can be muted and unmuted. |
| 37 bool can_mute = false; |
| 38 |
| 39 // If this is true, the media's volume can be changed. |
| 40 bool can_set_volume = false; |
| 41 |
| 42 // If this is true, the media's current playback position can be changed. |
| 43 bool can_seek = false; |
| 44 |
| 45 bool is_paused = false; |
| 46 |
| 47 bool is_muted = false; |
| 48 |
| 49 // Current volume of the media, with 1 being the highest and 0 being the |
| 50 // lowest/no sound. When |is_muted| is true, there should be no sound |
| 51 // regardless of |volume|. |
| 52 float volume = 0; |
| 53 |
| 54 // The length of the media. A value of zero indicates that this is a media |
| 55 // with no set duration (e.g. a live stream). |
| 56 base::TimeDelta duration; |
| 57 |
| 58 // Current playback position. Must be less than or equal to |duration|. |
| 59 base::TimeDelta current_time; |
| 60 }; |
| 61 |
| 62 } // namespace media_router |
| 63 |
| 64 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |
OLD | NEW |