[{"data":1,"prerenderedAt":1442},["ShallowReactive",2],{"navigation_docs":3,"-splice-getting-started-installation":420,"-splice-getting-started-installation-surround":1437},[4,26,201,312,317,335],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide:rocket","\u002Fgetting-started","01.getting-started",[10,14],{"title":11,"path":12,"stem":13,"icon":6},"Introduction","\u002Fgetting-started\u002Fintroduction","01.getting-started\u002F01.introduction",{"title":15,"icon":16,"path":17,"stem":18,"children":19,"page":25},"AI","i-lucide:bot","\u002Fgetting-started\u002Fai","01.getting-started\u002F02.ai",[20],{"title":21,"path":22,"stem":23,"icon":24},"LLMs Integration","\u002Fgetting-started\u002Fai\u002Fllms-txt","01.getting-started\u002F02.ai\u002F01.llms-txt","i-lucide:folder-code",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Video Player","i-lucide:play-circle","\u002Fvideo-player","02.video-player",[32,50,76,117,191],{"title":5,"icon":6,"path":33,"stem":34,"children":35,"page":25},"\u002Fvideo-player\u002Fgetting-started","02.video-player\u002F01.getting-started",[36,40,45],{"title":11,"path":37,"stem":38,"icon":39},"\u002Fvideo-player\u002Fgetting-started\u002Fintroduction","02.video-player\u002F01.getting-started\u002F01.introduction","i-lucide:book-open",{"title":41,"path":42,"stem":43,"icon":44},"Installation","\u002Fvideo-player\u002Fgetting-started\u002Finstallation","02.video-player\u002F01.getting-started\u002F02.installation","i-lucide:download",{"title":46,"path":47,"stem":48,"icon":49},"Try your own","\u002Fvideo-player\u002Fgetting-started\u002Ftry-your-own","02.video-player\u002F01.getting-started\u002F03.try-your-own","i-lucide:flask-conical",{"title":51,"icon":52,"path":53,"stem":54,"children":55,"page":25},"Core Concepts","i-lucide:lightbulb","\u002Fvideo-player\u002Fcore-concepts","02.video-player\u002F02.core-concepts",[56,61,66,71],{"title":57,"path":58,"stem":59,"icon":60},"Components","\u002Fvideo-player\u002Fcore-concepts\u002Fcomponents","02.video-player\u002F02.core-concepts\u002F01.components","i-lucide:component",{"title":62,"path":63,"stem":64,"icon":65},"Platforms","\u002Fvideo-player\u002Fcore-concepts\u002Fplatforms","02.video-player\u002F02.core-concepts\u002F02.platforms","i-lucide:globe",{"title":67,"path":68,"stem":69,"icon":70},"Web components","\u002Fvideo-player\u002Fcore-concepts\u002Fweb-components","02.video-player\u002F02.core-concepts\u002F03.web-components","i-lucide:box",{"title":72,"path":73,"stem":74,"icon":75},"Autoplay & audio","\u002Fvideo-player\u002Fcore-concepts\u002Fautoplay-and-audio","02.video-player\u002F02.core-concepts\u002F04.autoplay-and-audio","i-lucide:volume-2",{"title":77,"icon":78,"defaultOpen":25,"path":79,"stem":80,"children":81},"API Reference","i-lucide:book-marked","\u002Fvideo-player\u002Fapi","02.video-player\u002F03.api\u002Findex",[82,85,90,102,107,112],{"title":83,"path":79,"stem":80,"icon":84},"Overview","i-lucide:list",{"title":86,"path":87,"stem":88,"icon":89},"Props","\u002Fvideo-player\u002Fapi\u002Fprops","02.video-player\u002F03.api\u002F01.props","i-lucide:sliders-horizontal",{"title":91,"path":92,"stem":93,"children":94,"icon":96},"Methods & state","\u002Fvideo-player\u002Fapi\u002Fmethods","02.video-player\u002F03.api\u002F02.methods\u002Findex",[95,97],{"title":91,"path":92,"stem":93,"icon":96},"i-lucide:square-function",{"title":98,"path":99,"stem":100,"icon":101},"Wrapping a player","\u002Fvideo-player\u002Fapi\u002Fmethods\u002Fwrapping","02.video-player\u002F03.api\u002F02.methods\u002F01.wrapping","i-lucide:package",{"title":103,"path":104,"stem":105,"icon":106},"Events","\u002Fvideo-player\u002Fapi\u002Fevents","02.video-player\u002F03.api\u002F03.events","i-lucide:radio-tower",{"title":108,"path":109,"stem":110,"icon":111},"Headless controls","\u002Fvideo-player\u002Fapi\u002Fcontrols","02.video-player\u002F03.api\u002F04.controls","i-lucide:toggle-left",{"title":113,"path":114,"stem":115,"icon":116},"Built-in behaviour","\u002Fvideo-player\u002Fapi\u002Fbehaviour","02.video-player\u002F03.api\u002F05.behaviour","i-lucide:settings-2",{"title":118,"icon":119,"defaultOpen":25,"path":120,"stem":121,"children":122,"page":25},"Features","i-lucide:layers","\u002Fvideo-player\u002Ffeatures","02.video-player\u002F04.features",[123,128,133,138,143,148,164,181,186],{"title":124,"path":125,"stem":126,"icon":127},"Scrolling & viewport","\u002Fvideo-player\u002Ffeatures\u002Fviewport","02.video-player\u002F04.features\u002F01.viewport","i-lucide:scroll",{"title":129,"path":130,"stem":131,"icon":132},"Stage & playlists","\u002Fvideo-player\u002Ffeatures\u002Fstage-and-playlists","02.video-player\u002F04.features\u002F02.stage-and-playlists","i-lucide:layout-template",{"title":134,"path":135,"stem":136,"icon":137},"Transcripts","\u002Fvideo-player\u002Ffeatures\u002Ftranscripts","02.video-player\u002F04.features\u002F03.transcripts","i-lucide:scroll-text",{"title":139,"path":140,"stem":141,"icon":142},"Captions","\u002Fvideo-player\u002Ffeatures\u002Fcaptions","02.video-player\u002F04.features\u002F04.captions","i-lucide:subtitles",{"title":144,"path":145,"stem":146,"icon":147},"Quality","\u002Fvideo-player\u002Ffeatures\u002Fquality","02.video-player\u002F04.features\u002F05.quality","i-lucide:gauge",{"title":149,"icon":150,"defaultOpen":25,"path":151,"stem":152,"children":153},"Ads & monetisation","i-lucide:megaphone","\u002Fvideo-player\u002Ffeatures\u002Fads","02.video-player\u002F04.features\u002F06.ads\u002Findex",[154,155,160],{"title":149,"path":151,"stem":152,"icon":150},{"title":156,"path":157,"stem":158,"icon":159},"Header bidding","\u002Fvideo-player\u002Ffeatures\u002Fads\u002Fheader-bidding","02.video-player\u002F04.features\u002F06.ads\u002F01.header-bidding","i-lucide:gavel",{"title":161,"path":162,"stem":163,"icon":116},"Ad behaviour","\u002Fvideo-player\u002Ffeatures\u002Fads\u002Fbehaviour","02.video-player\u002F04.features\u002F06.ads\u002F02.behaviour",{"title":165,"icon":166,"defaultOpen":25,"path":167,"stem":168,"children":169},"Extensibility","i-lucide:puzzle","\u002Fvideo-player\u002Ffeatures\u002Fextensibility","02.video-player\u002F04.features\u002F07.extensibility\u002Findex",[170,171,176],{"title":165,"path":167,"stem":168,"icon":166},{"title":172,"path":173,"stem":174,"icon":175},"Icons","\u002Fvideo-player\u002Ffeatures\u002Fextensibility\u002Ficons","02.video-player\u002F04.features\u002F07.extensibility\u002F01.icons","i-lucide:image",{"title":177,"path":178,"stem":179,"icon":180},"Theming","\u002Fvideo-player\u002Ffeatures\u002Fextensibility\u002Ftheming","02.video-player\u002F04.features\u002F07.extensibility\u002F02.theming","i-lucide:palette",{"title":182,"path":183,"stem":184,"icon":185},"Deep links","\u002Fvideo-player\u002Ffeatures\u002Fdeep-links","02.video-player\u002F04.features\u002F08.deep-links","i-lucide:link",{"title":187,"path":188,"stem":189,"icon":190},"Clip ranges","\u002Fvideo-player\u002Ffeatures\u002Fclip-range","02.video-player\u002F04.features\u002F09.clip-range","i-lucide:brackets",{"title":192,"icon":49,"defaultOpen":25,"path":193,"stem":194,"children":195,"page":25},"Examples","\u002Fvideo-player\u002Fexamples","02.video-player\u002F05.examples",[196],{"title":197,"path":198,"stem":199,"icon":200},"Shorts-style feed","\u002Fvideo-player\u002Fexamples\u002Fshorts-feed","02.video-player\u002F05.examples\u002F01.shorts-feed","i-lucide:smartphone",{"title":202,"icon":203,"path":204,"stem":205,"children":206,"page":25},"Sigil","i-lucide:shapes","\u002Fsigil","03.sigil",[207,217,240,270,290],{"title":5,"icon":6,"path":208,"stem":209,"children":210,"page":25},"\u002Fsigil\u002Fgetting-started","03.sigil\u002F01.getting-started",[211,214],{"title":11,"path":212,"stem":213,"icon":39},"\u002Fsigil\u002Fgetting-started\u002Fintroduction","03.sigil\u002F01.getting-started\u002F01.introduction",{"title":41,"path":215,"stem":216,"icon":44},"\u002Fsigil\u002Fgetting-started\u002Finstallation","03.sigil\u002F01.getting-started\u002F02.installation",{"title":51,"icon":52,"path":218,"stem":219,"children":220,"page":25},"\u002Fsigil\u002Fcore-concepts","03.sigil\u002F02.core-concepts",[221,226,231,235],{"title":222,"path":223,"stem":224,"icon":225},"Resolution","\u002Fsigil\u002Fcore-concepts\u002Fresolution","03.sigil\u002F02.core-concepts\u002F01.resolution","i-lucide:route",{"title":227,"path":228,"stem":229,"icon":230},"Entries","\u002Fsigil\u002Fcore-concepts\u002Fentries","03.sigil\u002F02.core-concepts\u002F02.entries","i-lucide:package-open",{"title":232,"path":233,"stem":234,"icon":70},"The element","\u002Fsigil\u002Fcore-concepts\u002Fweb-component","03.sigil\u002F02.core-concepts\u002F03.web-component",{"title":236,"path":237,"stem":238,"icon":239},"Switching sets","\u002Fsigil\u002Fcore-concepts\u002Fswitching","03.sigil\u002F02.core-concepts\u002F04.switching","i-lucide:repeat",{"title":241,"icon":242,"defaultOpen":25,"path":243,"stem":244,"children":245},"Sources","i-lucide:library","\u002Fsigil\u002Fsources","03.sigil\u002F03.sources\u002Findex",[246,247,252,256,261,266],{"title":83,"path":243,"stem":244,"icon":84},{"title":248,"path":249,"stem":250,"icon":251},"Overrides","\u002Fsigil\u002Fsources\u002Foverrides","03.sigil\u002F03.sources\u002F01.overrides","i-lucide:pin",{"title":253,"path":254,"stem":255,"icon":175},"SVG libraries","\u002Fsigil\u002Fsources\u002Fsvg","03.sigil\u002F03.sources\u002F02.svg",{"title":257,"path":258,"stem":259,"icon":260},"Icon fonts","\u002Fsigil\u002Fsources\u002Ffonts","03.sigil\u002F03.sources\u002F03.fonts","i-lucide:type",{"title":262,"path":263,"stem":264,"icon":265},"From a JSON file","\u002Fsigil\u002Fsources\u002Fjson","03.sigil\u002F03.sources\u002F04.json","i-lucide:braces",{"title":267,"path":268,"stem":269,"icon":166},"Your own source","\u002Fsigil\u002Fsources\u002Fcustom","03.sigil\u002F03.sources\u002F05.custom",{"title":271,"icon":272,"defaultOpen":25,"collapsible":273,"path":274,"stem":275,"children":276,"page":25},"Integrations","i-lucide:plug",true,"\u002Fsigil\u002Fintegrations","03.sigil\u002F04.integrations",[277,281,285],{"title":278,"path":279,"stem":280,"icon":60},"Vue","\u002Fsigil\u002Fintegrations\u002Fvue","03.sigil\u002F04.integrations\u002F01.vue",{"title":282,"path":283,"stem":284,"icon":119},"Other frameworks","\u002Fsigil\u002Fintegrations\u002Fother-frameworks","03.sigil\u002F04.integrations\u002F02.other-frameworks",{"title":286,"path":287,"stem":288,"icon":289},"Third-party scripts","\u002Fsigil\u002Fintegrations\u002Fthird-party-scripts","03.sigil\u002F04.integrations\u002F03.third-party-scripts","i-lucide:git-fork",{"title":77,"icon":78,"defaultOpen":25,"path":291,"stem":292,"children":293},"\u002Fsigil\u002Fapi","03.sigil\u002F05.api\u002Findex",[294,295,300,303,308],{"title":83,"path":291,"stem":292,"icon":84},{"title":296,"path":297,"stem":298,"icon":299},"Registry","\u002Fsigil\u002Fapi\u002Fregistry","03.sigil\u002F05.api\u002F01.registry","i-lucide:database",{"title":241,"path":301,"stem":302,"icon":242},"\u002Fsigil\u002Fapi\u002Fsources","03.sigil\u002F05.api\u002F02.sources",{"title":304,"path":305,"stem":306,"icon":307},"Renderers","\u002Fsigil\u002Fapi\u002Frenderers","03.sigil\u002F05.api\u002F03.renderers","i-lucide:monitor",{"title":309,"path":310,"stem":311,"icon":265},"Types","\u002Fsigil\u002Fapi\u002Ftypes","03.sigil\u002F05.api\u002F04.types",{"title":313,"path":314,"stem":315,"icon":316},"Contributors","\u002Fcontributors","04.contributors","i-lucide:users",{"title":318,"icon":319,"path":320,"stem":321,"children":322,"page":25},"Ship Kit","i-lucide:terminal","\u002Fshipkit","04.shipkit",[323,326,330],{"title":11,"path":324,"stem":325,"icon":101},"\u002Fshipkit\u002Fintroduction","04.shipkit\u002F01.introduction",{"title":327,"path":328,"stem":329,"icon":319},"CLI","\u002Fshipkit\u002Fcli","04.shipkit\u002F02.cli",{"title":331,"path":332,"stem":333,"icon":334},"Vite Configs","\u002Fshipkit\u002Fvite-configs","04.shipkit\u002F03.vite-configs","i-lucide:code",{"title":336,"icon":337,"path":338,"stem":339,"children":340,"page":25},"Splice","i-lucide:scissors","\u002Fsplice","05.splice",[341,352,389,406],{"title":5,"icon":6,"path":342,"stem":343,"children":344,"page":25},"\u002Fsplice\u002Fgetting-started","05.splice\u002F01.getting-started",[345,348],{"title":11,"path":346,"stem":347,"icon":39},"\u002Fsplice\u002Fgetting-started\u002Fintroduction","05.splice\u002F01.getting-started\u002F01.introduction",{"title":349,"path":350,"stem":351,"icon":44},"Getting started","\u002Fsplice\u002Fgetting-started\u002Finstallation","05.splice\u002F01.getting-started\u002F02.installation",{"title":353,"icon":354,"path":355,"stem":356,"children":357,"page":25},"Making clips","i-lucide:film","\u002Fsplice\u002Fmaking-clips","05.splice\u002F02.making-clips",[358,362,367,371,375,380,385],{"title":359,"path":360,"stem":361,"icon":337},"createSplice","\u002Fsplice\u002Fmaking-clips\u002Fcreate-splice","05.splice\u002F02.making-clips\u002F01.create-splice",{"title":363,"path":364,"stem":365,"icon":366},"Crop","\u002Fsplice\u002Fmaking-clips\u002Fcrop","05.splice\u002F02.making-clips\u002F02.crop","i-lucide:crop",{"title":139,"path":368,"stem":369,"icon":370},"\u002Fsplice\u002Fmaking-clips\u002Fcaptions","05.splice\u002F02.making-clips\u002F03.captions","i-lucide:captions",{"title":372,"path":373,"stem":374,"icon":185},"Origin and links","\u002Fsplice\u002Fmaking-clips\u002Forigin-and-links","05.splice\u002F02.making-clips\u002F04.origin-and-links",{"title":376,"path":377,"stem":378,"icon":379},"End card, stamp and watermark","\u002Fsplice\u002Fmaking-clips\u002Fend-card","05.splice\u002F02.making-clips\u002F05.end-card","i-lucide:badge-check",{"title":381,"path":382,"stem":383,"icon":384},"Thumbnails","\u002Fsplice\u002Fmaking-clips\u002Fthumbnails","05.splice\u002F02.making-clips\u002F06.thumbnails","i-lucide:gallery-horizontal",{"title":386,"path":387,"stem":388,"icon":166},"With another player","\u002Fsplice\u002Fmaking-clips\u002Fanother-player","05.splice\u002F02.making-clips\u002F07.another-player",{"title":390,"icon":391,"path":392,"stem":393,"children":394,"page":25},"The editor","i-lucide:mouse-pointer-click","\u002Fsplice\u002Feditor","05.splice\u002F03.editor",[395,398,402],{"title":390,"path":396,"stem":397,"icon":391},"\u002Fsplice\u002Feditor\u002Feditor","05.splice\u002F03.editor\u002F01.editor",{"title":399,"path":400,"stem":401,"icon":28},"Clip this in video-player","\u002Fsplice\u002Feditor\u002Fvideo-player","05.splice\u002F03.editor\u002F02.video-player",{"title":403,"path":404,"stem":405,"icon":60},"Web component","\u002Fsplice\u002Feditor\u002Fweb-component","05.splice\u002F03.editor\u002F03.web-component",{"title":407,"icon":78,"defaultOpen":25,"path":408,"stem":409,"children":410,"page":25},"Reference","\u002Fsplice\u002Freference","05.splice\u002F04.reference",[411,416],{"title":412,"path":413,"stem":414,"icon":415},"Browser support","\u002Fsplice\u002Freference\u002Fbrowser-support","05.splice\u002F04.reference\u002F01.browser-support","i-lucide:monitor-check",{"title":417,"path":418,"stem":419,"icon":334},"API","\u002Fsplice\u002Freference\u002Fapi","05.splice\u002F04.reference\u002F02.api",{"id":421,"title":349,"body":422,"description":1430,"extension":1431,"links":1432,"meta":1433,"navigation":1434,"path":350,"seo":1435,"stem":351,"__hash__":1436},"docs\u002F05.splice\u002F01.getting-started\u002F02.installation.md",{"type":423,"value":424,"toc":1419},"minimark",[425,430,439,464,492,526,533,567,570,574,585,589,1325,1332,1336,1339,1412,1415],[426,427,429],"h2",{"id":428},"install","Install",[431,432,433,434,438],"p",{},"Splice isn't on npm yet. In this repo it's the ",[435,436,437],"code",{},"@munsonlabs\u002Fsplice"," workspace.",[440,441,446],"pre",{"className":442,"code":443,"language":444,"meta":445,"style":445},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @munsonlabs\u002Fsplice\n","bash","",[435,447,448],{"__ignoreMap":445},[449,450,453,457,461],"span",{"class":451,"line":452},"line",1,[449,454,456],{"class":455},"sBMFI","npm",[449,458,460],{"class":459},"sfazB"," install",[449,462,463],{"class":459}," @munsonlabs\u002Fsplice\n",[431,465,466,467,470,471,474,475,486,487,491],{},"It depends on ",[435,468,469],{},"mediabunny",", and on ",[435,472,473],{},"@munsonlabs\u002Fsigil"," for the editor's icons. The core needs nothing else. ",[476,477,478,479,482,483],"strong",{},"The editor needs ",[435,480,481],{},"vue"," and ",[435,484,485],{},"@munsonlabs\u002Fvideo-player",", peer dependencies it shares with the page, since the page's player is its preview. They're optional so a page that only uses the core isn't asked for them, as with ",[488,489,490],"a",{"href":387},"another player",".",[440,493,495],{"className":442,"code":494,"language":444,"meta":445,"style":445},"npm install @munsonlabs\u002Fvideo-player vue # for the editor, \u002Fvue or \u002Felement\nnpm install hls.js # optional, the player's: HLS playback outside Safari\n",[435,496,497,513],{"__ignoreMap":445},[449,498,499,501,503,506,509],{"class":451,"line":452},[449,500,456],{"class":455},[449,502,460],{"class":459},[449,504,505],{"class":459}," @munsonlabs\u002Fvideo-player",[449,507,508],{"class":459}," vue",[449,510,512],{"class":511},"sHwdD"," # for the editor, \u002Fvue or \u002Felement\n",[449,514,516,518,520,523],{"class":451,"line":515},2,[449,517,456],{"class":455},[449,519,460],{"class":459},[449,521,522],{"class":459}," hls.js",[449,524,525],{"class":511}," # optional, the player's: HLS playback outside Safari\n",[431,527,528,529,532],{},"With the Vue editor, import both stylesheets once. The ",[435,530,531],{},"\u002Felement"," build puts its own stylesheet on the page, so it needs only the player's:",[440,534,538],{"className":535,"code":536,"language":537,"meta":445,"style":445},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import '@munsonlabs\u002Fvideo-player\u002Fstyle'\nimport '@munsonlabs\u002Fsplice\u002Fstyle'\n","ts",[435,539,540,556],{"__ignoreMap":445},[449,541,542,546,550,553],{"class":451,"line":452},[449,543,545],{"class":544},"s7zQu","import",[449,547,549],{"class":548},"sMK4o"," '",[449,551,552],{"class":459},"@munsonlabs\u002Fvideo-player\u002Fstyle",[449,554,555],{"class":548},"'\n",[449,557,558,560,562,565],{"class":451,"line":515},[449,559,545],{"class":544},[449,561,549],{"class":548},[449,563,564],{"class":459},"@munsonlabs\u002Fsplice\u002Fstyle",[449,566,555],{"class":548},[431,568,569],{},"HLS playback is the player's. Thumbnails and export never use it: splice reads the stream itself with Mediabunny.",[426,571,573],{"id":572},"requirements","Requirements",[431,575,576,577,580,581,584],{},"A secure context (HTTPS or ",[435,578,579],{},"localhost",") in a browser with WebCodecs and ",[435,582,583],{},"OffscreenCanvas",": current Chrome, Edge, Safari and Firefox.",[426,586,588],{"id":587},"a-first-clip","A first clip",[590,591,592,597,603,705,709,942,946,967,1095,1099,1102],"steps",{},[593,594,596],"h3",{"id":595},"ask-first","Ask first",[431,598,599,602],{},[435,600,601],{},"canSplice"," opens the source and plans the output without encoding anything. It never throws, so use it to decide whether to offer clipping at all.",[440,604,606],{"className":535,"code":605,"language":537,"meta":445,"style":445},"import { canSplice } from '@munsonlabs\u002Fsplice'\n\nconst check = await canSplice('\u002Fvideo\u002Finterview.mp4') \u002F\u002F a URL, a File\u002FBlob or a \u003Cvideo>\nif (!check.ok) console.info(check.message)\n",[435,607,608,631,636,672],{"__ignoreMap":445},[449,609,610,612,615,619,622,625,627,629],{"class":451,"line":452},[449,611,545],{"class":544},[449,613,614],{"class":548}," {",[449,616,618],{"class":617},"sTEyZ"," canSplice",[449,620,621],{"class":548}," }",[449,623,624],{"class":544}," from",[449,626,549],{"class":548},[449,628,437],{"class":459},[449,630,555],{"class":548},[449,632,633],{"class":451,"line":515},[449,634,635],{"emptyLinePlaceholder":273},"\n",[449,637,639,643,646,649,652,655,658,661,664,666,669],{"class":451,"line":638},3,[449,640,642],{"class":641},"spNyl","const",[449,644,645],{"class":617}," check ",[449,647,648],{"class":548},"=",[449,650,651],{"class":544}," await",[449,653,618],{"class":654},"s2Zo4",[449,656,657],{"class":617},"(",[449,659,660],{"class":548},"'",[449,662,663],{"class":459},"\u002Fvideo\u002Finterview.mp4",[449,665,660],{"class":548},[449,667,668],{"class":617},") ",[449,670,671],{"class":511},"\u002F\u002F a URL, a File\u002FBlob or a \u003Cvideo>\n",[449,673,675,678,681,684,687,689,692,694,697,700,702],{"class":451,"line":674},4,[449,676,677],{"class":544},"if",[449,679,680],{"class":617}," (",[449,682,683],{"class":548},"!",[449,685,686],{"class":617},"check",[449,688,491],{"class":548},[449,690,691],{"class":617},"ok) console",[449,693,491],{"class":548},[449,695,696],{"class":654},"info",[449,698,699],{"class":617},"(check",[449,701,491],{"class":548},[449,703,704],{"class":617},"message)\n",[593,706,708],{"id":707},"make-the-clip","Make the clip",[440,710,712],{"className":535,"code":711,"language":537,"meta":445,"style":445},"import { createSplice } from '@munsonlabs\u002Fsplice'\n\nconst controller = new AbortController()\nconst clip = await createSplice({\n  source: '\u002Fvideo\u002Finterview.mp4',\n  start: 42,\n  end: 52,\n  crop: {\n    aspect: '9:16',\n    focus: { x: 0.4 },\n  },\n  onProgress: (fraction) => (progress.value = fraction),\n  signal: controller.signal,\n})\n\u002F\u002F clip is a Blob: 'video\u002Fmp4', H.264 video with AAC audio\n",[435,713,714,733,737,755,773,792,806,819,830,847,868,874,909,927,936],{"__ignoreMap":445},[449,715,716,718,720,723,725,727,729,731],{"class":451,"line":452},[449,717,545],{"class":544},[449,719,614],{"class":548},[449,721,722],{"class":617}," createSplice",[449,724,621],{"class":548},[449,726,624],{"class":544},[449,728,549],{"class":548},[449,730,437],{"class":459},[449,732,555],{"class":548},[449,734,735],{"class":451,"line":515},[449,736,635],{"emptyLinePlaceholder":273},[449,738,739,741,744,746,749,752],{"class":451,"line":638},[449,740,642],{"class":641},[449,742,743],{"class":617}," controller ",[449,745,648],{"class":548},[449,747,748],{"class":548}," new",[449,750,751],{"class":654}," AbortController",[449,753,754],{"class":617},"()\n",[449,756,757,759,762,764,766,768,770],{"class":451,"line":674},[449,758,642],{"class":641},[449,760,761],{"class":617}," clip ",[449,763,648],{"class":548},[449,765,651],{"class":544},[449,767,722],{"class":654},[449,769,657],{"class":617},[449,771,772],{"class":548},"{\n",[449,774,776,780,783,785,787,789],{"class":451,"line":775},5,[449,777,779],{"class":778},"swJcz","  source",[449,781,782],{"class":548},":",[449,784,549],{"class":548},[449,786,663],{"class":459},[449,788,660],{"class":548},[449,790,791],{"class":548},",\n",[449,793,795,798,800,804],{"class":451,"line":794},6,[449,796,797],{"class":778},"  start",[449,799,782],{"class":548},[449,801,803],{"class":802},"sbssI"," 42",[449,805,791],{"class":548},[449,807,809,812,814,817],{"class":451,"line":808},7,[449,810,811],{"class":778},"  end",[449,813,782],{"class":548},[449,815,816],{"class":802}," 52",[449,818,791],{"class":548},[449,820,822,825,827],{"class":451,"line":821},8,[449,823,824],{"class":778},"  crop",[449,826,782],{"class":548},[449,828,829],{"class":548}," {\n",[449,831,833,836,838,840,843,845],{"class":451,"line":832},9,[449,834,835],{"class":778},"    aspect",[449,837,782],{"class":548},[449,839,549],{"class":548},[449,841,842],{"class":459},"9:16",[449,844,660],{"class":548},[449,846,791],{"class":548},[449,848,850,853,855,857,860,862,865],{"class":451,"line":849},10,[449,851,852],{"class":778},"    focus",[449,854,782],{"class":548},[449,856,614],{"class":548},[449,858,859],{"class":778}," x",[449,861,782],{"class":548},[449,863,864],{"class":802}," 0.4",[449,866,867],{"class":548}," },\n",[449,869,871],{"class":451,"line":870},11,[449,872,873],{"class":548},"  },\n",[449,875,877,880,882,884,888,891,894,897,899,902,904,907],{"class":451,"line":876},12,[449,878,879],{"class":654},"  onProgress",[449,881,782],{"class":548},[449,883,680],{"class":548},[449,885,887],{"class":886},"sHdIc","fraction",[449,889,890],{"class":548},")",[449,892,893],{"class":641}," =>",[449,895,896],{"class":617}," (progress",[449,898,491],{"class":548},[449,900,901],{"class":617},"value ",[449,903,648],{"class":548},[449,905,906],{"class":617}," fraction)",[449,908,791],{"class":548},[449,910,912,915,917,920,922,925],{"class":451,"line":911},13,[449,913,914],{"class":778},"  signal",[449,916,782],{"class":548},[449,918,919],{"class":617}," controller",[449,921,491],{"class":548},[449,923,924],{"class":617},"signal",[449,926,791],{"class":548},[449,928,930,933],{"class":451,"line":929},14,[449,931,932],{"class":548},"}",[449,934,935],{"class":617},")\n",[449,937,939],{"class":451,"line":938},15,[449,940,941],{"class":511},"\u002F\u002F clip is a Blob: 'video\u002Fmp4', H.264 video with AAC audio\n",[593,943,945],{"id":944},"link-back-to-the-moment","Link back to the moment",[431,947,948,951,952,955,956,959,960,963,964,966],{},[435,949,950],{},"createClipLink"," is the origin's URL with ",[435,953,954],{},"#ml-t=start,end"," in its hash, the link ",[488,957,958],{"href":183},"video-player's deep links"," open at that moment. Pass ",[435,961,962],{},"origin"," to ",[435,965,359],{}," too, so the MP4's metadata carries it.",[440,968,970],{"className":535,"code":969,"language":537,"meta":445,"style":445},"import { createClipLink } from '@munsonlabs\u002Fsplice'\n\nconst origin = {\n  url: location.href,\n  title: document.title,\n  publisher: 'Example News',\n}\n\n\u002F\u002F https:\u002F\u002Fexample.com\u002Finterview#ml-t=42,52\nconst link = createClipLink(origin, 42, 52)\n",[435,971,972,991,995,1006,1023,1040,1056,1061,1065,1070],{"__ignoreMap":445},[449,973,974,976,978,981,983,985,987,989],{"class":451,"line":452},[449,975,545],{"class":544},[449,977,614],{"class":548},[449,979,980],{"class":617}," createClipLink",[449,982,621],{"class":548},[449,984,624],{"class":544},[449,986,549],{"class":548},[449,988,437],{"class":459},[449,990,555],{"class":548},[449,992,993],{"class":451,"line":515},[449,994,635],{"emptyLinePlaceholder":273},[449,996,997,999,1002,1004],{"class":451,"line":638},[449,998,642],{"class":641},[449,1000,1001],{"class":617}," origin ",[449,1003,648],{"class":548},[449,1005,829],{"class":548},[449,1007,1008,1011,1013,1016,1018,1021],{"class":451,"line":674},[449,1009,1010],{"class":778},"  url",[449,1012,782],{"class":548},[449,1014,1015],{"class":617}," location",[449,1017,491],{"class":548},[449,1019,1020],{"class":617},"href",[449,1022,791],{"class":548},[449,1024,1025,1028,1030,1033,1035,1038],{"class":451,"line":775},[449,1026,1027],{"class":778},"  title",[449,1029,782],{"class":548},[449,1031,1032],{"class":617}," document",[449,1034,491],{"class":548},[449,1036,1037],{"class":617},"title",[449,1039,791],{"class":548},[449,1041,1042,1045,1047,1049,1052,1054],{"class":451,"line":794},[449,1043,1044],{"class":778},"  publisher",[449,1046,782],{"class":548},[449,1048,549],{"class":548},[449,1050,1051],{"class":459},"Example News",[449,1053,660],{"class":548},[449,1055,791],{"class":548},[449,1057,1058],{"class":451,"line":808},[449,1059,1060],{"class":548},"}\n",[449,1062,1063],{"class":451,"line":821},[449,1064,635],{"emptyLinePlaceholder":273},[449,1066,1067],{"class":451,"line":832},[449,1068,1069],{"class":511},"\u002F\u002F https:\u002F\u002Fexample.com\u002Finterview#ml-t=42,52\n",[449,1071,1072,1074,1077,1079,1081,1084,1087,1089,1091,1093],{"class":451,"line":849},[449,1073,642],{"class":641},[449,1075,1076],{"class":617}," link ",[449,1078,648],{"class":548},[449,1080,980],{"class":654},[449,1082,1083],{"class":617},"(origin",[449,1085,1086],{"class":548},",",[449,1088,803],{"class":802},[449,1090,1086],{"class":548},[449,1092,816],{"class":802},[449,1094,935],{"class":617},[593,1096,1098],{"id":1097},"save-or-share-it","Save or share it",[431,1100,1101],{},"Web Share takes the file and the link. Where files can't be shared (most desktop browsers), download instead.",[440,1103,1105],{"className":535,"code":1104,"language":537,"meta":445,"style":445},"const file = new File([clip], 'interview-42-52.mp4', { type: clip.type })\nconst data = { files: [file], url: link }\n\nif (navigator.canShare?.(data)) {\n  await navigator.share(data)\n} else {\n  const a = document.createElement('a')\n  a.href = URL.createObjectURL(file)\n  a.download = file.name\n  a.click()\n}\n",[435,1106,1107,1154,1184,1188,1208,1228,1237,1265,1291,1310,1321],{"__ignoreMap":445},[449,1108,1109,1111,1114,1116,1118,1121,1124,1126,1128,1131,1133,1135,1137,1140,1142,1145,1147,1150,1152],{"class":451,"line":452},[449,1110,642],{"class":641},[449,1112,1113],{"class":617}," file ",[449,1115,648],{"class":548},[449,1117,748],{"class":548},[449,1119,1120],{"class":654}," File",[449,1122,1123],{"class":617},"([clip]",[449,1125,1086],{"class":548},[449,1127,549],{"class":548},[449,1129,1130],{"class":459},"interview-42-52.mp4",[449,1132,660],{"class":548},[449,1134,1086],{"class":548},[449,1136,614],{"class":548},[449,1138,1139],{"class":778}," type",[449,1141,782],{"class":548},[449,1143,1144],{"class":617}," clip",[449,1146,491],{"class":548},[449,1148,1149],{"class":617},"type ",[449,1151,932],{"class":548},[449,1153,935],{"class":617},[449,1155,1156,1158,1161,1163,1165,1168,1170,1173,1175,1178,1180,1182],{"class":451,"line":515},[449,1157,642],{"class":641},[449,1159,1160],{"class":617}," data ",[449,1162,648],{"class":548},[449,1164,614],{"class":548},[449,1166,1167],{"class":778}," files",[449,1169,782],{"class":548},[449,1171,1172],{"class":617}," [file]",[449,1174,1086],{"class":548},[449,1176,1177],{"class":778}," url",[449,1179,782],{"class":548},[449,1181,1076],{"class":617},[449,1183,1060],{"class":548},[449,1185,1186],{"class":451,"line":638},[449,1187,635],{"emptyLinePlaceholder":273},[449,1189,1190,1192,1195,1197,1200,1203,1206],{"class":451,"line":674},[449,1191,677],{"class":544},[449,1193,1194],{"class":617}," (navigator",[449,1196,491],{"class":548},[449,1198,1199],{"class":654},"canShare",[449,1201,1202],{"class":548},"?.",[449,1204,1205],{"class":617},"(data)) ",[449,1207,772],{"class":548},[449,1209,1210,1213,1216,1218,1221,1223,1226],{"class":451,"line":775},[449,1211,1212],{"class":544},"  await",[449,1214,1215],{"class":617}," navigator",[449,1217,491],{"class":548},[449,1219,1220],{"class":654},"share",[449,1222,657],{"class":778},[449,1224,1225],{"class":617},"data",[449,1227,935],{"class":778},[449,1229,1230,1232,1235],{"class":451,"line":794},[449,1231,932],{"class":548},[449,1233,1234],{"class":544}," else",[449,1236,829],{"class":548},[449,1238,1239,1242,1245,1248,1250,1252,1255,1257,1259,1261,1263],{"class":451,"line":808},[449,1240,1241],{"class":641},"  const",[449,1243,1244],{"class":617}," a",[449,1246,1247],{"class":548}," =",[449,1249,1032],{"class":617},[449,1251,491],{"class":548},[449,1253,1254],{"class":654},"createElement",[449,1256,657],{"class":778},[449,1258,660],{"class":548},[449,1260,488],{"class":459},[449,1262,660],{"class":548},[449,1264,935],{"class":778},[449,1266,1267,1270,1272,1274,1276,1279,1281,1284,1286,1289],{"class":451,"line":821},[449,1268,1269],{"class":617},"  a",[449,1271,491],{"class":548},[449,1273,1020],{"class":617},[449,1275,1247],{"class":548},[449,1277,1278],{"class":617}," URL",[449,1280,491],{"class":548},[449,1282,1283],{"class":654},"createObjectURL",[449,1285,657],{"class":778},[449,1287,1288],{"class":617},"file",[449,1290,935],{"class":778},[449,1292,1293,1295,1297,1300,1302,1305,1307],{"class":451,"line":832},[449,1294,1269],{"class":617},[449,1296,491],{"class":548},[449,1298,1299],{"class":617},"download",[449,1301,1247],{"class":548},[449,1303,1304],{"class":617}," file",[449,1306,491],{"class":548},[449,1308,1309],{"class":617},"name\n",[449,1311,1312,1314,1316,1319],{"class":451,"line":849},[449,1313,1269],{"class":617},[449,1315,491],{"class":548},[449,1317,1318],{"class":654},"click",[449,1320,754],{"class":778},[449,1322,1323],{"class":451,"line":870},[449,1324,1060],{"class":548},[431,1326,1327,1328,1331],{},"Or skip all four and drop in ",[488,1329,1330],{"href":396},"the editor",", which does this with a UI.",[426,1333,1335],{"id":1334},"load-it-late","Load it late",[431,1337,1338],{},"The core pulls in Mediabunny. Import it when someone asks for a clip, not with the page:",[440,1340,1342],{"className":535,"code":1341,"language":537,"meta":445,"style":445},"button.addEventListener('click', async () => {\n  const { createSplice } = await import('@munsonlabs\u002Fsplice')\n  \u002F\u002F ...\n})\n",[435,1343,1344,1374,1401,1406],{"__ignoreMap":445},[449,1345,1346,1349,1351,1354,1356,1358,1360,1362,1364,1367,1370,1372],{"class":451,"line":452},[449,1347,1348],{"class":617},"button",[449,1350,491],{"class":548},[449,1352,1353],{"class":654},"addEventListener",[449,1355,657],{"class":617},[449,1357,660],{"class":548},[449,1359,1318],{"class":459},[449,1361,660],{"class":548},[449,1363,1086],{"class":548},[449,1365,1366],{"class":641}," async",[449,1368,1369],{"class":548}," ()",[449,1371,893],{"class":641},[449,1373,829],{"class":548},[449,1375,1376,1378,1380,1382,1384,1386,1388,1391,1393,1395,1397,1399],{"class":451,"line":515},[449,1377,1241],{"class":641},[449,1379,614],{"class":548},[449,1381,722],{"class":617},[449,1383,621],{"class":548},[449,1385,1247],{"class":548},[449,1387,651],{"class":544},[449,1389,1390],{"class":548}," import",[449,1392,657],{"class":778},[449,1394,660],{"class":548},[449,1396,437],{"class":459},[449,1398,660],{"class":548},[449,1400,935],{"class":778},[449,1402,1403],{"class":451,"line":638},[449,1404,1405],{"class":511},"  \u002F\u002F ...\n",[449,1407,1408,1410],{"class":451,"line":674},[449,1409,932],{"class":548},[449,1411,935],{"class":617},[431,1413,1414],{},"The editor does this for you.",[1416,1417,1418],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":445,"searchDepth":515,"depth":515,"links":1420},[1421,1422,1423,1429],{"id":428,"depth":515,"text":429},{"id":572,"depth":515,"text":573},{"id":587,"depth":515,"text":588,"children":1424},[1425,1426,1427,1428],{"id":595,"depth":638,"text":596},{"id":707,"depth":638,"text":708},{"id":944,"depth":638,"text":945},{"id":1097,"depth":638,"text":1098},{"id":1334,"depth":515,"text":1335},"Install splice, check a source, make and save a first clip.","md",null,{},{"icon":44},{"title":349,"description":1430},"W1cDBUTQrQO-SqKoPoYZlvznwQ89OHMMiT5WdwLV-SU",[1438,1440],{"title":11,"path":346,"stem":347,"description":1439,"icon":39,"children":-1},"In-browser clip making. Trim a video, crop it to 9:16, burn in captions, add an end card and export an MP4, all on the device.",{"title":359,"path":360,"stem":361,"description":1441,"icon":337,"children":-1},"Cut a range out of a video and get back an MP4, with every option and what can go wrong.",1794851086610]