only detach of bars tools if exist

This commit is contained in:
SrGooglo 2025-04-02 00:32:47 +00:00
parent 23192a1772
commit 22f747c235

View File

@ -19,9 +19,14 @@ export default class PlayerUI {
}
if (app.layout.tools_bar) {
this.currentDomWindow = app.layout.tools_bar.attachRender("mediaPlayer", ToolBarPlayer, undefined, {
this.currentDomWindow = app.layout.tools_bar.attachRender(
"mediaPlayer",
ToolBarPlayer,
undefined,
{
position: "bottom",
})
},
)
}
}
@ -31,12 +36,9 @@ export default class PlayerUI {
return false
}
if (!app.layout.tools_bar) {
this.player.console.error("Tools bar not found")
return false
}
if (app.layout.tools_bar) {
app.layout.tools_bar.detachRender("mediaPlayer")
}
this.currentDomWindow = null
}