mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
fix console
This commit is contained in:
parent
f9f784b871
commit
9de1f66e35
@ -3,14 +3,13 @@ import { CapacitorMusicControls } from "capacitor-music-controls-plugin-v3"
|
||||
export default class MediaSession {
|
||||
initialize() {
|
||||
CapacitorMusicControls.addListener("controlsNotification", (info) => {
|
||||
this.console.log(info)
|
||||
console.log(info)
|
||||
|
||||
this.handleControlsEvent(info)
|
||||
})
|
||||
|
||||
// ANDROID (13, see bug above as to why it's necessary)
|
||||
document.addEventListener("controlsNotification", (event) => {
|
||||
this.console.log(event)
|
||||
console.log(event)
|
||||
|
||||
const info = { message: event.message, position: 0 }
|
||||
|
||||
|
@ -120,7 +120,7 @@ export default class Player extends Core {
|
||||
app.cores.sync.music.dispatchEvent("music.player.state.update", this.state)
|
||||
},
|
||||
"player.seeked": (to) => {
|
||||
app.cores.sync.music.dispatchEvent("music.player.seek", to)
|
||||
app.cores.sync.music.dispatchEvent("music.player.seek", to)
|
||||
},
|
||||
}
|
||||
|
||||
@ -213,12 +213,12 @@ export default class Player extends Core {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!app.layout.floatingStack) {
|
||||
this.console.error("Floating stack not found")
|
||||
if (!app.layout.tools_bar) {
|
||||
this.console.error("Tools bar not found")
|
||||
return false
|
||||
}
|
||||
|
||||
this.currentDomWindow = app.layout.floatingStack.add("mediaPlayer", EmbbededMediaPlayer)
|
||||
this.currentDomWindow = app.layout.tools_bar.attachRender("mediaPlayer", EmbbededMediaPlayer)
|
||||
}
|
||||
|
||||
detachPlayerComponent() {
|
||||
@ -227,12 +227,12 @@ export default class Player extends Core {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!app.layout.floatingStack) {
|
||||
this.console.error("Floating stack not found")
|
||||
if (!app.layout.tools_bar) {
|
||||
this.console.error("Tools bar not found")
|
||||
return false
|
||||
}
|
||||
|
||||
app.layout.floatingStack.remove("mediaPlayer")
|
||||
app.layout.tools_bar.detachRender("mediaPlayer")
|
||||
|
||||
this.currentDomWindow = null
|
||||
}
|
||||
@ -266,7 +266,7 @@ export default class Player extends Core {
|
||||
const img = new Image()
|
||||
|
||||
img.crossOrigin = "anonymous"
|
||||
img.src = `https://cors-anywhere.herokuapp.com/${instance.manifest.cover ?? instance.manifest.thumbnail}`
|
||||
img.src = instance.manifest.cover ?? instance.manifest.thumbnail //`https://cors-anywhere.herokuapp.com/${instance.manifest.cover ?? instance.manifest.thumbnail}`
|
||||
|
||||
const cover_analysis = await this.fac.getColorAsync(img)
|
||||
.catch((err) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user