A drop-in replacement for react-native-sound that works with react-native-web. Version 0.2.1 is the current stable release. It allows playing audio in web browsers by aliasing the react-native-sound package to this web implementation. The library mirrors the original API exactly, so no code changes are needed beyond the webpack alias configuration. It has low maintenance cadence but remains functional for basic audio playback needs. Alternatives include react-native-sound directly (native only) or web-specific libraries like Howler.js, but this package minimizes migration effort for existing react-native-sound users.
npm install react-native-web-soundNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to configure webpack alias and use the Sound API to play remote audio in a React Native Web app.
Add the alias as shown in the README.
Use only remote URLs for audio files.
Ensure play() is called from a user-initiated event handler like a button press.
Consider migrating to a more actively maintained web audio library like Howler.js or native solution.
Add the alias as shown in the README: 'react-native-sound': 'react-native-web-sound'
Use default import: import Sound from 'react-native-sound' or const Sound = require('react-native-sound').defaultWrap sound.play() in a user-initiated event handler (e.g., onClick).