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

Side by Side Diff: chrome/browser/media/router/mojo/media_controller.mojom

Issue 2727123002: [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces (Closed)
Patch Set: Change comment Created 3 years, 9 months 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
OLDNEW
(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 import "chrome/browser/media/router/mojo/media_status.mojom";
8 import "mojo/common/time.mojom";
9
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
12 // that it can be moved to the media namespace and be reused for other features
13 // in the future.
14 interface MediaController {
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.
17 Play();
18
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.
21 Pause();
22
23 // Mutes the media if |mute| is true, and unmutes it if false. Is a no-op if
24 // not supported by the media.
25 SetMute(bool mute);
26
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
29 // media. Is a no-op if not supported by the media.
30 SetVolume(float volume);
31
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.
34 Seek(mojo.common.mojom.TimeDelta time);
35 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698