视频详情评论

This commit is contained in:
xiaoxiao
2025-05-29 17:13:23 +08:00
parent 5375c26462
commit fc801e1345
23 changed files with 899 additions and 33 deletions
@@ -14,16 +14,17 @@ export class PLVOrientationManager {
}
readonly isPortrait: MutableState<boolean> = new MutableState(isPortrait())
requestOrientation(orientation: 'port' | 'land') {
const context = PLVAbilityContexts.getInstance().lastContext()
console.info('requestOrientation', orientation, context)
const windowOrientation = orientation === 'port' ? window.Orientation.PORTRAIT : window.Orientation.LANDSCAPE
if (!context) {
console.info('No context found')
return
}
window.getLastWindow(context).then((lastWindow) => {
console.info('Got lastWindow', lastWindow)
lastWindow.setPreferredOrientation(windowOrientation)
})
}
}