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]: [iOS] Video plays for some time, then randomly starts buffering and stalls #4089

Closed
sntg-p opened this issue Aug 14, 2024 · 8 comments
Labels

Comments

@sntg-p
Copy link

sntg-p commented Aug 14, 2024

Version

6.4.3

What platforms are you having the problem on?

iOS

System Version

17.4

On what device are you experiencing the issue?

Real device, Simulator

Architecture

Old architecture

What happened?

It seems that while playing a video on iOS (HTTP download, not streamed, signed AWS S3 URL), at some random point it will start throwing these messages in the console:

nw_connection_add_timestamp_locked_on_nw_queue [C30] Hit maximum timestamp count, will start dropping events

After these messages with different C-values get thrown, it will at some point log this and fire the onBuffer event with isBuffering: true:

{
  "transportType" : "HTTP Progressive Download",
  "mediaType" : "HTTP Progressive Download",
  "BundleID" : "ReactNativeVideoFreezeBug",
  "name" : "MEDIA_PLAYBACK_STALL",
  "interfaceType" : "Wifi"
}

When this happens, the user may invoke the seek method and play already buffered segments in which case it will fire the onBuffer event twice: first with isBuffering: false and then isBuffering: true. This double event fire happens again when it reaches the time where it originally threw the MEDIA_PLAYBACK_STALL message, which gets thrown again.

The problem does not appear instantly, it seems that it appears after playing some videos. Similar problems occur if the source URL is changed.

Reproduction

No response

Reproduction

Step to reproduce this bug are:

Just play two or three videos (HTTP download, AWS S3 signed URLs) until the problem appears.

@sntg-p sntg-p added the bug label Aug 14, 2024
@moskalakamil
Copy link
Member

Hi! Thank you for reporting the issue, it would be perfect if you could provide an example videos when the error occurs. Thanks!

@sntg-p
Copy link
Author

sntg-p commented Aug 15, 2024

Untitled-1.mov

Here I have recorded the moment the problem happens, after about 4 minutes of playback.

@rohankm
Copy link

rohankm commented Aug 24, 2024

i can confirm this isssue... even im facing

nw_connection_add_timestamp_locked_on_nw_queue [C5] Hit maximum timestamp count, will start dropping events

probably this is the reason for #3675

@rohankm
Copy link

rohankm commented Aug 24, 2024

also, this problem occurs in certain videos...

@moskalakamil
Copy link
Member

Hi @sntg-p, do you use DRM for video? This error is not for every video, so it would be perfect if you could you provide a sample

@sntg-p
Copy link
Author

sntg-p commented Sep 4, 2024

Hey @moskalakamil, we are currently not using DRM for video.

I was cleaning my sample repo and added a video with long expiration time to share it with you but since updating to RNV to v6.4.5 the video no longer freezes. After this finding I updated it in our app, and again it seems like it works.

It's late here so tomorrow I'll be checking with my team to see if they still have issues on their devices or if we can close this.

@moskalakamil
Copy link
Member

Sure, thanks for answering. Please let us know after you will check :))

@sntg-p
Copy link
Author

sntg-p commented Sep 9, 2024

We no longer have videos freezing on iOS, thanks for your work!

@sntg-p sntg-p closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants