Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snackbar cause Audio stop playing #1772

Closed
moshstudio opened this issue Aug 28, 2023 · 0 comments
Closed

Snackbar cause Audio stop playing #1772

moshstudio opened this issue Aug 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@moshstudio
Copy link

Description
When playing audio, show_snackbar cause this audio stopped.

Code example to reproduce the issue:

import flet as ft


def main(page: ft.Page):
    audio = ft.Audio(
        src="https://luan.xyz/files/audio/ambient_c_motion.mp3", autoplay=False
    )
    page.overlay.append(audio)

    page.add(
        ft.Text("This is an app with background audio."),
        ft.ElevatedButton("play", on_click=lambda _: audio.play()),
        ft.ElevatedButton(
            "snack bar",
            on_click=lambda _: page.show_snack_bar(
                ft.SnackBar(
                    content=ft.Text("test"),
                    action="ok",
                    open=True,
                )
            ),
        ),
    )


ft.app(target=main)

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Flet version (pip show flet):

Name: flet
Version: 0.9.0
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: [email protected]
License: Apache-2.0
Location: c:\users\14438\documents\github\private-taichi\venv\lib\site-packages
Requires: copier, flet-runtime, packaging, pydantic, qrcode, watchdog, websocket-client, websockets
Required-by:
Python: 3.8

Operating system:

Windows 11 22H2

Additional environment details:

@FeodorFitsner FeodorFitsner added the bug Something isn't working label Nov 4, 2023
FeodorFitsner added a commit that referenced this issue Nov 6, 2023
zrr1999 pushed a commit to zrr1999/flet that referenced this issue Jul 17, 2024
* AlertDialog uses global state

* DatePicker uses global state

* State on the control level

* Control-level state

Fix flet-dev#2025, Fix flet-dev#1807, Fix flet-dev#1236, Fix flet-dev#1772

* Fix control tests

* Bump fl_chart to 0.64.0

* Fix `scroll_to` with 0 animation duration

Fix flet-dev#1659

* Fix page.width/.height on session start

Fix flet-dev#1960

* Fix Flet version retrieval on non-English environments

Fix flet-dev#1997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants