A directive for AngularJS for embedding the Kaltura video player.
The directive supports basic embedding as well an API for controlling the player using notifications and events registration.
Player plugins can be configured as well.
- Download the directive file: ng-kaltura-player.js and add it to your HTML page:
<script src="ng-kaltura-player.js"></script>
- Inject the 'Kaltura.directives' namespace to your Angular application:
angular.module('App', ['Kaltura.directives'])
- Use the directive in your HTML markup:
<kaltura-player width="640px" height="320px"></kaltura-player>
- Explore the examples below to learn how to configure the player and use its API
- width: The player width. You can specify px for pixels or % for percentage
- height: The player height. You can specify px for pixels or % for percentage
- pid: Your Kaltura publisher ID.
- uiconfid: Your Kaltura player ID.
- entryid: The entry ID of the video to play.
- flahvars: A Kaltura player flashvars object listing player configuration and plugins.
- kalturaPlayerReady: Dispatched by the directive to the $rootScope when the Kaltura player is ready to play:
$scope.$on("kalturaPlayerReady", function(event, kdp, id){ // event: the event object // kdp: A reference to the Kaltura player that can be used with the Kaltura player API. // id: the player directive id attribute if specified. });