This project is read-only.

Fullscreen mode

Topics: Windows 10 UWP
Jul 15, 2015 at 1:50 PM
Hi there,
How can we enable the fullscreen mode using the player framework?
Using the Xaml.Controls.MediaElement we can go to fullscreen with the IsFullWindow property, but
using the same property in Microsoft.PlayerFramework.MediaPlayer the video goes only FullWindow and doesn´t render any other element like the (custom) player controls we have.

Thank you
Jul 15, 2015 at 8:05 PM
Looking into this.
Jul 20, 2015 at 6:12 PM
Unfortunately, there is not currently a good way to add elements on top of the window when in full window mode (IsFullWindow = true) which means that the PF controls get hidden. You can set AreTransportControlsEnabled = true when in full window mode which will enable the out of the box controls however, this presents some challenges on phone currently.

We'll continue to look for a solution but, in the meantime, I think the best course of action would be as follows if possible:

In your IsFullScreenChanged event handler, programmatically hide the non player elements on the screen to allow your player to expand.
Jul 20, 2015 at 7:05 PM
Simple example:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <ColumnDefinition Width="auto"/>
        <ColumnDefinition Width="*"/>
    <TextBlock x:Name="Title" Text="Wildlife"/>
Code behind:
    private void Player_IsFullScreenChanged(object sender, RoutedPropertyChangedEventArgs<bool> e)
        if (Player.IsFullScreen)
            Title.Visibility = Visibility.Collapsed;
            Title.Visibility = Visibility.Visible;
Jul 21, 2015 at 11:09 AM
Yes, that´s what we´re doing, we re-arrange the interface so the player can use the fullwindow without using the IsFullWindow property
I was worried because I thought that property was also used to make the player fullscreen but seems like we need to use:

ApplicationView.GetForCurrentView().TryEnterFullScreenMode() to make that, right?

One more thing, is there any possibility to keep the audio playing when the user minimizes the window?
The mmppf:MediaPlayer AudioCategory="BackgroundCapableMedia" doesn´t have any effect

Thank you!
Jul 21, 2015 at 2:27 PM
Edited Jul 21, 2015 at 2:32 PM
ApplicationView.GetForCurrentView().TryEnterFullScreenMode() is indeed correct.

For BG audio, the BackgroundMediaPlayer APIs need to be used. Take a look at the following sample:

Something like:
    private void Player_IsFullScreenChanged(object sender, RoutedPropertyChangedEventArgs<bool> e)
        if (Player.IsFullScreen)
            Title.Visibility = Visibility.Collapsed;
            Title.Visibility = Visibility.Visible;
Jul 21, 2015 at 3:30 PM
Thank you ibennett.
Jul 22, 2017 at 11:30 AM
Hi jose_zattoo and ibennett. I am also having the same issue. I am setting isFullWindow = true and AreTransportControlsEnabled = true, which is working fine but I want to hide the FullWindow button in the transport controls but not being able to find any property to do so. Please help me out.