Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7版本VideoPlayerView 存在 NullPointerException #9

Open
marlboro3420 opened this issue Jan 30, 2018 · 1 comment
Open

1.7版本VideoPlayerView 存在 NullPointerException #9

marlboro3420 opened this issue Jan 30, 2018 · 1 comment

Comments

@marlboro3420
Copy link

java.lang.NullPointerException: Attempt to read from field 'cn.ittiger.player.ui.VideoControllerView cn.ittiger.player.ui.StandardVideoView.mVideoControllerView' on a null object reference at cn.ittiger.player.VideoPlayerView.onExitSmallWindowPlay(VideoPlayerView.java:583) at cn.ittiger.player.VideoPlayerView.toggleSmallWindow(VideoPlayerView.java:530) at cn.ittiger.player.VideoPlayerView.onAttachedToWindow(VideoPlayerView.java:364) at android.view.View.dispatchAttachedToWindow(View.java:14551) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2839) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2846)

VideoPlayerView 的583行报错,多操作几下这个错误挺容易出现的

@marlboro3420
Copy link
Author

marlboro3420 commented Feb 5, 2018

我在

VideoPlayerView smallWindowView = (VideoPlayerView) windowContent.findViewById(R.id.vp_small_window_view_id);

行下面加了段

 if (smallWindowView == null) {
     TextureView textureView = createTextureView();
     mVideoTextureViewContainer.addView(textureView);
     PlayerManager.getInstance().setTextureView(textureView);
     return;
 }

暂时不崩溃了,感觉差不多好了,大佬看看有什么问题没

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant