GiraffePlayer2
GiraffePlayer2 copied to clipboard
giraffe player using xml (only VideoView)
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
Bump
sorry for late,is the problem solved?can you paste the full stack of the error