Skip to main content

MaterialVideoControls

Touch-oriented Material video controls.

Inherits: VideoControls

Properties

Properties

automatically_imply_skip_next_buttonclass-attributeinstance-attribute

automatically_imply_skip_next_button: bool = True

Whether a skip next button should be displayed if there are more than one videos in the playlist.

automatically_imply_skip_previous_buttonclass-attributeinstance-attribute

automatically_imply_skip_previous_button: bool = True

Whether a skip previous button should be displayed if there are more than one videos in the playlist.

backdrop_colorclass-attributeinstance-attribute

backdrop_color: ColorValue | None = '#66000000'

Color of backdrop that comes up when controls are visible.

bottom_button_barclass-attributeinstance-attribute

bottom_button_bar: (
    list[Control | VideoBarItem] | None
) = None

Controls displayed in the bottom button bar.

Set to a list to replace the bottom button bar, or an empty list to hide it; if None, the native default is:

[
ftv.VideoPositionIndicator(),
ftv.VideoSpacer(),
ftv.VideoFullscreenButton(),
]

bottom_button_bar_marginclass-attributeinstance-attribute

bottom_button_bar_margin: PaddingValue = field(
    default_factory=lambda: Padding.only(
        left=16.0, right=8.0
    )
)

Margin around the button bar.

brightness_gestureclass-attributeinstance-attribute

brightness_gesture: bool = False

Whether to modify screen brightness on vertical drag gesture on the left side of the screen.

button_bar_button_colorclass-attributeinstance-attribute

button_bar_button_color: ColorValue = '#FFFFFFFF'

Color of the button bar buttons.

button_bar_button_sizeclass-attributeinstance-attribute

button_bar_button_size: Number = 24.0

Size of the button bar buttons.

button_bar_heightclass-attributeinstance-attribute

button_bar_height: Number = 56.0

Height of the button bar.

controls_hover_durationclass-attributeinstance-attribute

controls_hover_duration: DurationValue = 3000

Duration after which the controls will be hidden when there is no mouse movement.

controls_transition_durationclass-attributeinstance-attribute

controls_transition_duration: DurationValue = 300

Duration for which the controls will be animated when shown or hidden.

display_seek_barclass-attributeinstance-attribute

display_seek_bar: bool = True

Whether to display seek bar.

gestures_enabled_while_controls_visibleclass-attributeinstance-attribute

gestures_enabled_while_controls_visible: bool = True

Whether to allow gesture controls to work while controls are visible.

Note

This option is ignored when gestures are disabled.

horizontal_gesture_sensitivityclass-attributeinstance-attribute

horizontal_gesture_sensitivity: Number = 1000

Gesture sensitivity on horizontal drag gestures, the higher the value is the less sensitive the gesture.

initial_brightnessclass-attributeinstance-attribute

initial_brightness: Number = 0.5

Initial brightness value used by the brightness gesture indicator.

It ranges from 0.0 to 1.0.

initial_volumeclass-attributeinstance-attribute

initial_volume: Number = 0.5

Initial volume value used by the volume gesture indicator.

It ranges from 0.0 to 1.0.

paddingclass-attributeinstance-attribute

padding: PaddingValue | None = None

Padding around the controls.

primary_button_barclass-attributeinstance-attribute

primary_button_bar: (
    list[Control | VideoBarItem] | None
) = None

Controls displayed in the primary button bar.

Set to a list to replace the primary button bar, or an empty list to hide it; if None, the native default is:

[
ftv.VideoSpacer(flex=2),
ftv.VideoSkipPreviousButton(),
ftv.VideoSpacer(),
ftv.VideoPlayOrPauseButton(icon_size=48.0),
ftv.VideoSpacer(),
ftv.VideoSkipNextButton(),
ftv.VideoSpacer(flex=2),
]

seek_bar_alignmentclass-attributeinstance-attribute

seek_bar_alignment: Alignment = field(
    default_factory=lambda: Alignment.BOTTOM_CENTER
)

Alignment of seek bar inside the seek bar container.

seek_bar_buffer_colorclass-attributeinstance-attribute

seek_bar_buffer_color: ColorValue = '#3DFFFFFF'

Color of the playback buffer section in the seek bar.

seek_bar_colorclass-attributeinstance-attribute

seek_bar_color: ColorValue = '#3DFFFFFF'

Color of the seek bar.

seek_bar_container_heightclass-attributeinstance-attribute

seek_bar_container_height: Number = 36.0

Height of the seek bar container.

seek_bar_heightclass-attributeinstance-attribute

seek_bar_height: Number = 2.4

Height of the seek bar.

seek_bar_marginclass-attributeinstance-attribute

seek_bar_margin: PaddingValue = 0

Margin around the seek bar.

seek_bar_position_colorclass-attributeinstance-attribute

seek_bar_position_color: ColorValue = '#FFFF0000'

Color of the playback position section in the seek bar.

seek_bar_thumb_colorclass-attributeinstance-attribute

seek_bar_thumb_color: ColorValue = '#FFFF0000'

Color of the seek bar thumb.

seek_bar_thumb_sizeclass-attributeinstance-attribute

seek_bar_thumb_size: Number = 12.8

Size of the seek bar thumb.

seek_gestureclass-attributeinstance-attribute

seek_gesture: bool = False

Whether to seek on horizontal drag gesture.

seek_on_double_tapclass-attributeinstance-attribute

seek_on_double_tap: bool = False

Whether to enable double tap to seek on left or right side of the screen.

seek_on_double_tap_backward_durationclass-attributeinstance-attribute

seek_on_double_tap_backward_duration: DurationValue = (
    10000
)

Duration of seek on double tap backward.

seek_on_double_tap_enabled_while_controls_visibleclass-attributeinstance-attribute

seek_on_double_tap_enabled_while_controls_visible: bool = (
    True
)

Whether to allow double tap to seek on left or right side of the screen to work while controls are visible.

Note

This option is ignored when seek_on_double_tap is False.

seek_on_double_tap_forward_durationclass-attributeinstance-attribute

seek_on_double_tap_forward_duration: DurationValue = (
    10000
)

Duration of seek on double tap forward.

seek_on_double_tap_layout_taps_ratiosclass-attributeinstance-attribute

seek_on_double_tap_layout_taps_ratios: list[int] = field(
    default_factory=lambda: [1, 1, 1]
)

Width proportions for the backward seek, instant tap, and forward seek areas when a double tap occurs on the video widget.

seek_on_double_tap_layout_widget_ratiosclass-attributeinstance-attribute

seek_on_double_tap_layout_widget_ratios: list[int] = field(
    default_factory=lambda: [1, 1, 1]
)

Width proportions for the visual indicators shown during backward seek, instant tap, and forward seek actions.

shift_subtitles_on_controls_visibility_changeclass-attributeinstance-attribute

shift_subtitles_on_controls_visibility_change: bool = False

Whether to shift the subtitles upwards when the controls are visible.

speed_up_factorclass-attributeinstance-attribute

speed_up_factor: Number = 2.0

Factor to speed up on long press.

speed_up_on_long_pressclass-attributeinstance-attribute

speed_up_on_long_press: bool = False

Whether to speed up on long press.

top_button_barclass-attributeinstance-attribute

top_button_bar: list[Control | VideoBarItem] | None = (
    None
)

Controls displayed in the top button bar.

Set to a list to replace the top button bar, or an empty list to hide it; if None, the native default is an empty list.

top_button_bar_marginclass-attributeinstance-attribute

top_button_bar_margin: PaddingValue = field(
    default_factory=lambda: Padding.symmetric(
        horizontal=16.0
    )
)

Margin around the top button bar.

vertical_gesture_sensitivityclass-attributeinstance-attribute

vertical_gesture_sensitivity: Number = 100

Gesture sensitivity on vertical drag gestures, the higher the value is the less sensitive the gesture.

visible_on_mountclass-attributeinstance-attribute

visible_on_mount: bool = False

Whether the controls are initially visible.

volume_gestureclass-attributeinstance-attribute

volume_gesture: bool = False

Whether to modify volume on vertical drag gesture on the right side of the screen.