Using metadata to select the broadcast source
Overview
OpenTV Video Platform's Metadata Service (MDS) provides regional source preference data in the channel metadata that it provides.
This allows managed client devices to use the correct broadcast source (DVB or OTT) for each channel, according to the configured preference for the region in which the device is located or in which the account is registered.
The deployment-time configuration determines which of the following is used to determine location:
- Geo-location using IP address
- The locale in the account profile that applies to the account
- The account's billing address.
Prerequisites
Before the client can get the information it needs to select the broadcast source, the following things must have already been done:
- Enable geo-filtering. See Content targeting.
- Create a content targeting group for each region. (See the precedence rules under Geofiltering here.)
- Add regions to the account profiles. Specify the name that you gave to the content targeting group (in step 1 above) in the profile's Content Targeting Filter field.
- For each editorial channel, select the appropriate location in the channel's regional settings.
For example, you could:
- Create a content targeting group called Berlin and select Berlin in the Cities tab.
- Specify Berlin in the appropriate account profile's Content Targeting Filter field.
- In each editorial channel's regional settings:
- Select City in Location Type.
- Select Berlin from the City drop-down.
- Repeat for each region you want to add.
Querying MDS
To query MDS for a list of channels, use the MDS Services API.
You can then check the value of the sourcePreference
field to see which source to use for each channel. It will have a value of either OTT
or DVB
.
For example:
{
"total_records": 1,
"services": [
{
"editorial": {
"id": "GLOBAL_140",
...
"sourcePreference": "OTT"
},
"technical": {
"id": "GLOBAL_140_D"
...
}
...
}
]
}
See also
- For information on configuring regions and regional settings for channels, see:
- For details of setting the region in an account profile, see the Content Targeting Filter field in Account profiles.
- For full details of this API, see Metadata Server (MDS) API Documentation.