feat(android): 新增手机横屏沉浸式播放模式 & 新增依赖导入 - #27
Merged
Merged
Conversation
详细提交内容: - 在package.json中新增screen-orientation插件依赖 - 在android/build.gradle中添加该插件的本地依赖项目 - 在capacitor.settings.gradle中配置插件的安卓项目路径 - 更新pnpm-lock.yaml以锁定screen-orientation插件版本
- 新增横屏沉浸式全屏播放模式,支持隐藏状态栏与导航手势条 - 新增横屏专属歌词字号、封面偏移、歌词内边距配置项 - 新增横竖屏切换过渡动画与状态锁逻辑 - 新增横屏紧凑播放器布局,适配手机横屏场景 - 隔离横屏与竖屏的纯净歌词模式与设置 - 适配Android原生沉浸式横屏逻辑与配置迁移
- 新增设备形态强制切换设置,可手动强制使用手机/平板布局 - 新增平板竖屏页面缩放配置项 - 新增竖屏隐藏底部导航栏功能 - 优化歌词显示适配小屏幕设备 - 优化横屏播放器封面布局与评论按钮逻辑 - 优化播放列表在平板竖屏下的显示样式 - 修复横竖屏切换时的导航栏闪现问题 - 完善双轨歌词支持与显示逻辑 - 优化页面缩放适配逻辑
- 将原有的类名前缀匹配改为包含匹配,修复选择器失效问题 - 新增间歇点容器的居中样式,调整布局显示效果
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 变更类型
📝 变更说明
一、核心功能:手机横屏沉浸式播放模式
为手机端补齐横屏沉浸式全屏播放体验,让用户在手机横屏时可获得接近平板/桌面的播放界面,同时充分利用手机横屏的横向空间显示歌词。
新增
FullPlayerMobile顶栏新增横屏入口按钮,触发竖屏 → 沉浸式横屏切换;横屏顶部菜单同时承担退出入口。prefers-reduced-motion,低动效场景跳过动画。lyricFontSizeLandscape横屏歌词字号landscapeCoverOffsetX封面 X 偏移landscapeLyricPaddingX歌词区左右内边距PlayerQuickActionsMenu中按当前模式动态显示对应控件。@capacitor/screen-orientation依赖,配合MainActivity/ AndroidNativePlaybackPlugin 实现 SENSOR_LANDSCAPE 锁定与状态栏管理。OrientationOverlay.vue+animate.scss:黑场、Hero 封面、stagger 三层动画样式。重构 / 行为隔离
pureLyricModeLandscape字段与 effectivePureLyricMode getter;左上角按钮在沉浸式横屏下只切横屏字段,避免污染竖屏设置。isImmersiveFullscreen期间跳过androidShowStatusBar恢复逻辑,由 nativeapplyImmersiveMode统一管控。二、Bug 修复(顺手)
setting.ts → checkAndMigrate旧实现把currentState当迁移前快照,循环内不更新;导致 v3→v6(enableTTMLLyric)、v5→v8(excludeUserKeywords/Regexes)等跨版本迁移读取到undefined,最终$patch把默认值覆盖为undefined。修复:每步Object.assign(currentState, migrationUpdates)同步合并。persist.pick引用了 StatusState 中并不存在的playSongType,已删除。三、依赖
@capacitor/screen-orientation,用于横屏锁定与方向感知;配套更新android/build.gradle、capacitor.settings.gradle与pnpm-lock.yaml。🔗 关联 Issue
Closes #
📱 影响范围
✅ 自检清单
devpnpm lint且无 warningpnpm typecheck且无报错@capacitor/screen-orientation)📸 截图 / 录屏
🧪 测试方式
prefers-reduced-motion: reduce) → 入/退场应直接切换状态而无动画,不出现卡死。schemaVersion < 21)升级安装 → 启动后检查enableOnlineTTMLLyric、excludeLyricsUserKeywords/Regexes等字段不应为undefined,保持有效默认值。💬 其他说明
pureLyricModeLandscape与pureLyricMode各自独立持久化,下次进同一模式各自记忆。isCapacitorAndroid && isPhone),其它平台保持原行为。