[{"data":1,"prerenderedAt":1460},["ShallowReactive",2],{"navigation_docs":3,"-splice-making-clips-another-player":420,"-splice-making-clips-another-player-surround":1455},[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":386,"body":422,"description":1448,"extension":1449,"links":1450,"meta":1451,"navigation":1452,"path":387,"seo":1453,"stem":388,"__hash__":1454},"docs\u002F05.splice\u002F02.making-clips\u002F07.another-player.md",{"type":423,"value":424,"toc":1442},"minimark",[425,443,729,734,759,768,794,811,815,818,892,895,915,1131,1137,1141,1156,1429,1438],[426,427,428,429,433,434,437,438,442],"p",{},"Splice's core doesn't need ",[430,431,432],"code",{},"@munsonlabs\u002Fvideo-player"," or Vue: ",[430,435,436],{},"@munsonlabs\u002Fsplice"," depends only on Mediabunny. Only ",[439,440,441],"a",{"href":396},"the editor"," is built on our player, because it uses the player as its preview. With any other player you call the core yourself and build the picker around it.",[444,445,450],"pre",{"className":446,"code":447,"language":448,"meta":449,"style":449},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { canSplice, createSplice } from '@munsonlabs\u002Fsplice'\n\nconst video = document.querySelector\u003CHTMLVideoElement>('#player video')!\n\nconst check = await canSplice(video, { crop: { aspect: '9:16' } })\nif (check.ok) {\n  const clip = await createSplice({\n    source: video,\n    start: video.currentTime,\n    end: video.currentTime + 10,\n    crop: { aspect: '9:16' },\n  })\n}\n","ts","",[430,451,452,490,496,546,551,601,618,638,652,669,692,715,723],{"__ignoreMap":449},[453,454,457,461,465,469,472,475,478,481,484,487],"span",{"class":455,"line":456},"line",1,[453,458,460],{"class":459},"s7zQu","import",[453,462,464],{"class":463},"sMK4o"," {",[453,466,468],{"class":467},"sTEyZ"," canSplice",[453,470,471],{"class":463},",",[453,473,474],{"class":467}," createSplice",[453,476,477],{"class":463}," }",[453,479,480],{"class":459}," from",[453,482,483],{"class":463}," '",[453,485,436],{"class":486},"sfazB",[453,488,489],{"class":463},"'\n",[453,491,493],{"class":455,"line":492},2,[453,494,495],{"emptyLinePlaceholder":273},"\n",[453,497,499,503,506,509,512,515,519,522,526,529,532,535,538,540,543],{"class":455,"line":498},3,[453,500,502],{"class":501},"spNyl","const",[453,504,505],{"class":467}," video ",[453,507,508],{"class":463},"=",[453,510,511],{"class":467}," document",[453,513,514],{"class":463},".",[453,516,518],{"class":517},"s2Zo4","querySelector",[453,520,521],{"class":463},"\u003C",[453,523,525],{"class":524},"sBMFI","HTMLVideoElement",[453,527,528],{"class":463},">",[453,530,531],{"class":467},"(",[453,533,534],{"class":463},"'",[453,536,537],{"class":486},"#player video",[453,539,534],{"class":463},[453,541,542],{"class":467},")",[453,544,545],{"class":463},"!\n",[453,547,549],{"class":455,"line":548},4,[453,550,495],{"emptyLinePlaceholder":273},[453,552,554,556,559,561,564,566,569,571,573,577,580,582,585,587,589,592,594,596,598],{"class":455,"line":553},5,[453,555,502],{"class":501},[453,557,558],{"class":467}," check ",[453,560,508],{"class":463},[453,562,563],{"class":459}," await",[453,565,468],{"class":517},[453,567,568],{"class":467},"(video",[453,570,471],{"class":463},[453,572,464],{"class":463},[453,574,576],{"class":575},"swJcz"," crop",[453,578,579],{"class":463},":",[453,581,464],{"class":463},[453,583,584],{"class":575}," aspect",[453,586,579],{"class":463},[453,588,483],{"class":463},[453,590,591],{"class":486},"9:16",[453,593,534],{"class":463},[453,595,477],{"class":463},[453,597,477],{"class":463},[453,599,600],{"class":467},")\n",[453,602,604,607,610,612,615],{"class":455,"line":603},6,[453,605,606],{"class":459},"if",[453,608,609],{"class":467}," (check",[453,611,514],{"class":463},[453,613,614],{"class":467},"ok) ",[453,616,617],{"class":463},"{\n",[453,619,621,624,627,630,632,634,636],{"class":455,"line":620},7,[453,622,623],{"class":501},"  const",[453,625,626],{"class":467}," clip",[453,628,629],{"class":463}," =",[453,631,563],{"class":459},[453,633,474],{"class":517},[453,635,531],{"class":575},[453,637,617],{"class":463},[453,639,641,644,646,649],{"class":455,"line":640},8,[453,642,643],{"class":575},"    source",[453,645,579],{"class":463},[453,647,648],{"class":467}," video",[453,650,651],{"class":463},",\n",[453,653,655,658,660,662,664,667],{"class":455,"line":654},9,[453,656,657],{"class":575},"    start",[453,659,579],{"class":463},[453,661,648],{"class":467},[453,663,514],{"class":463},[453,665,666],{"class":467},"currentTime",[453,668,651],{"class":463},[453,670,672,675,677,679,681,683,686,690],{"class":455,"line":671},10,[453,673,674],{"class":575},"    end",[453,676,579],{"class":463},[453,678,648],{"class":467},[453,680,514],{"class":463},[453,682,666],{"class":467},[453,684,685],{"class":463}," +",[453,687,689],{"class":688},"sbssI"," 10",[453,691,651],{"class":463},[453,693,695,698,700,702,704,706,708,710,712],{"class":455,"line":694},11,[453,696,697],{"class":575},"    crop",[453,699,579],{"class":463},[453,701,464],{"class":463},[453,703,584],{"class":575},[453,705,579],{"class":463},[453,707,483],{"class":463},[453,709,591],{"class":486},[453,711,534],{"class":463},[453,713,714],{"class":463}," },\n",[453,716,718,721],{"class":455,"line":717},12,[453,719,720],{"class":463},"  }",[453,722,600],{"class":575},[453,724,726],{"class":455,"line":725},13,[453,727,728],{"class":463},"}\n",[730,731,733],"h2",{"id":732},"what-to-pass-as-the-source","What to pass as the source",[426,735,736,737,740,741,744,745,747,748,750,751,754,755,758],{},"A ",[430,738,739],{},"\u003Cvideo>"," is read through its ",[430,742,743],{},"currentSrc",", so it works when the player plays a file: a plain ",[430,746,739],{},", or Video.js and Plyr playing an MP4. Find the player's ",[430,749,739],{}," (",[430,752,753],{},"player.el().querySelector('video')"," in Video.js, ",[430,756,757],{},"player.media"," in Plyr) or pass the file's URL.",[426,760,761,762,764,765,767],{},"A player that plays HLS or DASH through hls.js, dash.js, Shaka or Video.js's own streaming feeds its ",[430,763,739],{}," from a MediaSource. There's no file behind it, so ",[430,766,359],{}," refuses it with a clear error. Pass the stream's URL instead; splice reads the playlist itself and downloads only the smallest variant the clip needs.",[444,769,771],{"className":446,"code":770,"language":448,"meta":449,"style":449},"const source = hls.url \u002F\u002F the playlist hls.js was given, not the \u003Cvideo>\n",[430,772,773],{"__ignoreMap":449},[453,774,775,777,780,782,785,787,790],{"class":455,"line":456},[453,776,502],{"class":501},[453,778,779],{"class":467}," source ",[453,781,508],{"class":463},[453,783,784],{"class":467}," hls",[453,786,514],{"class":463},[453,788,789],{"class":467},"url ",[453,791,793],{"class":792},"sHwdD","\u002F\u002F the playlist hls.js was given, not the \u003Cvideo>\n",[426,795,736,796,798,799,802,803,806,807,514],{},[430,797,739],{}," playing DRM-protected media or a live ",[430,800,801],{},"MediaStream"," (a camera, a screen or a call) can't be clipped at all. ",[430,804,805],{},"canSplice"," says so before you offer the button. ",[439,808,810],{"href":809},"\u002Fsplice\u002Fmaking-clips\u002Fcreate-splice#when-it-rejects","See the errors",[730,812,814],{"id":813},"your-own-picker","Your own picker",[426,816,817],{},"The editor's range, crop window and filmstrip are yours to build. The core gives you the pieces:",[819,820,821,840,863,876],"ul",{},[822,823,824,828,829,832,833,836,837,514],"li",{},[825,826,827],"strong",{},"The range"," is ",[430,830,831],{},"start"," and ",[430,834,835],{},"end"," in seconds on the source's timeline. Take them from your own handles, or around ",[430,838,839],{},"video.currentTime",[822,841,842,828,845,848,849,852,853,855,856,859,860,514],{},[825,843,844],{},"The crop",[430,846,847],{},"crop: { aspect, focus }",", with ",[430,850,851],{},"focus"," from 0 to 1 across and down the frame. ",[430,854,805],{}," resolves the source's size in ",[430,857,858],{},"check.info",", so you can draw the window over the picture. ",[439,861,862],{"href":364},"See crop",[822,864,865,868,869,872,873,514],{},[825,866,867],{},"A filmstrip"," comes from ",[430,870,871],{},"createThumbnails",", each keyframe painted as it's decoded. ",[439,874,875],{"href":382},"See thumbnails",[822,877,878,881,882,832,885,888,889,514],{},[825,879,880],{},"Progress and cancel"," are ",[430,883,884],{},"onProgress",[430,886,887],{},"signal",". ",[439,890,891],{"href":360},"See createSplice",[730,893,139],{"id":894},"captions",[426,896,897,898,900,901,903,904,907,908,911,912,914],{},"The editor burns in the captions the viewer has on. Without it, pass ",[430,899,894],{}," yourself: a WebVTT URL, WebVTT text or cues. To burn in what the player is showing, read the cues from the ",[430,902,739],{},"'s text track. They're there for a track that's ",[430,905,906],{},"showing"," or ",[430,909,910],{},"hidden",", and Video.js, Plyr and hls.js all put their captions on the ",[430,913,739],{}," as text tracks.",[444,916,918],{"className":446,"code":917,"language":448,"meta":449,"style":449},"const track = [...video.textTracks].find((track) => track.mode === 'showing')\nconst captions = [...(track?.cues ?? [])].map((cue) => ({\n  start: cue.startTime,\n  end: cue.endTime,\n  text: (cue as VTTCue).text,\n}))\n\nawait createSplice({ source, start, end, captions })\n",[430,919,920,980,1028,1045,1061,1086,1094,1098],{"__ignoreMap":449},[453,921,922,924,927,929,932,935,938,940,943,945,948,950,952,956,958,961,964,966,969,972,974,976,978],{"class":455,"line":456},[453,923,502],{"class":501},[453,925,926],{"class":467}," track ",[453,928,508],{"class":463},[453,930,931],{"class":467}," [",[453,933,934],{"class":463},"...",[453,936,937],{"class":467},"video",[453,939,514],{"class":463},[453,941,942],{"class":467},"textTracks]",[453,944,514],{"class":463},[453,946,947],{"class":517},"find",[453,949,531],{"class":467},[453,951,531],{"class":463},[453,953,955],{"class":954},"sHdIc","track",[453,957,542],{"class":463},[453,959,960],{"class":501}," =>",[453,962,963],{"class":467}," track",[453,965,514],{"class":463},[453,967,968],{"class":467},"mode ",[453,970,971],{"class":463},"===",[453,973,483],{"class":463},[453,975,906],{"class":486},[453,977,534],{"class":463},[453,979,600],{"class":467},[453,981,982,984,987,989,991,993,996,999,1002,1005,1008,1010,1013,1015,1017,1020,1022,1024,1026],{"class":455,"line":492},[453,983,502],{"class":501},[453,985,986],{"class":467}," captions ",[453,988,508],{"class":463},[453,990,931],{"class":467},[453,992,934],{"class":463},[453,994,995],{"class":467},"(track",[453,997,998],{"class":463},"?.",[453,1000,1001],{"class":467},"cues ",[453,1003,1004],{"class":463},"??",[453,1006,1007],{"class":467}," [])]",[453,1009,514],{"class":463},[453,1011,1012],{"class":517},"map",[453,1014,531],{"class":467},[453,1016,531],{"class":463},[453,1018,1019],{"class":954},"cue",[453,1021,542],{"class":463},[453,1023,960],{"class":501},[453,1025,750],{"class":467},[453,1027,617],{"class":463},[453,1029,1030,1033,1035,1038,1040,1043],{"class":455,"line":498},[453,1031,1032],{"class":575},"  start",[453,1034,579],{"class":463},[453,1036,1037],{"class":467}," cue",[453,1039,514],{"class":463},[453,1041,1042],{"class":467},"startTime",[453,1044,651],{"class":463},[453,1046,1047,1050,1052,1054,1056,1059],{"class":455,"line":548},[453,1048,1049],{"class":575},"  end",[453,1051,579],{"class":463},[453,1053,1037],{"class":467},[453,1055,514],{"class":463},[453,1057,1058],{"class":467},"endTime",[453,1060,651],{"class":463},[453,1062,1063,1066,1068,1071,1074,1077,1079,1081,1084],{"class":455,"line":553},[453,1064,1065],{"class":575},"  text",[453,1067,579],{"class":463},[453,1069,1070],{"class":467}," (cue ",[453,1072,1073],{"class":459},"as",[453,1075,1076],{"class":524}," VTTCue",[453,1078,542],{"class":467},[453,1080,514],{"class":463},[453,1082,1083],{"class":467},"text",[453,1085,651],{"class":463},[453,1087,1088,1091],{"class":455,"line":603},[453,1089,1090],{"class":463},"}",[453,1092,1093],{"class":467},"))\n",[453,1095,1096],{"class":455,"line":620},[453,1097,495],{"emptyLinePlaceholder":273},[453,1099,1100,1103,1105,1107,1110,1113,1115,1118,1120,1123,1125,1127,1129],{"class":455,"line":640},[453,1101,1102],{"class":459},"await",[453,1104,474],{"class":517},[453,1106,531],{"class":467},[453,1108,1109],{"class":463},"{",[453,1111,1112],{"class":467}," source",[453,1114,471],{"class":463},[453,1116,1117],{"class":467}," start",[453,1119,471],{"class":463},[453,1121,1122],{"class":467}," end",[453,1124,471],{"class":463},[453,1126,986],{"class":467},[453,1128,1090],{"class":463},[453,1130,600],{"class":467},[426,1132,1133,1134,514],{},"An HLS stream's subtitles load segment by segment, so only the cues around what's been played are there. ",[439,1135,1136],{"href":368},"See captions",[730,1138,1140],{"id":1139},"the-link-back","The link back",[426,1142,1143,1144,1147,1148,1151,1152,1155],{},"With an ",[430,1145,1146],{},"origin",", the clip's metadata carries a link back to the moment: the page's URL with ",[430,1149,1150],{},"#ml-t=42,52"," in its hash. Our player's ",[430,1153,1154],{},"deep-link"," answers it. With another player, read the hash yourself and seek:",[444,1157,1159],{"className":446,"code":1158,"language":448,"meta":449,"style":449},"const link = new URLSearchParams(location.hash.slice(1)).get('ml-t') \u002F\u002F '42,52'\nconst [start, end] = link ? link.split(',').map(Number) : []\n\nconst stopAtEnd = () => {\n  if (video.currentTime \u003C end) return\n  video.pause()\n  video.removeEventListener('timeupdate', stopAtEnd)\n}\n\nif (start !== undefined) {\n  video.currentTime = start\n  if (end !== undefined) video.addEventListener('timeupdate', stopAtEnd)\n}\n",[430,1160,1161,1217,1269,1273,1290,1313,1326,1351,1355,1359,1376,1389,1425],{"__ignoreMap":449},[453,1162,1163,1165,1168,1170,1173,1176,1179,1181,1184,1186,1189,1191,1194,1197,1199,1202,1204,1206,1209,1211,1214],{"class":455,"line":456},[453,1164,502],{"class":501},[453,1166,1167],{"class":467}," link ",[453,1169,508],{"class":463},[453,1171,1172],{"class":463}," new",[453,1174,1175],{"class":517}," URLSearchParams",[453,1177,1178],{"class":467},"(location",[453,1180,514],{"class":463},[453,1182,1183],{"class":467},"hash",[453,1185,514],{"class":463},[453,1187,1188],{"class":517},"slice",[453,1190,531],{"class":467},[453,1192,1193],{"class":688},"1",[453,1195,1196],{"class":467},"))",[453,1198,514],{"class":463},[453,1200,1201],{"class":517},"get",[453,1203,531],{"class":467},[453,1205,534],{"class":463},[453,1207,1208],{"class":486},"ml-t",[453,1210,534],{"class":463},[453,1212,1213],{"class":467},") ",[453,1215,1216],{"class":792},"\u002F\u002F '42,52'\n",[453,1218,1219,1221,1223,1225,1227,1229,1232,1234,1236,1239,1242,1244,1247,1249,1251,1253,1255,1257,1259,1261,1264,1266],{"class":455,"line":492},[453,1220,502],{"class":501},[453,1222,931],{"class":463},[453,1224,831],{"class":467},[453,1226,471],{"class":463},[453,1228,1122],{"class":467},[453,1230,1231],{"class":463},"]",[453,1233,629],{"class":463},[453,1235,1167],{"class":467},[453,1237,1238],{"class":463},"?",[453,1240,1241],{"class":467}," link",[453,1243,514],{"class":463},[453,1245,1246],{"class":517},"split",[453,1248,531],{"class":467},[453,1250,534],{"class":463},[453,1252,471],{"class":486},[453,1254,534],{"class":463},[453,1256,542],{"class":467},[453,1258,514],{"class":463},[453,1260,1012],{"class":517},[453,1262,1263],{"class":467},"(Number) ",[453,1265,579],{"class":463},[453,1267,1268],{"class":467}," []\n",[453,1270,1271],{"class":455,"line":498},[453,1272,495],{"emptyLinePlaceholder":273},[453,1274,1275,1277,1280,1282,1285,1287],{"class":455,"line":548},[453,1276,502],{"class":501},[453,1278,1279],{"class":467}," stopAtEnd ",[453,1281,508],{"class":463},[453,1283,1284],{"class":463}," ()",[453,1286,960],{"class":501},[453,1288,1289],{"class":463}," {\n",[453,1291,1292,1295,1297,1299,1301,1303,1306,1308,1310],{"class":455,"line":553},[453,1293,1294],{"class":459},"  if",[453,1296,750],{"class":575},[453,1298,937],{"class":467},[453,1300,514],{"class":463},[453,1302,666],{"class":467},[453,1304,1305],{"class":463}," \u003C",[453,1307,1122],{"class":467},[453,1309,1213],{"class":575},[453,1311,1312],{"class":459},"return\n",[453,1314,1315,1318,1320,1323],{"class":455,"line":603},[453,1316,1317],{"class":467},"  video",[453,1319,514],{"class":463},[453,1321,1322],{"class":517},"pause",[453,1324,1325],{"class":575},"()\n",[453,1327,1328,1330,1332,1335,1337,1339,1342,1344,1346,1349],{"class":455,"line":620},[453,1329,1317],{"class":467},[453,1331,514],{"class":463},[453,1333,1334],{"class":517},"removeEventListener",[453,1336,531],{"class":575},[453,1338,534],{"class":463},[453,1340,1341],{"class":486},"timeupdate",[453,1343,534],{"class":463},[453,1345,471],{"class":463},[453,1347,1348],{"class":467}," stopAtEnd",[453,1350,600],{"class":575},[453,1352,1353],{"class":455,"line":640},[453,1354,728],{"class":463},[453,1356,1357],{"class":455,"line":654},[453,1358,495],{"emptyLinePlaceholder":273},[453,1360,1361,1363,1366,1369,1372,1374],{"class":455,"line":671},[453,1362,606],{"class":459},[453,1364,1365],{"class":467}," (start ",[453,1367,1368],{"class":463},"!==",[453,1370,1371],{"class":463}," undefined",[453,1373,1213],{"class":467},[453,1375,617],{"class":463},[453,1377,1378,1380,1382,1384,1386],{"class":455,"line":694},[453,1379,1317],{"class":467},[453,1381,514],{"class":463},[453,1383,666],{"class":467},[453,1385,629],{"class":463},[453,1387,1388],{"class":467}," start\n",[453,1390,1391,1393,1395,1397,1400,1402,1404,1406,1408,1411,1413,1415,1417,1419,1421,1423],{"class":455,"line":717},[453,1392,1294],{"class":459},[453,1394,750],{"class":575},[453,1396,835],{"class":467},[453,1398,1399],{"class":463}," !==",[453,1401,1371],{"class":463},[453,1403,1213],{"class":575},[453,1405,937],{"class":467},[453,1407,514],{"class":463},[453,1409,1410],{"class":517},"addEventListener",[453,1412,531],{"class":575},[453,1414,534],{"class":463},[453,1416,1341],{"class":486},[453,1418,534],{"class":463},[453,1420,471],{"class":463},[453,1422,1348],{"class":467},[453,1424,600],{"class":575},[453,1426,1427],{"class":455,"line":725},[453,1428,728],{"class":463},[426,1430,1431,1434,1435,514],{},[430,1432,1433],{},"createClipLink(origin, start, end)"," builds the same link, for a \"copy link\" button of your own. ",[439,1436,1437],{"href":373},"See origin and links",[1439,1440,1441],"style",{},"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .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 .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":449,"searchDepth":492,"depth":492,"links":1443},[1444,1445,1446,1447],{"id":732,"depth":492,"text":733},{"id":813,"depth":492,"text":814},{"id":894,"depth":492,"text":139},{"id":1139,"depth":492,"text":1140},"Use splice's core with Video.js, Plyr, hls.js or a plain \u003Cvideo>, without @munsonlabs\u002Fvideo-player.","md",null,{},{"icon":166},{"title":386,"description":1448},"YCp3t7Y5jvV4rwsw5HAoN1tHDcln_aFzlo_WbvKeeFU",[1456,1458],{"title":381,"path":382,"stem":383,"description":1457,"icon":384,"children":-1},"Make a filmstrip of keyframe thumbnails, painted as each one lands.",{"title":390,"path":396,"stem":397,"description":1459,"icon":391,"children":-1},"SpliceEditor, a \"clip this\" editor inline on the page's video-player.",1794851087103]