PageSourceSearch

https://conversiontab.com/build/assets/flip-video-online-page-CHOVU2q7.js

js conversiontab.com collected 2026-09-24 10:07:31 UTC 4,885 bytes, 1 lines download raw bytes

1import{f as _}from"./ctMediaConvertDownload-n0-64pPl.js";import{w as z,c as A}from"./ctPendingDownload-B21SXRKd.js";import{i as W}from"./mediaInputFromFilename-AaKRjYpC.js";import{g as X}from"./ffmpegVideoCompress-C_zYTcnz.js";import{c as $}from"./fileDropzone-CA_uaFcV.js";import{s as Y}from"./ctToast-C2BAo121.js";import{w as U}from"./wireMediaToolPageOnce-DYtotjbx.js";import{c as j,w as q,V as G}from"./videoToolRuntime-BhBVPdre.js";import"./ctMediaProgressUi-wz6CtyvX.js";import"./ctFullscreenAd-CL-AA_Ul.js";import"./app-gOHIPY12.js";import"./videoEncodeHints-B5HbAqTP.js";import"./transientNotice-Ds_di7lD.js";import"./mediaMetadataDisplay-rUX1VKD5.js";import"./ffmpegProbeDuration-CZSGPlSL.js";import"./videoToolFilePick-DrReu7dZ.js";import"./ffmpegWasmProbe-Dr2SB0y0.js";import"./videoToolFfmpegSession-vgvYnhrp.js";import"./ctMediaSourceOutputName-BkKiostT.js";function g(F){const o=document.getElementById("ctFlipVidToastBody"),l=document.getElementById("ctFlipVidToast");!o||!l||Y(l,{bodyEl:o,message:F,delay:12e3})}function fe(){const F=document.getElementById("ct-flip-video-online-root");if(!U(F,"ctFlipVidWired"))return;const o=(F.dataset.ctFormat||"mp4").toLowerCase(),l=document.getElementById("ctFlipVidFile"),C=document.getElementById("ctFlipVidDrop"),P=document.getElementById("ctFlipVidDropCaption"),e=document.getElementById("ctFlipVidPreview"),y=document.getElementById("ctFlipVidName"),E=document.getElementById("ctFlipVidBtn"),v=document.getElementById("ctFlipVidDownload"),m=A();z(v,m);const w=document.getElementById("ctFlipVidClr"),O=document.getElementById("ctFlipVidWasmStatus"),T=document.getElementById("ctFlipVidMeta"),p=document.getElementById("ctFlipH"),u=document.getElementById("ctFlipV"),B=document.getElementById("ctFlipVidPlayBtn"),I=document.getElementById("ctFlipVidPreviewChrome"),a=document.getElementById("ctFlipVidTimeLabel");if(!l||!e||!y||!E||!w||!B||!I)return;const i=j({statusEl:O,progressIds:{barId:"ctFlipVidProgBar",labelId:"ctFlipVidProgLabel",percentId:"ctFlipVidProgPct"},routeFormat:o,probeReadyLabel:"Ready"});let n=null;function k(t){if(!Number.isFinite(t)||t<0)return"0:00";const d=Math.floor(t/60),h=Math.floor(t%60);return`${d}:${h.toString().padStart(2,"0")}`}function s(){B.textContent=e.paused?"Play preview":"Pause"}function D(){if(!a)return;const t=e.currentTime,d=e.duration;Number.isFinite(d)&&d>0?a.textContent=`${k(t)} / ${k(d)}`:a.textContent=""}function L(t){I.classList.toggle("d-none",!t),I.classList.toggle("d-flex",t)}function r(){p==null||p.classList.toggle("active",n==="h"),u==null||u.classList.toggle("active",n==="v"),e.src&&!e.classList.contains("d-none")?e.style.transform=n==="h"?"scaleX(-1)":n==="v"?"scaleY(-1)":"":e.style.transform="",E.disabled=!i.currentFile||!n||i.encodeInFlight}B.addEventListener("click",async()=>{if(!(e.classList.contains("d-none")||!e.src)){if(e.paused)try{await e.play()}catch{g("Could not start preview playback.")}else e.pause();s()}}),e.addEventListener("play",()=>{s()}),e.addEventListener("pause",()=>{s()}),e.addEventListener("ended",()=>{s()}),e.addEventListener("timeupdate",()=>{D()}),e.addEventListener("keydown",t=>{(t.key===" "||t.key==="Enter")&&(t.preventDefault(),B.click())}),p==null||p.addEventListener("click",()=>{n=n==="h"?null:"h",r()}),u==null||u.addEventListener("click",()=>{n=n==="v"?null:"v",r()}),q({fileEl:l,dropEl:C,dropCaptionEl:P,runtime:i,clearBtn:w,nameInput:y,preview:e,metaEl:T,onEmpty:()=>{n=null,e.pause(),L(!1),s(),a&&(a.textContent=""),r()},onTooLarge:()=>{g("File size exceeds the 500MB limit."),$(l,{drop:C,captionEl:P})},onProbeFailed:()=>{g("Failed to read video metadata."),n=null,L(!1),r()},onReady:()=>{L(!0),s(),D(),r()}}),w.addEventListener("click",()=>{m.clear(),m.syncDownloadButton(v),$(l),w.disabled=!0,n=null,e.pause(),e.removeAttribute("src"),e.classList.add("d-none"),L(!1),s(),a&&(a.textContent=""),y&&(y.value="flipped_video"),i.clearPickState({preview:e,metaEl:T}),r()}),E.addEventListener("click",async()=>{var x,M;const t=i.currentFile;if(!t||!n){g("Choose a video and a flip direction.");return}if(t.size>G){g("File size exceeds the 500MB limit.");return}const d=n==="h"?"hflip":"vflip",h=X(o,i.metadata),V=i.inputNameFor(t),b=`output.${o}`;m.clear(),m.syncDownloadButton(v),E.disabled=!0;try{const c=await i.runEncode({inName:V,args:["-y","-loglevel","warning","-stats","-i",V,"-vf",d,...h,b],encodingLabel:"Flipping…"}),f=await c.readFile(b),N=f.buffer?f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength):f,R=new Blob([N],{type:`video/${o}`}),S=(y.value||"flipped_video").replace(/[^\w\-]+/g,"_");await _(m,v,{blob:R,filename:`${S}.${o}`,progressUi:(x=i.setProg)==null?void 0:x.ui});try{await c.deleteFile(V),await c.deleteFile(b)}catch{}}catch(c){W(c)||(g(c instanceof Error?c.message:"Flip failed."),(M=i.setProg)==null||M.ui.hardReset("Ready"))}finally{r()}})}
1export{fe as initFlipVideoOnlinePage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.