<commit_before># angular-kaltura

A simple wrapper around Kaltura player

### Installation


To install Kaltura Player from npm:

```bash
npm install angular2-kaltura --save
```


### How to use

Just add following your component template:

```html
<kaltura-player [config]="kalturaConfig" [videoId]="videoId"></kaltura-player>
```

`videoId` is the entry_id from Kaltura and `config` is a `KalturaConfig` object (yes I like Typescript).

and in your component you'll need:

```js
private kalturaConfig: KalturaConfig;
...

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

// 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
  }
};

```
<commit_msg>add better documentation<commit_after># angular-kaltura

A simple wrapper around Kaltura player

### Installation


To install Kaltura Player from npm:

```bash
npm install angular2-kaltura --save
```


### How to use

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

```js
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:

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

`videoId` is the entry_id from Kaltura 
`config` is a `KalturaConfig` object (yes I like Typescript).
`(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.

```js
private kalturaConfig: KalturaConfig;
...

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


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

```js
// 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
  }
};

```

{'fraction_non_alphanumeric': 0.11178939336131248, 'fraction_numerical': 0.0019076688286913392, 'mean_word_length': 3.7586206896551726, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085573', 'n_tokens_mistral': 868, 'n_tokens_neox': 831, 'n_words': 269}