GiraffePlayer2 icon indicating copy to clipboard operation
GiraffePlayer2 copied to clipboard

giraffe player using xml (only VideoView)

Open feloham opened this issue 6 years ago • 2 comments

Hi, I need to use your player throw xml.

My xml is :

<tcking.github.com.giraffeplayer2.VideoView android:id="@+id/video_view" android:layout_width="match_parent" android:layout_height="match_parent"

/>

My java file :

videoView = (VideoView)findViewById(R.id.video_view); videoView.setVideoPath(channel.getUrl()).getPlayer().start();

The error I'm getting :

java.lang.NullPointerException: Attempt to invoke interface method 'long tv.danmaku.ijk.media.player.IMediaPlayer.getCurrentPosition()' on a null object reference

How do I solve this?

PS: it doesn't happen all the time. It happens specially at first time run

feloham avatar May 16 '18 13:05 feloham

Bump

feloham avatar May 18 '18 07:05 feloham

sorry for late,is the problem solved?can you paste the full stack of the error

tcking avatar Jun 25 '18 11:06 tcking