Skip to content

fix(stream): align floating window orientation - #41

Merged
qiin2333 merged 3 commits into
masterfrom
codex/fix-floating-window-orientation
Jun 17, 2026
Merged

fix(stream): align floating window orientation#41
qiin2333 merged 3 commits into
masterfrom
codex/fix-floating-window-orientation

Conversation

@qiin2333

@qiin2333 qiin2333 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

改了啥呀

  • 让 Ability 默认使用 auto_rotation_restricted,参考 LinysBrowser_NEXT 的小窗方向策略,把普通/小窗状态交回系统管理。
  • 小窗/窗口模式下读取真实窗口宽高来判断客户端视口方向,并用窗口尺寸计算串流画面区域,别再让整屏方向这个杂鱼状态乱带节奏。
  • 从全屏切到小窗时恢复系统受限自动旋转;切回全屏时再按串流分辨率锁横/竖。
  • 服务端分辨率变化和窗口大小变化都会重新检查客户端视口方向,必要时强制同步服务端方向。

为啥要改

用户反馈小窗模式下画面是竖的,和系统小窗方向不一致。根因是我们之前在窗口化时仍然沿用整块物理屏幕/串流分辨率方向去判断和锁定方向,导致小窗实际横竖状态没有被纳入同步逻辑。

验证

  • git diff --check
  • 尝试 node .\hvigorw.js assembleHap,但本机没有可用 hvigor/ohpm,npx 也无法执行 @ohos/hvigor,所以 HAP 编译没有跑起来。这个工具链杂鱼先记一笔。

Summary by CodeRabbit

发布说明

  • 新功能
    • 增强应用屏幕方向和旋转约束配置,提升在多窗口模式下的显示效果和用户体验。

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qiin2333, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 35 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d65699dd-edfb-4873-b269-ed12f88a3c1d

📥 Commits

Reviewing files that changed from the base of the PR and between 10b5b1d and c3bb4d3.

📒 Files selected for processing (1)
  • nativelib/src/main/cpp/CMakeLists.txt
📝 Walkthrough

Walkthrough

entry/src/main/module.json5EntryAbility 配置中新增两个字段:orientation 设为 "auto_rotation_restricted"preferMultiWindowOrientation 设为 "landscape_auto",其余配置不变。

Changes

EntryAbility 屏幕方向约束配置

Layer / File(s) Summary
EntryAbility 方向字段新增
entry/src/main/module.json5
新增 orientation: "auto_rotation_restricted" 限制自动旋转范围,新增 preferMultiWindowOrientation: "landscape_auto" 指定多窗口模式下优先横屏自动旋转。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题 'fix(stream): align floating window orientation' 清晰准确地反映了主要变更内容——修复流媒体在悬浮窗模式下的屏幕方向问题。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-floating-window-orientation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qiin2333
qiin2333 marked this pull request as ready for review June 16, 2026 09:18
@qiin2333

Copy link
Copy Markdown
Contributor Author

真机有效,但反馈比例不一致,有裁剪?

@qiin2333
qiin2333 merged commit 970d8fd into master Jun 17, 2026
2 checks passed
@qiin2333
qiin2333 deleted the codex/fix-floating-window-orientation branch June 17, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant