王士厅

fix: 横版视频全屏LANDSCAPE_INVERTED替换为LANDSCAPE

... ... @@ -43,13 +43,13 @@ export class devicePLSensorManager {
requestOrientation = window.Orientation.LANDSCAPE;
}
else if (orientation > 225 && orientation < 315) {
requestOrientation = window.Orientation.LANDSCAPE_INVERTED;
requestOrientation = window.Orientation.LANDSCAPE;
}
if (targetOrientation == window.Orientation.PORTRAIT && requestOrientation == window.Orientation.PORTRAIT) {
WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
sensor.off(sensor.SensorId.ACCELEROMETER);
}
if (targetOrientation == window.Orientation.LANDSCAPE && (requestOrientation == window.Orientation.LANDSCAPE || requestOrientation == window.Orientation.LANDSCAPE_INVERTED)) {
if (targetOrientation == window.Orientation.LANDSCAPE && (requestOrientation == window.Orientation.LANDSCAPE || requestOrientation == window.Orientation.LANDSCAPE)) {
WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
sensor.off(sensor.SensorId.ACCELEROMETER);
}
... ...
... ... @@ -122,7 +122,7 @@ export struct PlayUIComponent {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
})
... ... @@ -354,7 +354,7 @@ export struct PlayUIComponent {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
})
... ...
... ... @@ -53,7 +53,7 @@ export struct PlayerTitleComponent {
.onClick(() => {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
... ...
... ... @@ -44,7 +44,7 @@ export struct PlayerUIComponent {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
if(this.playerController){
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
... ...
... ... @@ -76,7 +76,7 @@ export struct PlayerVideoControlComponent {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
if(this.playerController){
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
... ...
... ... @@ -481,7 +481,7 @@ export struct DetailPlayShortVideoPage {
DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
})
... ...
... ... @@ -146,7 +146,7 @@ export struct DetailVideoListPage {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
}
}
... ...
... ... @@ -157,7 +157,7 @@ export struct VideoChannelDetail {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
}
}
... ...
... ... @@ -76,7 +76,7 @@ export struct PlayerFullScreenView {
DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE_INVERTED)
window.Orientation.LANDSCAPE)
})
Text(this.getTitle())
.fontSize(18)
... ...
... ... @@ -63,7 +63,7 @@ export struct WDPlayerRenderView {
}
this.playerController.onVideoSizeChange = (width: number, height: number) => {
// console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`)
console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`)
Logger.info(TAG, ` onVideoSizeChange width:${width} height:${height}`)
this.videoWidth = width;
this.videoHeight = height;
... ...