[{"data":1,"prerenderedAt":1169},["ShallowReactive",2],{"navigation_docs":3,"-video-player-features-clip-range":420,"-video-player-features-clip-range-surround":1164},[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":187,"body":422,"description":1157,"extension":1158,"links":1159,"meta":1160,"navigation":1161,"path":188,"seo":1162,"stem":189,"__hash__":1163},"docs\u002F02.video-player\u002F04.features\u002F09.clip-range.md",{"type":423,"value":424,"toc":1152},"minimark",[425,449,947,954,1025,1071,1091,1123,1128,1148],[426,427,428,429,432,433,437,438,441,442,448],"p",{},"A clip range is a stretch of the video the player highlights on its scrubber and holds playback to: at its end it pauses once, loops back to its start, or plays on. ",[430,431,182],"a",{"href":183}," set one from the URL; ",[434,435,436],"code",{},"setClipRange()"," on the ",[430,439,440],{"href":92},"handle"," sets one from your code. ",[430,443,444,447],{"href":396},[434,445,446],{},"@munsonlabs\u002Fsplice","'s editor"," loops its preview this way.",[450,451,452,852],"tabs",{},[453,454,456],"tabs-item",{"icon":455,"label":278},"i-vscode-icons:file-type-vue",[457,458,463],"pre",{"className":459,"code":460,"language":461,"meta":462,"style":462},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { VideoPlayer, type PlayerHandle } from '@munsonlabs\u002Fvideo-player'\n\nconst player = ref\u003CPlayerHandle>()\n\nfunction loopChorus() {\n  player.value?.setClipRange({ start: 42, end: 52 }, { end: 'loop' })\n  player.value?.seek(42)\n  void player.value?.play()\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CVideoPlayer ref=\"player\" src=\"\u002Fvideo\u002Finterview.mp4\" \u002F>\n  \u003Cbutton @click=\"loopChorus\">Loop the chorus\u003C\u002Fbutton>\n  \u003Cbutton @click=\"player?.setClipRange(null)\">Stop looping\u003C\u002Fbutton>\n\u003C\u002Ftemplate>\n","vue","",[434,464,465,500,528,558,564,590,595,610,676,697,717,723,733,738,748,783,814,843],{"__ignoreMap":462},[466,467,470,474,478,482,485,488,491,495,497],"span",{"class":468,"line":469},"line",1,[466,471,473],{"class":472},"sMK4o","\u003C",[466,475,477],{"class":476},"swJcz","script",[466,479,481],{"class":480},"spNyl"," setup",[466,483,484],{"class":480}," lang",[466,486,487],{"class":472},"=",[466,489,490],{"class":472},"\"",[466,492,494],{"class":493},"sfazB","ts",[466,496,490],{"class":472},[466,498,499],{"class":472},">\n",[466,501,503,507,510,514,517,520,523,525],{"class":468,"line":502},2,[466,504,506],{"class":505},"s7zQu","import",[466,508,509],{"class":472}," {",[466,511,513],{"class":512},"sTEyZ"," ref",[466,515,516],{"class":472}," }",[466,518,519],{"class":505}," from",[466,521,522],{"class":472}," '",[466,524,461],{"class":493},[466,526,527],{"class":472},"'\n",[466,529,531,533,535,538,541,544,547,549,551,553,556],{"class":468,"line":530},3,[466,532,506],{"class":505},[466,534,509],{"class":472},[466,536,537],{"class":512}," VideoPlayer",[466,539,540],{"class":472},",",[466,542,543],{"class":505}," type",[466,545,546],{"class":512}," PlayerHandle",[466,548,516],{"class":472},[466,550,519],{"class":505},[466,552,522],{"class":472},[466,554,555],{"class":493},"@munsonlabs\u002Fvideo-player",[466,557,527],{"class":472},[466,559,561],{"class":468,"line":560},4,[466,562,563],{"emptyLinePlaceholder":273},"\n",[466,565,567,570,573,575,578,580,584,587],{"class":468,"line":566},5,[466,568,569],{"class":480},"const",[466,571,572],{"class":512}," player ",[466,574,487],{"class":472},[466,576,513],{"class":577},"s2Zo4",[466,579,473],{"class":472},[466,581,583],{"class":582},"sBMFI","PlayerHandle",[466,585,586],{"class":472},">",[466,588,589],{"class":512},"()\n",[466,591,593],{"class":468,"line":592},6,[466,594,563],{"emptyLinePlaceholder":273},[466,596,598,601,604,607],{"class":468,"line":597},7,[466,599,600],{"class":480},"function",[466,602,603],{"class":577}," loopChorus",[466,605,606],{"class":472},"()",[466,608,609],{"class":472}," {\n",[466,611,613,616,619,622,625,628,631,634,637,640,644,646,649,651,654,657,659,661,663,665,668,671,673],{"class":468,"line":612},8,[466,614,615],{"class":512},"  player",[466,617,618],{"class":472},".",[466,620,621],{"class":512},"value",[466,623,624],{"class":472},"?.",[466,626,627],{"class":577},"setClipRange",[466,629,630],{"class":476},"(",[466,632,633],{"class":472},"{",[466,635,636],{"class":476}," start",[466,638,639],{"class":472},":",[466,641,643],{"class":642},"sbssI"," 42",[466,645,540],{"class":472},[466,647,648],{"class":476}," end",[466,650,639],{"class":472},[466,652,653],{"class":642}," 52",[466,655,656],{"class":472}," },",[466,658,509],{"class":472},[466,660,648],{"class":476},[466,662,639],{"class":472},[466,664,522],{"class":472},[466,666,667],{"class":493},"loop",[466,669,670],{"class":472},"'",[466,672,516],{"class":472},[466,674,675],{"class":476},")\n",[466,677,679,681,683,685,687,690,692,695],{"class":468,"line":678},9,[466,680,615],{"class":512},[466,682,618],{"class":472},[466,684,621],{"class":512},[466,686,624],{"class":472},[466,688,689],{"class":577},"seek",[466,691,630],{"class":476},[466,693,694],{"class":642},"42",[466,696,675],{"class":476},[466,698,700,703,706,708,710,712,715],{"class":468,"line":699},10,[466,701,702],{"class":472},"  void",[466,704,705],{"class":512}," player",[466,707,618],{"class":472},[466,709,621],{"class":512},[466,711,624],{"class":472},[466,713,714],{"class":577},"play",[466,716,589],{"class":476},[466,718,720],{"class":468,"line":719},11,[466,721,722],{"class":472},"}\n",[466,724,726,729,731],{"class":468,"line":725},12,[466,727,728],{"class":472},"\u003C\u002F",[466,730,477],{"class":476},[466,732,499],{"class":472},[466,734,736],{"class":468,"line":735},13,[466,737,563],{"emptyLinePlaceholder":273},[466,739,741,743,746],{"class":468,"line":740},14,[466,742,473],{"class":472},[466,744,745],{"class":476},"template",[466,747,499],{"class":472},[466,749,751,754,757,759,761,763,766,768,771,773,775,778,780],{"class":468,"line":750},15,[466,752,753],{"class":472},"  \u003C",[466,755,756],{"class":476},"VideoPlayer",[466,758,513],{"class":480},[466,760,487],{"class":472},[466,762,490],{"class":472},[466,764,765],{"class":493},"player",[466,767,490],{"class":472},[466,769,770],{"class":480}," src",[466,772,487],{"class":472},[466,774,490],{"class":472},[466,776,777],{"class":493},"\u002Fvideo\u002Finterview.mp4",[466,779,490],{"class":472},[466,781,782],{"class":472}," \u002F>\n",[466,784,786,788,791,794,796,798,801,803,805,808,810,812],{"class":468,"line":785},16,[466,787,753],{"class":472},[466,789,790],{"class":476},"button",[466,792,793],{"class":480}," @click",[466,795,487],{"class":472},[466,797,490],{"class":472},[466,799,800],{"class":493},"loopChorus",[466,802,490],{"class":472},[466,804,586],{"class":472},[466,806,807],{"class":512},"Loop the chorus",[466,809,728],{"class":472},[466,811,790],{"class":476},[466,813,499],{"class":472},[466,815,817,819,821,823,825,827,830,832,834,837,839,841],{"class":468,"line":816},17,[466,818,753],{"class":472},[466,820,790],{"class":476},[466,822,793],{"class":480},[466,824,487],{"class":472},[466,826,490],{"class":472},[466,828,829],{"class":493},"player?.setClipRange(null)",[466,831,490],{"class":472},[466,833,586],{"class":472},[466,835,836],{"class":512},"Stop looping",[466,838,728],{"class":472},[466,840,790],{"class":476},[466,842,499],{"class":472},[466,844,846,848,850],{"class":468,"line":845},18,[466,847,728],{"class":472},[466,849,745],{"class":476},[466,851,499],{"class":472},[453,853,855],{"icon":854,"label":403},"i-vscode-icons:file-type-html",[457,856,860],{"className":857,"code":858,"language":859,"meta":462,"style":462},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const player = document.querySelector('ml-video-player')\nplayer.setClipRange({ start: 42, end: 52 }, { end: 'loop' })\nplayer.seek(42)\n","js",[434,861,862,889,933],{"__ignoreMap":462},[466,863,864,866,868,870,873,875,878,880,882,885,887],{"class":468,"line":469},[466,865,569],{"class":480},[466,867,572],{"class":512},[466,869,487],{"class":472},[466,871,872],{"class":512}," document",[466,874,618],{"class":472},[466,876,877],{"class":577},"querySelector",[466,879,630],{"class":512},[466,881,670],{"class":472},[466,883,884],{"class":493},"ml-video-player",[466,886,670],{"class":472},[466,888,675],{"class":512},[466,890,891,893,895,897,899,901,903,905,907,909,911,913,915,917,919,921,923,925,927,929,931],{"class":468,"line":502},[466,892,765],{"class":512},[466,894,618],{"class":472},[466,896,627],{"class":577},[466,898,630],{"class":512},[466,900,633],{"class":472},[466,902,636],{"class":476},[466,904,639],{"class":472},[466,906,643],{"class":642},[466,908,540],{"class":472},[466,910,648],{"class":476},[466,912,639],{"class":472},[466,914,653],{"class":642},[466,916,656],{"class":472},[466,918,509],{"class":472},[466,920,648],{"class":476},[466,922,639],{"class":472},[466,924,522],{"class":472},[466,926,667],{"class":493},[466,928,670],{"class":472},[466,930,516],{"class":472},[466,932,675],{"class":512},[466,934,935,937,939,941,943,945],{"class":468,"line":530},[466,936,765],{"class":512},[466,938,618],{"class":472},[466,940,689],{"class":577},[466,942,630],{"class":512},[466,944,694],{"class":642},[466,946,675],{"class":512},[948,949,951],"h2",{"id":950},"setcliprangerange-options",[434,952,953],{},"setClipRange(range, options?)",[955,956,957,973],"table",{},[958,959,960],"thead",{},[961,962,963,967,970],"tr",{},[964,965,966],"th",{},"Argument",[964,968,969],{},"Type",[964,971,972],{},"Description",[974,975,976,1007],"tbody",{},[961,977,978,984,993],{},[979,980,981],"td",{},[434,982,983],{},"range",[979,985,986,989,990],{},[434,987,988],{},"{ start: number; end: number | null }"," or ",[434,991,992],{},"null",[979,994,995,996,999,1000,1003,1004,1006],{},"Seconds. ",[434,997,998],{},"end: null"," only highlights from ",[434,1001,1002],{},"start"," on; ",[434,1005,992],{}," clears the range",[961,1008,1009,1014,1019],{},[979,1010,1011],{},[434,1012,1013],{},"options.end",[979,1015,1016],{},[434,1017,1018],{},"'pause' | 'loop' | 'continue'",[979,1020,1021,1022],{},"What happens at the end. Defaults to ",[434,1023,1024],{},"'pause'",[955,1026,1027,1039],{},[958,1028,1029],{},[961,1030,1031,1036],{},[964,1032,1033],{},[434,1034,1035],{},"end",[964,1037,1038],{},"Behaviour",[974,1040,1041,1052,1061],{},[961,1042,1043,1049],{},[979,1044,1045,1048],{},[434,1046,1047],{},"pause"," (default)",[979,1050,1051],{},"Pauses once. Pressing play carries on past the end",[961,1053,1054,1058],{},[979,1055,1056],{},[434,1057,667],{},[979,1059,1060],{},"Jumps back to the start, until the viewer seeks more than a second outside it, which clears the range",[961,1062,1063,1068],{},[979,1064,1065],{},[434,1066,1067],{},"continue",[979,1069,1070],{},"Plays on; the range stays highlighted",[426,1072,1073,1074,1076,1077,1080,1081,1084,1085,1090],{},"Setting a range does not seek or play: the playhead stays where it is, and the end behaviour starts once it is inside the range. Seek to ",[434,1075,1002],{}," yourself when that is where you want playback to be. The range is on the handle as ",[434,1078,1079],{},"clipRange"," (",[434,1082,1083],{},"{ start, end } | null","), so a custom HUD can show it too, and the ",[430,1086,1087],{"href":109},[434,1088,1089],{},"Scrubber"," control highlights it. Calling it again replaces the range; a deep link that arrives later replaces it as well. The remembered playback position is not restored over a range.",[426,1092,1093,1097,1098,437,1101,1104,1105,1108,1109,1112,1113,1115,1116,1119,1120,1122],{},[1094,1095,1096],"strong",{},"The end is frame-accurate on native sources."," For an MP4, HLS or DASH source the player checks the playhead on every presented frame while it plays inside the range (",[434,1099,1100],{},"requestVideoFrameCallback",[434,1102,1103],{},"\u003Cvideo>",", or ",[434,1106,1107],{},"requestAnimationFrame"," where an engine has none), so a loop jumps back, or a pause stops, within about a frame of the end: measured on a 30fps clip, a loop's last frame lands 2-35ms past the end in WebKit and Chromium, where ",[434,1110,1111],{},"timeupdate"," alone overshot by 170-200ms. The frame callbacks run only while playing inside a range with an end, and stop on pause, at the end of the media, when the range is cleared and on unmount. ",[434,1114,1111],{}," still checks as well, which is all an embed (YouTube, Vimeo, Dailymotion) has, so there the end is noticed up to a quarter of a second late; it also covers a hidden tab, where browsers stop frame callbacks. A range that runs to the end of the video loops from the ",[434,1117,1118],{},"ended"," event. ",[430,1121,182],{"href":183}," are clip ranges, so they are frame-accurate too.",[1124,1125,1127],"h3",{"id":1126},"why-a-method-and-not-a-prop","Why a method and not a prop",[426,1129,1130,1131,1134,1135,1137,1138,1140,1141,1144,1145,618],{},"A range is something the player can let go of by itself (a loop releases it when the viewer seeks away), like the quality the viewer picks with ",[434,1132,1133],{},"setQuality()",", so it is state the player owns, set through the handle. A ",[434,1136,1079],{}," prop would also shadow the exposed ",[434,1139,1079],{}," state on the custom element, where props are DOM properties: the same reason the handle says ",[434,1142,1143],{},"currentVolume"," and ",[434,1146,1147],{},"currentPlaybackRate",[1149,1150,1151],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .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);}",{"title":462,"searchDepth":502,"depth":502,"links":1153},[1154],{"id":950,"depth":502,"text":953,"children":1155},[1156],{"id":1126,"depth":530,"text":1127},"Hold playback to a stretch of the video with setClipRange, highlighted on the scrubber, pausing, looping or playing on at its end.","md",null,{},{"icon":190},{"title":187,"description":1157},"QrGGFZH1378dDKMnJ2_22G6hxHpWSGkP1xXuD0ZP3r4",[1165,1167],{"title":182,"path":183,"stem":184,"description":1166,"icon":185,"children":-1},"Open a page at a moment in a video with",{"title":197,"path":198,"stem":199,"description":1168,"icon":200,"children":-1},"A YouTube Shorts-style vertical feed built from playInView and the headless controls.",1794851087676]