Version: 1.0
Status: :black_circle::black_circle::white_circle:
Cobalt plugin for Thunder framework.
This document describes purpose and functionality of the Cobalt plugin. It includes detailed specification about its configuration, methods and properties provided, as well as notifications sent.
All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.
The table below provides and overview of acronyms used in this document and their definitions.
| Acronym | Description |
|---|---|
| API | Application Programming Interface |
| HTTP | Hypertext Transfer Protocol |
| JSON | JavaScript Object Notation; a data interchange format |
| JSON-RPC | A remote procedure call protocol encoded in JSON |
The table below provides and overview of terms and abbreviations used in this document and their definitions.
| Term | Description |
|---|---|
| callsign | The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique. |
| Ref ID | Description |
|---|---|
| HTTP | HTTP specification |
| JSON-RPC | JSON-RPC 2.0 specification |
| JSON | JSON specification |
| Thunder | Thunder API Reference |
The Cobalt plugin provides web browsing functionality based on the Cobalt engine.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
| Name | Type | Description |
|---|---|---|
| callsign | string | Plugin instance name (default: Cobalt) |
| classname | string | Class name: Cobalt |
| locator | string | Library name: libWPEFrameworkCobalt.so |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
| configuration | object | (optional) |
| configuration?.url | string | (optional) The URL that is loaded upon starting the browser |
| configuration?.language | string | (optional) POSIX-style Language(Locale) ID. Example: ‘en_US’ |
| configuration?.preload | boolean | (optional) Enable pre-loading of application |
| configuration?.autosuspenddelay | number | (optional) Applicable when pre-loading. Number of seconds to wait before suspending the app |
| configuration?.gstdebug | string | (optional) Configure GST_DEBUG environment variable, default: ‘gstplayer:4,2’ |
| configuration?.closurepolicy | string | (optional) Configures how to handle window close request. Accepted values: [suspend, quit]. Default: ‘quit’ |
| configuration?.systemproperties | object | (optional) Configure some properties queried with Starboard System API |
| configuration?.systemproperties?.modelname | string | (optional) The production model number of the device |
| configuration?.systemproperties?.brandname | string | (optional) The name of the brand under which the device is being sold |
| configuration?.systemproperties?.modelyear | string | (optional) The year the device was launched |
| configuration?.systemproperties?.chipsetmodelnumber | string | (optional) The full model number of the main platform chipset |
| configuration?.systemproperties?.firmwareversion | string | (optional) The production firmware version number which the device is currently running |
| configuration?.systemproperties?.integratorname | string | (optional) The original manufacture of the device |
| configuration?.systemproperties?.friendlyname | string | (optional) A friendly name for this actual device |
| configuration?.systemproperties?.devicetype | string | (optional) The type of the device. (must be one of the following: SetTopBox, OverTheTopBox, TV) |
| configuration?.fireboltendpoint | string | (optional) A URL that specifies access point to Firebolt Riple. Should include session id in the query |
| configuration?.advertisingid | object | (optional) Configure Identifier For Advertising |
| configuration?.advertisingid?.ifa | string | (optional) Advertising ID or IFA |
| configuration?.advertisingid?.lmt | string | (optional) Limit advertising tracking, treated as boolean |
| configuration?.sbmainargs | array | (optional) A list of additional arguments to pass to StarboardMain |
| configuration?.sbmainargs[#] | string | (optional) |
This plugin implements the following interfaces:
The following methods are provided by the Cobalt plugin:
Cobalt interface methods:
| Method | Description |
|---|---|
| deeplink | Sends a deep link to the application |
Sends a deep link to the application.
No Events.
| Name | Type | Description |
|---|---|---|
| params | string | An application-specific link |
| Name | Type | Description |
|---|---|---|
| result | null |
{ "jsonrpc": "2.0", "id": 42, "method": "Cobalt.1.deeplink", "params": "..." }
{ "jsonrpc": "2.0", "id": 42, "result": null }
The following properties are provided by the Cobalt plugin:
StateControl interface properties:
| Property | Description |
|---|---|
| state | Running state of the service |
Accessibility interface properties:
| Property | Description |
|---|---|
| accessibility | Accessibility settings |
Provides access to the running state of the service.
Use this property to return the running state of the service.
| Event | Description |
|---|---|
statechange | Triggered if the state of the service changed. |
Also see: statechange
| Name | Type | Description |
|---|---|---|
| (property) | string | Running state of the service (must be one of the following: resumed, suspended) |
{ "jsonrpc": "2.0", "id": 42, "method": "Cobalt.1.state" }
{ "jsonrpc": "2.0", "id": 42, "result": "resumed" }
{ "jsonrpc": "2.0", "id": 42, "method": "Cobalt.1.state", "params": "resumed" }
{ "jsonrpc": "2.0", "id": 42, "result": "null" }
Provides access to the accessibility settings.
| Name | Type | Description |
|---|---|---|
| (property) | object | Accessibility settings |
| (property)?.closedcaptions | object | (optional) The platform settings for closed captions |
| (property)?.closedcaptions.isenabled | boolean | Determines if the user has chosen to enable closed captions on their system |
| (property)?.closedcaptions?.backgroundcolor | string | (optional) The closed captioning color. (must be one of the following: Blue, Black, Cyan, Green, Magenta, Red, White, Yellow) |
| (property)?.closedcaptions?.backgroundopacity | string | (optional) The closed captioning opacity percentages. (must be one of the following: 0, 25, 50, 75, 100) |
| (property)?.closedcaptions?.characteredgestyle | string | (optional) The closed captioning character edge style. (must be one of the following: None, Raised, Depressed, Uniform, DropShadow) |
| (property)?.closedcaptions?.fontcolor | string | (optional) The closed captioning color. (must be one of the following: Blue, Black, Cyan, Green, Magenta, Red, White, Yellow) |
| (property)?.closedcaptions?.fontfamily | string | (optional) The closed captioning font family. (must be one of the following: Casual, Cursive, MonospaceSansSerif, MonospaceSerif, ProportionalSansSerif, ProportionalSerif, SmallCapitals) |
| (property)?.closedcaptions?.fontopacity | string | (optional) The closed captioning opacity percentages. (must be one of the following: 0, 25, 50, 75, 100) |
| (property)?.closedcaptions?.fontsize | string | (optional) The closed captioning font size percentages. (must be one of the following: 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300) |
| (property)?.closedcaptions?.windowcolor | string | (optional) The closed captioning color. (must be one of the following: Blue, Black, Cyan, Green, Magenta, Red, White, Yellow) |
| (property)?.closedcaptions?.windowopacity | string | (optional) The closed captioning opacity percentages. (must be one of the following: 0, 25, 50, 75, 100) |
| (property)?.textdisplay | object | (optional) Text display settings |
| (property)?.textdisplay.ishighcontrasttextenabled | boolean | Whether the high contrast text setting is enabled or not |
{ "jsonrpc": "2.0", "id": 42, "method": "Cobalt.1.accessibility" }
{ "jsonrpc": "2.0", "id": 42, "result": { "closedcaptions": { "isenabled": false, "backgroundcolor": "Blue", "backgroundopacity": "0", "characteredgestyle": "None", "fontcolor": "Blue", "fontfamily": "Casual", "fontopacity": "0", "fontsize": "25", "windowcolor": "Blue", "windowopacity": "0" }, "textdisplay": { "ishighcontrasttextenabled": false } } }
{ "jsonrpc": "2.0", "id": 42, "method": "Cobalt.1.accessibility", "params": { "closedcaptions": { "isenabled": false, "backgroundcolor": "Blue", "backgroundopacity": "0", "characteredgestyle": "None", "fontcolor": "Blue", "fontfamily": "Casual", "fontopacity": "0", "fontsize": "25", "windowcolor": "Blue", "windowopacity": "0" }, "textdisplay": { "ishighcontrasttextenabled": false } } }
{ "jsonrpc": "2.0", "id": 42, "result": "null" }
Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.
The following events are provided by the Cobalt plugin:
Cobalt interface events:
| Event | Description |
|---|---|
| closure | Triggered when the application requests to close its window |
StateControl interface events:
| Event | Description |
|---|---|
| statechange | Signals a state change of the service |
Triggered when the application requests to close its window.
This event carries no parameters.
{ "jsonrpc": "2.0", "method": "client.events.1.closure" }
Signals a state change of the service.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.suspended | boolean | Determines if the service has entered suspended state (true) or resumed state (false) |
{ "jsonrpc": "2.0", "method": "client.events.1.statechange", "params": { "suspended": false } }