Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/components/DefaultVideo/DefaultVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ interface DefaultVideoProps {
export const DefaultVideo = React.forwardRef<DefaultVideoRefType, DefaultVideoProps>(
(props, ref) => {
const {video, qa, customBarControlsClassName} = props;
const {controls, customControlsOptions, muted: initiallyMuted = true, onVideoEnd} = video;
const {
controls,
customControlsOptions,
muted: initiallyMuted = true,
onVideoEnd,
loop,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we won't get a conflict with this logic ? https://github.com/gravity-ui/page-constructor/blob/main/src/components/Media/Video/Video.tsx#L49

when rendering from the Video file, you need to check that loop is a boolean, and if it is a parameter, then you don't need to include it in defaultVideo

} = video;
const {
muteButtonShown,
positioning,
Expand Down Expand Up @@ -94,6 +100,7 @@ export const DefaultVideo = React.forwardRef<DefaultVideoRefType, DefaultVideoPr
ref={videoRef}
preload="metadata"
muted={isMuted}
loop={Boolean(loop)}
aria-label={video.ariaLabel}
onClick={onClick}
>
Expand Down