diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs')
| -rw-r--r-- | MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs b/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs new file mode 100644 index 000000000..0c75190ce --- /dev/null +++ b/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs @@ -0,0 +1,49 @@ +using MediaBrowser.Model.DTO; +using MediaBrowser.UI.Configuration; +using System.Collections.Generic; +using System.Windows; + +namespace MediaBrowser.UI.Playback.InternalPlayer +{ + /// <summary> + /// Class BaseInternalMediaPlayer + /// </summary> + public abstract class BaseInternalMediaPlayer : BaseMediaPlayer + { + /// <summary> + /// Ensures the media player created. + /// </summary> + protected abstract void EnsureMediaPlayerCreated(); + + /// <summary> + /// Plays the internal. + /// </summary> + /// <param name="items">The items.</param> + /// <param name="options">The options.</param> + /// <param name="playerConfiguration">The player configuration.</param> + protected override void PlayInternal(List<DtoBaseItem> items, PlayOptions options, PlayerConfiguration playerConfiguration) + { + App.Instance.ApplicationWindow.Dispatcher.Invoke(() => + { + App.Instance.ApplicationWindow.BackdropContainer.Visibility = Visibility.Collapsed; + App.Instance.ApplicationWindow.WindowBackgroundContent.SetResourceReference(FrameworkElement.StyleProperty, "WindowBackgroundContentDuringPlayback"); + }); + + App.Instance.NavigateToInternalPlayerPage(); + } + + /// <summary> + /// Called when [player stopped internal]. + /// </summary> + protected override void OnPlayerStoppedInternal() + { + App.Instance.ApplicationWindow.Dispatcher.Invoke(() => + { + App.Instance.ApplicationWindow.BackdropContainer.Visibility = Visibility.Visible; + App.Instance.ApplicationWindow.WindowBackgroundContent.SetResourceReference(FrameworkElement.StyleProperty, "WindowBackgroundContent"); + }); + + base.OnPlayerStoppedInternal(); + } + } +} |
