BenzLeung / benz-amr-recorder

Play, record, reformat AMR audio
https://benzleung.github.io/benz-amr-recorder/demo.html
MIT License
334 stars 99 forks source link

initWithUrl一个amr链接报错_typeof is not defined #35

Open chenmengyingfe opened 4 years ago

chenmengyingfe commented 4 years ago

Uncaught ReferenceError: _typeof is not defined at Object.open (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2) at Object.createStandardStreams (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2) at Object.init (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2) at 8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2 at callRuntimeCallbacks (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2) at ensureInitRuntime (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:2) at doRun (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:6) at run (8e8bdf9e-d4c0-4737-bebc-063804e23f6b:6) at 8e8bdf9e-d4c0-4737-bebc-063804e23f6b:6 at 8e8bdf9e-d4c0-4737-bebc-063804e23f6b:6

BenzLeung commented 4 years ago

用的什么浏览器?你是如何调用 initWithUrl 的?可以贴一些代码上来

lidazhaung-1998 commented 4 years ago

chrome 浏览器 $('.play').click(function () { var amr = new BenzAMRRecorder() amr.initWithUrl('/api/ldz/chudianh5/11.amr').then(function () { amr.play(); }) })

BenzLeung commented 4 years ago

稍微谷歌了一下,直觉上像是因为 webpack 4 或者 babel 7…… 确认一下,你们的项目是用的 webpack 4 或者 babel 7 还是其他? @chenmengyingfe @lidazhaung-1998 也可以直接把 package.json 的代码贴上来。

lidazhaung-1998 commented 4 years ago

对,webpack 4,babel 7。 随后在html中直接使用script标签引入文件没有出现该问题。

gjbbd commented 2 years ago

Uncaught ReferenceError: _typeof is not defined

alexx617 commented 2 years ago

复现了,请问有解决方案吗? { "version": "0.0.1", "dependencies": { "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@rollup/plugin-image": "^2.1.1", "core-js": "^3.6.5", "dayjs": "^1.11.0", "vue": "^3.2.2" }, "devDependencies": { "@rollup/plugin-alias": "^3.1.9", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-json": "^4.1.0", "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.2.2", "@vue/eslint-config-prettier": "^6.0.0", "autoprefixer": "^10.4.2", "babel-eslint": "^10.1.0", "cross-env": "^7.0.3", "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.0.0", "postcss": "^8.4.6", "postcss-pxtorem": "^6.0.0", "prettier": "^2.6.1", "rollup-plugin-livereload": "^2.0.5", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-vue": "^6.0.0", "sass": "^1.26.5", "sass-loader": "^8.0.2" }, "keywords": [], "author": "", "license": "ISC", }

BenzLeung commented 2 years ago

Sorry...我暂时没空维护了,谁解决了欢迎提交 pull request

HuangFeiPeng commented 2 years ago

我也遇到了一模一样的问题,我的错误比较低级,起因是在粘贴vue项目的时候,少写了一个.browserslistrc文件,然后添加了一下解决了。

LWD8 commented 1 year ago

我也遇到了一模一样的问题,我的错误比较低级,起因是在粘贴vue项目的时候,少写了一个.browserslistrc文件,然后添加了一下解决了。

确实可以了,少了.browserslistrc文件

dominate666 commented 9 months ago

我也遇到了一模一样的问题,我的错误比较低级,起因是在粘贴vue项目的时候,少写了一个.browserslistrc文件,然后添加了一下解决了。

确实可以了,少了.browserslistrc文件

请问可以贴一下这个文件内容吗