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