OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 [DartPackage="mojo_services"] |
| 6 module mojo.media; |
| 7 |
| 8 import "mojo/services/media/common/interfaces/media_metadata.mojom"; |
| 9 import "mojo/services/media/common/interfaces/media_state.mojom"; |
| 10 import "mojo/services/media/common/interfaces/rate_control.mojom"; |
| 11 |
| 12 // Plays media. |
| 13 interface MediaPlayer { |
| 14 // Starts playback. |
| 15 Play(); |
| 16 |
| 17 // Pauses playback. |
| 18 Pause(); |
| 19 |
| 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. |
| 22 GetStatus(uint64 version_last_seen) => |
| 23 (uint64 version, MediaPlayerStatus status); |
| 24 }; |
| 25 |
| 26 // MediaPlayer status information. |
| 27 struct MediaPlayerStatus { |
| 28 // Current state of the player. |
| 29 MediaState state; |
| 30 |
| 31 // Transform translating local time to presentation time. Reverse translation |
| 32 // (presentation time to local time) is only valid when media is playing. |
| 33 TimelineTransform? timeline_transform; |
| 34 |
| 35 // Describes the media. |
| 36 MediaMetadata? metadata; |
| 37 }; |
OLD | NEW |