Hints for captions advanced use HTML5/KDP3 player.

3 replies [Last post]
Joined: 07/04/2011
Points: 108

Use case (for Eagle):

-Show captions at the start and end of a video that are generated on the fly (example: at the start 'This video is for user: Username' is shown.

-The captions 'file' would be served from an external server -not kaltura.com- with an url of this form http://mimachine.mydomain/captions/user_at_machine_dot_domain

Would you please give me hints and/or doc references to achieve this.

thx in advance.

I would like to use flash fallback. my page will be using swfobject.embedSWF and <script src="http://html5.kaltura.org/js"></script> at the header.

Joined: 02/22/2009
Points: 76

you can set the captions flashvars config to point to your server.. then you could generate whatever SRT you want to generate. Something like "closedCaptions.ccUrl={url}" in your flashvars should do the trick.

Joined: 07/04/2011
Points: 108

Trying to change captions for each entry of a playlist with this piece of code:

       function jsCallbackReady() {
             $('#mykdp').get(0).addJsListener("changeMedia", "cargaSubtitulosHandler");
        }
        function cargaSubtitulosHandler(event){
            //alert('Se produjo un changeMedia');
            $('#mykdp').get(0).setKDPAttribute('closedCaptions','type','srt');
            $('#mykdp').get(0).setKDPAttribute('closedCaptions','ccUrl','http://machine.domain/test.srt');
          }

BUT, html5 player throws changeMedia notification but flash kdp3 do not ( i've used externalInterfaceDisabled : "false" )
. To reproduce use a page with playlist and this code, when forcing forceMobileHTML5 you will see changeMedia alert is going to be shown but it will not if you use flash KDP3.

Maybe it will be worthwhile to create Kaltura Dynamic Player version 3 JavaScript Playground for playlists.

thx and happy christmas for everybody!!!!

Joined: 07/04/2011
Points: 108

SOLVED, forget it. bad use of symfony decorator was polluting the html produced.