Code Monkey home page Code Monkey logo

angular2-kaltura's Introduction

angular-kaltura

A simple wrapper around Kaltura player

Installation

To install Kaltura Player from npm:

npm install angular2-kaltura --save

How to use

Import KalturaModule and define it as one of the imports of your application module:

import { NgModule } from '@angular/core';
import { KalturaModule } from 'angular2-kaltura';

import { AppComponent } from './app.component';

@NgModule({
    imports: [
        KalturaModule
    ],
    declarations: [
        AppComponent
    ],
    bootstrap: [
        AppComponent
    ]
})
export class AppModule { }

Add the following HTML to the component template in which you want to use the select component:

<kaltura-player [config]="kalturaConfig" 
                [videoId]="videoId" 
                [secure]="true"
                (ready)="doSomethingOnReady(targetId)">
</kaltura-player>

videoId is the entry_id from Kaltura config is a KalturaConfig object (yes I like Typescript). secure is a boolean flag. Set to true if you want to load Kaltura Player Javascript via https. Default false (ready) is an event which is emitted when the Kaltura Player is ready. targetId is the DOM id of the element that wrapps the player.

Within the component class you have to set KalturaConfig object.

private kalturaConfig: KalturaConfig;
...

this.kalturaConfig = new KalturaConfig('partner_id', 'uiconfid');

To customize the player you can pass the flashvars object to KalturaConfig like this:

// flashvars is optional and allows you to set runtime uiVar configuration
this.kalturaConfig.flashvars = {
  autoPlay: false,
  IframeCustomPluginCss1: '/path/to/your/custom.css',
  mediaProxy: {
    entry: {
      name: 'Some title'
    }
  },
  topBarContainer: {
    plugin: true
  }
};

angular2-kaltura's People

Contributors

sekibomazic avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nayfin

angular2-kaltura's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.