You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ! I wrote this code earlier and found out it was never triggering :
const[audio,controls]=createAudio(track,()=>state.playing,()=>state.volume);createEffect(()=>{console.log(audio.state);// just for debug :')if(audio.state===AudioState.COMPLETE){// this is never triggered !!consttrackID=findSuitableTrack();console.info(`Playing track ${trackID} next.`);setState(prev=>({history: [...prev.history,prev.currentTrackID],currentTrackID: trackID}));}});
When I looked through the enum, I thought that AudioState.COMPLETE would be perfect for my situation.
Even though, it doesn't work, so I went through the primitive code to see what is happening under the hood.
Describe the bug
Hi ! I wrote this code earlier and found out it was never triggering :
When I looked through the enum, I thought that
AudioState.COMPLETE
would be perfect for my situation.Even though, it doesn't work, so I went through the primitive code to see what is happening under the hood.
In the whole file (https://github.com/solidjs-community/solid-primitives/blob/main/packages/audio/src/index.ts),
AudioState.COMPLETE
is NEVER used, it's just defined in the enum.In the minimal reproduction link, you can see the state ends up to "paused" instead of "complete".
My question is: will there be any implementation concerning that in a near future ?
Thanks you !
Minimal Reproduction Link
https://stackblitz.com/edit/github-p2hm8v?file=src%2FApp.tsx
The text was updated successfully, but these errors were encountered: