PageSourceSearch

https://dakekuajing.com/_next/static/chunks/7214.028528cc8895c4c4.js

js dakekuajing.com collected 2026-10-05 22:12:49 UTC 2,353 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7214],{17214:(e,a,t)=>{t.r(a),t.d(a,{default:()=>n});var r=t(95155),o=t(12115);function n(e){let{onUploaded:a,onUploading:n,label:s="上传视频",size:c="sm",variant:l="btn-outline",className:i=""}=e,[d,u]=(0,o.useState)(!1),[p,m]=(0,o.useState)(0),[v,f]=(0,o.useState)(!1),h=(0,o.useRef)(null),w=async e=>{var r,o;let s=null==(r=e.target.files)?void 0:r[0];if(s){if(s.size>524288e3)return void alert("视频文件不能超过 500MB");u(!0),m(0),f(!1),null==n||n(!0);try{let e=await fetch("/api/vod/upload-auth?title=".concat(encodeURIComponent(s.name),"&fileName=").concat(encodeURIComponent(s.name)),{method:"POST"}),r=await e.json();if(200!==r.code)throw Error(r.message||"获取上传凭证失败");let{uploadAddress:n,uploadAuth:c,videoId:l}=r.data,i=JSON.parse(atob(n)),d=JSON.parse(atob(c)),u=new(await t.e(1303).then(t.t.bind(t,32495,23))).default({region:(null==(o=i.Endpoint)?void 0:o.replace(/^https?:\/\//,"").replace(/\.aliyuncs\.com$/,""))||"oss-cn-shanghai",accessKeyId:d.AccessKeyId,accessKeySecret:d.AccessKeySecret,stsToken:d.SecurityToken,bucket:i.Bucket,secure:!0,refreshSTSTokenInterval:3e5}),p=i.FileName;await u.multipartUpload(p,s,{progress:e=>{m(Math.round(100*e))},partSize:1048576});let v=await fetch("/api/vod/play-info?videoId=".concat(l)),h=await v.json();if(200!==h.code)throw Error(h.message||"获取播放信息失败");let w=h.data,y=w.playUrlHls||w.playUrlMp4,b=w.duration||0;if(!y)throw Error("未获取到播放地址,视频可能还在转码中");f(!0),a({videoUrl:y,duration:b})}catch(e){console.error("[VOD Upload Error]",e),alert("视频上传失败: "+(e instanceof Error?e.message:String(e)))}finally{u(!1),m(0),null==n||n(!1)}h.current&&(h.current.value="")}};return(0,r.jsxs)("div",{className:"flex items-center gap-2 ".concat(i),children:[(0,r.jsx)("input",{ref:h,type:"file",accept:"video/mp4,video/mov,video/avi,video/mkv,video/webm,.mp4,.mov,.avi,.mkv,.webm",onChange:w,className:"hidden"}),(0,r.jsx)("button",{type:"button",className:"btn ".concat(l," btn-").concat(c," ").concat(d?"loading":""),disabled:d,onClick:()=>{var e;return null==(e=h.current)?void 0:e.click()},children:d?"上传中 ".concat(p,"%"):v?"已上传 ✓":s}),d&&p>0&&(0,r.jsx)("progress",{className:"progress progress-primary w-24",value:p,max:100})]})}}}]);

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.