website/docs/release/breaking-changes/deprecated-video-apis.md
Video control APIs deprecated:::note This guide is accurate as of Flet 0.85.0. Later releases might add new APIs or additional migration paths.
The breaking changes and deprecations index lists the guides created for each release. :::
Flet 0.85.0 deprecated [Video.show_controls][flet_video.Video.show_controls],
[Video.playlist_add()][flet_video.Video.playlist_add], and
[Video.playlist_remove()][flet_video.Video.playlist_remove].
Use [Video.controls][flet_video.Video.controls] to configure or hide video
controls. Mutate [Video.playlist][flet_video.Video.playlist] directly with
standard list methods.
Video.controls provides a single configuration point for built-in and custom
video controls. It also supports the old hide-controls behavior by setting the
value to None.
The playlist is now the source of truth for video items. Mutating the list directly keeps the API aligned with other list-backed Flet controls.
Code before migration:
video = ft.Video(
playlist=[media],
show_controls=False,
)
Code after migration:
video = ft.Video(
playlist=[media],
controls=None,
)
Code before migration:
video.playlist_add(media)
video.playlist_remove(media_index)
Code after migration:
video.playlist.append(media)
video.playlist.pop(media_index)
video.update()
Call video.update() when the mutation happens after the control has already
been added to the page.
0.85.00.88.0Video][flet_video.Video]