mVideoSurfaceView = new VideoSurfaceView(context);
showContentVideoView();
setVisibility(View.VISIBLE);
- mClient.onShowCustomView(this);
+ }
+
+ protected ContentVideoViewClient getContentVideoViewClient() {
+ return mClient;
}
private void initResources(Context context) {
Context context, long nativeContentVideoView, ContentVideoViewClient client,
boolean legacy) {
ThreadUtils.assertOnUiThread();
+ ContentVideoView videoView = null;
if (legacy) {
- return new ContentVideoViewLegacy(context, nativeContentVideoView, client);
+ videoView = new ContentVideoViewLegacy(context, nativeContentVideoView, client);
} else {
- return new ContentVideoView(context, nativeContentVideoView, client);
+ videoView = new ContentVideoView(context, nativeContentVideoView, client);
+ }
+
+ if (videoView.getContentVideoViewClient().onShowCustomView(videoView)) {
+ return videoView;
}
+ return null;
}
public void removeSurfaceView() {