maliang.media.main¶
字数 268 个 代码 77 行 阅读时间 2 分钟 访问量
APIs for playing videos
🟢VideoCanvas
¶
class
public
| Canvas
A canvas that is scalable and playable for videos
master
: parent widgetcontrols
: whether to enable the built-in UIloop
: whether the video loops automaticallyclick_pause
: whether to pause when clickedexpand
: the mode of expand,x
is horizontal, andy
is verticalauto_zoom
: whether or not to scale its itemskeep_ratio
: the mode of aspect ratio,min
follows the minimum value,max
follows the maximum valuefree_anchor
: whether the anchor point is free-floatingkwargs
: compatible with other parameters of classtkinter.Canvas
🟡_display_control_bar
¶
method
protected
🟡_initialization
¶
method
protected
🟡_load_control_bar
¶
method
protected
🟡_play
¶
method
protected
🟡_refresh_control_bar
¶
method
protected
🟡_resize
¶
method
protected
🟡close
¶
method
public
🟡destroy
¶
method
public
🟡open
¶
method
public
Open a video file and play
file
: the video file pathauto_play
: whether to start playing the video automaticallymuted
: whether or not to mute the video at the start
🟡zoom
¶
method
public
🟢_AudioImage
¶
class
protected
| Image
_CustomizedWidget
🟢_CustomizedWidget
¶
class
protected
| Widget
ABC
🟡_bind
¶
method
protected
🟡_theme
¶
method
protected
🟢_FullscreenToggleButton
¶
class
protected
| ToggleButton
_CustomizedWidget
🟢_PlayButton
¶
class
protected
| Button
_CustomizedWidget
🟡_toggle
¶
method
protected