TheWidlarzGroup / react-native-video

A <Video /> component for react-native
http://thewidlarzgroup.github.io/react-native-video/
MIT License
7.15k stars 2.88k forks source link

Live Video in React Native Video - Problem with start time and current playback time #2299

Closed pravchuk closed 2 years ago

pravchuk commented 3 years ago

Bug

When playing live video as soon as the video starts to play the video starts at the current time of the video. But in the controls it seems to be still at 0:00 seconds.

Platform

Observed this in Android.

Environment info

React native info output:

System:
    OS: macOS 10.15.4
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 169.54 MB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.21.0 - ~/.nvm/versions/node/v10.21.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v10.21.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 23, 28, 29
      Build Tools: 28.0.3, 29.0.3
      System Images: android-R | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Add the HLS url to to the uri tag
  2. Observe the controls in the output. You will see its started at 0:00

Expected behaviour

  1. The controls should show the user to see the correct playback time when the user is live.

Reproducible sample code

<Video source={{uri:'URL PATH.ism/manifest(format=m3u8-aapl)', type:'m3u8'}} 
                    ref={(ref:any) => {
                        this.player = ref
                    }}
                    controls={true}
                    progressUpdateInterval={1000} //calls onProgress after every 1 second
                    onSeek={( seek : {currentTime: number, seekTime: number}) => {console.log(seek)}}
                    onProgress={( progress : {currentTime: number, playableDuration: number, seekableDuration: number}) => {console.log(progress)}}
                    style={{
                        width: Dimensions.get('window').width,
                        height: 400
                      }}
                />

Image sample

Screenshot 2021-02-26 at 1 21 49 AM
cutoz commented 3 years ago

Above is using Manifest from #azuremediaservices

samarthjain10 commented 2 years ago

any update on this ?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are having a similar problem, please open a new issue and reference this one instead of commenting on a stale or closed issue.