Closed Meet-Kapadiya closed 4 months ago
Hmm when I am testing it in example it's working ...
I am using IOS 17
Hmm when I am testing it in example it's working ...
there are too much onBuffer events on ios :D
@Meet-Kapadiya please provide detailed informations on how to reproduce the issue. We cannot provide support with so few informations ...
Code
const onLoadStart = useCallback(() => {
setLoading(true);
}, []);
const onLoad = useCallback((data: OnLoadData) => {
setLoading(false);
setPlay(true);
setDuration(data.duration);
setCurrentTime(data.currentTime);
}, []);
const onBuffer = useCallback(({isBuffering}: OnBufferData) => {
setLoading(isBuffering);
}, []);
const onSeek = useCallback((seekTime: number) => {
videoRef.current?.seek(seekTime);
setCurrentTime(seekTime);
}, []);
<Video
ref={videoRef}
style={styles.video}
source={{
uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
}}
onLoadStart={onLoadStart}
onLoad={onLoad}
onProgress={onProgress}
onBuffer={onBuffer}
onEnd={onEnd}
onError={onError}
playInBackground={false}
resizeMode="contain"
paused={!play}
rate={speed}
selectedTextTrack={{
type: SelectedTrackType.LANGUAGE,
value: subtitle,
}}
textTracks={[
{
title: 'English Subtitles',
language: 'en',
type: TextTrackType.VTT,
uri: 'https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt',
},
{
title: 'Spanish Subtitles',
language: 'es',
type: TextTrackType.SUBRIP,
uri: 'https://durian.blender.org/wp-content/content/subtitles/sintel_es.srt',
},
]}
/>
@Meet-Kapadiya Is it the multiple onBuffer calls which gives you issues ? I confirm this is an issue, but with low severity.
I don't fully understand the issue here ...
In IOS, onBuffer not fired while seek forward or backward, I want to show loader while seeking. In android you can clearly see when i move forward or backward through buttons or slider, onBuffer event is fired.
And also in video with loading start and end, i mention time, In IOS both fired at same time.
To Summary - on iOS
onLoadStart
(Load start on your demo) and onLoad
(Load end on your demo) is triggered in the same time (but in correct order)Am I right ?
Yes
So it seems that onBuffer with seeking will work only for streams (eg. HLS playlists) - try to use HLS playlists as source instead of mp4
example source https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8
So it seems that onBuffer with seeking will work only for streams (eg. HLS playlists) - try to use HLS playlists as source instead of mp4 example source
https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8
Can you please tell me where can i find function that handle onBuffer on ios? trying to figure out why it keeps returning true even though the video is playing
Version
react-native-video: 6.0.0-rc.0
What platforms are you having the problem on?
iOS
What happened?
In android everything working fine, But in IOS onBuffer not working & onLoadStart fired with onLoad