Skip to content

Commit

Permalink
fix(thevideocontroller): fix multi screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat1enceLos committed Mar 8, 2019
1 parent b4f8ba6 commit 4889d0d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/renderer/components/PlayingView/TheVideoController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ export default {
}
return false;
},
shouldLift() {
return process.platform === 'darwin' &&
this.intrinsicWidth / this.intrinsicHeight > window.screen.width / window.screen.height;
},
},
watch: {
originSrc() {
Expand Down Expand Up @@ -234,17 +230,20 @@ export default {
};
});
this.$bus.$on('to-fullscreen', () => {
if (this.shouldLift) {
if (process.platform === 'darwin' &&
this.intrinsicWidth / this.intrinsicHeight > window.screen.width / window.screen.height) {
this.preFullScreen = true;
}
});
this.$bus.$on('toggle-fullscreen', () => {
if (this.shouldLift) {
if (process.platform === 'darwin' &&
this.intrinsicWidth / this.intrinsicHeight > window.screen.width / window.screen.height) {
this.preFullScreen = !this.preFullScreen;
}
});
this.$bus.$on('off-fullscreen', () => {
if (this.shouldLift) {
if (process.platform === 'darwin' &&
this.intrinsicWidth / this.intrinsicHeight > window.screen.width / window.screen.height) {
this.preFullScreen = false;
}
});
Expand Down

0 comments on commit 4889d0d

Please sign in to comment.