henryblue/MxVideoPlayer

How to play video from raw folder?

divysoni3 opened this issue · 2 comments

How can I play video from raw folder, I have tried by following

final String path = "android.resource://" + getPackageName() + "/" + R.raw.vid0643;
        videoPlayerWidget.startPlay(path,
                MxVideoPlayer.SCREEN_LAYOUT_NORMAL, "LUV Apink");

But it is giving following error

E/IJKMEDIA: android.resource://com.app.mxvideoplayer/2131099648: Protocol not found
09-19 12:22:25.526 23054-25808/com.app.mxvideoplayer I/IJKMEDIA: SDL_JNI_DetachThreadEnv: [25808]
09-19 12:22:25.526 23054-25806/com.app.mxvideoplayer D/IJKMEDIA: FFP_MSG_ERROR: 0
09-19 12:22:25.526 23054-23086/com.app.mxvideoplayer E/tv.danmaku.ijk.media.player.IjkMediaPlayer: Error (-10000,0)
09-19 12:22:25.531 23054-23054/com.app.mxvideoplayer I/MxVideoPlayer: onSurfaceTextureAvailable [200135303] 
09-19 12:22:25.531 23054-23086/com.app.mxvideoplayer W/tv.danmaku.ijk.media.player.IjkMediaPlayer: setScreenOnWhilePlaying(true) is ineffective for Surface
09-19 12:22:25.531 23054-23086/com.app.mxvideoplayer D/IJKMEDIA: IjkMediaPlayer_setVideoSurface
    ijkmp_set_android_surface(surface=0x9d877500)
    ffpipeline_set_surface()
    ijkmp_set_android_surface(surface=0x9d877500)=void
09-19 12:22:25.531 23054-23054/com.app.mxvideoplayer E/MxVideoPlayer: onError what : -10000 extra : 0 [200135303] 

ijkPlayer not support such as "android.resource" path. so MxVideoPlayer can not play raw folder

ok, thanks for your fast response.