You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
In versions <4.0.0, the PlaybackTrackChanged was fired every time a track started, even if repeat mode was enabled and the same track got played again. In 4.0.0-rc5, the same thing can still be observed on android, but not anymore on iOS. While this might be intended behavior since the track does not change, both platforms behave differently. The same behavior can be observed for the newly introduced PlaybackActiveTrackChanged. This is discussed further in issue #1995.
We used this event for a feature which allows a user to repeat a track once, twice, or infinite times.
Steps To Reproduce
On iOS, Set repeat mode to RepeatMode.Track by calling await TrackPlayer.setRepeatMode(RepeatMode.Track). Then finish a track. The PlaybackTrackChanged is not fired. On android with the same setup, it is fired. Same thing can be observerd for the PlaybackActiveTrackChanged event.
So I have adjusted the android behavior to not emit the track changed event when a track repeats: puckey@6a551f6 which is a part of the following pull request: #2058
* fix(ios): fix emitting of EventType.PlaybackQueueEnded (fixes#2038)
* fix(android): avoid emitting track changed when replaying the same track
see #2059
As mentioned, new functionality also stops Android from emitting this event. Now both platforms will behave the same. Since I know there's a request for having a way to track repeat plays in #2061, I'll close this issue (where platforms are inconsistent) as it was resolved by #2058 .
* fix(ios): fix emitting of EventType.PlaybackQueueEnded (fixes #2038)
* fix(android): avoid emitting track changed when replaying the same track
see doublesymmetry/react-native-track-player#2059
Describe the Bug
In versions <4.0.0, the
PlaybackTrackChanged
was fired every time a track started, even if repeat mode was enabled and the same track got played again. In4.0.0-rc5
, the same thing can still be observed on android, but not anymore on iOS. While this might be intended behavior since the track does not change, both platforms behave differently. The same behavior can be observed for the newly introducedPlaybackActiveTrackChanged
. This is discussed further in issue #1995.We used this event for a feature which allows a user to repeat a track once, twice, or infinite times.
Steps To Reproduce
On iOS, Set repeat mode to
RepeatMode.Track
by callingawait TrackPlayer.setRepeatMode(RepeatMode.Track)
. Then finish a track. ThePlaybackTrackChanged
is not fired. On android with the same setup, it is fired. Same thing can be observerd for thePlaybackActiveTrackChanged
event.Code To Reproduce
Replicable on Example App?
Yes
Environment Info:
Paste the results of
npx react-native info
Paste the exact
react-native-track-player
version you are using4.0.0-rc5
Real device? Or simulator?
Both
What OS are you running?
iOS 16.4.1
How I can Help
If you point me in the right direction, I'll try my best but I only have very limited swift experience.
The text was updated successfully, but these errors were encountered: