using MediaBrowser.Model.Dto; using System; using System.Collections.Generic; namespace MediaBrowser.UI.Playback { /// /// Class PlayOptions /// public class PlayOptions { /// /// Gets or sets the items. /// /// The items. public List Items { get; set; } /// /// If true, the PlayableItems will be shuffled before playback /// /// true if shuffle; otherwise, false. public bool Shuffle { get; set; } /// /// If true, Playback will be resumed from the last known position /// /// true if resume; otherwise, false. public bool Resume { get; set; } private long? _startPositionTicks; /// /// Gets or sets the start position ticks. /// /// The start position ticks. public long StartPositionTicks { get { if (_startPositionTicks.HasValue) { return _startPositionTicks.Value; } if (Resume && Items.Count > 0) { var item = Items[0]; if (item.UserData != null) { return item.UserData.PlaybackPositionTicks; } } return 0; } set { _startPositionTicks = value; } } /// /// Holds the time that playback was started /// /// The playback start time. public DateTime PlaybackStartTime { get; private set; } /// /// The _show now playing view /// private bool _showNowPlayingView = true; /// /// Determines whether or not the PlaybackController should show the now playing view during playback /// Note that this depends on PlaybackController implementation and support /// /// true if [show now playing view]; otherwise, false. public bool ShowNowPlayingView { get { return _showNowPlayingView; } set { _showNowPlayingView = value; } } /// /// The _go full screen /// private bool _goFullScreen = true; /// /// Determines whether or not the PlaybackController should go full screen upon beginning playback /// /// true if [go full screen]; otherwise, false. public bool GoFullScreen { get { return _goFullScreen; } set { _goFullScreen = value; } } } }