albemala/native_video_player

Error on Android TV

razfazz opened this issue · 6 comments

W/MediaPlayer(15169): Couldn't open {network url} java.io.FileNotFoundException: No content provider:
No Network Security Config specified, using platform default

even the url to be played is a web url

@albemala
Same problem:
Everything is not working.
I tried VideoSourceType.[network, file, asset]

Android Tablet simulator not working:

  • Error: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider..

Android TV working:
I tried on android TV and the video is still running, but still get the message:

  • W/MediaPlayer( 6868): Couldn't open /data/user/0/com.myapp.development/cache/assets/svg/videoplayback.webm: java.io.FileNotFoundException: No content provider: /data/user/0 /com.myapp.development/cache/assets/svg/videoplayback.webm
  • E/FrameEvents( 6868): updateAcquireFence: Did not find frame.
  • E/FrameEvents( 6868): updateAcquireFence: Did not find frame.
  • E/libEGL ( 6868): eglGetFrameTimestampsANDROID:2457 error 3002 (EGL_BAD_ACCESS)

@leanhro2812 are you running the example app, or your app?

Please provide:

  • Android version
  • flutter doctor output

Also, try running your app on a real device

@albemala
I tried it on a real device:
Fire TV: => Video is still working properly but still appearing
Couldn't open /data/user/0/com.myapp.development/cache/normal/videoplayback.mp4: java.io.FileNotFoundException: No content provider: /data/user/0/com.myapp.development/cache/ normal/videoplayback.mp4

By the way:
_controller?.onPlaybackReady.addListener(_onPlaybackError);

Dispose:
_controller?.onError.removeListener(_onPlaybackError);
Doesn't work, I can't listen to anything when something goes wrong. I tried adding a url that doesn't exist. but received nothing.

are you running the example app, or your app?

Please provide:

Android version
flutter doctor output

If you removeListener , you won't receive any event

@albemala
Sorry I was missing, the removeListener part in dispose and the addListener part when ready.
But nothing is received when the error occurs.

_controller?.onPlaybackReady.addListener(_onPlaybackError);

Dispose:
_controller?.onError.removeListener(_onPlaybackError);