Hi,
I have checked 3 similar threads (attached at end), but none is exactly the same issue as I have.
I have a html5 video tag that loads video from the phone local storage and a vtt file from remote AWS S3.
I have added crossorigin
attribute in video tag
<video src="a-local-path-mp4-file" crossorigin="anonymous">
<track src="http://s3-path-to-vtt-file">
</video>
If I open the page in iOS (WKWebview plugin installed) for the first 3-4 times, the vtt file was loaded successfully.
Then it starts to give a CORS error Failed to load resource: Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
This issue does not appear in Android.
I have configured CORS in AWS S3 to even AllowedOrigin to http://* and https://*. Issue persists
An example CORS setting in AWS S3:
<CORSRule>
<AllowedOrigin>http://localhost:8080</AllowedOrigin>
<AllowedOrigin>https://*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
Any help is appreciated!
Br,
D