 Chromium Code Reviews
 Chromium Code Reviews Issue 2727123002:
  [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces  (Closed)
    
  
    Issue 2727123002:
  [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces  (Closed) 
  | 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 module media_router.mojom; | |
| 6 | |
| 7 // Represents the current state of a media content. This struct should be kept | |
| 8 // free of details specific to Media Router, so that it can be moved to the | |
| 9 // media namespace and be reused for other features in the future. | |
| 10 struct MediaStatus { | |
| 11 // The main title of the media. For example, in a MediaStatus representing | |
| 12 // a YouTube Cast session, this could be the title of the video. | |
| 13 string title; | |
| 14 // Text describing the status of the media, or a secondary title. For example, | |
| 15 // in a MediaStatus representing a YouTube Cast session, this could be | |
| 16 // "YouTube". | |
| 17 string status; | |
| 18 // If this is true, the media can be played and paused through its | |
| 19 // MediaController. | |
| 20 bool can_play_pause; | |
| 21 // If this is true, the media can be muted and unmuted through its | |
| 22 // MediaController. | |
| 23 bool can_mute; | |
| 24 // If this is true, the media's volume can be changed through its | |
| 25 // MediaController. | |
| 26 bool can_set_volume; | |
| 27 // If this is true, the media's current playback position can be changed | |
| 28 // through its MediaController. | |
| 29 bool can_seek; | |
| 30 bool is_paused; | |
| 31 bool is_muted; | |
| 32 // Current volume of the media, with 1 being the highest and 0 being the | |
| 33 // lowest/no sound. When |is_muted| is true, there should be no sound | |
| 34 // regardless of |volume|. | |
| 35 float volume; | |
| 36 // The length of the media in milliseconds. A value of 0 indicates that this | |
| 37 // is a media with no set duration (e.g. a live stream). | |
| 38 uint32 duration; | |
| 
dcheng
2017/03/08 01:08:20
Can we use mojo.common.mojom.TimeDelta from https:
 
takumif
2017/03/08 04:24:03
Done.
 | |
| 39 // Current playback position in milliseconds. Must be less than or equal to | |
| 40 // |duration|. | |
| 41 uint32 current_time; | |
| 
dcheng
2017/03/08 01:08:20
Same here.
 
takumif
2017/03/08 04:24:03
Done.
 | |
| 42 }; | |
| 43 | |
| 44 // Interface for being notified whenever the MediaStatus of a media changes. | |
| 45 // This interface should be kept free of details specific to Media Router, so | |
| 46 // that it can be moved to the media namespace and be reused for other features | |
| 47 // in the future. | |
| 48 interface MediaStatusObserver { | |
| 49 OnMediaStatusUpdated(MediaStatus status); | |
| 50 }; | |
| OLD | NEW |