react-native-audio-toolkit
react-native-audio-toolkit copied to clipboard
AudioAttributes on Android
Playing audio stream together with video (react-native-video) doesn't seem to work correctly without specifying AudioAttributes on Android 6 and 7 (older versions not tested). When playing video and audio simultaneously, the video's soundtrack or audio stream is interrupted. On Android > 7 the problem is not present.
This PR fixes it by setting Media type of AudioAttributes. Maybe it's a temporary solution and the library should allow setting attributes according to users' choice.
Compatibility
OS | Implemented |
---|---|
iOS | ✅ |
Android | ✅ |
Checklist
- [X] I have tested this on a device and a simulator
- [ ] I mentioned this change in
CHANGELOG.md