-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
"@api.video/react-native-player": "^1.0.1"
Environment that reproduces the issue
All Android TV devices (but not on the emulator)
Is it reproducible in the example application?
Yes
Reproduction steps
Displaying the video on Android TV device
Expected result
Displaying the video ASAP
Actual result
Keeps loading without result
Additional context
"react-native": "npm:[email protected]"
`<VideoPlayer
ref={player}
muted={isMuted}
hideTitle={true}
videoParams={{
...video?.videoParams,
profileId: props?.currentProfile?._id,
}}
autoplay={false}
videoId={video?.videoId}
videoToken={video?.assets?.player?.substr(
video?.assets?.player?.indexOf('=') + 1,
video?.assets?.player?.length,
)}
onTimeUpdate={v => {
setTime(parseInt(v));
//Mute player
const muteVideo = p => {
if (p && p.current) {
p.current.mute();
}
};
//UnMute player
const unmuteVideo = p => {
if (p && p.current) {
p.current.unmute();
}
};
//Skipe Video player
const skipTo = (p, second = 0) => {
if (p && p.current) {
p.current.setCurrentTime(second);
}
};
const filters = [];
if (video?.userFilters?.length > 0) {
video?.userFilters?.map(uF => {
videoFilters?.map(vF => {
if (
vF &&
vF.filter &&
vF.filter._id &&
vF.filter._id === uF
) {
filters.push(vF);
}
});
});
}
const audio_filters =
filters?.length > 0
? filters?.filter(f => f?.filter?.type === 'audio')
: [];
const video_filters =
filters?.length > 0
? filters?.filter(f => f?.filter?.type === 'video')
: [];
audio_filters?.length > 0 &&
audio_filters?.map(aFilter => {
const {from, to} = aFilter;
if (from <= v && v <= to && player && player.current) {
muteVideo(player);
} else if (parseInt(v) === parseInt(to)) {
unmuteVideo(player);
}
});
video_filters?.length > 0 &&
video_filters?.map(vFilter => {
const {from, to} = vFilter;
if (from <= v && v <= to && player && player.current) {
skipTo(player, to);
}
});
}}
onPlay={() => setIsPlaying(true)}
onPause={() => setIsPlaying(false)}
onReady={() => setIsReady(true)}
onVolumeChange={volume => {}}
onError={e => console.log('video e', e)}
/>`
Relevant logs output
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working