mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2025-03-01 18:35:43 +00:00
fix: WebAudio not being properly disposed when reinitiating playback (#2280)
This could be reproduced by switching tracks initiating new reproductions (for example, by clicking in individual tracks inside an album). Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
This commit is contained in:
parent
55d5d37327
commit
9600525033
@ -166,11 +166,12 @@ watch(
|
||||
);
|
||||
|
||||
watch(mediaElementRef, async () => {
|
||||
await nextTick();
|
||||
detachHls();
|
||||
await detachWebAudio();
|
||||
|
||||
if (mediaElementRef.value) {
|
||||
await nextTick();
|
||||
|
||||
if (mediaElementType.value === 'video' && hls) {
|
||||
hls.attachMedia(mediaElementRef.value);
|
||||
hls.on(Events.ERROR, onHlsEror);
|
||||
@ -182,7 +183,10 @@ watch(mediaElementRef, async () => {
|
||||
);
|
||||
mediaWebAudio.sourceNode.connect(mediaWebAudio.context.destination);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Needed so WebAudio is properly disposed
|
||||
*/
|
||||
}, { flush: 'sync' });
|
||||
|
||||
watch(
|
||||
() => playbackManager.currentSourceUrl,
|
||||
|
Loading…
x
Reference in New Issue
Block a user