JakeSteam / Vidsta

Easily implementable and customisable Android video player library
https://play.google.com/store/apps/details?id=uk.co.jakelee.exposurevideoplayersample
GNU General Public License v3.0
37 stars 13 forks source link

Video plays only once and gives error next time video is loaded from url #5

Open larrytech7 opened 7 years ago

larrytech7 commented 7 years ago

Video happens to play only once when first loaded and never again always throwing error callback. The video is loaded over an https resource and happens to play only the first time it is actually set to source. When i restart the activity to play it again, it doesn't play, it throws the onerror callback

larrytech7 commented 7 years ago

Here's the stack trace

06-07 15:59:17.014 5065-5065/comn.example.user.j_trok D/MediaPlayer: setDataSource IOException happend : java.io.FileNotFoundException: No content provider: https://firebasestorage.googleapis.com/v0/b/myap/resourceparams... at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1074) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:854) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1085) at uk.co.jakelee.vidsta.VidstaPlayer.setUpVideoPlayer(VidstaPlayer.java:376) at uk.co.jakelee.vidsta.VidstaPlayer.setVideoSource(VidstaPlayer.java:362) at comn.example.user.j_trok.ui.PostDetailActivity$1.onDataChange(PostDetailActivity.java:110) at com.google.android.gms.internal.zzbpx.zza(Unknown Source) at com.google.android.gms.internal.zzbqx.zzZV(Unknown Source) at com.google.android.gms.internal.zzbra$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 06-07 15:59:17.014 5065-5065/comn.example.user.j_trok D/MediaPlayer: Couldn't open file on client side, trying server side 06-07 15:59:17.034 5065-23007/comn.example.user.j_trok D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= Samsung SM-N900V stagefright/Beyonce/1.1.9 (Linux;Android 5.0) 06-07 15:59:17.034 5065-23201/comn.example.user.j_trok I/System.out: (HTTPLog)-Static: isSBSettingEnabled false

JakeSteam commented 7 years ago

Hey,

Looks like that's lower level than Vidsta, MediaPlayer is saying it can't find a file there. This can be due to missing headers, bad filetype, or a thousand other things.

Try playing back the file in a raw mediaplayer instance, and see how it goes?

Jake

larrytech7 commented 7 years ago

the video always plays the first time on any device, but any subsequent time, it throws an error

JakeSteam commented 7 years ago

Please try it with a regular media player, not with Vidsta, as I believe the file / source is at fault.

larrytech7 commented 7 years ago

ok, i'll try that and see what comes out

joseAugustoCR commented 6 years ago

same problem here