GiraffePlayer icon indicating copy to clipboard operation
GiraffePlayer copied to clipboard

Error while loading player as header of Listview/Recyclerview.

Open alphaDroid89 opened this issue 9 years ago • 2 comments

Hi @tcking,

Thanks for this library. I faced the following issue while bind the video view as header in my ListView/RecyclerView.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void tcking.github.com.giraffeplayer.IjkVideoView.setOnCompletionListener(tv.danmaku.ijk.media.player.IMediaPlayer$OnCompletionListener)' on a null object reference

I used the same code in Activity its working fine but inside the adapter i got the above error.

inside the adapter constructor i added like. GiraffePlayer mVideoPlayer = new GiraffePlayer(getActivity);

let me know how can i initialize player inside the adapter. Thanks in advance.

alphaDroid89 avatar Sep 21 '16 11:09 alphaDroid89

can u give me a demo code project?

tcking avatar Oct 03 '16 10:10 tcking

Same happening to me. @tcking , Can you please give me the suggestion?

shivanig30 avatar Apr 26 '17 09:04 shivanig30