albemala / native_video_player

A Flutter widget to play videos on iOS and Android using a native implementation.
MIT License
18 stars 13 forks source link

Error on Android TV #1

Open razfazz opened 2 years ago

razfazz commented 2 years ago

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 commented 2 years ago

Could this be helpful:

LarYoungruu commented 2 years ago

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

Android Tablet simulator not working:

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

albemala commented 2 years ago

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

Please provide:

Also, try running your app on a real device

LarYoungruu commented 2 years ago

@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.

albemala commented 2 years ago

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

LarYoungruu commented 2 years ago

@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);