nstudio / nativescript-videoplayer

:clapper: Video Player widget for NativeScript apps
MIT License
133 stars 59 forks source link

Video is black when played from file-system on Android 4.4.2 #124

Open alereisan opened 6 years ago

alereisan commented 6 years ago

On a modern Android device (i.e. Android 8) everything works as it should, but as soon as we install the app on our target device (Android 4.4.2 HDMI Stick), the videos are black.

We try to play the video from /sdcard/myFolder/data and/or internal path: src="file:///data/user/0/ch.nativescript.player/files/data/big_buck_bunny_636734799617546545.mp4"

tns --version 4.2.3 "nativescript-videoplayer": "^4.0.4" "tns-core-modules": "4.1.0"

it is a nativescript-angular application

alereisan commented 6 years ago

FYI: nativescript-videoplayer does not work on our hardware. nativescript-exoplayer instead can do 1frame/5sec (!), but at least the video is not completely black. with the "Hardware Acceleration" flag enabled, the exoplayer can even play the vido fluidly for up to 50seconds, then the app crashes with an out of memory error.

the native android videoplayers play the mp4 videos w/o problems.

bradmartin commented 6 years ago

that is interesting. This plugin uses the MediaPlayer on android (https://github.com/nstudio/nativescript-videoplayer/blob/master/src/videoplayer.android.ts#L15) - maybe there is something going on with the surface texture here which is actually the main View that gets rendered. I don't have time to dig into that right now but that's my first guess.

john-landgrave commented 5 years ago

@bradmartin was there ever any more movement on this one? I'm running into what appears to be the same issue, though I am using Nativescript-Vue.

Nevermind? I changed seemingly nothing and it started working, which is somewhat concerning...

alereisan commented 5 years ago

@john-landgrave we could not get this to work stable. We had to upgrade our hardware and also switched to ActionScript :(

john-landgrave commented 5 years ago

I actually ended up getting it working, it was ultimately a file path issue (I either had or didn't have an extra / with the file://).

job111 commented 5 years ago

I'm having same issue, tried to use file:// but still the video is not showing

Ghits-nl commented 4 years ago

I have the same issue. is there any solution?