mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +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 {
|
export default class MediaSession {
|
||||||
initialize() {
|
initialize() {
|
||||||
CapacitorMusicControls.addListener("controlsNotification", (info) => {
|
CapacitorMusicControls.addListener("controlsNotification", (info) => {
|
||||||
this.console.log(info)
|
console.log(info)
|
||||||
|
|
||||||
this.handleControlsEvent(info)
|
this.handleControlsEvent(info)
|
||||||
})
|
})
|
||||||
|
|
||||||
// ANDROID (13, see bug above as to why it's necessary)
|
|
||||||
document.addEventListener("controlsNotification", (event) => {
|
document.addEventListener("controlsNotification", (event) => {
|
||||||
this.console.log(event)
|
console.log(event)
|
||||||
|
|
||||||
const info = { message: event.message, position: 0 }
|
const info = { message: event.message, position: 0 }
|
||||||
|
|
||||||
|
@ -213,12 +213,12 @@ export default class Player extends Core {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app.layout.floatingStack) {
|
if (!app.layout.tools_bar) {
|
||||||
this.console.error("Floating stack not found")
|
this.console.error("Tools bar not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentDomWindow = app.layout.floatingStack.add("mediaPlayer", EmbbededMediaPlayer)
|
this.currentDomWindow = app.layout.tools_bar.attachRender("mediaPlayer", EmbbededMediaPlayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
detachPlayerComponent() {
|
detachPlayerComponent() {
|
||||||
@ -227,12 +227,12 @@ export default class Player extends Core {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app.layout.floatingStack) {
|
if (!app.layout.tools_bar) {
|
||||||
this.console.error("Floating stack not found")
|
this.console.error("Tools bar not found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
app.layout.floatingStack.remove("mediaPlayer")
|
app.layout.tools_bar.detachRender("mediaPlayer")
|
||||||
|
|
||||||
this.currentDomWindow = null
|
this.currentDomWindow = null
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ export default class Player extends Core {
|
|||||||
const img = new Image()
|
const img = new Image()
|
||||||
|
|
||||||
img.crossOrigin = "anonymous"
|
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)
|
const cover_analysis = await this.fac.getColorAsync(img)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user