Reputation: 51
We use react-native-video for a video application, the problem is when you lock screen during watching video, you get empty grey areas, we want to see video title and thumbnail there,
I have tried using react-native-track-player for title and thumbnail at the same time with video player but it does not work. If I use react-native-track-player alone I can see title and thumbnail, but if I use react-native-video for video but use react-native-track-player only for title and thumbnail I anymore see title and thumbnail.
Upvotes: 3
Views: 529
Reputation: 73
no need for react-native-track-player. set metadata in source: https://docs.thewidlarzgroup.com/react-native-video/component/props#overriding-the-metadata-of-a-source
source={{
uri: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
metadata: {
title: 'Custom Title',
subtitle: 'Custom Subtitle',
artist: 'Custom Artist',
description: 'Custom Description',
imageUri: 'https://pbs.twimg.com/profile_images/1498641868397191170/6qW2XkuI_400x400.png'
}
}}
Upvotes: 0