1import{j as t}from"./jsx-runtime-u17CrQMm.js";import{y as c}from"./chunk-4N6VE7H7-OtquOwOc.js";import{c as y}from"./index-BAaT-_5m.js";import{B as g}from"./button-H5c85Ksk.js";import{a as v,D as x,E}from"./index-BK4Ip9pn.js";const C=u=>{const[n,r]=c.useState(!0),l=c.useRef(null),i=()=>{const e=u.current;return e?e.tagName==="VIDEO"?e:e.querySelector("video"):null};return c.useEffect(()=>{if(!!document.createElement("video").canPlayType&&l.current){const o=i();o&&(o.controls=!1),l.current.style.display="inline-block"}},[]),{videoPlaying:n,togglePlayPause:e=>{e.preventDefault();const o=i();o&&(n?(o.pause(),r(!1)):(o.play(),r(!0)))},controlsRef:l}},V="_videoContainer_159ci_1",j="_fill_159ci_6",I="_videoWrapper_159ci_13",b="_videoPlayer_159ci_32",h="_videoControls_159ci_41",D="_controlsIcon_159ci_59",s={videoContainer:V,fill:j,videoWrapper:I,videoPlayer:b,videoControls:h,controlsIcon:D},L=({className:u,eventName:n,fill:r,posterImg:l,sources:i,videoSrc:d,videoType:e})=>{const o=c.useRef(null),{videoPlaying:p,togglePlayPause:f,controlsRef:m}=C(o);return t.jsxs("div",{className:y(s.videoContainer,{[s.fill]:r},u),children:[t.jsx("figure",{className:y(s.videoWrapper,{[s.fill]:r}),children:t.jsx("video",{autoPlay:!0,className:s.videoPlayer,controls:!0,controlsList:"nofullscreen nodownload noremoteplayback noplaybackrate",loop:!0,muted:!0,playsInline:!0,poster:l,ref:o,onPlay:()=>{v.emit(x.PLAY_VIDEO,n),v.emit(E.VIDEO_PLAYED,n)},children:i?i.map(({src:a,type:P,media:_})=>t.jsx("source",{src:a,type:P,media:_},a)):t.jsx("source",{src:d,type:e})})}),t.jsx(g,{type:"button",className:s.videoControls,onClick:a=>f(a,p),ref:m,style:{display:"none"},children:t.jsx("img",{alt:"Play-Pause button",className:s.controlsIcon,height:"28",width:"28",src:p?"/icons/pause-button.svg":"/icons/play-button.svg"})})]})};export{L as V};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.