@@ -11,6 +11,7 @@ import {useTheme} from '../../context/theme';
1111import { Col , Grid , Row } from '../../grid' ;
1212import { ClassNameProps , HeaderBlockBackground , HeaderBlockProps } from '../../models' ;
1313import { block , getThemedValue } from '../../utils' ;
14+ import { mergeVideoMicrodata } from '../../utils/microdata' ;
1415
1516import { getImageSize , getTitleSizes , titleWithImageSizes } from './utils' ;
1617
@@ -97,6 +98,10 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
9798 const backgroundThemed = background && getThemedValue ( background , theme ) ;
9899 const imageThemed = image && getThemedValue ( image , theme ) ;
99100 const videoThemed = video && getThemedValue ( video , theme ) ;
101+ const mediaWithMicrodata = mergeVideoMicrodata ( videoThemed , {
102+ name : title ,
103+ description,
104+ } ) ;
100105 const fullWidth = backgroundThemed ?. fullWidth || backgroundThemed ?. fullWidthMedia ;
101106 const titleId = useUniqId ( ) ;
102107
@@ -184,7 +189,7 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
184189 className = { b ( 'media' , { [ curImageSize ] : true } ) }
185190 videoClassName = { b ( 'video' ) }
186191 imageClassName = { b ( 'image' ) }
187- video = { videoThemed }
192+ { ... mediaWithMicrodata }
188193 image = { imageThemed }
189194 />
190195 ) }
0 commit comments