Commit 5b5c573d authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: add option to always play video in fullscreen, on by default (closes #14985)

(cherry picked from commit 7f9e30e0)
parent 9235f68f
......@@ -82,6 +82,16 @@
<real>2</real>
</array>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>AlwaysUseFullscreenForVideo</string>
<key>Title</key>
<string>SETTINGS_VIDEO_FULLSCREEN</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -72,6 +72,16 @@
<real>2</real>
</array>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>AlwaysUseFullscreenForVideo</string>
<key>Title</key>
<string>SETTINGS_VIDEO_FULLSCREEN</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -590,7 +590,7 @@
<image name="audioTrackIcon.png" width="19" height="19"/>
<image name="backIcon.png" width="32" height="16"/>
<image name="forwardIcon.png" width="32" height="16"/>
<image name="minimizePlayback" width="18" height="10"/>
<image name="minimizePlayback" width="15" height="5"/>
<image name="playIcon.png" width="19" height="17"/>
<image name="ratioIcon.png" width="15" height="15"/>
<image name="resetIcon.png" width="24" height="30"/>
......
......@@ -742,7 +742,7 @@
<image name="audioTrackIcon.png" width="19" height="19"/>
<image name="backIcon.png" width="32" height="16"/>
<image name="forwardIcon.png" width="32" height="16"/>
<image name="minimizePlayback" width="18" height="10"/>
<image name="minimizePlayback" width="15" height="5"/>
<image name="playIcon.png" width="19" height="17"/>
<image name="ratioIcon.png" width="15" height="15"/>
<image name="resetIcon.png" width="24" height="30"/>
......
......@@ -73,7 +73,8 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize
kVLCSettingSubtitlesBoldFont: kVLCSettingSubtitlesBoldFontDefaultValue,
kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue,
kVLCSettingNetworkCaching : kVLCSettingNetworkCachingDefaultValue,
kVLCSettingPlaybackGestures : [NSNumber numberWithBool:YES],
kVLCSettingPlaybackGestures : @(YES),
kVLCSettingVideoFullscreenPlayback : @(YES),
kVLCSettingFTPTextEncoding : kVLCSettingFTPTextEncodingDefaultValue,
kVLCSettingWiFiSharingIPv6 : kVLCSettingWiFiSharingIPv6DefaultValue,
kVLCSettingEqualizerProfile : kVLCSettingEqualizerProfileDefaultValue,
......@@ -273,6 +274,7 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
}
if ([action isEqualToString:@"stream"] && movieURL) {
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
vpc.fullscreenSessionRequested = YES;
[vpc playURL:movieURL successCallback:successCallback errorCallback:errorCallback];
}
else if ([action isEqualToString:@"download"] && movieURL) {
......@@ -315,6 +317,7 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
[alert show];
} else {
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
vpc.fullscreenSessionRequested = YES;
[vpc playURL:url successCallback:nil errorCallback:nil];
}
}
......
......@@ -44,6 +44,7 @@
#define kVLCSettingsDecrapifyTitles @"MLDecrapifyTitles"
#define kVLCSettingPlaybackGestures @"EnableGesturesToControlPlayback"
#define kVLCSettingVariableJumpDuration @"EnableVariableJumpDuration"
#define kVLCSettingVideoFullscreenPlayback @"AlwaysUseFullscreenForVideo"
#define kVLCSettingFTPTextEncoding @"ftp-text-encoding"
#define kVLCSettingFTPTextEncodingDefaultValue @(5) // ISO Latin 1
#define kVLCSettingPlaybackSpeedDefaultValue @"playback-speed"
......
......@@ -18,11 +18,13 @@
- (void)playMediaLibraryObject:(NSManagedObject *)mediaObject
{
self.fullscreenSessionRequested = YES;
if ([mediaObject isKindOfClass:[MLFile class]]) {
[self configureWithFile:(MLFile *)mediaObject];
}
else if ([mediaObject isKindOfClass:[MLAlbumTrack class]]) {
[self configureWithAlbumTrack:(MLAlbumTrack *)mediaObject];
self.fullscreenSessionRequested = NO;
}
else if ([mediaObject isKindOfClass:[MLShowEpisode class]])
[self configureWithShowEpisode:(MLShowEpisode *)mediaObject];
......
......@@ -74,6 +74,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
@property (nonatomic, readonly) BOOL currentMediaHasTrackToChooseFrom;
@property (nonatomic, readonly) BOOL activePlaybackSession;
@property (nonatomic, readonly) BOOL audioOnlyPlaybackSession;
@property (nonatomic, readwrite) BOOL fullscreenSessionRequested;
+ (VLCPlaybackController *)sharedInstance;
......
......@@ -118,6 +118,15 @@ static inline void commonSetup(VLCPlayerDisplayController *self)
- (void)playbackDidStart:(NSNotification *)notification
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
BOOL enforceFullscreen = [[defaults objectForKey:kVLCSettingVideoFullscreenPlayback] boolValue];
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
if (vpc.fullscreenSessionRequested && enforceFullscreen) {
[self showFullscreenPlayback];
return;
}
switch (self.displayMode) {
case VLCPlayerDisplayControllerDisplayModeFullscreen:
[self _presentFullscreenPlaybackViewIfNeeded];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment