-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RepeatMode.Off Not Respected on Android Device #2428
Labels
Comments
im fairly sure it works as expected, as i rely on RepeatMode.Off to properly trigger PlaybackQueueEnded; otherwise the player just loops. since u cannot get ur gradle/the example app to work, im afraid not much can be done here. one thing to note is u did not show u did TP.add([]) but used TP.load instead. i believe load does not set the queue, but its not my use case thus cant tell for sure. |
this is exactly why anyone should try to use the example app reporting a
bug. i have no clue, knowledge, experience nor interest that ur combining
expo av and rntp that both steals focus, and caused issues. again unless u
do have the example app running i dont see much can be done here
…On Fri, Jan 17, 2025, 1:21 AM kimangell ***@***.***> wrote:
one thing to note is u did not show u did TP.add([]) but used TP.load
instead. i believe load does not set the queue, but its not my use case
thus cant tell for sure.
Thanks for the help. I tried using add instead of load just to be sure,
but it had no effect. It seems load does create a queue anyway.
However, I discovered my issue. I play a background audio as a response to
RNTP playback state changes using expo-av
<https://github.com/expo/expo/tree/sdk-52/packages/expo-av>. These
background audios were initialized with isLooping set to true, and for some
reason this is interfering with the behavior of RNTP on Android. As if the
expo-av looping setting is applying to all media / audio playback.
I did notice a quirk with RNTP while debugging this: when repeatMode is
set to off (and the expo-av audio is initialized with isLooping false),
when the audio stops, it fires these events in rapid succession:
ended
buffering
ready
playing
stopped
Is it supposed to work like that? Why would it restart just to be
immediately stopped instead of simply ending?
—
Reply to this email directly, view it on GitHub
<#2428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZMOVVQBK2TKNJ6GZVTLBBL2LDDRNAVCNFSM6AAAAABU7Y2TZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJXG44DKMBUGA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
No matter if repeat mode is set to RepeatMode.Off or RepeatMode.Track, audio repeats on Android device. I know a similar issue was reported before, but it was the opposite situation that time. I can confirm repeat mode is correctly set and has the right value by calling getRepeatMode() after setting it:
RepeatMode.Off is also respected on iOS simulator using the same codebase.
Steps To Reproduce
I'm preparing mine like so:
Code To Reproduce
See last section
Replicable on Example App?
I'm unable to get gradle to work on my machine, so not sure how to set up the example app. I use
eas build -p android
for my app.Environment Info:
Result of npx react-native info:
React Native and RNTP versions:
Platform-specific app.json config:
The issue occurs on Android device. Everything works fine on iOS simulator.
How I can Help
What can you do to help resolve this?
Have you investigated the underlying JS or Swift/Android code causing this bug?
Can you create a Pull Request with a fix?
Thank you so much everyone involved in creating and maintaining this library! It's been invaluable <3
The text was updated successfully, but these errors were encountered: