3import android.content.Context;
4import android.content.res.TypedArray;
5import android.os.Build;
6import android.util.AttributeSet;
7import android.view.View;
8import android.widget.FrameLayout;
10import us.zoom.internal.video.BaseSDKVideoView;
11import us.zoom.internal.video.SDKVideoRender;
12import us.zoom.internal.video.SDKVideoSurfaceView;
13import us.zoom.internal.video.SDKVideoTextureView;
14import us.zoom.internal.video.SDKVideoUnitMgr;
15import us.zoom.internal.video.ZPGLSurfaceView;
16import us.zoom.internal.video.ZPGLTextureView;
17import us.zoom.videomeetings.R;
54 this.renderTextureView = isRenderTextureView;
55 init(context, isRenderTextureView);
66 this.renderTextureView = isRenderTextureView;
68 init(context, isRenderTextureView);
72 super(context, attrs);
77 private void initAttr(Context context, AttributeSet attrs) {
78 TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ZoomVideoSDKVideoView);
79 renderTextureView = typedArray.getBoolean(R.styleable.ZoomVideoSDKVideoView_render_textureView,
false);
80 translucent = typedArray.getBoolean(R.styleable.ZoomVideoSDKVideoView_render_translucent,
true);
85 super(context, attrs, defStyle);
91 private void init(Context context,
boolean isRenderTextureView) {
92 if (isRenderTextureView) {
106 SDKVideoSurfaceView videoSurfaceView = (SDKVideoSurfaceView)
mVideoView;
108 FrameLayout.LayoutParams lp =
new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
109 videoSurfaceView.setLayoutParams(lp);
110 }
else if (
mVideoView instanceof ZPGLTextureView) {
111 SDKVideoTextureView videoSurfaceView = (SDKVideoTextureView)
mVideoView;
112 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
113 videoSurfaceView.setPreserveEGLContextOnPause(
true);
115 FrameLayout.LayoutParams lp =
new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
116 videoSurfaceView.setLayoutParams(lp);
129 SDKVideoSurfaceView videoSurfaceView = (SDKVideoSurfaceView)
mVideoView;
130 videoSurfaceView.setZOrderMediaOverlay(isMediaOverlay);
144 SDKVideoSurfaceView videoSurfaceView = (SDKVideoSurfaceView)
mVideoView;
145 videoSurfaceView.setZOrderOnTop(onTop);
156 SDKVideoUnitMgr.getInstance().switchToLevel(level, x, y);
Zoom Video SDK video canvas view.
boolean translucent
Uses translucent for video rendering.
void init(Context context, boolean isRenderTextureView)
void setZOrderMediaOverlay(boolean isMediaOverlay)
Controls whether the surface view's surface is placed on top of another regular surface view in the w...
BaseSDKVideoView mVideoView
ZoomVideoSDKVideoView(Context context, boolean isRenderTextureView, boolean translucent)
Constructor.
void switchToLevel(float level, float x, float y)
Zooms in or out for share.
ZoomVideoSDKVideoView(Context context, AttributeSet attrs)
ZoomVideoSDKVideoView(Context context, AttributeSet attrs, int defStyle)
ZoomVideoSDKVideoView(Context context)
SDKVideoRender mVideoRender
void setZOrderOnTop(boolean onTop)
Controls whether the surface view's surface is placed on top of its window. Normally it is placed beh...
void initAttr(Context context, AttributeSet attrs)
ZoomVideoSDKVideoView(Context context, boolean isRenderTextureView)
Constructor.
boolean renderTextureView
Uses SurfaceView for performance, or TextureView for UI animation.