Skip to content

Commit 983b3e8

Browse files
add explicit prop type to nativevideoplayer
1 parent 865c55b commit 983b3e8

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/frontend/src/widgets/primitives/video/NativeVideoPlayer.tsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ import { validateImageUrl } from '@/lib/url';
44
import { VideoPlayerError } from './VideoPlayerError';
55
import type { VideoPlayerProps } from './types';
66

7-
export const NativeVideoPlayer: React.FC<VideoPlayerProps> = ({
8-
id,
9-
validatedSrc,
10-
poster,
11-
width,
12-
height,
13-
autoplay = false,
14-
loop = false,
15-
muted = false,
16-
preload = 'metadata',
17-
controls = true,
18-
onError,
19-
}) => {
7+
export const NativeVideoPlayer: React.FC<VideoPlayerProps> = (props: VideoPlayerProps) => {
8+
const {
9+
id,
10+
validatedSrc,
11+
poster,
12+
width,
13+
height,
14+
autoplay = false,
15+
loop = false,
16+
muted = false,
17+
preload = 'metadata',
18+
controls = true,
19+
onError,
20+
} = props;
2021
const [hasError, setHasError] = useState(false);
2122
const videoRef = useRef<HTMLVideoElement>(null);
2223
const validatedPoster = poster ? validateImageUrl(poster) : null;

0 commit comments

Comments
 (0)