|
@@ -100,7 +100,7 @@ function analyzeMediaInfo () {
|
|
|
function analyzeByWorker (obj) {
|
|
function analyzeByWorker (obj) {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log(`开始解析文件${obj.name}`)
|
|
console.log(`开始解析文件${obj.name}`)
|
|
|
- const worker = new Worker('/mediainfo.js')
|
|
|
|
|
|
|
+ const worker = new Worker('/admin/mediainfo.js')
|
|
|
worker.onmessage = e => {
|
|
worker.onmessage = e => {
|
|
|
let isNeedConfirm = false
|
|
let isNeedConfirm = false
|
|
|
|
|
|
|
@@ -398,7 +398,7 @@ function calculateHashByWorker (obj, options = {}) {
|
|
|
const { progress = noop } = options
|
|
const { progress = noop } = options
|
|
|
const { token } = obj.source
|
|
const { token } = obj.source
|
|
|
const chunks = createChunks(obj.file)
|
|
const chunks = createChunks(obj.file)
|
|
|
- const worker = new Worker('/hash.js')
|
|
|
|
|
|
|
+ const worker = new Worker('/admin/hash.js')
|
|
|
token(worker)
|
|
token(worker)
|
|
|
worker.onmessage = e => {
|
|
worker.onmessage = e => {
|
|
|
const { hash, index, total } = e.data
|
|
const { hash, index, total } = e.data
|