chenjun

体育-广东体育-小视频撑到顶部,修复折叠屏带出的问题

... ... @@ -160,11 +160,14 @@ export struct WDPlayerRenderView {
if (info.size.width > 0 && info.size.height > 0) {
if (!this.liftVideo) {
let ratio = this.videoWidth / this.videoHeight
const height = info.size.width / ratio
Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height)
if (this.videoHeight > 0 && this.videoWidth > 0) {
this.xComponentController.setXComponentSurfaceRect({
surfaceWidth: info.size.width,
surfaceHeight: info.size.width / this.videoRatio,
offsetY: this.isPad ? this.topSafeHeight : 0
offsetY: this.isPad ? this.topSafeHeight : (info.size.height - height) / 2
});
return
}
... ...