zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.79k stars 748 forks source link

Handle looping for Android #586

Open pawlowskim opened 5 years ago

pawlowskim commented 5 years ago

It's fresh merge for https://github.com/zmxv/react-native-sound/pull/213 . My previous commit was in 2017 so I created a new clean fork and added my changes. Unfortunately I don't have time to test it right now. So please @paulmelnikow test it before merging - it worked back then :)

paulmelnikow commented 5 years ago

Thanks! I will test this when I can. Meanwhile if anyone else can test this and post a report, that would help this get merged faster!

chetstone commented 5 years ago

I tried this in my app: I got java compilation errors:

> Task :RNSound:compileDebugJavaWithJavac FAILED
/Users/maint/prj/malas/upgrade/node_modules/react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java:244: error: cannot find symbol
                  if (this.loops > 0) {
                          ^
  symbol: variable loops
/Users/maint/prj/malas/upgrade/node_modules/react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java:246: error: cannot find symbol
                        this.loops--;
                            ^
  symbol: variable loops
Note: /Users/maint/prj/malas/upgrade/node_modules/react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.
pawlowskim commented 5 years ago

@chetstone as I said, I didn't tested it at all. I have released a fix that builds. Could you test it? https://github.com/pawlowskim/react-native-sound