mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
use fullscreen
This commit is contained in:
parent
27869af61a
commit
5d33c0e8a5
@ -637,6 +637,18 @@ export default class SyncLyrics extends React.Component {
|
|||||||
app.cores.style.applyVariant("dark")
|
app.cores.style.applyVariant("dark")
|
||||||
app.layout.floatingStack.toogleGlobalVisibility(false)
|
app.layout.floatingStack.toogleGlobalVisibility(false)
|
||||||
|
|
||||||
|
// 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.backLocation()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
window._hacks = {
|
window._hacks = {
|
||||||
toogleVideoCanvas: this.toogleVideoCanvas,
|
toogleVideoCanvas: this.toogleVideoCanvas,
|
||||||
toogleCinematicMode: this.toogleCinematicMode,
|
toogleCinematicMode: this.toogleCinematicMode,
|
||||||
@ -663,6 +675,11 @@ export default class SyncLyrics extends React.Component {
|
|||||||
app.cores.style.compactMode(false)
|
app.cores.style.compactMode(false)
|
||||||
app.cores.style.applyInitialVariant()
|
app.cores.style.applyInitialVariant()
|
||||||
app.layout.floatingStack.toogleGlobalVisibility(true)
|
app.layout.floatingStack.toogleGlobalVisibility(true)
|
||||||
|
|
||||||
|
// exit full screen
|
||||||
|
if (document.fullscreenEnabled) {
|
||||||
|
document.exitFullscreen()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLines() {
|
renderLines() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user