PageSourceSearch

https://learnboogiewoogie.com/assets/WebinarEmbed-IsRpBfuC.js

js learnboogiewoogie.com collected 2026-10-09 22:03:31 UTC 7,898 bytes, 25 lines download raw bytes

1import{bq as z,r as i,R as P,j as n}from"./index-MK_YrAO_.js";const U=()=>{const{slug:b}=z(),[c,j]=i.useState(null),[v,L]=i.useState(""),[k,S]=i.useState(null),[y,x]=i.useState(!1),[d,h]=i.useState(!0),[l,w]=i.useState(1),s=i.useRef(null);i.useEffect(()=>{const e=s.current;e&&(e.muted=d,e.volume=l)},[d,l]);const g=i.useRef(!1);i.useEffect(()=>{const e=t=>{var u,f;const o=t==null?void 0:t.data;if(!o||typeof o!="object")return;const r=s.current;if(r){if(o.type==="webinar:pause"){g.current=!0,r.pause();try{(u=window.parent)==null||u.postMessage({type:"webinar:playstate",paused:!0},"*")}catch{}}else if(o.type==="webinar:play"){g.current=!1,r.play().catch(()=>{});try{(f=window.parent)==null||f.postMessage({type:"webinar:playstate",paused:!1},"*")}catch{}}}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),i.useEffect(()=>{const e=s.current;if(!e)return;const t=()=>{g.current||e.readyState>=2&&e.play().catch(()=>{})};return e.addEventListener("pause",t),()=>e.removeEventListener("pause",t)},[c]),i.useEffect(()=>{if(!b)return;let e=!1;return(async()=>{const{data:t,error:o}=await P.functions.invoke(`get-webinar-url?slug=${encodeURIComponent(b)}`,{method:"GET"});if(!e){if(o||!(t!=null&&t.signedUrl)){S("Webinar not found.");return}L(t.title??""),j(t.signedUrl)}})(),()=>{e=!0}},[b]);const C=()=>{x(!0)},M=()=>{const e=s.current;if(e){try{e.currentTime=0}catch{}e.muted=!1,e.volume=1,h(!1),w(1),e.play().catch(()=>{}),x(!1)}},I=()=>{var t;const e=s.current;if(e)try{(t=window.parent)==null||t.postMessage({type:"webinar:timeupdate",currentTime:e.currentTime,duration:e.duration},"*")}catch{}};return i.useEffect(()=>{const e=s.current;if(!e||!c)return;const t=()=>{var p,m;const a=e;try{(p=a.webkitExitFullscreen)==null||p.call(a)}catch{}try{document.fullscreenElement&&((m=document.exitFullscreen)==null||m.call(document))}catch{}};e.addEventListener("webkitbeginfullscreen",t),document.addEventListener("fullscreenchange",t);const o=()=>{var a;try{(a=document.exitPictureInPicture)==null||a.call(document)}catch{}};e.addEventListener("enterpictureinpicture",o);const r=navigator.mediaSession,u=()=>{var p,m,E;if(!r)return;try{r.metadata=new MediaMetadata({title:v||"LIVE",artist:"Live now"})}catch{}let a=!1;try{(p=r.setPositionState)==null||p.call(r,{duration:1/0}),a=!0}catch{}if(!a){try{(m=r.setPositionState)==null||m.call(r,{duration:0,position:0,playbackRate:1})}catch{}try{(E=r.setPositionState)==null||E.call(r)}catch{}}try{r.playbackState="playing"}catch{}for(const F of["seekto","seekforward","seekbackward","previoustrack","nexttrack","skipad","stop","pause","play"])try{r.setActionHandler(F,null)}catch{}};u();const f=window.setInterval(u,2e3);return()=>{e.removeEventListener("webkitbeginfullscreen",t),e.removeEventListener("enterpictureinpicture",o),document.removeEventListener("fullscreenchange",t),window.clearInterval(f)}},[c,v]),i.useEffect(()=>{const e=t=>t.preventDefault();return document.addEventListener("contextmenu",e),document.addEventListener("dragstart",e),()=>{document.removeEventListener("contextmenu",e),document.removeEventListener("dragstart",e)}},[]),n.jsxs(n.Fragment,{children:[n.jsx("style",{children:`
2        html, body, #root { background: #000 !important; margin: 0; padding: 0; height: 100%; overflow: hidden; }
3        video::-webkit-media-controls,
4        video::-webkit-media-controls-enclosure,
5        video::-webkit-media-controls-panel,
6        video::-webkit-media-controls-panel-container,
7        video::-webkit-media-controls-overlay-play-button,
8        video::-webkit-media-controls-start-playback-button,
9        video::-webkit-media-controls-play-button,
10        video::-webkit-media-controls-pause-button,
11        video::-webkit-media-controls-rewind-button,
12        video::-webkit-media-controls-seek-back-button,
13        video::-webkit-media-controls-seek-forward-button,
14        video::-webkit-media-controls-mute-button,
15        video::-webkit-media-controls-volume-slider,
16        video::-webkit-media-controls-toggle-closed-captions-button,
17        video::-webkit-media-controls-picture-in-picture-button,
18        video::-webkit-media-controls-fullscreen-button,
19        video::-webkit-media-controls-timeline,
20        video::-webkit-media-controls-timeline-container,
21        video::-webkit-media-controls-current-time-display,
22        video::-webkit-media-controls-time-remaining-display { display: none !important; opacity: 0 !important; -webkit-appearance: none; pointer-events: none !important; }
23        video::-internal-media-controls-overlay-cast-button { display: none !important; }
24        video:-webkit-full-screen { display: none !important; }
25      `}),n.jsx("div",{style:{position:"fixed",inset:0,background:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:k?n.jsx("p",{style:{color:"#888",fontFamily:"sans-serif",fontSize:13},children:k}):c?n.jsxs(n.Fragment,{children:[n.jsx("video",{ref:s,src:c,title:v,muted:!0,playsInl
25ine:!0,"webkit-playsinline":"true","x-webkit-airplay":"deny",preload:"metadata",controls:!1,disablePictureInPicture:!0,disableRemotePlayback:!0,controlsList:"nodownload noplaybackrate noremoteplayback nofullscreen",onLoadedData:C,onTimeUpdate:I,onContextMenu:e=>e.preventDefault(),style:{width:"100%",height:"100%",objectFit:"contain",background:"#000",pointerEvents:"none",outline:"none"}}),n.jsx("div",{style:{position:"absolute",inset:0,background:"transparent",pointerEvents:y?"none":"auto"},onContextMenu:e=>e.preventDefault()}),y&&n.jsxs("button",{type:"button",onClick:M,"aria-label":"Start with sound",style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.55)",border:0,cursor:"pointer",color:"#fff",fontFamily:"system-ui, sans-serif",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:14},children:[n.jsx("div",{style:{width:74,height:74,borderRadius:"50%",background:"rgba(255,255,255,0.95)",display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"#000",children:n.jsx("path",{d:"M8 5v14l11-7z"})})}),n.jsx("span",{style:{fontSize:13,letterSpacing:.5},children:"Click to start with sound"})]}),!y&&n.jsxs("div",{style:{position:"absolute",bottom:16,right:16,display:"flex",alignItems:"center",gap:10,padding:"8px 14px",borderRadius:999,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",border:"1px solid rgba(255,255,255,0.12)",pointerEvents:"auto",zIndex:5,fontFamily:"system-ui, sans-serif"},onContextMenu:e=>e.preventDefault(),children:[n.jsx("button",{type:"button",onClick:()=>{h(e=>{const t=!e;return!t&&l===0&&w(.8),t})},"aria-label":d?"Unmute":"Mute",style:{width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:0,cursor:"pointer",color:"#fff",padding:0},children:d||l===0?n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.59 3L19 9.41 17.59 8 15 10.59 12.41 8 11 9.41 13.59 12 11 14.59 12.41 16 15 13.41 17.59 16 19 14.59 16.59 12z"})}):l<.5?n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M5 9v6h4l5 5V4L9 9H5zm11.5 3a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12z"})}):n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05A4.5 4.5 0 0 0 16.5 12zM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54z"})})}),n.jsx("input",{type:"range",min:0,max:1,step:.01,value:d?0:l,onChange:e=>{const t=parseFloat(e.target.value);w(t),h(t===0)},"aria-label":"Volume",style:{width:110,accentColor:"#C8922A",cursor:"pointer"}})]})]}):n.jsx("p",{style:{color:"#444",fontFamily:"sans-serif",fontSize:12},children:"Loading…"})})]})};export{U as default};

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.