Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to toggle Enter fullscreen on rotate #2808

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/renderer/components/ft-video-player/ft-video-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ export default Vue.extend({
return this.$store.getters.getDisplayVideoPlayButton
},

enterFullscreenOnDisplayRotate: function() {
return this.$store.getters.getEnterFullscreenOnDisplayRotate
},

sponsorSkips: function () {
const sponsorCats = ['sponsor',
'selfpromo',
Expand Down Expand Up @@ -363,8 +367,8 @@ export default Vue.extend({
})
this.player.mobileUi({
fullscreen: {
enterOnRotate: true,
exitOnRotate: true,
enterOnRotate: this.enterFullscreenOnDisplayRotate,
exitOnRotate: this.enterFullscreenOnDisplayRotate,
lockOnRotate: false
},
// Without this flag, the mobile UI will only activate
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/player-settings/player-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export default Vue.extend({
return this.$store.getters.getDisplayVideoPlayButton
},

enterFullscreenOnDisplayRotate: function () {
return this.$store.getters.getEnterFullscreenOnDisplayRotate
},

maxVideoPlaybackRate: function () {
return parseInt(this.$store.getters.getMaxVideoPlaybackRate)
},
Expand Down Expand Up @@ -270,6 +274,7 @@ export default Vue.extend({
'updateVideoVolumeMouseScroll',
'updateVideoPlaybackRateMouseScroll',
'updateDisplayVideoPlayButton',
'updateEnterFullscreenOnDisplayRotate',
'updateMaxVideoPlaybackRate',
'updateVideoPlaybackRateInterval',
'updateEnableScreenshot',
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/components/player-settings/player-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
:default-value="displayVideoPlayButton"
@change="updateDisplayVideoPlayButton"
/>
<ft-toggle-switch
:label="$t('Settings.Player Settings.Enter Fullscreen on Display Rotate')"
:compact="true"
:default-value="enterFullscreenOnDisplayRotate"
@change="updateEnterFullscreenOnDisplayRotate"
/>
</div>
<div class="switchColumn">
<ft-toggle-switch
Expand Down
1 change: 1 addition & 0 deletions src/renderer/store/modules/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const state = {
displayVideoPlayButton: true,
enableSearchSuggestions: true,
enableSubtitles: true,
enterFullscreenOnDisplayRotate: false,
externalLinkHandling: '',
externalPlayer: '',
externalPlayerExecutable: '',
Expand Down
1 change: 1 addition & 0 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Settings:
Scroll Volume Over Video Player: Scroll Volume Over Video Player
Scroll Playback Rate Over Video Player: Scroll Playback Rate Over Video Player
Display Play Button In Video Player: Display Play Button In Video Player
Enter Fullscreen on Display Rotate: Enter Fullscreen on Display Rotate
Next Video Interval: Next Video Interval
Fast-Forward / Rewind Interval: Fast-Forward / Rewind Interval
Default Volume: Default Volume
Expand Down
1 change: 1 addition & 0 deletions static/locales/en_GB.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Settings:
Playlist Next Video Interval: Playlist Next Video Interval
Next Video Interval: Next video interval
Display Play Button In Video Player: Display play button in video player
Enter Fullscreen on Display Rotate: Enter fullscreen on display rotate
Fast-Forward / Rewind Interval: Fast-forward / rewind interval
Scroll Playback Rate Over Video Player: Scroll playback rate over video player
Video Playback Rate Interval: Video playback rate interval
Expand Down