Studio Service

Channel Content

Channel Content must contains

  • zones : Only for channel, depends on layout of the channel. zone's ID pattern is always zone{number} and must be the same as the zone ID defined in layout for this channel, each zone must contain content list of that zone.

May contains

  • meta : Object; information about the content that does not change frequently
  • props : Object; options to change how the data is rendered on App or UI

List

Array of Objects

  • list_id: UUID V4, generated for reference
  • content: contains _ref
  • rules: Object
// list of refs with rules
{
list: [
{
list_id: "uuid",
content: {
_ref: {
type: "channel",
id: "uuid",
props : {duration: 10000, sizing_type: 'fit'}
},
rules: [{
"day_of_week": {
"mon": true,
"tue": false,
"wed": false,
"thu": false,
"fri": false,
"sat": false,
"sun": false
}]
}
}
}
]
}

Rule

Rules is the Object that contain data to take control on how content is show or not showing on screen.

{
time: [
{start: '08:00', end: '12:00'},
{start: '13:00', end: '18:30'}
],
day_of_week: {
'mon': true,
'tue': false,
'wed': false,
'thu': false,
'fri': false,
'sat': false,
'sun': false
},
date: [
{start: '2018-08-01', end: '2018-08-31'}, // yyyy-mm-dd
{start: '2018-09-10', end: '2018-09-20'}
],
exclusive: true
}

Rule must contain one of

  • time : Array Object
  • day_of_week  :  Object
  • date : Array Object
  • exclusive  : Boolean

All conditions inside each rule are applied together with "AND", but each rule inside rules join together with "OR"

time

set of period of times that content can show

day_of_week

days of the week that the content can show

date

specific date that content can show

exclusive

to mark the content as priority / takeover other non exclusive, if more than one items are exclusive then player will loop showing through all of them

Use case

  • Show coffee break ads only on week day 2 hours after breakfast and lunch
  • Show sale promotions during 3 days before and after end of month
  • Always show shop promote ads on week day when no other ads to show
  • Show weekend event detail on weekend when no other ads to show
  • Content is auto expired / removed from playlist on specific date (media publish/expire at field)
  • Change channel one (1 zone) to Channel three (3 zone) on the afternoon
"rules":[
{
"date":[
],
"time":[
{
"end":"10:00",
"start":"08:00"
},
{
"end":"14:00",
"start":"13:00"
}
],
"exclusive":false,
"day_of_week":{
"fri":false,
"mon":true,
"sat":false,
"sun":true,
"thu":false,
"tue":false,
"wed":false
}
},
{
"date":[
],
"time":[
],
"exclusive":true,
"day_of_week":{
"fri":true,
"mon":false,
"sat":true,
"sun":false,
"thu":true,
"tue":true,
"wed":true
}
},
{
"date":[
{
"end":"2019-03-31",
"start":"2019-03-01"
}
],
"time":[
],
"exclusive":false,
"day_of_week":{
"fri":false,
"mon":false,
"sat":false,
"sun":false,
"thu":false,
"tue":false,
"wed":true
}
}
]

Zones JSON Example

{
"zones":{
"zone1":{
"list":[
{
"rules":[],
"content":{
"_ref":{
"id":"23d75f05-d955-410b-8339-3f15d2e595cf",
"type":"file"
},
"props":{
}
},
"list_id":"3880855c-bbff-4f7f-9da5-81984a57cb29"
},
{
"rules":[],
"content":{
"_ref":{
"id":"acf3685a-6db3-4fe1-bb73-78b6e65f4ab8",
"type":"file"
},
"props":{
}
},
"list_id":"dc902525-a4bc-44a8-8eab-9e0c53092d7e"
},
{
"rules":[],
"content":{
"_ref":{
"id":"b7e6d318-4492-46a4-a327-ea6f8daa1eac",
"type":"file"
},
"props":{
}
},
"list_id":"b497290d-601b-4d66-9463-3dd7a9e6723c"
}
],
"props":{
"sizing_type":{
"image":"fill",
"video":"fill",
"document":"fill"
}
}
},
"zone2":{
"list":[
{
"rules":[],
"content":{
"_ref":{
"id":"7f30ba13-674c-4bce-9f6e-9325d361b1b1",
"type":"file"
},
"props":{
}
},
"list_id":"2c024b22-7153-4647-9c40-6e8062435904"
},
{
"rules":[],
"content":{
"_ref":{
"id":"dfd3be66-0f9d-47bf-9037-46be927391c6",
"type":"file"
},
"props":{
}
},
"list_id":"c86a56c9-5bd7-4c8d-a88c-fadfae569cbf"
}
],
"props":{
"sizing_type":{
"image":"fill",
"video":"fill",
"document":"fill"
}
}
}
}
}

JSON Schema

{
"$schema":"http://json-schema.org/draft-07/schema",
"type":"object",
"title":"Channel content json schema",
"description":"",
"default":{
},
"definitions":{
"_ref":{
"$id":"#/definitions/_ref",
"type":"object",
"title":"Content ref",
"description":"",
"default":{
},
"examples":[
{
"_ref":{
"type":"playlist",
"id":"uuid"
}
}
],
"properties":{
"type":{
"type":"string",
"enum":[
"file",
"playlist",
"channel",
"app",
"link"
]
},
"id":{
"type":"string",
"format":"uuid"
}
}
},
"list":{
"$id":"#/definitions/list",
"type":"object",
"title":"Content list",
"description":"",
"default":{
},
"examples":[
{
"list_id":"uuid",
"content":{
"_ref":{
"type":"playlist",
"id":"uuid"
},
"props":{
"duration":10000
}
}
}
],
"properties":{
"rules": {
"type": "array",
"items": {
"$ref":"#/definitions/rules"
}
},
"content":{
"type":"object",
"require":[
"_ref"
],
"properties":{
"_ref":{
"$ref":"#/definitions/_ref"
},
"props":{
"type":"object",
"properties":{
"duration":{
"$ref":"#/definitions/duration_value"
}
}
}
}
},
"list_id":{
"type":"string",
"format":"uuid"
}
}
},
"duration_value":{
"$id":"#/definitions/duration_value",
"type":"number",
"title":"Durations of media",
"description":"always in millisecond",
"default":0,
"minimum":0,
"examples":[
50000
]
},
"transition":{
"$id":"#/definitions/transition",
"type":"object",
"title":"Transition of Media",
"description":"",
"default":{
},
"oneOf":[
{
"type":"object",
"require":[
"type",
"duration"
],
"properties":{
"type":{
"type":"string",
"enum":[
"none",
"fade",
"dissolve",
"jackinthebox"
]
},
"color":{
"type":"string",
"pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$"
},
"duration":{
"$ref":"#/definitions/duration_value"
}
}
},
{
"type":"object",
"require":[
"type",
"duration"
],
"properties":{
"type":{
"type":"string",
"enum":[
"slide",
"roll"
]
},
"duration":{
"$ref":"#/definitions/duration_value"
},
"direction":{
"type":"string",
"enum":[
"right",
"left",
"up",
"down"
]
}
}
},
{
"type":"object",
"require":[
"type",
"duration"
],
"properties":{
"type":{
"type":"string",
"enum":[
"zoom",
"bounce"
]
},
"duration":{
"$ref":"#/definitions/duration_value"
},
"direction":{
"type":"string",
"enum":[
"center",
"right",
"left",
"up",
"down"
]
}
}
},
{
"type":"object",
"require":[
"type",
"duration"
],
"properties":{
"type":{
"type":"string",
"enum":[
"flip"
]
},
"duration":{
"$ref":"#/definitions/duration_value"
},
"direction":{
"type":"string",
"enum":[
"right",
"down"
]
}
}
},
{
"type":"object",
"require":[
"type",
"duration"
],
"properties":{
"type":{
"type":"string",
"enum":[
"rotate"
]
},
"duration":{
"$ref":"#/definitions/duration_value"
},
"direction":{
"type":"string",
"enum":[
"clockwise",
"counterclockwise"
]
}
}
}
]
},
"durations":{
"$id":"#/definitions/durations",
"type":"object",
"description":"always in millisecond",
"default":{
},
"examples":[
{
"image":10000,
"app":60000,
"link":60000
}
],
"required":[
"image",
"app",
"link"
],
"properties":{
"image":{
"$ref":"#/definitions/duration_value"
},
"app":{
"$ref":"#/definitions/duration_value"
},
"link":{
"$ref":"#/definitions/duration_value"
}
}
},
"sizing_type_value":{
"$id":"#/definitions/sizing_type_value",
"type":"string",
"enum":[
"fit",
"fill"
]
},
"rules":{
"$id":"#/definitions/rules",
"type":"array",
"items": {
"type": "object",
"properties": {
"day_of_week": {
"type": "object",
"properties": {
"mon": {
"type": "boolean"
},
"tue": {
"type": "boolean"
},
"wed": {
"type": "boolean"
},
"thu": {
"type": "boolean"
},
"fri": {
"type": "boolean"
},
"sat": {
"type": "boolean"
},
"sun": {
"type": "boolean"
}
}
},
"date": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
},
"exclusive": {
"type": "boolean"
},
"time": {
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"end": {
"type": "string"
}
}
}
}
}
}
},
"sizing_type":{
"$id":"#/definitions/sizing_type",
"type":"object",
"title":"Default Durations of Media",
"description":"",
"default":{
},
"examples":[
{
"document":"fit",
"image":"fill",
"video":"fill"
}
],
"required":[
"document",
"image",
"video"
],
"properties":{
"image":{
"$ref":"#/definitions/sizing_type_value"
},
"document":{
"$ref":"#/definitions/sizing_type_value"
},
"video":{
"$ref":"#/definitions/sizing_type_value"
}
}
},
"props":{
"$id":"#/definitions/props",
"type":"object",
"title":"Props",
"description":"",
"default":{
},
"properties":{
"default_durations":{
"$ref":"#/definitions/durations"
},
"sizing_type":{
"$ref":"#/definitions/sizing_type"
},
"default_transition":{
"$ref":"#/definitions/transition"
},
"transition":{
"$ref":"#/definitions/transition"
},
"duration":{
"$ref":"#/definitions/durations"
}
}
},
"zones":{
"$id":"#/definitions/zones",
"type":"object",
"title":"Zones",
"description":"",
"default":{},
"patternProperties":{
"^zone[1-5]$":{
"type":"object",
"properties": {
"props":{
"$ref":"#/definitions/props"
},
"list":{
"type":"array",
"items":{
"$ref":"#/definitions/list"
}
}
}
},
"hidden":{
"type":"object",
"properties": {
"props":{
"$ref":"#/definitions/props"
},
"list":{
"type":"array",
"items":{
"$ref":"#/definitions/list"
}
}
}
}
},
"additionalProperties": false
}
},
"properties":{
"props":{
"$ref":"#/definitions/props"
},
"zones":{
"$ref":"#/definitions/zones"
}
},
"required":[
"zones"
]
}

Examples


{
"props":{
"default_durations":{
"image":10000,
"app": 788,
"link":60000
},
"sizing_type":{
"document":"fit",
"image":"fill",
"video":"fit"
},
"transition":{
"type":"fade",
"color":"#000000",
"duration":1000
}
},
"zones":{
"zone1":{
"props":{
"sizing_type":{
"document":"fit",
"image":"fill",
"video":"fit"
},
"transition":{
"type":"fade",
"color":"#111111",
"duration":1000
}
},
"list":[
{
"list_id":"uuid",
"content":{
"_ref":{
"type":"playlist",
"id":"uuid"
},
"props":{
}
},
"rules":[
{
"day_of_week":{
"mon":true,
"tue":false,
"wed":false,
"thu":false,
"fri":false,
"sat":false,
"sun":false
}
}
]
}
]
},
"zone2":{
"props":{
"transition":{
"type":"fade",
"color":"#dfdfdf",
"duration":1000
}
},
"list":[
{
"list_id":"uuid",
"content":{
"_ref":{
"type":"playlist",
"id":"uuid"
},
"props":{
"duration":1000
}
}
},
{
"list_id":"uuid",
"content":{
"_ref":{
"type":"file",
"id":"uuid"
}
},
"rules":[
{
"day_of_week":{
"mon":true,
"tue":false,
"wed":false,
"thu":false,
"fri":false,
"sat":false,
"sun":false
},
"time":[
{
"start":"08:00",
"end":"12:00"
},
{
"start":"13:00",
"end":"18:30"
}
]
},
{
"day_of_week":{
"mon":true,
"tue":false,
"wed":false,
"thu":false,
"fri":false,
"sat":false,
"sun":false
},
"time":[
{
"start":"08:00",
"end":"12:00"
},
{
"start":"13:00",
"end":"18:30"
}
]
}
]
},
{
"list_id":"uuid",
"content":{
"_ref":{
"type":"file",
"id":"uuid"
}
},
"rules":[
{
"day_of_week":{
"mon":true,
"tue":false,
"wed":false,
"thu":false,
"fri":false,
"sat":false,
"sun":false
},
"time":[
{
"start":"08:00",
"end":"12:00"
},
{
"start":"13:00",
"end":"18:30"
}
]
},
{
"day_of_week":{
"mon":true,
"tue":false,
"wed":false,
"thu":false,
"fri":false,
"sat":false,
"sun":false
},
"time":[
{
"start":"08:00",
"end":"12:00"
},
{
"start":"13:00",
"end":"18:30"
}
]
}
]
}
]
}
}
}