File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ const defaultProps = {
1919 } ,
2020} as TaroVideoProps
2121
22- const classPrefix = `nut-video`
22+ const classPrefix = 'nut-video'
23+
2324export const Video : FunctionComponent < Partial < TaroVideoProps & VideoProps > > = (
2425 props
2526) => {
@@ -39,8 +40,12 @@ export const Video: FunctionComponent<Partial<TaroVideoProps & VideoProps>> = (
3940 onPlayEnd,
4041 ...restProps
4142 } = mergeProps ( defaultProps , props )
43+
4244 const classes = classNames ( classPrefix , className )
4345
46+ const effectiveControls =
47+ props . options ?. controls ?? controls ?? options . controls
48+
4449 return (
4550 < View className = { classes } style = { style } >
4651 < VideoTaro
@@ -49,7 +54,7 @@ export const Video: FunctionComponent<Partial<TaroVideoProps & VideoProps>> = (
4954 autoplay = { options . autoplay || autoplay }
5055 loop = { options . loop || loop }
5156 poster = { options . poster || poster }
52- controls = { controls !== undefined ? controls : options . controls }
57+ controls = { effectiveControls }
5358 src = { source . src || ( src as string ) }
5459 onPlay = { onPlay }
5560 onPause = { onPause }
You can’t perform that action at this time.
0 commit comments