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
My app implements its own playlist and I need a custom event to send "Next Event" and "Previous Event" to a component deeper in the component tree. In order to do so, I used (hacked) genre property of PlaybackMetadataReceived like so:
<IconButton
icon="skip-next"
onPress={() => {
// TrackPlayer.skipToNext();
(async () => {
await TrackPlayer.updateMetadataForTrack(0, { genre: "next" });
console.log(await TrackPlayer.getTrack(0)); // => genre is updated in the unique track of the queue
})();
}}
size={iconSize}
/>
But the component that is supposed to receive this event never receives it :
If I can't fix this issue, I was thinking of using a react native custom even library but I am not even sure it exists. If you know a good one that works like react native track player events, please let me know.
PS: I am testing my app on an Android expo dev client.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My app implements its own playlist and I need a custom event to send "Next Event" and "Previous Event" to a component deeper in the component tree. In order to do so, I used (hacked) genre property of PlaybackMetadataReceived like so:
But the component that is supposed to receive this event never receives it :
Do you see what I missed ? Thanks in advance
If I can't fix this issue, I was thinking of using a react native custom even library but I am not even sure it exists. If you know a good one that works like react native track player events, please let me know.
PS: I am testing my app on an Android expo dev client.
Beta Was this translation helpful? Give feedback.
All reactions