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

Android 三台手机进会 2台看不到第三个人。。。。。 #12

Open
LxzBUG opened this issue Mar 5, 2021 · 4 comments
Open

Comments

@LxzBUG
Copy link

LxzBUG commented Mar 5, 2021

No description provided.

@yoreland
Copy link

yoreland commented Mar 5, 2021

有截图么?
向右滑能看到网格视图么?

@LxzBUG
Copy link
Author

LxzBUG commented Mar 5, 2021

不能 只有最后进去的人才能看到之前进去的 第一个进入的没法看到后面进来的 不过用户列表是有的 就是视频没有 也不能滑动

@LxzBUG
Copy link
Author

LxzBUG commented Mar 8, 2021

@yoreland A进会 B进会 A看不到B进入 成员列表也没有B 总结就是先进第看不到后面进来第人

@xgfd3
Copy link
Collaborator

xgfd3 commented Mar 9, 2021

这个bug是因为复用了被销毁的surface,将在下一个版本更新。可以这么处理:
在BindingAdapter.java里,修改方法bindVideo为如下:

public static void bindVideo(View view, boolean enable, int uid, boolean overlay, @RenderMode int renderMode) {
        if (view instanceof ViewGroup) {
            if (enable) {
                SurfaceView surfaceView;
                // get child view from ViewGroup
                View child = ((ViewGroup) view).getChildAt(0);
                if (child instanceof SurfaceView) { // SurfaceView already exits
                    surfaceView = (SurfaceView) child;
                    // ############添加surface是否被销毁的判断################
                    if(surfaceView.getHolder().getSurface().isValid()){
                        Object tag = surfaceView.getTag();
                        if (tag instanceof Integer) {
                            if ((Integer) tag == uid) {
                                // return if the SurfaceView has bound this uid
                                return;
                            }
                        }
                    }else{
                        surfaceView = RtcManager.instance().createRendererView(view.getContext());
                    }
                   // ############添加surface是否被销毁的判断############
                } else { // SurfaceView not exits
                    // create new SurfaceView
                    surfaceView = RtcManager.instance().createRendererView(view.getContext());
                }
                ...
            } else {
                ((ViewGroup) view).removeAllViews();
            }
        }
}

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

3 participants