Sample kWidget.getSources
This script enables you to generate stand alone video tags using kaltura entries.
Basic usage of kWidget.getSources looks like this:
- kWidget.getSources({
- 'partnerId': {partnerId},
- 'entryId': {entryId},
- 'callback': function( data ){
- // data includes an array of sources that can easily be put into a video tag:
- $vid = $('<video />').attr({
- 'title' : data.name,
- 'poster' : data.poster + '/width/640',
- })
- for( var i=0; i < data.sources.length; i++ ){
- $vid.append(
- $('<source />').attr( data.sources[i] )
- )
- }
- $('body').append( $vid )
- })
partnerId :
entryId: