# Video Preload API Integration Guide

### Overview

This integration guide aims to help developers understand the Video Preload Plugin's functionalities and the necessary steps to integrate it into their API and Applicaster app. By following this guide, developers can create a streamlined user experience that ensures video content is appropriately personalized, protected, and accessed only by authorized users.

The flow could be explained in the following diagram:

![](../using-zapp/player/video-preload/video-preload-diagram.png)

### Prerequisites

To be able to load items prior to playback, please make sure the Feed provided has the relevant structure set, and the `link` object contains the `self` attribute as explained [here](/integrations/feed-json-protocol.md#entrylink).

In order to connect the plugin to the URL Signing service, please make sure you followed the [URL Signer Service guide](/integrations/pipes2-signed-urls).

### Endpoint and Feeds

In order to set the relevant feed on the plugin (in case you would like to use default URL), you should configure the endpoint for an entry feed in a [similar way](/using-zapp/content/endpoints-and-context-keys) you configured all the other endpoints in the app. Configuring endpoints will allow you to set the relevant context keys that could be sent as part of the `ctx` query param on each request. An example of a use-case could be blocked content which could be retrieved only with additional user token (provide content to authorized users only).

After setting the endpoint, go to the _Feeds_ [section](/using-zapp/content/pipes2-feeds) and configure the relevant feed. You will most likely need to use _Dynamic feeds_ with dynamic entry id (e.g.: `https://example.com/videos/{{id}})`. The dynamic attribute could be pulled from the referrer that initiate the call (the item user clicked to watch the video, deep link triggered from outside the app, url scheme triggered from outside the app, etc).

When using a _Signed URL Service_, set the signing url endpoint to leverage `ctx` keys on the request.

### Video Preload plugin parameters

- **Fetch Entry**: Set this flag if you want to reload the entry using the `link.href` attribute set in the entry provided to the plugin (/integrations/feed-json-protocol.md#entrylink), or using the _Default Entry Source_.
- **Default Entry Source**: If `Fetch Entry` is set, and you would like to use a default URL, you will need to provide the feed to be used by the plugin. Choose the relevant feed from the dropdown, and set the key attributes in case your feed includes dynamic values - this will be a default. The override value could be configured as part of the [entry meta data](/integrations/feed-json-protocol.md#entrylink).
- **Use Signing URLs Service**: Set this flag if you want to connect to a URL signer service.
- **Signer API** - If `Use Signing URLs Service` is set, select the Source feed configured in the feed section. This will be used as the default url, and could be overridden if `signer_api` is set on the entry [extensions](/integrations/feed-json-protocol.md#entryextensionssigner_api).
