This post discusses how to add sound effects to a web application using Phoenix LiveView. It explores using the HTMLAudioElement and the Web Audio API to manage audio, as well as JS audio libraries like Howler.js. The post also covers how to trigger sound effects from user interactions and from the server.

8m read time From fly.io
Post cover image
Table of contents
How do we add sound?JS libraries to the rescue!We need sounds to play!Hook-ing up our audioTie a sound to a click eventHow to trigger a sound effect?Can the server trigger a sound?Automatically stopping audioDiscussion

Sort: