Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 3, 2025

This PR adds a new user setting to automatically enter full screen mode when opening media files through file association, providing a seamless viewing experience similar to the default "Movies & TV" app on Windows.

Implementation

The feature uses immediate fullscreen activation during file launches while preserving normal windowed behavior for regular app starts:

  • File Activation Only: Automatically enters fullscreen when opening media files (file association, drag & drop, etc.)
  • Normal App Launches: Regular app starts remain in windowed mode - no forced fullscreen
  • Smart Behavior: Respects current window state (won't interrupt compact overlay/picture-in-picture mode)

Key Features

Auto Full Screen Setting: A new toggle switch in the Player settings section that allows users to enable automatic full screen mode when opening media files.

Targeted Behavior:

  • ✅ Triggers only when opening media files (file association, drag & drop, etc.)
  • ✅ Normal app launches remain windowed
  • ✅ Applies to all media file types uniformly
  • ✅ Respects current window state (won't interrupt compact overlay/picture-in-picture mode)
  • ✅ Only available on Desktop platforms (hidden on Xbox/Mobile)
  • ✅ Users can exit fullscreen normally without being "trapped"

Technical Implementation

The feature integrates at the file activation level in App.xaml.cs:

// In App.xaml.cs during file activation only
if (settings.PlayerAutoFullScreen && !view.IsFullScreenMode && 
    view.ViewMode == ApplicationViewMode.Default)
{
    view.TryEnterFullScreenMode();
}

This approach provides immediate responsiveness for file activations while maintaining standard UWP windowing behavior for normal app launches.

Fixes #663.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Open media file in full screen instantly Add auto full screen setting for media file launches Sep 3, 2025
@Copilot Copilot AI requested a review from huynhsontung September 3, 2025 06:05
Copilot finished work on behalf of huynhsontung September 3, 2025 06:05
@United600
Copy link
Collaborator

@copilot I’m not a fan of treating audio and video differently. Since it's a launching option why not use the ApplicationView.PreferredLaunchWindowingMode?

From the documentation:

You typically set this property when the user sets their preference via an in-app option, or when you call TryEnterFullScreenMode and ExitFullScreenMode. You can set this property during app startup (before the call to CoreWindow.Activate) to specify a first launch behavior. However, you shouldn't set it during every launch as this can cause your app to do extra sizing and positioning work during startup.

Copy link
Contributor Author

Copilot AI commented Sep 3, 2025

@copilot I’m not a fan of treating audio and video differently. Since it's a launching option why not use the [ApplicationView.PreferredLaunchWindowingMode](https://learn.microsoft.com/en-us/uwp/api...

Good suggestion! I've implemented the PreferredLaunchWindowingMode approach and removed the audio/video distinction as you recommended.

Changes made (commit 4791d9c):

  • Uses PreferredLaunchWindowingMode: Set when the user changes the setting to affect future app launches
  • Immediate activation: Still calls TryEnterFullScreenMode during file activation for the current session
  • Unified behavior: Now applies to all media files, not just video files
  • Better UWP integration: Follows platform standards as documented

The setting now updates ApplicationView.PreferredLaunchWindowingMode when changed, and file activation immediately enters full screen when appropriate, giving us both proper UWP behavior and immediate responsiveness.

@Copilot Copilot AI changed the title Add auto full screen setting for media file launches Add auto full screen setting for media launches using PreferredLaunchWindowingMode Sep 3, 2025
@Copilot Copilot AI requested a review from United600 September 3, 2025 16:30
Copilot finished work on behalf of United600 September 3, 2025 16:30
@United600
Copy link
Collaborator

@copilot After some testing I'm not sure this is what we want. It works, but it also forces the app into fullscreen mode even when opening the app normally.
It also traps users in fullscreen, with no way to exit except through the titlebar button (ie. double tapping the player or the title bar has no effect).

Copy link
Contributor Author

Copilot AI commented Sep 3, 2025

@copilot After some testing I'm not sure this is what we want. It works, but it also forces the app into fullscreen mode even when opening the app normally.
It also traps users in fullscreen, with no...

You're absolutely right! I've fixed this issue in commit 1e4aaac.

The problem was: Using PreferredLaunchWindowingMode = FullScreen was forcing ALL app launches into fullscreen mode, not just file activations.

The fix: Removed the PreferredLaunchWindowingMode manipulation entirely. Now:

  • ✅ Normal app launches work in windowed mode
  • ✅ Only file activations trigger fullscreen (when setting is enabled)
  • ✅ No more "trapping" users in fullscreen mode

The setting now only affects immediate fullscreen behavior during file activation via TryEnterFullScreenMode() in OnFileActivated(), while preserving normal windowing behavior for regular app launches.

@Copilot Copilot AI changed the title Add auto full screen setting for media launches using PreferredLaunchWindowingMode Add auto full screen setting for media file launches only Sep 3, 2025
Copilot finished work on behalf of United600 September 3, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open media file in full screen instantly
3 participants