PageSourceSearch

https://www.liveonairstudio.com/assets/ObsLive-DVz-FowB.js

js liveonairstudio.com collected 2026-10-05 00:52:15 UTC 5,108 bytes, 1 lines download raw bytes

1import{r as a,j as e}from"./vendor-react-DwiXYjRQ.js";import{B as w,m as T,ae as $,af as z,a5 as S}from"./admin-pages-rD5qQFN_.js";import{u as M,m as V}from"./useStationLive-cB97ntd3.js";import{B as k,O as q}from"./index-DfPxxR7g.js";import{f as G,s as K,a as D}from"./stationWeek-CyPXC_IC.js";import{L as y}from"./vendor-router-n_zBXFel.js";import"./vendor-radix-kCV4DlWZ.js";import"./vendor-recharts-BRhreb2J.js";import"./vendor-supabase-DK0D4pT9.js";import"./vendor-query-DMghypAX.js";import"./vendor-markdown-Cx8Kgx7r.js";import"./radioClock-CVLE0ZD0.js";import"./producerRoles-CxSimk05.js";function re(){var b,j,N;const{user:I,loading:L,tz:B,callLetters:E,now:i,live:t,seg:r}=M(),n=a.useRef(null),[d,m]=a.useState(!1),[v,x]=a.useState(-1),[l,C]=a.useState(()=>localStorage.getItem("obs-live-autoread")==="1"),[c,_]=a.useState(()=>localStorage.getItem("obs-live-bed")!=="0"),p=a.useRef(null);a.useEffect(()=>{localStorage.setItem("obs-live-autoread",l?"1":"0")},[l]),a.useEffect(()=>{localStorage.setItem("obs-live-bed",c?"1":"0")},[c]),a.useEffect(()=>()=>{var s;return(s=n.current)==null?void 0:s.dispose()},[]);const u=r?[r.title,r.notes].filter(Boolean).join(". "):"",h=()=>{var s,o;!r||!u||!k.supported()||((s=n.current)==null||s.stop(),n.current??(n.current=new k),m(!0),n.current.playBrowser(u,{bed:c&&r.type!=="content",vibe:r.type==="ad"?"drive":"warm",voiceName:(o=q("after"))==null?void 0:o.name,onLine:O=>x(O),onEnd:()=>{m(!1),x(-1)}}))},A=()=>{var s;(s=n.current)==null||s.stop(),m(!1),x(-1)};if(a.useEffect(()=>{if(!l||!(t!=null&&t.rd)||t.segIdx<0||!r)return;const s=`${t.rd.start_time}-${t.segIdx}`;p.current!==s&&(p.current=s,r.type!=="content"&&h())},[l,t,r]),!L&&!I)return e.jsx("main",{className:"flex min-h-screen items-center justify-center bg-background p-6 text-foreground",children:e.jsx(w,{asChild:!0,children:e.jsx(y,{to:"/auth?next=/obs/live",children:"Sign in to load your rundown"})})});const f=t!=null&&t.rd&&t.segIdx>=0?t.rd.segments[t.segIdx+1]:null,R=f&&(t!=null&&t.rd)?G(K((D(t.rd.start_time)??0)+t.rd.segments.slice(0,t.segIdx+1).reduce((s,o)=>s+o.duration_seconds,0))):null,g=u.split(new RegExp("(?<=[.!?…])\\s+")).filter(Boolean);return e.jsxs("main",{className:"flex min-h-screen flex-col gap-6 bg-background p-6 text-foreground md:p-10",children:[e.jsx("title",{children:"On-Air Screen — OnAir Studio"}),e.jsx("meta",{name:"robots",content:"noindex"}),e.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm uppercase tracking-widest text-muted-foreground",children:[E||"Station"," · ",B]}),e.jsxs("p",{className:"text-xl font-semibold",children:[e.jsx(T,{className:"mr-2 inline h-5 w-5 text-primary","aria-hidden":!0}),((b=t==null?void 0:t.dp)==null?void 0:b.show_name)??((j=t==null?void 0:t.rd)==null?void 0:j.show_name)??"No show on air",(N=t==null?void 0:t.dp)!=null&&N.host_name?e.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.dp.host_name]}):null]})]}),e.jsx("span",{className:"font-mono text-5xl font-bold tabular-nums text-primary",children:(i==null?void 0:i.label)??"--:--:--"})]}),r?e.jsxs("section",{className:"flex flex-1 flex-col gap-6 rounded-2xl border border-border bg-card/60 p-6 backdrop-blur-xl md:p-10",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[e.jsx("h1",{className:"text-4xl font-bold md:text-6xl",children:r.title}),e.jsx("span",{className:`font-mono text-7xl font-bold tabular-nums md:text-8xl ${t.segLeft<=10?"text-destructive":"text-accent"}`,children:V(t.segLeft)})]}),e.jsx("div",{className:"text-2xl leading-relaxed md:text-4xl","aria-live":"polite",children:g.length>1||r.notes?g.map((s,o)=>e.jsxs("span",{className:o===v?"text-primary":d?"text-muted-foreground":"",children:[s," "]},o)):e.jsx("span",{className:"text-muted-foreground",children:"No script for this segment — ad-lib or add notes in your rundown."})}),e.jsxs("div",{className:"mt-auto flex flex-wrap items-center gap-4 border-t border-border pt-4",children:[e.jsxs(w,{size:"lg",variant:d?"destructive":"default",onClick:d?A:h,children:[d?e.jsx($,{className:"mr-2 h-5 w-5"}):e.jsx(z,{className:"mr-2 h-5 w-5"}),d?"Stop read":"Read on air"]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx(S,{checked:l,onCheckedChange:C,"aria-label":"Auto-read each segment"})," Auto-read each segment"]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx(S,{checked:c,onCheckedChange:_,"aria-label":"Music bed"})," Music bed"]}),f&&e.jsxs("span",{className:"ml-auto text-muted-foreground",children:["Next at ",R,": ",e.jsx("strong",{className:"text-foreground",children:f.title})]})]})]}):e.jsx("section",{className:"flex flex-1 items-center justify-center rounded-2xl border border-border bg-card/60 p-10 text-center",children:e.jsxs("p",{className:"text-xl text-muted-foreground",children:["No timed rundown on air right now. Generate this week's rundowns on your"," ",e.jsx(y,{to:"/station",className:"underline",children:"station dashboard"}),"."]})})]})}export{re 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.