setPlayerView method
设置播放器渲染视图(公开 API)。
Sets the rendering view for the player. Called by the player surface slot when the native view is created.
viewId The ID of the newly created platform view.
isPortrait 为 true 时同时记录为竖屏视图 ID,
退出全屏时将使用此 ID 重绑定,避免使用已销毁的全屏视图 ID。
Implementation
void setPlayerView(int viewId, {bool isPortrait = false}) {
if (isPortrait) {
_portraitViewId = viewId;
}
_setPlayerView(viewId);
}