OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
imcheng
2017/03/28 23:47:41
It seems this and other .mojom files should be in
takumif
2017/03/29 01:03:41
Actually, media/capture/mojo/ doesn't have an inte
| |
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 module media_router.mojom; | 5 module media_router.mojom; |
6 | 6 |
7 import "chrome/browser/media/router/mojo/media_status.mojom"; | 7 import "media/router/mojo/media_status.mojom"; |
8 import "mojo/common/time.mojom"; | 8 import "mojo/common/time.mojom"; |
9 | 9 |
10 // Interface for a controller to change the current state of a media content. | 10 // Interface for a controller to change the current state of a media content. |
11 // This interface should be kept free of details specific to Media Router, so | 11 // This interface should be kept free of details specific to Media Router, so |
12 // that it can be moved to the media namespace and be reused for other features | 12 // that it can be moved to the media namespace and be reused for other features |
13 // in the future. | 13 // in the future. |
14 interface MediaController { | 14 interface MediaController { |
15 // Starts playing the media if it is paused. Is a no-op if not supported by | 15 // Starts playing the media if it is paused. Is a no-op if not supported by |
16 // the media or the media is already playing. | 16 // the media or the media is already playing. |
17 Play(); | 17 Play(); |
18 | 18 |
19 // Pauses the media if it is playing. Is a no-op if not supported by the media | 19 // Pauses the media if it is playing. Is a no-op if not supported by the media |
20 // or the media is already paused. | 20 // or the media is already paused. |
21 Pause(); | 21 Pause(); |
22 | 22 |
23 // Mutes the media if |mute| is true, and unmutes it if false. Is a no-op if | 23 // Mutes the media if |mute| is true, and unmutes it if false. Is a no-op if |
24 // not supported by the media. | 24 // not supported by the media. |
25 SetMute(bool mute); | 25 SetMute(bool mute); |
26 | 26 |
27 // Changes the current volume of the media, with 1 being the highest and 0 | 27 // Changes the current volume of the media, with 1 being the highest and 0 |
28 // being the lowest/no sound. Does not change the (un)muted state of the | 28 // being the lowest/no sound. Does not change the (un)muted state of the |
29 // media. Is a no-op if not supported by the media. | 29 // media. Is a no-op if not supported by the media. |
30 SetVolume(float volume); | 30 SetVolume(float volume); |
31 | 31 |
32 // Sets the current playback position. |time| must be less than or equal to | 32 // Sets the current playback position. |time| must be less than or equal to |
33 // the duration of the media. Is a no-op if the media doesn't support seeking. | 33 // the duration of the media. Is a no-op if the media doesn't support seeking. |
34 Seek(mojo.common.mojom.TimeDelta time); | 34 Seek(mojo.common.mojom.TimeDelta time); |
35 }; | 35 }; |
OLD | NEW |