Skip to content

ft.Video doesn’t allow you to move the slider #4234

Closed Answered by ndonkoHenri
Klu1d asked this question in Q&A
Discussion options

You must be logged in to vote

Seems like you are doing it wrongly here:

sample_media = [
    ft.Container(
        content=ft.VideoMedia(
            "https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4",
        ),
    ),
]

Container.content cannot be a VideoMedia, because VideoMedia isn't a Flet Control.
Modern IDEs highlight such basic errors (Pycharm below):

This is the reason why your second sample_media works - that's the right way to do it:

sample_media = [
    ft.VideoMedia(
        "https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4",
    ),
]

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Comment options

You must be logged in to vote
2 replies
@Klu1d
Comment options

@syleishere
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4233 on October 25, 2024 22:45.