Add file name and other info to track

This commit is contained in:
Danish Ahmed Mirza 2022-06-14 23:38:21 +05:30 committed by Danish
parent afbcea1f38
commit 79975710e4
1 changed files with 8 additions and 1 deletions

View File

@ -122,7 +122,14 @@ IMessageAudioProps) => {
setLoading(true);
try {
await TrackPlayer.add([{ url: `${url}?rc_uid=${user.id}&rc_token=${user.token}` }]);
await TrackPlayer.add([
{
url: `${url}?rc_uid=${user.id}&rc_token=${user.token}`,
title: file.title,
artist: file.author_name,
duration
}
]);
} catch {
// Do nothing
}