I have MP4 video file and WEBVTT file both stored in my AWS S3. The AWS S3 bulk configured to my subdomain, and can access it through: http://clip.mydomain.com/bulkname/video.mp4
My web application location: http://dev.mydomain.com/index.html
When I load the page, I try to load my video and track element:
<video id="Video." controls width="100%" height="90%" style="padding-top: 30px;height: 90%;">
<source src="http://clip.mydomain.com/bulkname/video.mp4" type="video/mp4">
<track kind="metadata" label="GetAlert metadata" src="http://clip.mydomain.com/bulkname/video.trk" srclang="en" default></track>
</video>
I get the following cross domain error:
Text track from origin 'http://clip.mydomain.com' has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. Origin 'http://dev.mydomain.com' is therefore not allowed access.
My bulk configured to support cross domain ( CORS Configuration), which seems like I gave access, I tried also without "http://":
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://clip.mydomain.com</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>http://dev.mydomain.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
parent of track element does not have a 'crossorigin' attribute.... It seems like one of your tags needscrossorigin="anonynmous"or something along those lines. I'm speculating rather wildly, but that's what the error seems to be saying. - Michael - sqlbotanonymousand @Joseph added it as is with the typo. - Vasiliy Zverev