react-native-video: [BUG]: (Android) HLS in background stops and shows buffering animation forever in example/basic app on physical devices

Version

^6.2.4

What platforms are you having the problem on?

Android

System Version

14

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

Using an HLS livestream such as this Democracy Now DVR stream (available from 8-9am United States Eastern Time) or this DVR FPV Drone stream (always available) in the example/basic app on a physical device does not play properly in the background.

Reproduction

https://github.com/paulrinaldi/react-native-video/tree/master

  1. Start the app on a physical android 14 device
  2. Navigate channel up to one channel past the red bull stream
  3. Wait until the video loads
  4. Background the app
  5. Pull down the notification controls so you can observe AV (not necessarily needed, you can reproduce this without viewing the notif media controls)
    • Watch the notification’s progress bar move until the circle hits the end of the progress bar and switches out the play/pause icon for the buffering animation

Actual: 7. Observe no AV and the buffering animation continue nonstop*

Desired: 7. Observe the playable duration increase and the progress bar’s ticker move backward slightly because the new buffered section loaded in the progress bar and no interruption in the audio while backgrounded.

OR

Add either or both of these entries to examples/basic/src/constants/general.ts this DVR HLS:

  {
    description: 'democracy now',
    uri: 'https://democracynow-hls.secdn.net/democracynow-live/play/democracynow.smil/playlist.m3u8',
  },
  {
    description: 'Drone B-Roll',
    uri: 'https://5b44cf20b0388.streamlock.net:8443/dvr/dvr/playlist.m3u8?DVR',
  },

Actual:

  1. Start the app on a physical android 14 device
  2. Tap notification controls
  3. Navigate channel up to the added source
  4. Background the app
  5. Pull down the notification controls so you can observe AV (not necessarily needed, you can reproduce this without viewing the notif media controls)
  6. Observe no AV and the buffering animation continue nonstop*

Desired: 7. Observe the playable duration increase and the progress bar’s ticker move backward slightly because the new buffered section loaded in the progress bar and no interruption in the audio while backgrounded.

Other notes: In Browserstack, this cannot be reproduced, this is potentially because the browserstack devices are of very high quality and low wear and tear unlike phones that actual owners have when they use our apps.

*(the only way to resume is to foreground the app and wait like 10s, rewind the player via notif controls, rewind the player via player controls in foreground, seek forward the player via notif controls, seek forward the player via player controls in foreground, or foreground the app then pause then play the player - sometimes neither of these options resume the player)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Most upvoted comments

Tracing code more today.

I haven’t been able to reproduce this on an emulator.

@paulrinaldi is possible to reproduce this issue on emulator? I don’t have physical android 14 😕

Similar issue on ios, but issue appears even on foreground