OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
6 module mojo.media; | 6 module mojo.media; |
7 | 7 |
8 import "mojo/services/media/common/interfaces/media_metadata.mojom"; | 8 import "mojo/services/media/common/interfaces/media_metadata.mojom"; |
9 import "mojo/services/media/common/interfaces/media_state.mojom"; | 9 import "mojo/services/media/common/interfaces/media_state.mojom"; |
10 import "mojo/services/media/common/interfaces/rate_control.mojom"; | 10 import "mojo/services/media/common/interfaces/rate_control.mojom"; |
11 | 11 |
12 // Plays media. | 12 // Plays media. |
13 interface MediaPlayer { | 13 interface MediaPlayer { |
14 // Starts playback. | 14 // Starts playback. |
15 Play(); | 15 Play(); |
16 | 16 |
17 // Pauses playback. | 17 // Pauses playback. |
18 Pause(); | 18 Pause(); |
19 | 19 |
20 // Gets the status. To get the status immediately, call GetStatus(0). To | 20 // Gets the status. To get the status immediately, call GetStatus(0). To |
21 // get updates thereafter, pass the version sent in the previous callback. | 21 // get updates thereafter, pass the version sent in the previous callback. |
22 GetStatus(uint64 version_last_seen) => | 22 GetStatus(uint64 version_last_seen) |
23 (uint64 version, MediaPlayerStatus status); | 23 => (uint64 version, MediaPlayerStatus status); |
24 }; | 24 }; |
25 | 25 |
26 // MediaPlayer status information. | 26 // MediaPlayer status information. |
27 struct MediaPlayerStatus { | 27 struct MediaPlayerStatus { |
28 // Current state of the player. | 28 // Current state of the player. |
29 MediaState state; | 29 MediaState state; |
30 | 30 |
31 // Transform translating local time to presentation time. Reverse translation | 31 // Transform translating local time to presentation time. Reverse translation |
32 // (presentation time to local time) is only valid when media is playing. | 32 // (presentation time to local time) is only valid when media is playing. |
33 TimelineTransform? timeline_transform; | 33 TimelineTransform? timeline_transform; |
34 | 34 |
35 // Describes the media. | 35 // Describes the media. |
36 MediaMetadata? metadata; | 36 MediaMetadata? metadata; |
37 }; | 37 }; |
OLD | NEW |