src | string | | Yes | The address of the video to be played. |
duration | number | | No | The duration of the video |
controls | boolean | true | No | Specifies whether to display default playback controls (Play/Pause buttons, playback progress, and timeline). |
danmuList | any[] | | No | List of barrage comments |
danmuBtn | boolean | false | No | Specifies whether to display the barrage button. It is valid only during initialization, and cannot be dynamically changed. |
enableDanmu | boolean | false | No | Specifies whether to display barrage comments. It is valid only during initialization, and cannot be dynamically changed. |
autoplay | boolean | false | No | Specifies whether to enable auto playback |
loop | boolean | false | No | Specifies whether to enable loop playback |
muted | boolean | false | No | Specifies whether to enable muted playback |
initialTime | number | | No | Specifies the initial time point at which the video starts to play |
pageGesture | boolean | false | No | (Discarded. See vslide-gesture.) Specifies whether to enable brightness and volume adjusting gestures in the non-full-screen mode. |
direction | number | | No | Specifies the direction of the video in the full screen. If it is not specified, the direction is set automatically based on the aspect ratio. |
showProgress | boolean | true | No | If this property is not specified, the progress bar is displayed only when the width is greater than 240 px. |
showFullscreenBtn | boolean | true | No | Specifies whether to display the full screen button |
showPlayBtn | boolean | true | No | Specifies whether to display the play button in the bottom control bar of the video |
showCenterPlayBtn | boolean | true | No | Specifies whether to display the play button in the center of the video |
enableProgressGesture | boolean | true | No | Specifies whether to enable progress control gestures |
objectFit | "contain" | "fill" | "cover" | "contain" | No | The presentation of the video when the video size differs from the video container size |
poster | string | | No | The URL or cloud file ID of the image on the video cover. If the value of the controls property is false, the setting of the poster does not take effect. |
showMuteBtn | boolean | false | No | Specifies whether to display the mute button |
title | string | | No | The title of the video. It is displayed on the top in the full screen mode. |
playBtnPosition | "bottom" | "center" | 'bottom' | No | The location of the play button |
enablePlayGesture | boolean | false | No | Specifies whether to enable the playback gestures: Double-tap to switch between play/pause. |
autoPauseIfNavigate | boolean | true | No | Specifies whether to automatically pause the video on the current page when the user is navigated to another Mini Program page. |
autoPauseIfOpenNative | boolean | true | No | Specifies whether to automatically pause the real-/video on the current page upon the navigation to another native page of WeChat. |
vslideGesture | boolean | false | No | (Same as pageGesture ) Specifies whether to enable brightness and volume adjusting gestures in the non-full-screen mode. |
vslideGestureInFullscreen | boolean | true | No | Specifies whether to enable brightness and volume adjusting gestures in the full screen mode. |
adUnitId | string | | No | Unit IDs for pre-video posting ads, see Open Capabilities for more details Advertising before the video. |
posterForCrawler | string | | No | It is recommended to use a video cover image without a play icon and only supports network addresses. |
showCastingButton | boolean | | No | Specifies whether to show cast button. Android only and rendered on the same layer, DLNA protocol supported. |
onPlay | BaseEventOrigFunction<any> | | No | Triggers the play event when the playback is started/resumed |
onPause | BaseEventOrigFunction<any> | | No | Triggers the pause event when the playback is paused |
onEnded | BaseEventOrigFunction<any> | | No | Triggers the ended event at the end of the video. |
onTimeUpdate | BaseEventOrigFunction<onTimeUpdateEventDetail> | | No | Triggered when the playback progress changes.
event.detail = {currentTime, duration}. It is triggered every 250 ms. |
onFullscreenChange | BaseEventOrigFunction<onFullscreenChangeEventDetail> | | No | Triggered when the video enters or exits the full screen. event.detail = {fullScreen, direction}. Valid values of direction include vertical and horizontal. |
onWaiting | BaseEventOrigFunction<onWaitingEventDetail> | | No | Triggered when the video starts buffering |
onError | BaseEventOrigFunction<any> | | No | Triggered when an error occurs during video playback |
onProgress | BaseEventOrigFunction<onProgressEventDetail> | | No | Triggered when the loading progress changes. It is supported only for a section of progress. event.detail = {buffered}. Its value is a percentage. |
onLoadedMetaData | BaseEventOrigFunction<any> | | No | Triggered when the video metadata has finished loading. event.detail = {width, height, duration} |