capacitor-community / capacitor-community/native-audio
Android Audio loop not work
- Dominant language
- Java
- Stars
- 154
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
When I call the loop method, the sound is not played.
Only Android
**To Reproduce**
Steps to reproduce the behavior:
Angular Call
await NativeAudio.loop({assetId:soundToPlay.key});
**Expected behavior**
sound should be played
**Smartphone (please complete the following information):**
- Device: Gigaset GS270 plus
- OS: Android 8.1.0
**Problem located**
There was no exception.
File: AudioDispatcher.java line 93
`public void loop() throws Exception {
mediaPlayer.setLooping(true);
}`
I fix the problem with this change
`public void loop() throws Exception {
mediaPlayer.setLooping(true);
mediaPlayer.start();
}`
I don't know if this is the right place but it works.
Contributor guide
Assessment
This issue has not been assessed yet.