disable fullscreen on lyrics

This commit is contained in:
SrGooglo 2023-10-12 19:59:55 +00:00
parent df91e6ed2d
commit 6234290905

View File

@ -335,6 +335,7 @@ class SyncLyrics extends React.Component {
events = { events = {
"player.state.update:track_manifest": (currentManifest) => { "player.state.update:track_manifest": (currentManifest) => {
console.log(currentManifest)
this.setState({ currentManifest }) this.setState({ currentManifest })
if (document.startViewTransition) { if (document.startViewTransition) {
@ -616,17 +617,17 @@ class SyncLyrics extends React.Component {
app.cores.style.compactMode(true) app.cores.style.compactMode(true)
app.cores.style.applyVariant("dark") app.cores.style.applyVariant("dark")
// request full screen to browser // // request full screen to browser
if (document.fullscreenEnabled) { // if (document.fullscreenEnabled) {
document.documentElement.requestFullscreen() // document.documentElement.requestFullscreen()
} // }
// listen when user exit full screen to exit cinematic mode // // listen when user exit full screen to exit cinematic mode
document.addEventListener("fullscreenchange", () => { // document.addEventListener("fullscreenchange", () => {
if (!document.fullscreenElement) { // if (!document.fullscreenElement) {
app.location.back() // app.location.back()
} // }
}) // })
window._hacks = { window._hacks = {
toggleVideoCanvas: this.toggleVideoCanvas, toggleVideoCanvas: this.toggleVideoCanvas,
@ -657,10 +658,10 @@ class SyncLyrics extends React.Component {
app.cores.style.compactMode(false) app.cores.style.compactMode(false)
app.cores.style.applyInitialVariant() app.cores.style.applyInitialVariant()
// exit full screen // // exit full screen
if (document.fullscreenEnabled) { // if (document.fullscreenEnabled) {
document.exitFullscreen() // document.exitFullscreen()
} // }
} }
renderLines() { renderLines() {