Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: onBandwidthUpdate not working on iOS #4139

Closed
anthonychemaly opened this issue Sep 3, 2024 · 10 comments · Fixed by #4140 or #4149
Closed

[BUG]: onBandwidthUpdate not working on iOS #4139

anthonychemaly opened this issue Sep 3, 2024 · 10 comments · Fixed by #4140 or #4149
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: iOS Repro Provided

Comments

@anthonychemaly
Copy link

Version

6.4.5

What platforms are you having the problem on?

iOS

System Version

17.4

On what device are you experiencing the issue?

Simulator

Architecture

Old architecture

What happened?

onBandwidthUpdate is not logging anything on iOS. It works on android.
This is the portion of code:

<Video ref={videoPlayer} style={styles.video} isLooping resizeMode="contain" paused={paused} onEnd={onEnd} onLoad={onLoad} onProgress={onProgress} onBandwidthUpdate={e => { console.log(Platform.OS, 'bandwidth', e); }} source={{ uri: episode.videos[0].video, }} />

I am using HLS streaming (index.m3u8) file. Does that change anything? Is there any setting or permission i should turn on or request from app connect

Reproduction Link

No response

Reproduction

Try onBandwidthUpdate prop in react-native-video.

Copy link

github-actions bot commented Sep 3, 2024

Thank you for your bug report. We will review it and get back to you if we need more information.

@freeboub
Copy link
Collaborator

freeboub commented Sep 3, 2024

@anthonychemaly I just had a look, can you please test the PR I opened ? Thank you

@freeboub freeboub added Accepted Issue is confirmed and accepted by maintainers team and removed Waiting for Review labels Sep 3, 2024
@anthonychemaly
Copy link
Author

anthonychemaly commented Sep 3, 2024

@anthonychemaly I just had a look, can you please test the PR I opened ? Thank you

For some reason it is returning on the test app and on my personal app: onVideoBandwidthUpdate {"bitrate": -1, "target": 3}
No value for the bitrate

@freeboub
Copy link
Collaborator

freeboub commented Sep 3, 2024

@anthonychemaly are you sure you are testing with online files ? I think this is expected with local files...

@anthonychemaly
Copy link
Author

@anthonychemaly are you sure you are testing with online files ? I think this is expected with local files...

yes i am testing on a 2 minute video in hls format (index.m3u8)?
any significance for -1 flag?

@freeboub
Copy link
Collaborator

freeboub commented Sep 4, 2024

@anthonychemaly I tested again (on master as I merged the PR), I correctly receive the event:
onVideoBandwidthUpdate {"bitrate": 9760357.076251693, "target": 3}

I am testing on emulator / iphone 15 pro / ios 17.4
What is your environment ?

@freeboub freeboub reopened this Sep 4, 2024
@anthonychemaly
Copy link
Author

same environment. may i know the length of the video you are streaming. is it a big file? does it start with a -1 value before showing this?

@freeboub
Copy link
Collaborator

freeboub commented Sep 4, 2024

it is small video available in the sample...
Notice that I release this morning a version with the patch I made !

@freeboub
Copy link
Collaborator

freeboub commented Sep 5, 2024

I still not seeing the same issue than you ... BTW, I added a complementary fix here: #4149

@seyedmostafahasani
Copy link
Collaborator

@anthonychemaly
Would you please test it with the PR linked here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: iOS Repro Provided
Projects
None yet
3 participants