Merge pull request #1689 from Lurkars/fixAudioPlayerSrc

fix audio player src
This commit is contained in:
David Négrier 2022-01-03 18:25:38 +01:00 committed by GitHub
commit 5234cbe3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,9 @@
audioManagerVolumeStore.setVolume(volume); audioManagerVolumeStore.setVolume(volume);
audioManagerVolumeStore.setMuted(localUserStore.getAudioPlayerMuted()); audioManagerVolumeStore.setMuted(localUserStore.getAudioPlayerMuted());
unsubscriberFileStore = audioManagerFileStore.subscribe(() => { unsubscriberFileStore = audioManagerFileStore.subscribe((src) => {
HTMLAudioPlayer.pause(); HTMLAudioPlayer.pause();
HTMLAudioPlayer.src = src;
HTMLAudioPlayer.loop = get(audioManagerVolumeStore).loop; HTMLAudioPlayer.loop = get(audioManagerVolumeStore).loop;
HTMLAudioPlayer.volume = get(audioManagerVolumeStore).volume; HTMLAudioPlayer.volume = get(audioManagerVolumeStore).volume;
HTMLAudioPlayer.muted = get(audioManagerVolumeStore).muted; HTMLAudioPlayer.muted = get(audioManagerVolumeStore).muted;
@ -148,9 +149,7 @@
</label> </label>
<section class="audio-manager-file"> <section class="audio-manager-file">
<!-- svelte-ignore a11y-media-has-caption --> <!-- svelte-ignore a11y-media-has-caption -->
<audio class="audio-manager-audioplayer" bind:this={HTMLAudioPlayer}> <audio class="audio-manager-audioplayer" bind:this={HTMLAudioPlayer} />
<source src={$audioManagerFileStore} />
</audio>
</section> </section>
</div> </div>
</div> </div>