Customizing the appsList.json File
Background
The starter kit includes a special file called appsList.json. This file is available at the market level.
In the default Starter kit, this file can be found at the following location:
/public/London/appsList.json
The purpose of appsList.json file is to allow broadcasters to define and describe all the applications they wish to use in a particular market. In addition, this file also allows broadcasters to configure other network related settings such as:
-
Organization details
-
Broadcaster related Terms and Conditions
-
User related Privacy Policy
For the purpose of further explanation, a small section of the default appsList.json file is shown below:
{
"appList": {
"legals" : {
"default": {
"match-keys": {
"name": "COMPANY 12",
"address": "Company Address No. 12",
"email": "contact@domain.net",
"date": "Tuesday, December 08, 2020"
},
"terms-of-service": "/run3tv-common/tos/terms-of-service.html",
"privacy-policy": "/run3tv-common/tos/privacy-policy.html"
},
"custom": {
"match-keys": {
"company": "COMPANY 21",
"address": "Company Address No. 21"
},
"terms-of-service": "/london/Station-2/common-app/tos/terms-of-service.html",
"privacy-policy": "/london/Station-2/common-app/tos/privacy-policy.html"
}
},
"applications": {
"field-test": {
"appRoot": "/run3tv-common/apps",
"appEntry": "/field-test.html",
"appVersion": "1.0.0",
"appId": "G-YRCMBH9TDW",
"properties": {
"ga-id": "G-YRCMBH9TDW"
}
},
"trigger-1": {
"appRoot": "/run3tv-common/apps/triggers",
"appEntry": "/cta.html",
"appVersion": "1.0.0",
"appId": "G-MXP1YLWM3C",
"properties": {
"ga-id": "G-MXP1YLWM3C",
"linkApp": "STATION-1",
"hidden": false,
"timeout": 5,
"img": "/london/Station-1/trigger/img/img.png",
"hover": "/london/Station-1/trigger/img/hover.png"
}
},
"STATION-1": {
"appRoot": "/run3tv-common/apps/common-app",
"appEntry": "/index.html",
"appVersion": "1.0.0",
"appId": "G-B1Q1EGVSVX",
"properties": {
"ga-id": "G-B1Q1EGVSVX",
"back": {"properties": {"hidden": true}},
"menu": "/london/Station-1/common-app/dynamic/menu/menu.json",
"national-menu": "/london/Station-1/common-app/dynamic/menu/national-menu.json",
"settings": "/london/Station-1/common-app/config/default-settings.json",
"menu-settings": "/london/Station-1/common-app/config/menu-settings.json",
"messages": "/london/Station-1/common-app/config/messages.json",
"style": "/london/Station-1/common-app/css/default.css",
"amp": "/london/Station-1/common-app/css/skin.css",
"resize": true,
"header": {"type": "channel", "title": {"en": "APP ID 1", "es": "APP ID 1"}, "id": "SRV1", "name": "ID-1", "logo": "/london/Station-1/common-app/img/home-menu/channel.png"},
"panels-ttl": 300,
"player-ttl": 5
},
"drm": null,
"allowConfigDRM": true,
"allowLocalStorage": true,
"allowFrameworkStorage": true
}
}
}
}
"img
Let us now look at various properties which are used in appsList.json file.
"legals"
This property allows broadcasters to define all relevant legal information including:
-
Organization details
-
Broadcast related Terms & Conditions
-
Privacy policy documents.
"default"
This sub-property comes pre-configured with dummy values and acts as an example.
“custom”
This sub-property allows broadcasters to define their own set of legal information to be displayed in their main application. Later in this document, we will elaborate on this section and demonstrate different ways of using this property.
"applications"
This block consists of all the applications a broadcaster wishes to use within a market. Some applications may be simple and may only have few properties whilst other may be more elaborate with a number of configurable options.
The individual properties used for different applications are described below:
"appRoot"
The root path to where this application resides
"appEntry"
The first or entry point for the given application
"appVersion"
The actual version number of the application. This is used for version control as well as Google analytics.
"appId"
This id is used by the data layer in order to identify a particular application
“ga-id”
A unique Google Analytic's tracking code (or ID) that allows Google Analytics to collect data when inserted into a website. This tracking code is the mechanism by which Google Analytics compiles data. It consolidates this data into reports, using graphs and other visuals to display the results.
"timeout"
The time delay after which trigger goes into hidden state.
"properties"
The google ID linked to a particular application
“img”
This property defines the actual image used by a particular application and is primarily used for displaying trigger image.
“hover”
This property defines the image used by a particular application when user hovers over the current image. This is similar to mouse-over technique used on websites. This may be useful for receivers that employ pointer devices for navigation purposes.
Other properties for more complex applications include:
"back"
This property defines the behaviour when returning from the currently loaded application to the previous application. This property usually only applies to common application or broadcaster’s main application. It usually returns the user to either a trigger application or full screen video.
MENUS
In 1.9.1 release, a new feature has been added in the menu property. This allows broadcasters to define local level as well as national level menus separately. These menus along with their display properties are automatically aggregated by the framework and displayed to the viewer as a single menu.
"menu"
This property contains the link to the main (local) menu of the application. The main menu referred to here is the standard local menu for a particular station.
"national-menu":
This property contains the link to the (national) part of the menu. The framework automatically aggregates the two menu files and presents them as a single menu to the viewer. If the national menu file is empty, then only the (local) menu items contained in menu.json file are displayed in the menu panel of the application
"settings"
This property defines extra properties of the main menu itself. Some of the options here include things like panel size, panel properties and some language related properties
"menu-settings"
This property refers to the actual SETTINGS option and its sub-menu displayed within the main menu. The SETTINGS section consists of many other sub settings like Language, privacy, location etc
"messages"
This property refers to the list of errors and notifications. A default list of errors and notification is provided in the Starter kit. This list can be extended by the broadcasters
"style"
This refers to the CSS file which contains all the design / styling information
"amp"
This refers to the CSS which is specifically used for VOD player skin
"resize"
This property allows RMP video re-sizing in the background when an application panel changes state i.e. displayed or hidden
"header"
This property contains all the information that is displayed in the top left hand corner of the main menu panel.
It should be noted that the framework first attempts to retrieve this information using query.Service API. If it fails, the framework then uses the information provided in the “servciceInfo” block within the Bridge.json file.
If that attempts also fails because the broadcaster has not entered correct details in the “serviceInfo” block of Bridge.json file, then the information provided here against “header” property is retrieved and displayed in the main application
"panels-ttl"
This property defines the timeout for the main application panel
"player-ttl"
This property defines the timeout for the player bar in VoD player
"drm"
This property is used for Digital Rights Management and can either be an object or a json file
"allowConfigDRM"
This property allows DRM to be configured
"allowLocalStorage"
This property allows the main (common) application to set the localStorage session at framework level.
"allowFrameworkStorage"
This property allows individual object values to be set inside the framework storage itself.
Example: How to configure T&C and Privacy policy documents
It is very straightforward to add your company details as well as your custom T&C and Privacy statements to your NEXTGEN application. All of these parameters can be configured by editing just one file called appsList.json which usually resides in your ‘Market’ folder. In this example, the file (appsList.json) can be found at:
/public/london/
Look for your main application’s code block in your appsList.json file. An example block for Station-2 is shown below. This station uses 'custom' legal values (see line 14 below).
"STATION-2": {
"appRoot": "/run3tv-common/apps/common-app",
"appEntry": "/index.html",
"properties": {
"back": {"properties": {"hidden": true}},
"menu": "/london/Station-2/common-app/dynamic/menu/default-menu.json",
"settings": "/london/Station-2/common-app/config/default-settings.json",
"menu-settings": "/london/Station-2/common-app/config/menu-settings.json",
"messages": "/london/Station-2/common-app/config/messages.json",
"style": "/london/Station-2/common-app/css/default.css",
"amp": "/london/Station-2/common-app/css/skin.css",
"resize": true,
"header": {"type": "channel", "title": {"en": "APP ID 2", "es": "APP ID 2"}, "id": "SRV2", "name": "ID-2", "logo": "/london/Station-2/common-app/img/home-menu/channel.png"},
"legals": "custom",
"panels-ttl": 300,
"player-ttl": 5
},
"drm": null,
"allowConfigDRM": true,
"allowLocalStorage": true,
"allowFrameworkStorage": true
}
This ‘custom’ block is present near the top of the same (appsList.json) file.
"custom": {
"match-keys": {
"company": "COMPANY 21",
"address": "Company Address No. 21"
},
"terms-of-service": "/run3tv-common/tos/terms-of-service.html",
"privacy-policy": "/run3tv-common/tos/privacy-policy.html"
}
This is where you can configure your company details as well as point your application to your customized T&C and Privacy policy documents.
Prepare your T&C and Privacy policy documents in standard HTML format. Then, either drop these files in the same location as show above ("/run3tv-common/tos/privacy-policy.html") or create a new folder and point to the correct location.
NOTE:
Instead of using ‘custom’ block as explained above, you could also create your own block in the same appsList.json file as follows:
In your main application block within appsList.json file, add a property which looks something like:
"legals": "my-legals",
Then, in the same appsList.json file, add the following block near the top:
"my-legals": {
"match-keys": {
"company": "MY COMPANY NAME",
"address": "My Company Address No. 21"
},
"terms-of-service": "/run3tv-common/my-tos-folder/tos.html",
"privacy-policy": "/run3tv-common/my-tos-folder/privacy.html"
}
Here, your custom T&C file is called tos.html and it resides at: /public/run3tv-commom/my-tos-folder/