Reputation: 1470
I am using react-native-video for video player but it not show preview of list of videos.
Please check this
<Video
ref={ref => this._video = ref}
source={{ uri: "https://www.radiantmediaplayer.com/media/bbb-360p.mp4" }}
resizeMode={'cover'}
repeat={true}
paused = {true}
style={{
height: 200,
width: 200,
}}
onLoad={() => {
this._video.seek(2);
}} />
<Video
ref={ref => this._video = ref}
source={{ uri: "https://www.radiantmediaplayer.com/media/bbb-360p.mp4" }}
resizeMode={'cover'}
repeat={true}
paused = {true}
style={{
height: 200,
width: 200,
}}
onLoad={() => {
this._video.seek(2);
}} />
<Video
ref={ref => this._video = ref}
source={{ uri: "https://www.radiantmediaplayer.com/media/bbb-360p.mp4" }}
resizeMode={'cover'}
repeat={true}
paused = {true}
style={{
height: 200,
width: 200,
}}
onLoad={() => {
this._video.seek(2);
}} />
It show preview of first video only.
If it is not possible, then can any one please suggest me any other library for video preview from url.
Thanks!
Upvotes: 0
Views: 1554
Reputation: 1470
Finally I found solution to this issue by adding unique "ref" in each tag
<Video
ref={ref => this._video1 = ref}
source={{ uri: "https://www.radiantmediaplayer.com/media/bbb-360p.mp4" }}
resizeMode={'cover'}
repeat={true}
paused = {true}
style={{
height: 200,
width: 200,
}}
onLoad={() => {
this._video1.seek(2);
}} />
<Video
ref={ref => this._video2 = ref}
source={{ uri: "https://www.radiantmediaplayer.com/media/bbb-360p.mp4" }}
resizeMode={'cover'}
repeat={true}
paused = {true}
style={{
height: 200,
width: 200,
}}
onLoad={() => {
this._video2.seek(2);
}} />
Thanks!
Upvotes: 1