Skip to content

feat: Add playback speed control to chapter player#706

Open
Sai-Adithya-M wants to merge 1 commit intoAOSSIE-Org:devfrom
Sai-Adithya-M:feat/playback-speed-control
Open

feat: Add playback speed control to chapter player#706
Sai-Adithya-M wants to merge 1 commit intoAOSSIE-Org:devfrom
Sai-Adithya-M:feat/playback-speed-control

Conversation

@Sai-Adithya-M
Copy link
Copy Markdown

@Sai-Adithya-M Sai-Adithya-M commented Jan 11, 2026

Description

This PR introduces a Playback Speed Control feature to the Chapter Player. Users can now adjust the audio playback rate to suit their listening preferences.

Key Changes:

  • UI: Added a toggle button in
    ChapterPlayer to cycle through speeds: 0.5x, 0.75x, 1.0x, 1.25x, 1.5x, 2.0x.
  • Logic: Updated ChapterPlayerController to manage playback speed state and interface with AudioPlayer.
  • Tests: Added unit tests to verify speed control logic

Fixes #707

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I have performed the following tests to verify these changes:

1.Unit Testing: Created and ran
test/controllers/chapter_player_controller_speed_test.dart to verify that
setPlaybackSpeed correctly updates the observable state and calls the audio player API.

  • Command: flutter test test/controllers/chapter_player_controller_speed_test.dart
    2.Manual Verification:
  • Verified that the speed button appears in the Chapter Player UI.
  • Verified that tapping the button updates the label (e.g., 1.0x -> 1.25x) and cycles through all speeds.
  • Verified that the audio pitch/speed changes accordingly during playback.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

@Sai-Adithya-M Sai-Adithya-M requested a review from M4dhav as a code owner January 11, 2026 16:45
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Welcome @Sai-Adithya-M!
Thank you for your pull request! Our team will review it soon. 🔍

  • Please ensure your PR follows the contribution guidelines. ✅
  • All automated tests should pass before merging. 🔄
  • If this PR fixes an issue, link it in the description. 🔗

We appreciate your contribution! 🚀

@M4dhav M4dhav linked an issue Jan 11, 2026 that may be closed by this pull request
@M4dhav M4dhav added the enhancement New feature or request label Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add Playback Speed Control to Chapter Player

2 participants