Skip to content

Commit

Permalink
Update AudioPlayer.svelte: fix: begin playing sound again on ended
Browse files Browse the repository at this point in the history
Bug: on:ended the time was set to 0 but after the audio/video ends the audio/video is paused automatically.

Fix: on:ended the audio/video needs to be unpaused again.
  • Loading branch information
marfrede authored Jan 9, 2024
1 parent 4e15087 commit aac4f82
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
bind:paused
preload="metadata"
on:ended={() => {
time = 0;
paused = false;
}}
/>

Expand Down Expand Up @@ -145,4 +145,4 @@
height: 100%;
background: var(--bg-3);
}
</style>
</style>

0 comments on commit aac4f82

Please sign in to comment.