Open hasan-soliev opened 1 month ago
Please provide how you use the package and a sample url
Укажите, как вы используете пакет, и пример URL.
<VideoPlayer ref={videoRef} source={{ uri: 'https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.mp4/.m3u8', headers: { 'Accept-Encoding': 'deflate', }, }} style={fullScreen || pictureInPicture ? styles.fullScreen : inline} resizeMode={videoResizeMode} hideShutterView={true} muted={muted} rate={1} paused={paused} volume={volume} onLoadStart={() => onLoadStart()} bufferConfig={{ minBufferMs: bufferConfig.minBufferMs, maxBufferMs: bufferConfig.maxBufferMs, bufferForPlaybackMs: bufferConfig.bufferForPlaybackMs, bufferForPlaybackAfterRebufferMs: bufferConfig.bufferForPlaybackAfterRebufferMs, }} playInBackground={playInBackground} playWhenInactive={true} ignoreSilentSwitch={'ignore'} pictureInPicture={pictureInPicture} minLoadRetryCount={1000} onBuffer={info => { if (paused) { setLoading(false); } else { setLoading(info.isBuffering); } onBuffer(info); }} onPictureInPictureStatusChanged={e => { if (e.isActive) { setPictureInPicture(true); setPlaInBackground(true); } else { setPictureInPicture(false); } }} onProgress={t => { setCurrentTime(t.currentTime); onProgress(t); }} onLoad={e => { if (videoRef.current && seekToOnLoad && player == 'movie') { // setLoading(false); videoRef.current.seek(seekToOnLoad); } else { // console.log('Invalid seek position:', seekToOnLoad); } }} progressUpdateInterval={noVideo ? 1000 : 250} selectedAudioTrack={ playUrl == undefined ? {type: 'index', value: parseInt(audioTracks)} : undefined } onEnd={onVideoEnd} playerTransport={1} />
I just try to put the sample url in the sample included in the repo, I don't reproduce the issue. Can you please check if one the the prop you causes the issue ?
The video doesn't help ... please try to simplify your code, for exemple,
onProgress={t => {
setCurrentTime(t.currentTime);
onProgress(t);
}}
will recreate the callback on every render. It would be really better to extract the function from the <Video tag. This is not a good pratice.
Please remove as much as prop you can remove to identify if the issue is in your usage or if it is really in react native video.
For now we cannot help with informations you provided ...
Version
6.1.0
What platforms are you having the problem on?
iOS
Architecture
New architecture with interop layer
What happened?
hls video plays slowly only on ios and only on a real phone on the emulator 7-8 seconds for the same video on the phone up to 20 seconds on android everything works fine
Reproduction
repository link
Reproduction
Step to reproduce this bug are: