ft.Video doesn’t allow you to move the slider #4234
-
Duplicate Check
Describe the bugThe problem is that I can’t move the slider when I place the ft.VideoMedia widget inside an ft.Container. However, when I put it in a variable without the ft.Container, I can move the slider. I’ve attached the video and code. sample_media = [
ft.Container(
content=ft.VideoMedia(
"https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4",
),
),
] Then change it to this: sample_media = [
ft.VideoMedia(
"https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4",
),
] Code sampleCodeimport flet as ft
def main(page: ft.Page):
sample_media = [
ft.Container(
content=ft.VideoMedia(
"https://user-images.githubusercontent.com/28951144/229373720-14d69157-1a56-4a78-a2f4-d7a134d7c3e9.mp4",
),
),
]
page.add(
ft.Video(
expand=True,
playlist=sample_media[0:2],
)
)
ft.app(main) To reproducenot have Expected behaviorNo response Screenshots / VideosCapturesvied.mp4Operating SystemWindows Operating system detailsWindows 11 Flet version0.24.1 RegressionNo, it isn't SuggestionsNo response LogsNo response Additional detailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I also tested this bug in version 0.25.0.dev3570, and the issue is still there |
Beta Was this translation helpful? Give feedback.
-
Are you setting your container expand=True? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Seems like you are doing it wrongly here:
Container.content
cannot be aVideoMedia
, becauseVideoMedia
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: