PageSourceSearch

https://timereaction.lovable.app/assets/js/VideoPage-EuFXCbK9.js

js timereaction.lovable.app collected 2026-10-03 03:51:04 UTC 4,744 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-3gk4mjtH.js";import{r}from"./vendor-BmnQ2z9d.js";import{d as v,b,L as p}from"./router-DFtDxSAI.js";import{N as c,H as y,s as N}from"./index-B8vKJ0nv.js";import l from"./Footer-C8KMx-dV.js";import{u as _}from"./useAnalytics-DQNklpaM.js";import{u as w}from"./i18n--vPob74L.js";import{A as h}from"./arrow-left-DCcIa99T.js";const A=()=>{const{slug:o}=v();b(),w();const{trackEvent:m}=_(),[t,x]=r.useState(null),[f,d]=r.useState(!0),[g,a]=r.useState(!1),j=(i,s)=>i?i.startsWith("http")?i:`https://timereaction.com${i}`:s==="demo-spanish"?"https://timereaction.com/lovable-uploads/timereaction-demo-spanish-thumb.webp":"https://timereaction.com/lovable-uploads/timereaction-demo-english-thumb.webp";if(r.useEffect(()=>{o&&m("page_view",{page_title:`Video - ${o}`,page_location:window.location.href,page_path:`/video/${o}`})},[o,m]),r.useEffect(()=>{(async()=>{if(!o){a(!0),d(!1);return}try{const{data:s,error:u}=await N.from("blog_posts").select("id, title, slug, video_url, image_url, author, created_at, meta_title, meta_description").eq("slug",o).maybeSingle();u?(console.error("Error fetching post:",u),a(!0)):!s||!s.video_url?a(!0):x(s)}catch(s){console.error("Error fetching post:",s),a(!0)}finally{d(!1)}})()},[o]),f)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(c,{}),e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-muted-foreground",children:"Loading video..."})}),e.jsx(l,{})]});if(g||!t)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(c,{}),e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Video Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"The requested video could not be found."}),e.jsxs(p,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline",children:[e.jsx(h,{className:"w-4 h-4"}),"Back to Blog"]})]}),e.jsx(l,{})]});const n=j(t.image_url,t.slug);return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(y,{children:[e.jsx("title",{children:t.meta_title||`${t.title} - Video | Timereaction`}),e.jsx("meta",{name:"description",content:t.meta_description||`Watch the video for ${t.title}. Manufacturing insights and solutions from Timereaction.`}),e.jsx("meta",{name:"keywords",content:"manufacturing video, supply chain video, Timereaction demo, manufacturing solutions"}),e.jsx("link",{rel:"canonical",href:`https://timereaction.com/video/${o}`}),e.jsx("meta",{property:"og:title",content:`${t.title} - Video | Timereaction`}),e.jsx("meta",{property:"og:description",content:t.meta_description||`Watch the video for ${t.title}. Manufacturing insights and solutions from Timereaction.`}),e.jsx("meta",{property:"og:type",content:"video.other"}),e.jsx("meta",{property:"og:url",content:`https://timereaction.com/video/${o}`}),e.jsx("meta",{property:"og:video",content:t.video_url||""}),e.jsx("meta",{property:"og:image",content:n}),e.jsx("meta",{name:"twitter:card",content:"player"}),e.jsx("meta",{name:"twitter:title",content:`${t.title} - Video | Timereaction`}),e.jsx("meta",{name:"twitter:description",content:t.meta_description||`Watch the video for ${t.title}`}),e.jsx("meta",{name:"twitter:image",content:n}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"VideoObject",name:t.title,description:t.meta_description||`Watch the video for ${t.title}`,uploadDate:t.created_at,contentUrl:t.video_url,thumbnailUrl:n,publisher:{"@type":"Organization",name:"Timereaction",url:"https://timereaction.com"}})}),e.jsx("meta",{name:"robots",content:"index, follow"})]}),e.jsx(c,{}),e.jsx("main",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs(p,{to:`/blog/${o}`,className:"inline-flex items-center gap-2 text-primary hover:underline mb-6",children:[e.jsx(h,{className:"w-4 h-4"}),"Back to Article"]}),e.jsx("h1",{className:"text-3xl font-bold mb-6",children:t.title}),e.jsx("div",{className:"relative w-full bg-black rounded-lg mb-6",style:{aspectRatio:"16/9"},children:e.jsxs("video",{controls:!0,autoPlay:!0,className:"w-full h-full object-cover rounded-lg",preload:"metadata",poster:t.image_url||n,children:[e.jsx("source",{src:t.video_url,type:"video/mp4"}),"Your browser does not support the video tag."]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{children:["By ",t.author]}),e.jsx("span",{children:"•"}),e.jsx("span",{children:new Date(t.created_at).toLocaleDateString()})]})]})}),e.jsx(l,{})]})};export{A 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.