# Advanced Integration

## Adding a Player with GlobalID

Besides the classic Integration with **`STREAMTYPE`** and **`MEDIA-ID`**, you can also integrate a Player with a GlobalID, which does not need a **`STREAMTYPE`** anymore.

```markup
_play.control.addPlayerWithGlobalID(CONTAINER-ID, GLOBAL-ID, CONFIG)
```

{% hint style="info" %}
**CONTAINER-ID** is the id of the target Container on the Page, that the Player will be inserted into. Please notice, that the Container should have a given width/height in either inline CSS or by a CSS Document to allow the Player to measure its Dimensions.
{% endhint %}

{% hint style="info" %}
**GLOBAL-ID** is the ID of an existing Media Object within nexxOMNIA
{% endhint %}

{% hint style="info" %}
**CONFIG** is a Configuration Object, that serves as “Override” Object. By using this, the Player can behave differently in this Instance than normally defined.
{% endhint %}

## Adding a Player with Remote Content

Although nexxPLAY only plays Content, that exists with nexxOMNIA, it is possible to play Video (and Audio), that is managed outside of nexxOMNIA by Partner Companies.

```javascript
_play.control.addPlayerWithRemoteMedia(CONTAINER-ID, REMOTE-REFERENCE, PROVIDER-CODE, STREAMTYPE, CONFIG)
```

{% hint style="info" %}
**CONTAINER-ID** is the id of the target Container on the Page, that the Player will be inserted into. Please notice, that the Container should have a given width/height in either inline CSS or by a CSS Document to allow the Player to measure its Dimensions.
{% endhint %}

{% hint style="info" %}
**REMOTE-REFERENCE** is the ID of an existing Media Object at the nexxOMNIA Partner Provider.
{% endhint %}

{% hint style="info" %}
**PROVIDER-CODE** is the Code Name of a Partner Provider, given by 3Q
{% endhint %}

{% hint style="info" %}
**STREAMTYPE** is the Type of the Media Object (only **`video`** and **`audio`** is allowed here)
{% endhint %}

{% hint style="info" %}
**CONFIG** is a Configuration Object, that serves as “Override” Object. By using this, the Player can behave differently in this Instance than normally defined.
{% endhint %}

## Adding a Player with AutoContent

In most Cases, the Frontend define exactly, which IDs of Video/Audio/Scene... shall appear where on which Page. For optimal Control, this is the classic and intended Way to implement to nexxPLAY.

Nevertheless, there may be Scenarios, where the Domain does not fully care, which Media exactly shall appear where. Instead, they want to stream Media from its Content Pool defined by a Topic/Keywords or the Page itself.

To handle these Cases, nexxPLAY can be started in an "autoContent" Mode, which can be started like the following:

```javascript
var contentConfig = new _play.ContentConfiguration({keywords:'1234 123',limit:5});

_play.control.addAutoContentPlayer(CONTAINER-ID, STREAMTYPE, contentConfig, CONFIG)
```

{% hint style="info" %}
**CONTAINER-ID** is the id of the target Container on the Page, that the Player will be inserted into. Please notice, that the Container should have a given width/height in either inline CSS or by a CSS Document to allow the Player to measure its Dimensions.
{% endhint %}

{% hint style="info" %}
**STREAMTYPE** is the Type of the Media Object
{% endhint %}

{% hint style="info" %}
**CONFIG** is a Configuration Object, that serves as “Override” Object. By using this, the Player can behave differently in this Instance than normally defined.
{% endhint %}

You define the target Container, the Streamtype and the Player Configuration exactly as always. Instead of a **`MEDIA-ID`**, a **`_play.ContentConfiguration`** Object is given, which handles various Usecases.

You can set the following Object Keys for Control:

| Key             | Description                                                                                                                 |
| --------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **titletag**    | the Container ID, HTML Object or HTML Tag Name of a Page Element, which contains Information about the Title                |
| **subtitletag** | the Container ID, HTML Object or HTML Tag Name of a Page Element, which contains Information about the Subtitle             |
| **contenttag**  | the Container ID, HTML Object or HTML Tag Name of a Page Element, which contains Information about the Content              |
| **keywords**    | a free List of manual Keywords - if this is set, the Content will be found by this Keywords and all other Tags are ignored. |
| **language**    | (optional, 2-Letter Language Code) if not given, the Player Language will be used                                           |
| **channel**     | (optional, Channel ID) if given, Contents will be searched for only in the given Channel                                    |
| **format**      | (optional, Format ID) if given, Contents will be searched for only in the given Format                                      |
| **limit**       | if a "Playlist/Video List/Audio List..." is wanted, enter the maximal Amount of Items here                                  |

{% hint style="info" %}
This Method is only available for HTML5 Players.
{% endhint %}
