Skip to main content

Video Preload Plugin

Introduction

This plugin provides your Application with capability to perform actions before the video playback will start. Currently the plugin supports 2 actions:

  1. Load additional information of an entry (additional metadata, secured stream sources, drm information, etc).
  2. Connect to your URL Signer Service to obtained signed stream url.

The flow could be explained in the following diagram:

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.

In order to connect the plugin to the URL Signing service, please make sure you followed the URL Signer Service guide.

App Set up

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 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 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.

Plugin

Add the plugin Video Preload to the app version via the plugin configuration. Make sure you add the plugin to all relevant versions and platforms. Once added, a rebuild of the app will be required to be able to use this functionality.

Configure the Preload Video plugin parameters in the plugin configuration panel:

  • 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.
  • 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.

Screen

Add the Preload Video Screen in Zapp Studio.

This screen will allow you to set the plugin as a hook to the player.

Adding the Preload Video as a hook for video content

  1. In Zapp studio, make sure you add Preload Video Screen screen.
  2. Once added, select the player screen and scroll down the configuration panel to the SCREEN STORYBOARD section. Select the Preload Video screen from the plugins dropdown.
  3. Click on the + button and save the layout.