Skip to content

flet-dev/flet-audio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flet Audio control

Audio control for Flet.

Usage

Add flet-audio as dependency (pyproject.toml or requirements.txt) to your Flet project.

Example

import flet as ft

import flet_audio as fta


def main(page: ft.Page):
    audio1 = fta.Audio(
        src="https://luan.xyz/files/audio/ambient_c_motion.mp3", autoplay=True
    )
    page.overlay.append(audio1)
    page.add(
        ft.Text("This is an app with background audio."),
        ft.ElevatedButton("Stop playing", on_click=lambda _: audio1.pause()),
    )

ft.app(main)