razorRun / react-native-vlc-media-player

React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
https://roshan.digital/
MIT License
354 stars 184 forks source link

Blank screen upon loading any video file #122

Closed aivct closed 2 weeks ago

aivct commented 2 years ago

Steps to Reproduce

  1. Download razorRun's test repo
  2. Run npm i and npx react-native run-android

Expected Behaviour

A video file ought to play. See https://www.wowza.com/developer/rtsp-stream-test

Result

There are no logs either from the developer console or from node.js

image

Additional Notes

Tested on Android. Tested client on emulator and a physical android phone. Have not tested compiling on other development environments. The same applies to getting files from https. Have not tested with local files yet.

System Config Information

C:\Users\Test>npm version
{
  'onvif-test': '0.0.1',
  npm: '8.1.0',
  node: '16.13.0',
  v8: '9.4.146.19-node.13',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.2',
  modules: '93',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '1.1.1l+quic',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}
camilobaezcamba commented 1 year ago

@aivct I'm having the same problem. Were you able to solve it?

adok0001 commented 9 months ago

Having the same issue here. @camilobaezcamba @aivct any luck?

camilobaezcamba commented 9 months ago

@adok0001 If I'm not mistaken, this happened because the video I was trying to play needed basic auth and I was passing it as a header (Authorization: Basic <Base64(user:pass)>), however it was necessary to pass it in the following format https://user:pass@www.example.com/video.mp4 in the URL

Change this:

source={{
  uri: "https://www.example.com/video.mp4",
  headers: {
    Authorization: 'Basic <Base64(user:pass)',
  }
}}

for this:

source={{
  uri: "https://user:pass@www.example.com/video.mp4",
}}
github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.