Skip to content

fix(flet-audio): replaying Audio after completion under ReleaseMode.RELEASE raises TimeoutException#6538

Open
ndonkoHenri wants to merge 3 commits into
mainfrom
audio-fixes
Open

fix(flet-audio): replaying Audio after completion under ReleaseMode.RELEASE raises TimeoutException#6538
ndonkoHenri wants to merge 3 commits into
mainfrom
audio-fixes

Conversation

@ndonkoHenri
Copy link
Copy Markdown
Contributor

@ndonkoHenri ndonkoHenri commented May 29, 2026

Fix #6536

Summary by Sourcery

Ensure audio playback can be replayed safely after completion in release mode and improve clarity of release mode behavior.

Bug Fixes:

  • Allow replaying audio after completion in release mode without triggering timeouts by reapplying the audio source before seeking or resuming playback.

Enhancements:

  • Factor out source application into a reusable helper to re-prepare the native audio player when needed.
  • Clarify and expand documentation for ReleaseMode options, describing behavior, trade-offs, and recommended use cases.
  • Document the default starting position for audio playback in the Python Audio.play method.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes flet-audio replay behavior after audio completion in the default release mode by re-preparing the native audio source before replaying or seeking.

Changes:

  • Extracts audio source setup into _applySource() and reuses it after completed playback under ReleaseMode.release.
  • Updates ReleaseMode documentation to clarify resource/replay behavior.
  • Adds a changelog entry and clarifies Audio.play() default start position.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
sdk/python/packages/flet-audio/src/flutter/flet_audio/lib/src/audio.dart Re-applies the source before replay/seek after completion in release mode.
sdk/python/packages/flet-audio/src/flet_audio/types.py Expands ReleaseMode behavior documentation.
sdk/python/packages/flet-audio/src/flet_audio/audio.py Clarifies play(position) defaults to the beginning.
CHANGELOG.md Documents the audio replay timeout bug fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b1b74f
Status: ✅  Deploy successful!
Preview URL: https://05ac1108.flet-website-v2.pages.dev
Branch Preview URL: https://audio-fixes.flet-website-v2.pages.dev

View logs

@ndonkoHenri ndonkoHenri changed the title fix(flet-audio): replaying Audio after completion under ReleaseMode.RELEASE no longer raises TimeoutException fix(flet-audio): replaying Audio after completion under ReleaseMode.RELEASE raises TimeoutException May 30, 2026
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.

bug: Flet Audio TimeoutException

2 participants