fix(players): append local player, fix of #23 and #24

This commit is contained in:
Falcion 2025-05-14 14:26:13 +03:00
parent a33fa47758
commit c643116fa5
2 changed files with 4 additions and 1 deletions

View file

@ -54,7 +54,9 @@ export default class Whisperer extends Plugin {
this.addSettingTab(new WhispererSettingsTab(this.app, this))
this.registerEvent(
this.app.workspace.on('file-open', this.playerPerFile.handleFileOpen.bind(this))
this.app.workspace.on('file-open', async (file) => {
await this.playerPerFile.handleFileOpen(file)
})
) // Listen for file open
const container = document.getElementsByClassName('obsidian-app')[0]

View file

@ -31,6 +31,7 @@ export default class PlayerPerGlobal {
} else if (isAllowedHost(this.plugin.settings.vault_ambience_path, SC_HOSTS)) {
playerFactory.createPlayer(player as HTMLElement, 'sc')
}
} else {
playerFactory.createPlayer(player as HTMLElement, 'local')
}