Closed hfmanson closed 11 months ago
It looks like this is your first issue. Welcome! 👋 One of the project maintainers will be with you as soon as possible. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.
Hi @hfmanson - thanks a lot for reporting this one.
I had a look into this, and I can't reproduce this on Firefox or Chrome. You can also check using curl to see the returned content-type:
# Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
cd path/to/webaudio-examples/audioworklet
python3 -m http.server
# ...
curl -v localhost:8000/script.js
* Trying 127.0.0.1:8000...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /script.js HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/8.1.2
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: SimpleHTTP/0.6 Python/3.11.5
< Date: Tue, 12 Dec 2023 15:41:52 GMT
< Content-type: application/javascript
< Content-Length: 2611
< Last-Modified: Thu, 29 Jun 2023 15:18:38 GMT
It could be that this has been fixed in the meantime, but I've tested using Python 3.11.5.
I'm going to close for the moment, but if you have some other info, let me know here! Thanks a lot!
Indeed, it's a python problem: SimpleHTTP/0.6 Python/3.10.12 on Linux returns text/javascript SimpleHTTP/0.6 Python/3.10.9 on Windows returns text/plain as MIME type on a .js files
I agree on closing the issue, maybe mention python version should be at least 3.10.12
Thanks for getting back, I'm glad we got to the bottom of it.
mention python version should be at least 3.10.12
That's a good idea, we can add a note in the docs. 👍🏻
in README.md it's suggested to run the samples with
However this server returns the
text/html
MIME type for.js
and.css
files. Therefore, on Chrome the audioworklet sample does not work.I now use this Python script, providing the correct MIME type for javascript and css files.