@@ -30,12 +30,12 @@ import type {
3030import { SelfHostedVideoPlayer } from './SelfHostedVideoPlayer' ;
3131import { ophanTrackerWeb } from './YoutubeAtom/eventEmitters' ;
3232
33- const videoAndBackgroundStyles = css `
33+ const videoAndBackgroundStyles = ( isCinemagraph : boolean ) => css `
3434 position : relative;
3535 display : flex;
3636 justify-content : space-around;
37- z-index : ${ getZIndex ( 'video-container' ) } ;
3837 background-color : ${ palette ( '--video-background' ) } ;
38+ ${ ! isCinemagraph && `z-index: ${ getZIndex ( 'video-container' ) } ` } ;
3939` ;
4040
4141const videoContainerStyles = ( width : number , height : number ) => css `
@@ -49,10 +49,6 @@ const videoContainerStyles = (width: number, height: number) => css`
4949 }
5050` ;
5151
52- const cinemagraphContainerStyles = css `
53- pointer-events : none;
54- ` ;
55-
5652/**
5753 * Dispatches a custom play audio event so that other videos listening
5854 * for this event will be muted.
@@ -677,13 +673,10 @@ export const SelfHostedVideo = ({
677673 : undefined ;
678674
679675 return (
680- < div css = { videoAndBackgroundStyles } className = "loop-video-container" >
676+ < div css = { videoAndBackgroundStyles ( isCinemagraph ) } >
681677 < figure
682678 ref = { setNode }
683- css = { [
684- videoContainerStyles ( width , height ) ,
685- isCinemagraph && cinemagraphContainerStyles ,
686- ] }
679+ css = { videoContainerStyles ( width , height ) }
687680 className = { `video-container ${ videoStyle . toLocaleLowerCase ( ) } ` }
688681 data-component = "gu-video-loop"
689682 >
0 commit comments