Skip to content

Document --include-packages #2663

Description

@taaaf11

Description
I have used the first example given in Audio docs. I was able to run the file using python main.py. But, when built apk using flet build apk -vv, and installed, ran it, it showed a red colour "drawer", giving info Unknown control: audio.

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):
    audio1 = ft.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(target=main)

Describe the results you received:

A red colour "drawer" giving info: Unknown control: audio

Describe the results you expected:

Audio in the example being played in the background.

Additional information you deem important (e.g. issue happens only occasionally):
Issue happening when running apk on android, built with flet build apk -vv

Flet version (pip show flet):

Name: flet
Version: 0.20.1
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page: 
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: C:\Users\Altaaf\AppData\Local\Programs\Python\Python313\Lib\site-packages
Requires: cookiecutter, flet-runtime, packaging, qrcode, watchdog, websocket-client, websockets
Required-by:

Give your requirements.txt file (don't pip freeze, instead give direct packages):

flet

Operating system:

Windows 10 Version 22H2 (OS Build 19045.4046)

Additional environment details:

Using vscode, (though it is not related, but still)
Python version: Python 3.13.0a4

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsRelated to the documentation

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions