From 40e1a5546804f0682faf49b881f92f2e0970fee4 Mon Sep 17 00:00:00 2001 From: Nacompllo Date: Tue, 13 Apr 2021 20:10:09 +0200 Subject: [PATCH] Added IsFullWindow property in CrossMediaManager --- MediaManager.Forms/VideoView.cs | 5 ++++- MediaManager/MediaManagerBase.cs | 7 +++++++ MediaManager/Playback/IPlaybackManager.cs | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/MediaManager.Forms/VideoView.cs b/MediaManager.Forms/VideoView.cs index 42435a23..313f543f 100644 --- a/MediaManager.Forms/VideoView.cs +++ b/MediaManager.Forms/VideoView.cs @@ -65,6 +65,9 @@ protected virtual void MediaManager_PropertyChanged(object sender, System.Compon break; case nameof(MediaManager.AutoPlay): AutoPlay = MediaManager.AutoPlay; + break; + case nameof(MediaManager.IsFullWindow): + IsFullWindow = MediaManager.IsFullWindow; break; case nameof(MediaManager.RepeatMode): Repeat = MediaManager.RepeatMode; @@ -316,7 +319,7 @@ private static async void OnVideoPlaceholderPropertyChanged(BindableObject binda private static void OnIsFullWindowPropertyChanged(BindableObject bindable, object oldValue, object newValue) { MediaManager.MediaPlayer.IsFullWindow = (bool)newValue; - } + } public virtual void Dispose() { diff --git a/MediaManager/MediaManagerBase.cs b/MediaManager/MediaManagerBase.cs index 8c2a5f58..6ef17c16 100644 --- a/MediaManager/MediaManagerBase.cs +++ b/MediaManager/MediaManagerBase.cs @@ -160,6 +160,13 @@ public bool AutoPlay { get => _autoPlay; set => SetProperty(ref _autoPlay, value); + } + + private bool _isFullWindow = false; + public bool IsFullWindow + { + get => _isFullWindow; + set => SetProperty(ref _isFullWindow, value); } private bool _retryPlayOnFailed = true; diff --git a/MediaManager/Playback/IPlaybackManager.cs b/MediaManager/Playback/IPlaybackManager.cs index 938c91cd..7b7b8a08 100644 --- a/MediaManager/Playback/IPlaybackManager.cs +++ b/MediaManager/Playback/IPlaybackManager.cs @@ -69,6 +69,11 @@ public interface IPlaybackManager : INotifyPropertyChanged /// bool AutoPlay { get; set; } + /// + /// Indicates if the Player is in full screen + /// + bool IsFullWindow { get; set; } + /// /// Will keep the screen on when set to true and a VideoView is on the screen and playing ///