some fixes
This commit is contained in:
parent
392b5a20a8
commit
07ea88323f
4 changed files with 28 additions and 7 deletions
|
@ -1076,6 +1076,11 @@ export class BrowserWindow {
|
||||||
BrowserWindow.win.setFullScreen(flag)
|
BrowserWindow.win.setFullScreen(flag)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//Fullscreen
|
||||||
|
ipcMain.on('getFullScreen', (event, flag) => {
|
||||||
|
event.returnValue = BrowserWindow.win.isFullScreen()
|
||||||
|
})
|
||||||
|
|
||||||
//Fullscreen
|
//Fullscreen
|
||||||
ipcMain.on('detachDT', (_event, _) => {
|
ipcMain.on('detachDT', (_event, _) => {
|
||||||
BrowserWindow.win.webContents.openDevTools({mode: 'detach'});
|
BrowserWindow.win.webContents.openDevTools({mode: 'detach'});
|
||||||
|
|
|
@ -29,6 +29,7 @@ const app = new Vue({
|
||||||
limit: 10
|
limit: 10
|
||||||
},
|
},
|
||||||
fullscreenLyrics: false,
|
fullscreenLyrics: false,
|
||||||
|
fullscreenState: ipcRenderer.sendSync("getFullScreen"),
|
||||||
playerLCD: {
|
playerLCD: {
|
||||||
playbackDuration: 0,
|
playbackDuration: 0,
|
||||||
desiredDuration: 0,
|
desiredDuration: 0,
|
||||||
|
@ -4130,10 +4131,11 @@ const app = new Vue({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fullscreen(flag) {
|
fullscreen(flag) {
|
||||||
|
this.fullscreenState = flag;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
ipcRenderer.send('setFullScreen', true);
|
ipcRenderer.send('setFullScreen', true);
|
||||||
if (app.mk.nowPlayingItem.type && app.mk.nowPlayingItem.type.toLowerCase().includes("video")) {
|
if (app.mk.nowPlayingItem.type && app.mk.nowPlayingItem.type.toLowerCase().includes("video")) {
|
||||||
document.querySelector('video#apple-music-video-player').requestFullscreen()
|
// document.querySelector('video#apple-music-video-player').requestFullscreen()
|
||||||
} else {
|
} else {
|
||||||
app.appMode = 'fullscreen';
|
app.appMode = 'fullscreen';
|
||||||
}
|
}
|
||||||
|
@ -4144,8 +4146,20 @@ const app = new Vue({
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ipcRenderer.send('setFullScreen', false);
|
ipcRenderer.send('setFullScreen', false);
|
||||||
|
if (app.mk.nowPlayingItem.type && app.mk.nowPlayingItem.type.toLowerCase().includes("video")) {
|
||||||
|
|
||||||
|
} else {
|
||||||
app.appMode = 'player';
|
app.appMode = 'player';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pip(){
|
||||||
|
document.querySelector('video#apple-music-video-player').requestPictureInPicture()
|
||||||
|
// .then(pictureInPictureWindow => {
|
||||||
|
// pictureInPictureWindow.addEventListener("resize", () => {
|
||||||
|
// console.log("[PIP] Resized")
|
||||||
|
// }, false);
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
miniPlayer(flag) {
|
miniPlayer(flag) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
|
@ -2971,7 +2971,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
|
||||||
float: left;
|
float: left;
|
||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - var(--chromeHeight));
|
height: 100%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,13 +112,15 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div id="player-pip"
|
<div id="player-pip"
|
||||||
@click="document.querySelector('video#apple-music-video-player').requestPictureInPicture()"
|
@click="pip()"
|
||||||
title="Picture-in-Picture">
|
title="Picture-in-Picture"
|
||||||
|
v-b-tooltip.hover>
|
||||||
<%- include("../svg/pip.svg") %>
|
<%- include("../svg/pip.svg") %>
|
||||||
</div>
|
</div>
|
||||||
<div id="player-fullscreen"
|
<div id="player-fullscreen"
|
||||||
@click="document.querySelector('video#apple-music-video-player').requestFullscreen()"
|
@click="fullscreen(!fullscreenState)"
|
||||||
title="Fullscreen">
|
title="Fullscreen"
|
||||||
|
v-b-tooltip.hover>
|
||||||
<%- include("../svg/fullscreen.svg") %>
|
<%- include("../svg/fullscreen.svg") %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue