简体   繁体   中英

Javascript working in Firefox, but not in Chrome

I am testing the following javascript project: https://github.com/cwilso/AudioRecorder . When I try to run the same project demo from this link: https://webaudiodemos.appspot.com/AudioRecorder/index.html it works on both browsers. But, when I download the project from github and run it localy from my computer, it doesn't work on Chrome. It just freezes(no waveform and the record button doesn't work).

Google chrome has some javascript limitations when the webpage is not run from a webserver or localhost server.

I'm not sure that's the issue but I'm putting my bet on it.

You can try adding "-allow-file-access-from-files" to your chrome shortcut and see if that fixes the problem. If it does that means that audiorecorder only works properly on a localhost or webserver.


Above file access issue in chrome is what I ran into a long time ago with less.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM