Initial TrueGrowth source import
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Change: update audio playback speed control
|
||||
|
||||
## Why
|
||||
当前悬浮播放控件和音乐播放器工具缺少统一的播放速度入口,语音朗读的语速又单独存在于设置面板,导致用户无法在播放时直接调整速度,也容易出现播放控件与设置值不一致的问题。
|
||||
|
||||
## What Changes
|
||||
- 为悬浮播放控件和音乐播放器工具新增统一的播放速度入口
|
||||
- 在共享播放服务中增加普通音频与语音朗读的独立速率状态
|
||||
- 让语音朗读速率与设置中的 `tts.rate` 双向同步
|
||||
|
||||
## Impact
|
||||
- Affected specs: `canvas-audio-playback`
|
||||
- Affected code:
|
||||
- `packages/drawnix/src/services/canvas-audio-playback-service.ts`
|
||||
- `packages/drawnix/src/components/audio-node-element/CanvasAudioPlayer.tsx`
|
||||
- `packages/drawnix/src/tools/tools/music-player/MusicPlayerTool.tsx`
|
||||
@@ -0,0 +1,28 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Shared playback modes for audio players
|
||||
The system SHALL provide shared playback controls for the global floating audio player and the music player tool.
|
||||
|
||||
#### Scenario: Switch playback speed from the floating player
|
||||
- **GIVEN** an audio or reading queue is active
|
||||
- **WHEN** the user changes playback speed from the floating player dropdown
|
||||
- **THEN** the system SHALL update the shared playback speed state
|
||||
- **AND** the music player tool SHALL reflect the same selected speed
|
||||
|
||||
#### Scenario: Switch playback speed from the music player tool
|
||||
- **GIVEN** an audio or reading queue is active
|
||||
- **WHEN** the user changes playback speed from the music player tool dropdown
|
||||
- **THEN** the system SHALL update the shared playback speed state
|
||||
- **AND** the floating player SHALL reflect the same selected speed
|
||||
|
||||
#### Scenario: Sync reading speed with TTS settings
|
||||
- **GIVEN** the active queue is a reading queue
|
||||
- **WHEN** the user changes playback speed from either player entry
|
||||
- **THEN** the system SHALL update the current reading playback speed
|
||||
- **AND** SHALL sync the same value to `tts.rate`
|
||||
|
||||
#### Scenario: Reflect external TTS speed changes during reading
|
||||
- **GIVEN** a reading queue is active
|
||||
- **WHEN** `tts.rate` changes from the settings panel
|
||||
- **THEN** the shared reading playback speed SHALL update
|
||||
- **AND** both player entries SHALL reflect the latest reading speed
|
||||
@@ -0,0 +1,5 @@
|
||||
## 1. Implementation
|
||||
- [x] 1.1 在共享播放服务中增加普通音频与语音朗读的速率状态、持久化与设置联动
|
||||
- [x] 1.2 在悬浮播放控件中新增播放速度入口并接入共享状态
|
||||
- [x] 1.3 在音乐播放器工具中新增播放速度入口并接入共享状态
|
||||
- [x] 1.4 补充服务测试,覆盖音频速率持久化与语音速率同步
|
||||
Reference in New Issue
Block a user