At A Glance Main Projects Tutorials Resume

Contact


Email: palen1c at gmail.com




Kaltura HTML5 Video And Media JavaScript Library and Problems With Captions

Tue, 6 Mar 2012 11:25:38 EST

The Kaltura media player in action. With captions.
I wanted to quickly highlight an issue I ran into with the great Kaltura HTML5 Video and Media JavaScript library. I'm using it commercially as a way to deliver video messages to clients across platforms in conjunction with Amazon S3. As I highlighted previously I go into great agony making sure these videos are accessible via captions/subtitles.

The Kaltura HTML5 Video and Media JavaScript Library uses javascript to load the srt caption files. This makes caption files unable to be hosted on content delivery networks like S3. In Javascript as well as a little bit of Flash(unless the programmer makes specific allowances) there is a security policy called same origin which prevents the caption files form being loaded from a different domain via javascript. My S3 solution dynamically uses their notion of expiring links so people can't crawl my site and see marketing content. The fact that my caption files couldn't be served on S3 caused a lot of pain for me.

I came up with the solution to use my own server side scripts to make a copy of the srt captions from S3 on demand, then use cron in Linux, to periodically purge all caption files. (This site is hosted on Gentoo by a very talented admin, not myself). This really is a patch of a solution that really frustrated me with Kaltura. But how could they load captions and remain fully compliant? The only way I can think of is to provide some sort of proxy, but it sill messes up the S3 paradigm no matter what. Don't get me wrong, I still like Kaltura; but had trouble finding any documentation for solutions on this. In the trunk right now it looks like they are working on solutions to this.

A great solution would be to allow loading of captions by text embedded in the web page. That way server side scripts could dynamically pull captions from anywhere and incorporate it into the dynamic page.

Charles Palen has been involved in the technology sector for several years. His formal education focused on Enterprise Database Administration. He currently works as the principal software architect and manager at Transcending Digital where he can be hired for your next contract project. Charles is a full stack developer who has been on the front lines of small business and enterprise for over 10 years. Charles current expertise covers the areas of .NET, Java, PHP, Node.js, Javascript, HTML, and CSS. Charles created Technogumbo in 2008 as a way to share lessons learned while making original products.

Comments

No one has posted any comments yet, be the first

Comments are currently disabled.