methods: {
onPlay() {
document.querySelectorAll("audio:not(.bg-audio),video").forEach(e => {
e.addEventListener("play", () => {
this.animSpectrs = false;
this.$refs.bgAudio.pause();
});
e.addEventListener("pause", () => {
if (!this.userStopBgAudio) {
this.animSpectrs = true;
this.$refs.bgAudio.play();
}
});
});
},
watch: {
$route: "onPlay"
}