logs progress
This commit is contained in:
@@ -11,7 +11,15 @@
|
|||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
|
|
||||||
<h5>Native audio controls</h5>
|
<h5>Native audio controls</h5>
|
||||||
<Audio src="/example.mp3" autoplay={false} {volume} {playbackRate} {paused} bind:currentTime />
|
<Audio
|
||||||
|
on:progress={(e) => console.log(e.detail)}
|
||||||
|
src="/example.mp3"
|
||||||
|
autoplay={false}
|
||||||
|
{volume}
|
||||||
|
{playbackRate}
|
||||||
|
{paused}
|
||||||
|
bind:currentTime
|
||||||
|
/>
|
||||||
|
|
||||||
<h5>Custom audio controls</h5>
|
<h5>Custom audio controls</h5>
|
||||||
|
|
||||||
@@ -25,7 +33,6 @@
|
|||||||
|
|
||||||
<button type="button" on:click={() => (currentTime = currentTime + 5)}>Skip 5s</button>
|
<button type="button" on:click={() => (currentTime = currentTime + 5)}>Skip 5s</button>
|
||||||
<button type="button" on:click={() => (currentTime = currentTime - 5)}>Rewind 5s</button>
|
<button type="button" on:click={() => (currentTime = currentTime - 5)}>Rewind 5s</button>
|
||||||
|
|
||||||
<button type="button" on:click={() => (currentTime = 30)}>Go to 30s</button>
|
<button type="button" on:click={() => (currentTime = 30)}>Go to 30s</button>
|
||||||
|
|
||||||
<h6>Playback Rate</h6>
|
<h6>Playback Rate</h6>
|
||||||
|
|||||||
Reference in New Issue
Block a user