Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
This demo (http://kaldev.kaltura.com/projects2009/kdp_js_api.html) illustrates using the js api for controlling the flash player only. Does the js api extend beyond the flash player? In particular, I need to tie linked phrases to specific points in time in the video, and would like that to degrade from HTML to Flash.
Is there a well documented example of controlling playback through the current API? So far, I have just been figuring it out through studying the code. Here are some of my findings:
The following assume that we're working with a <video id="myTestVideo"/>.
$("#myTestVideo").get(0).controlBuilder.showControlBar()
$("#myTestVideo").get(0).controlBuilder.toggleFullscreen()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.play()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.pause()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.stop()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.currentTime
// The player that is currently playing in the browser.
$("#myTestVideo").get(0).controlBuilder.embedPlayer.selectedPlayer
// update the poster attribute first
$("#myTestVideo").get(0).controlBuilder.embedPlayer.updatePosterSrc()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.getSrc()
$("#myTestVideo").get(0).controlBuilder.embedPlayer.load(callback)
$("#myTestVideo").get(0).controlBuilder.embedPlayer.loadSourceFromApi(callback)
mw.ready( function(){
mw.setConfig( 'EmbedPlayer.OverlayControls', false );
$j('#showVideo').click( function(){
$j( '#videoContainer' ).loadingSpinner();
mw.load( 'EmbedPlayer', function(){
$j( '#videoContainer' ).html(
$j('')
.css({
'width' : 400,
'height' : 300
})
.attr({
'kentryid' : $j( '#kentryid' ).val(),
'kwidgetid' : $j( '#kwidgetid' ).val()
})
);
// Rewrite all the players on the page
$j.embedPlayers();
});
});
} );
My big question is, "Is there a way to load a new video into a current player without creating a new instance of the tag, which seems expensive.
Hi Chris,
The JavaScript client library is used to call the various Kaltura Server APIs.
The HTML5 library is used to work with video based on HTML5 standard.
The demo you link to is an old demo that doesn't work and was intended to show the Flash player apis.