Skip to content

Commit

Permalink
[PLAYER-5035] Add setting for skin in cast mode and schema for it.
Browse files Browse the repository at this point in the history
  • Loading branch information
atopilskii committed Mar 11, 2019
1 parent 30982d9 commit 106ce4d
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 6 deletions.
73 changes: 67 additions & 6 deletions skin-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "This JSON schema describes the base UI configuration for the Ooyala Player, which can be customized in the <a href=\"https://github.com/ooyala/skin-config.git\">skin.json</a> file. Also see <a href=\"https://facebook.github.io/react\">https://facebook.github.io/react</a> and <a href=\"https://facebook.github.io/react-native\">https://facebook.github.io/react-native</a>.",
"type": "object",
"additionalProperties": false,
"required": ["general", "startScreen", "pauseScreen", "endScreen", "upNext", "moreOptionsScreen", "discoveryScreen", "closedCaptionOptions", "icons", "buttons", "controlBar", "shareScreen", "localization"],
"required": ["general", "startScreen", "pauseScreen", "endScreen", "upNext", "moreOptionsScreen", "castDevicesScreen", "discoveryScreen", "closedCaptionOptions", "icons", "buttons", "controlBar", "shareScreen", "localization"],
"properties": {
"general": {
"description": "Configuration of things that do not appear in only one part of the UI.",
Expand Down Expand Up @@ -478,6 +478,20 @@
}
}
},
"castDevicesScreen": {
"description": "The Cast devices overflow panel. The set of items that shows list of available cast devices",
"type": "object",
"required": ["iconSize", "color"],
"additionalProperties": false,
"properties": {
"iconSize": {"type": "number"},
"color": {"$ref": "#/definitions/color"},
"iconStyle": {
"description": "Default color is white with an opacity of 1",
"$ref": "#/definitions/iconStyle"
}
}
},
"closedCaptionOptions": {
"description": "Settings regarding closed captioning.",
"type": "object",
Expand Down Expand Up @@ -603,17 +617,64 @@
}
}
},
"castControls": {
"description": "Toolbar for cast which contains buttons that allow skipping back or forward, switching to the previous or next videos in cast mode and show button to display cast devices",
"type": "object",
"required": [
"enabled",
"previousVideo",
"skipBackward",
"skipForward",
"nextVideo",
"buttons"
],
"properties": {
"enabled": {
"description": "Show the \"Cast button\" if set to true, hide if set to false.",
"type": "boolean"
},
"skipBackwardTime": {
"description": "An integer number ranging from 1 to 60. Controls the amount of seconds that the playhead moves when the \"Skip Backward\" button is clicked in cast mode.",
"type": "number",
"minimum": 1,
"maximum": 99
},
"skipForwardTime": {
"description": "An integer number ranging from 1 to 60. Controls the amount of seconds that the playhead moves when the \"Skip Forward\" button is clicked in cast mode.",
"type": "number",
"minimum": 1,
"maximum": 99
},
"buttons": {
"description": "The collection of buttons that can be displayed on the \"Cast Controls\" toolbar.",
"type": "object",
"properties": {
"previousVideo": {
"description": "Button that allows switching to the last video that was played or to the previous video in a playlist.",
"$ref": "#/definitions/skipControlsButton"
},
"skipBackward": {
"description": "Button that allows skipping the video backward the amount of seconds defined in \"skipBackwardTime\".",
"$ref": "#/definitions/skipControlsButton"
},
"skipForward": {
"description": "Button that allows skipping the video forward the amount of seconds defined in \"skipForwardTime\".",
"$ref": "#/definitions/skipControlsButton"
},
"nextVideo": {
"description": "Button that allows switching to the next video recommendation or to the next video in a playlist.",
"$ref": "#/definitions/skipControlsButton"
}
}
}
}
},
"controlBar": {
"description": "The playback control bar. Generally contains a play-pause button, scrubber control, etc. The set of items to show comes from the 'buttons' part of the schema.",
"type": "object",
"additionalProperties": false,
"required": [ "height", "autoHide", "logo" ],
"properties": {
"enabled": {
"description": "Show the control bar if set to true. Hide the control bar if set to false. Default is true.",
"type": "boolean",
"default": true
},
"volumeControl": {
"description": "Defines color of volume control in control bar.",
"type": "object",
Expand Down
33 changes: 33 additions & 0 deletions skin.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,39 @@
}
}
},
"castControls": {
"enabled": false,
"skipBackwardTime": 30,
"skipForwardTime": 30,
"buttons": {
"previousVideo": {
"enabled": true,
"index": 1
},
"skipBackward": {
"enabled": true,
"index": 2
},
"skipForward": {
"enabled": true,
"index": 3
},
"nextVideo": {
"enabled": true,
"index": 4
}
}
},
"castDevicesScreen": {
"iconStyle": {
"active": {
"color": "#3eb5f7"
},
"inactive": {
"color": "#FFFFFF"
}
}
},
"controlBar": {
"enabled": true,
"volumeControl": {
Expand Down

0 comments on commit 106ce4d

Please sign in to comment.