blob: 1f467f48e698862db9180b232e19dff15d653dd5 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.media.sessions;
using zx;
using fuchsia.media;
table PlaybackStatus {
/// Total duration of playing media. 0 if not known or not applicable.
1: zx.duration duration;
2: PlaybackState playback_state;
/// A playback function that describes the position and rate of play through
/// the media.
// TODO(turnage): move this type to fuchsia.media
3: fuchsia.media.TimelineFunction playback_function;
4: RepeatMode repeat_mode;
5: bool shuffle_on;
/// Whether a media item exists after the playing one in queue (e.g. a next
/// song in an album or next video in a playlist.)
6: bool has_next_item;
/// Whether a media item preceded the playing one in queue.
7: bool has_prev_item;
8: Error error;
};
enum PlaybackState {
STOPPED = 0;
PLAYING = 1;
PAUSED = 2;
ERROR = 3;
};
table Error {
1: uint32 code;
2: string description;
};
enum RepeatMode {
/// No repeat.
OFF = 0;
/// Repeat the relevant group of media (e.g. playlist).
GROUP = 1;
/// Repeat the currently playing media.
SINGLE = 2;
};