王士厅
... ... @@ -251,11 +251,11 @@ export struct DetailPlayShortVideoPage {
// 视频宽高比屏幕大,则宽度撑满
if (this.ratio > width / height) {
this.playerWidth = '100%'
this.playerHeight = width / this.ratio
this.playerHeight = px2vp(width / this.ratio)
} else {
// 否则高度撑满
this.playerHeight = '100%'
this.playerWidth = height * this.ratio
this.playerWidth = px2vp(height * this.ratio)
}
console.log('calculatePlayerRect=====', width, height)
... ...