Enable Smartstart on one or more asset(s). Smartstart improves player startup times for assets that require server-side ad insertion.
Key information:
-
A virtual linear playlist is created for each specified asset.
-
Each virtual linear playlist's ID is set to its asset's ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). This simplifies playback implementation by allowing you to construct a playback URL using this shared ID.
Request
Request syntax:
POST /smart-start
Request body parameters:
Pass the following request body parameters:
Name | Data Type | Description |
---|---|---|
active | Integer | Determines the status for each playlist. Valid values are: 0: Inactive 1: Active Default value: 1 |
ad_slate_fill | Integer | Determines whether ad breaks with insufficient ads will be filled with ad slate. Valid values are: 0: Disables ad slate and returns back to content. 1: Enables ad slate. Default value: 0 |
assets Required | List | Contains a list of asset IDsThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.. The system creates a virtual linear playlist for each specified asset. Each virtual linear playlist's system-defined ID will match its asset's system-defined ID (i.e., asset ID). |
beam_break_duration | Integer | Determines whether ad breaks defined within an asset are honored and their duration. Valid values are: 0: Ad breaks are ignored. #: Sets the duration, in seconds, for all ad breaks. Default value: 0 |
desc | String | Sets the virtual linear playlist's description. |
repeat | Integer | Determines the number of times that the playlist will be repeated. Valid values are: 0: The playlist will not repeat. -1: The playlist will repeat indefinitely. * #: The playlist will repeat the specified number of times. Default value: 0 |
skip_drm | Integer | Determines whether playback of the virtual linear playlist requires a digital signature. Valid values are: 0: Playback requires a digital signature. 1: Playback is allowed without a digital signature. This property takes precedence over an asset's Require a token for playback setting. Default value: 0 |
studio_drm_required | Integer | Determines whether playback of the virtual linear playlist will be secured via Studio DRM. Valid values are: 0: Playback is not secured by Studio DRM. 1: Playback is secured via DRM. This property takes precedence over an asset's Require studio approved DRM for playback setting. Default value: 0 |
Response
The response for a successful request contains the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path to this endpoint. |
@type | String | Returns SmartStart. |
ss_created | List | Contains a list of the virtual linear playlists that were created. Each virtual linear playlist is identified by its system-defined ID. Each virtual linear playlist's system-defined ID will match its asset's system-defined ID (i.e., asset ID). |
ss_not_created | List | Contains a list of virtual linear playlists that were not created because they are duplicates of an existing virtual linear playlist. |
ss_errored | List | Contains a list of virtual linear playlists that were not created due to an error. |
Sample Request/Response
Call the bulk_virtual_linear_playlists module (Python 3) to create virtual linear playlists in bulk. This module imports names from the api_auth module.
import json
import requests
from api_auth import APICredentials, APIParams
class Smartstart:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._bulk_virtual_linear_playlist()
def _bulk_virtual_linear_playlist(self):
url = "{}{}".format(self.host, "/api/v4/smart-start")
description = 'Sample Playlist' # Brief description for the new playlists.
repeat = -1 # Repeats playlists indefinitely.
beam_break_duration = 30 # Sets 30 second ad breaks.
assets = [
'a404b63430a7437a99995d3285a48be1',
'4a702cd463db4a94a90c1ea4bf9f3102',
'da2861de60484b6eb01e8372f069ecc3'
] # Replace with the desired asset IDs.
payload = {
'desc': description,
'repeat': repeat,
'beam_break_duration': beam_break_duration,
'assets': assets
}
headers = {'Content-Type': 'application/json'}
response = requests.post(
url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
)
print(response.json())
Smartstart().run()
Response:
{
'@id': '/api/v4/smart-start',
'@type': 'SmartStart',
'ss_created': ['a404b63430a7437a99995d3285a48be1', '4a702cd463db4a94a90c1ea4bf9f3102', 'da2861de60484b6eb01e8372f069ecc3']
}