Skip to content

Commit

Permalink
disable fullscreen on lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
srgooglo committed Oct 12, 2023
1 parent df91e6e commit 6234290
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions packages/app/src/pages/lyrics/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class SyncLyrics extends React.Component {

events = {
"player.state.update:track_manifest": (currentManifest) => {
console.log(currentManifest)
this.setState({ currentManifest })

if (document.startViewTransition) {
Expand Down Expand Up @@ -616,17 +617,17 @@ class SyncLyrics extends React.Component {
app.cores.style.compactMode(true)
app.cores.style.applyVariant("dark")

// request full screen to browser
if (document.fullscreenEnabled) {
document.documentElement.requestFullscreen()
}
// // request full screen to browser
// if (document.fullscreenEnabled) {
// document.documentElement.requestFullscreen()
// }

// listen when user exit full screen to exit cinematic mode
document.addEventListener("fullscreenchange", () => {
if (!document.fullscreenElement) {
app.location.back()
}
})
// // listen when user exit full screen to exit cinematic mode
// document.addEventListener("fullscreenchange", () => {
// if (!document.fullscreenElement) {
// app.location.back()
// }
// })

window._hacks = {
toggleVideoCanvas: this.toggleVideoCanvas,
Expand Down Expand Up @@ -657,10 +658,10 @@ class SyncLyrics extends React.Component {
app.cores.style.compactMode(false)
app.cores.style.applyInitialVariant()

// exit full screen
if (document.fullscreenEnabled) {
document.exitFullscreen()
}
// // exit full screen
// if (document.fullscreenEnabled) {
// document.exitFullscreen()
// }
}

renderLines() {
Expand Down

0 comments on commit 6234290

Please sign in to comment.