I'm trying to use the Audio API, and I can't play audio.
Here is a reproduction of the issue. If you open the js console, after triggering play/pause on the video, you'll see a message saying VM374:1MediaElementAudioSource outputs zeroes due to CORS access restrictions for https://s3.amazonaws.com/mettavr/dev/VfE_html5.mp4
and no audio is played. (it's not an error, but just an info log)
I've found a few SO questions like this one or this one. It sounds that the flag crossorigin
should be set to anonymous
and that the server permissions should allow cross origin.
I'm serving the file from a S3 bucket that seems to have opened enough permissions:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://*</AllowedOrigin>
<AllowedOrigin>https://*</AllowedOrigin>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>HEAD</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<ExposeHeader>Content-Range</ExposeHeader>
<ExposeHeader>Content-Length</ExposeHeader>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Still, I can't play my audio
======
Edit 1: clarify when the info message appears