Web & frontend·JavaScript·Superseded
Digital Landun PJR Siren
A browser siren simulator for the Indonesian PJR highway patrol sound set: six patterns (Wail, Yelp, Phaser, Horn, Pulsar, HighLow) mapped to MP3 tracks, plus an air horn. The interesting part was never the audio files, it was the interaction model: every button works as momentary while held and as a toggle when the switch is green, and only one siren may play at a time. The horn overrides a running siren and resumes it on release, which forced me to track playback state separately from button state instead of hanging everything off click handlers. I used Gapless5.js for seamless looping because plain HTML5 audio leaves an audible gap at the loop point. The project is closed; it was superseded by the version at joshriang.cloud/works/landun-pjr.




- Audible loop gaps in HTML5 audio are a known library problem, which is why Gapless5.js exists.
- Momentary versus toggle input needs explicit playback state, not just per-button handlers.
- Override-and-resume behaviour is a small state machine and should be modelled as one from the start.
Scale 0–100: how much this project relied on each skill.