Caption file not being read

Hello,

I’m experiencing an issue where the HTML5 Media plugin is not recognizing a VTT caption file with the same name (except for the extensions). I suspect the complicating factor is that I’m using the Zend S3 adaptor with pre-signed URLS. I am able to view captions on a sandbox on the same server that uses local storage.

In this case I’m able to view the source and see the track with VTT file listed, and can even click on the path and open it.

The paths to the filenames looks like this:

https://s3.amazonaws.com/bucketname/original/vttfilename.vtt?AWSAccessKeyId=[Access Key]&Expires=0000000000&Signature=[Signature]

I was wondering if anybody had experienced a similar issue or might be able to suggest a fix.

Thanks!

The HTML5 Media plugin just uses the “original” filenames as stored in the Omeka database to compute this, so it shouldn’t matter whether they’re on S3 (after all, normal Omeka filenames of uploaded files are all random strings of characters, so no two would ever match if that were the requirement).

It’s possible there’s instead a problem with how the file is loaded by the Javascript library used by HTML5 Media. Is there anything interesting in the browser’s error console? One thing I’m thinking is quite possible as a problem is CORS: browser security policies restricting loading and reading files from separate domains.

S3 provides some settings for enabling CORS headers on their end of things by configuring your bucket. Setting that up might be enough on its own, but I think you might also have to set the crossorigin attribute on the video tag itself to cause it to try to use CORS for a text track. If so, that would necessitate a change to the plugin.

So I checked the console as you suggested and this is exactly what was happening! It seems that it was as simple as enabling CORS on my bucket.

Thanks for the reply, I very much appreciate it!

Good to hear that it was as simple as doing the CORS config on S3.