mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-24 18:23:09 +02:00
enhance (frontend): stop ModPlayer when unmounted.
This commit is contained in:
parent
54cd51df5a
commit
1fb7498be5
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, computed, watch } from 'vue';
|
||||
import { ref, nextTick, computed, watch, onDeactivated } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
@ -401,6 +401,10 @@ watch(patternScrollSliderPos, () => {
|
|||
displayCanvas.value.parentElement.scrollLeft = (displayCanvas.value.width - displayCanvas.value.parentElement.offsetWidth) * patternScrollSliderPos.value / 100;
|
||||
});
|
||||
|
||||
onDeactivated(() => {
|
||||
stop();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in a new issue