Skip to content

[Bug]: [Android] playableDuration in onProgress exhibits erratic behavior (flickering values) #5028

Description

@weiningtry7

What happened?

I am experiencing an issue on Android where the bufferDuration value provided by the onProgress callback is inconsistent. As the video plays, the bufferDuration does not monotonically increase; instead, it frequently jumps down, causing the buffer progress bar in my UI to flicker or visually regress.

I am using bufferDuration / duration to calculate the buffer progress. Since bufferDuration occasionally reports lower values than previous calls, the UI state becomes unstable.

VideoHeader.tsx:423 >>>>>>>>> _onProgress <<<<<<<<<<
VideoHeader.tsx:424 data.currentTime::8.159 data.bufferDuration 0.6069999999999993
VideoHeader.tsx:423 >>>>>>>>> _onProgress <<<<<<<<<<
VideoHeader.tsx:424 data.currentTime::8.403 data.bufferDuration 0.36299999999999955
VideoHeader.tsx:423 >>>>>>>>> _onProgress <<<<<<<<<<
VideoHeader.tsx:424 data.currentTime::8.651 data.bufferDuration 0.4580000000000002

Steps to reproduce

  1. Play a video on an Android device.
  2. Listen to the onProgress event.

Reproduction repository

No response

react-native-video version

7.0.0-beta.10

react-native version

0.84.1

react-native-nitro-modules version

0.36.1

Platforms

Android

OS version

Android 13

Device

Real device

Architecture

New Architecture

Expo

No (bare / React Native CLI)

Last working version

No response

Media / source type

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions