fix media session

This commit is contained in:
Vidocq 2021-02-26 00:00:12 +08:00
parent 8a30558ac1
commit 7e33afa94d
3 changed files with 22 additions and 20 deletions

View file

@ -243,7 +243,7 @@ export default {
};
},
computed: {
...mapState(["settings", "data"]),
...mapState(["player", "settings", "data"]),
isElectron() {
return process.env.IS_ELECTRON;
},
@ -293,7 +293,7 @@ export default {
set(deviceId) {
if (deviceId === this.settings.outputDevice || deviceId === undefined) return;
this.$store.commit("changeOutputDevice", deviceId);
document.querySelector("audio").setSinkId(deviceId); // Change output device
this.player.setOutputDevice();
},
},
showGithubIcon: {