diff --git a/.releaserc b/.releaserc index c5635fd72..80e12f9ea 100644 --- a/.releaserc +++ b/.releaserc @@ -45,7 +45,7 @@ [ "@semantic-release/git", { - "assets": ["CHANGELOG.md", "package.json", "package-lock.json", "npm-shrinkwrap.json", "src/sdks/core/package.json", "src/sdks/manage/package.json"] + "assets": ["CHANGELOG.md", "package.json", "package-lock.json", "npm-shrinkwrap.json", "src/sdks/core/package.json", "src/sdks/manage/package.json", "src/sdks/discovery/package.json"] } ], [ diff --git a/CHANGELOG.md b/CHANGELOG.md index ca266e76a..0d2e21fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,125 @@ +# [1.2.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-17) + + +### Bug Fixes + +* Add discovery to semantic-release ([#282](https://github.com/rdkcentral/firebolt-apis/issues/282)) ([7966bd3](https://github.com/rdkcentral/firebolt-apis/commit/7966bd34f7a5cdfa4d65c6a5e0e304ee777925c5)) +* Add PlaylistEntity to EntityIntent ([9769d6d](https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* CHANGELOG formatting for Core SDK ([de051a4](https://github.com/rdkcentral/firebolt-apis/commit/de051a427ec4e9b287efd0c8b64d53e656539343)) +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version ([#231](https://github.com/rdkcentral/firebolt-apis/issues/231)) ([ef3de3e](https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) +* Update CHANGELOG.md ([85e6ccb](https://github.com/rdkcentral/firebolt-apis/commit/85e6ccb0f6d4f73a5a244a9914a78c2afc3e04aa)) + + +### Features + +* CI/CD docs (next-major) and merges (next-major/main) ([#245](https://github.com/rdkcentral/firebolt-apis/issues/245)) ([49ab03d](https://github.com/rdkcentral/firebolt-apis/commit/49ab03db9986b27dafd279fcc6121abe447784dc)) +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* Firebolt CPP SDKs ([5ea5d4e](https://github.com/rdkcentral/firebolt-apis/commit/5ea5d4e2f486a7bc3861955cd98323fc2c26cce1)), closes [#189](https://github.com/rdkcentral/firebolt-apis/issues/189) [#190](https://github.com/rdkcentral/firebolt-apis/issues/190) [#191](https://github.com/rdkcentral/firebolt-apis/issues/191) [#192](https://github.com/rdkcentral/firebolt-apis/issues/192) [#205](https://github.com/rdkcentral/firebolt-apis/issues/205) [#209](https://github.com/rdkcentral/firebolt-apis/issues/209) [#218](https://github.com/rdkcentral/firebolt-apis/issues/218) [#222](https://github.com/rdkcentral/firebolt-apis/issues/222) [#228](https://github.com/rdkcentral/firebolt-apis/issues/228) [#230](https://github.com/rdkcentral/firebolt-apis/issues/230) [#237](https://github.com/rdkcentral/firebolt-apis/issues/237) [#238](https://github.com/rdkcentral/firebolt-apis/issues/238) [#249](https://github.com/rdkcentral/firebolt-apis/issues/249) +* Updated CHANGELOGS for SDKs for version 1.2.0 ([b20b38d](https://github.com/rdkcentral/firebolt-apis/commit/b20b38db5bd59efb7c31c562ba00666161dbf783)) +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.2.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-17) + + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent ([9769d6d](https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* CHANGELOG formatting for Core SDK ([de051a4](https://github.com/rdkcentral/firebolt-apis/commit/de051a427ec4e9b287efd0c8b64d53e656539343)) +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version ([#231](https://github.com/rdkcentral/firebolt-apis/issues/231)) ([ef3de3e](https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) +* Update CHANGELOG.md ([85e6ccb](https://github.com/rdkcentral/firebolt-apis/commit/85e6ccb0f6d4f73a5a244a9914a78c2afc3e04aa)) + + +### Features + +* CI/CD docs (next-major) and merges (next-major/main) ([#245](https://github.com/rdkcentral/firebolt-apis/issues/245)) ([49ab03d](https://github.com/rdkcentral/firebolt-apis/commit/49ab03db9986b27dafd279fcc6121abe447784dc)) +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* Firebolt CPP SDKs ([5ea5d4e](https://github.com/rdkcentral/firebolt-apis/commit/5ea5d4e2f486a7bc3861955cd98323fc2c26cce1)), closes [#189](https://github.com/rdkcentral/firebolt-apis/issues/189) [#190](https://github.com/rdkcentral/firebolt-apis/issues/190) [#191](https://github.com/rdkcentral/firebolt-apis/issues/191) [#192](https://github.com/rdkcentral/firebolt-apis/issues/192) [#205](https://github.com/rdkcentral/firebolt-apis/issues/205) [#209](https://github.com/rdkcentral/firebolt-apis/issues/209) [#218](https://github.com/rdkcentral/firebolt-apis/issues/218) [#222](https://github.com/rdkcentral/firebolt-apis/issues/222) [#228](https://github.com/rdkcentral/firebolt-apis/issues/228) [#230](https://github.com/rdkcentral/firebolt-apis/issues/230) [#237](https://github.com/rdkcentral/firebolt-apis/issues/237) [#238](https://github.com/rdkcentral/firebolt-apis/issues/238) [#249](https://github.com/rdkcentral/firebolt-apis/issues/249) +* Updated CHANGELOGS for SDKs for version 1.2.0 ([b20b38d](https://github.com/rdkcentral/firebolt-apis/commit/b20b38db5bd59efb7c31c562ba00666161dbf783)) +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.2.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-17) + + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent ([9769d6d](https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* CHANGELOG formatting for Core SDK ([de051a4](https://github.com/rdkcentral/firebolt-apis/commit/de051a427ec4e9b287efd0c8b64d53e656539343)) +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version ([#231](https://github.com/rdkcentral/firebolt-apis/issues/231)) ([ef3de3e](https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) +* Update CHANGELOG.md ([85e6ccb](https://github.com/rdkcentral/firebolt-apis/commit/85e6ccb0f6d4f73a5a244a9914a78c2afc3e04aa)) + + +### Features + +* CI/CD docs (next-major) and merges (next-major/main) ([#245](https://github.com/rdkcentral/firebolt-apis/issues/245)) ([49ab03d](https://github.com/rdkcentral/firebolt-apis/commit/49ab03db9986b27dafd279fcc6121abe447784dc)) +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* Firebolt CPP SDKs ([5ea5d4e](https://github.com/rdkcentral/firebolt-apis/commit/5ea5d4e2f486a7bc3861955cd98323fc2c26cce1)), closes [#189](https://github.com/rdkcentral/firebolt-apis/issues/189) [#190](https://github.com/rdkcentral/firebolt-apis/issues/190) [#191](https://github.com/rdkcentral/firebolt-apis/issues/191) [#192](https://github.com/rdkcentral/firebolt-apis/issues/192) [#205](https://github.com/rdkcentral/firebolt-apis/issues/205) [#209](https://github.com/rdkcentral/firebolt-apis/issues/209) [#218](https://github.com/rdkcentral/firebolt-apis/issues/218) [#222](https://github.com/rdkcentral/firebolt-apis/issues/222) [#228](https://github.com/rdkcentral/firebolt-apis/issues/228) [#230](https://github.com/rdkcentral/firebolt-apis/issues/230) [#237](https://github.com/rdkcentral/firebolt-apis/issues/237) [#238](https://github.com/rdkcentral/firebolt-apis/issues/238) [#249](https://github.com/rdkcentral/firebolt-apis/issues/249) +* Updated CHANGELOGS for SDKs for version 1.2.0 ([b20b38d](https://github.com/rdkcentral/firebolt-apis/commit/b20b38db5bd59efb7c31c562ba00666161dbf783)) +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.2.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent ([9769d6d](https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* CHANGELOG formatting for Core SDK ([de051a4](https://github.com/rdkcentral/firebolt-apis/commit/de051a427ec4e9b287efd0c8b64d53e656539343)) +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version ([#231](https://github.com/rdkcentral/firebolt-apis/issues/231)) ([ef3de3e](https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) +* Update CHANGELOG.md ([85e6ccb](https://github.com/rdkcentral/firebolt-apis/commit/85e6ccb0f6d4f73a5a244a9914a78c2afc3e04aa)) + + +### Features + +* CI/CD docs (next-major) and merges (next-major/main) ([#245](https://github.com/rdkcentral/firebolt-apis/issues/245)) ([49ab03d](https://github.com/rdkcentral/firebolt-apis/commit/49ab03db9986b27dafd279fcc6121abe447784dc)) +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* Firebolt CPP SDKs ([5ea5d4e](https://github.com/rdkcentral/firebolt-apis/commit/5ea5d4e2f486a7bc3861955cd98323fc2c26cce1)), closes [#189](https://github.com/rdkcentral/firebolt-apis/issues/189) [#190](https://github.com/rdkcentral/firebolt-apis/issues/190) [#191](https://github.com/rdkcentral/firebolt-apis/issues/191) [#192](https://github.com/rdkcentral/firebolt-apis/issues/192) [#205](https://github.com/rdkcentral/firebolt-apis/issues/205) [#209](https://github.com/rdkcentral/firebolt-apis/issues/209) [#218](https://github.com/rdkcentral/firebolt-apis/issues/218) [#222](https://github.com/rdkcentral/firebolt-apis/issues/222) [#228](https://github.com/rdkcentral/firebolt-apis/issues/228) [#230](https://github.com/rdkcentral/firebolt-apis/issues/230) [#237](https://github.com/rdkcentral/firebolt-apis/issues/237) [#238](https://github.com/rdkcentral/firebolt-apis/issues/238) [#249](https://github.com/rdkcentral/firebolt-apis/issues/249) +* Updated CHANGELOGS for SDKs for version 1.2.0 ([b20b38d](https://github.com/rdkcentral/firebolt-apis/commit/b20b38db5bd59efb7c31c562ba00666161dbf783)) +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.2.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent ([9769d6d](https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* CHANGELOG formatting for Core SDK ([de051a4](https://github.com/rdkcentral/firebolt-apis/commit/de051a427ec4e9b287efd0c8b64d53e656539343)) +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version ([#231](https://github.com/rdkcentral/firebolt-apis/issues/231)) ([ef3de3e](https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) +* Update CHANGELOG.md ([85e6ccb](https://github.com/rdkcentral/firebolt-apis/commit/85e6ccb0f6d4f73a5a244a9914a78c2afc3e04aa)) + + +### Features + +* CI/CD docs (next-major) and merges (next-major/main) ([#245](https://github.com/rdkcentral/firebolt-apis/issues/245)) ([49ab03d](https://github.com/rdkcentral/firebolt-apis/commit/49ab03db9986b27dafd279fcc6121abe447784dc)) +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* Firebolt CPP SDKs ([5ea5d4e](https://github.com/rdkcentral/firebolt-apis/commit/5ea5d4e2f486a7bc3861955cd98323fc2c26cce1)), closes [#189](https://github.com/rdkcentral/firebolt-apis/issues/189) [#190](https://github.com/rdkcentral/firebolt-apis/issues/190) [#191](https://github.com/rdkcentral/firebolt-apis/issues/191) [#192](https://github.com/rdkcentral/firebolt-apis/issues/192) [#205](https://github.com/rdkcentral/firebolt-apis/issues/205) [#209](https://github.com/rdkcentral/firebolt-apis/issues/209) [#218](https://github.com/rdkcentral/firebolt-apis/issues/218) [#222](https://github.com/rdkcentral/firebolt-apis/issues/222) [#228](https://github.com/rdkcentral/firebolt-apis/issues/228) [#230](https://github.com/rdkcentral/firebolt-apis/issues/230) [#237](https://github.com/rdkcentral/firebolt-apis/issues/237) [#238](https://github.com/rdkcentral/firebolt-apis/issues/238) [#249](https://github.com/rdkcentral/firebolt-apis/issues/249) +* Updated CHANGELOGS for SDKs for version 1.2.0 ([b20b38d](https://github.com/rdkcentral/firebolt-apis/commit/b20b38db5bd59efb7c31c562ba00666161dbf783)) +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + +# [1.2.0-next.5](https://github.com/rdkcentral/firebolt-apis/compare/v1.2.0-next.4...v1.2.0-next.5) (2024-06-13) + + +### Bug Fixes + +* Remove x-alternatives that don't exist ([#278](https://github.com/rdkcentral/firebolt-apis/issues/278)) ([e38ad5a](https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) + +# [1.2.0-next.4](https://github.com/rdkcentral/firebolt-apis/compare/v1.2.0-next.3...v1.2.0-next.4) (2024-06-06) + + +### Features + +* Command and Control Intents ([#251](https://github.com/rdkcentral/firebolt-apis/issues/251)) ([c8f8dae](https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) + +# [1.2.0-next.3](https://github.com/rdkcentral/firebolt-apis/compare/v1.2.0-next.2...v1.2.0-next.3) (2024-06-06) + + +### Features + +* User Interest ([#170](https://github.com/rdkcentral/firebolt-apis/issues/170)) ([48a1094](https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + # [1.2.0-next.2](https://github.com/rdkcentral/firebolt-apis/compare/v1.2.0-next.1...v1.2.0-next.2) (2024-04-08) diff --git a/package-lock.json b/package-lock.json index 516e7ca76..74777de8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "@firebolt-js/sdks", - "version": "1.2.0-next.2", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@firebolt-js/sdks", - "version": "1.2.0-next.2", + "version": "1.2.0", "license": "Apache-2.0", "workspaces": [ "src/sdks/core", - "src/sdks/manage" + "src/sdks/manage", + "src/sdks/discovery" ], "bin": { "firebolt-version": "src/js/version.mjs" @@ -986,13 +987,17 @@ "node": ">=8" } }, + "node_modules/@firebolt-js/discovery-sdk": { + "resolved": "src/sdks/discovery", + "link": true + }, "node_modules/@firebolt-js/manage-sdk": { "resolved": "src/sdks/manage", "link": true }, "node_modules/@firebolt-js/openrpc": { - "version": "2.1.0", - "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#c36a4deff28ac0326823d2ff322b7f70c2e01ff0", + "version": "3.0.0-next.3", + "resolved": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#8b16ad59d86936e21a0a7ad64bd9cb6e674ffc8a", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1019,15 +1024,15 @@ "dev": true }, "node_modules/@firebolt-js/openrpc/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" }, "funding": { "type": "github", @@ -16916,7 +16921,7 @@ }, "src/sdks/core": { "name": "@firebolt-js/sdk", - "version": "1.2.0-next.2", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", @@ -16927,18 +16932,18 @@ }, "src/sdks/discovery": { "name": "@firebolt-js/discovery-sdk", - "version": "0.11.0-one-repository.1", - "extraneous": true, + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", "typescript": "^4.6.4" } }, "src/sdks/manage": { "name": "@firebolt-js/manage-sdk", - "version": "1.2.0-next.2", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", @@ -17687,6 +17692,15 @@ } } }, + "@firebolt-js/discovery-sdk": { + "version": "file:src/sdks/discovery", + "requires": { + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", + "typescript": "^4.6.4" + } + }, "@firebolt-js/manage-sdk": { "version": "file:src/sdks/manage", "requires": { @@ -17697,7 +17711,7 @@ } }, "@firebolt-js/openrpc": { - "version": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#c36a4deff28ac0326823d2ff322b7f70c2e01ff0", + "version": "git+ssh://git@github.com/rdkcentral/firebolt-openrpc.git#8b16ad59d86936e21a0a7ad64bd9cb6e674ffc8a", "dev": true, "from": "@firebolt-js/openrpc@rdkcentral/firebolt-openrpc#cpp-media-info-test", "requires": { @@ -17721,15 +17735,15 @@ "dev": true }, "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "uri-js": "^4.4.1" } }, "fs-extra": { diff --git a/package.json b/package.json index 6e375a897..7e7fadcb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdks", - "version": "1.2.0-next.2", + "version": "1.2.0", "description": "The Firebolt JS SDK", "type": "module", "bin": { @@ -8,14 +8,15 @@ }, "workspaces": [ "src/sdks/core", - "src/sdks/manage" + "src/sdks/manage", + "src/sdks/discovery" ], "scripts": { "fs:setup": "npm run clean && mkdir -p dist", - "validate:each": "npx firebolt-openrpc validate --input src/openrpc --schemas node_modules/@firebolt-js/schemas/src/schemas --schemas src/schemas --transformations", - "validate:compiled": "npx firebolt-openrpc validate --input dist/firebolt-open-rpc.json && npm run validate --workspaces", + "validate:each": "npx firebolt-openrpc validate --input src/openrpc --schemas src/schemas --transformations", + "validate:compiled": "npx firebolt-openrpc validate --input dist/firebolt-open-rpc.json --pass-throughs && npm run validate --workspaces", "validate": "npm run validate:each && npm run validate:compiled ", - "compile": "npx firebolt-openrpc openrpc --input src --template src/template/openrpc/template.json --output ./dist/firebolt-open-rpc.json --schemas node_modules/@firebolt-js/schemas/src/schemas --schemas src/schemas", + "compile": "npx firebolt-openrpc openrpc --input src --template src/template/openrpc/template.json --output ./dist/firebolt-open-rpc.json --schemas src/schemas", "slice": "npm run slice --workspaces", "sdks": "npm run sdk --workspaces", "docs": "npm run docs --workspaces", @@ -24,6 +25,7 @@ "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "clean": "rm -rf dist && npm run clean --workspaces", "dist": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run test", + "dist:light": "npm run fs:setup && npm run validate:each && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces", "specification": "node ./src/js/version-specification/index.mjs --source ./src/json/firebolt-specification.json", "specification:report": "node ./src/js/version-specification/index.mjs --source ./dist/firebolt-specification.json --report", "version": "node ./src/js/version.mjs sync", diff --git a/requirements/images/specifications/general/capabilities/image1.png b/requirements/images/specifications/general/capabilities/image1.png new file mode 100644 index 000000000..049fc70bf Binary files /dev/null and b/requirements/images/specifications/general/capabilities/image1.png differ diff --git a/requirements/images/specifications/general/capabilities/image2.png b/requirements/images/specifications/general/capabilities/image2.png new file mode 100644 index 000000000..7c0c10f7c Binary files /dev/null and b/requirements/images/specifications/general/capabilities/image2.png differ diff --git a/requirements/images/specifications/general/capabilities/image4.png b/requirements/images/specifications/general/capabilities/image4.png new file mode 100644 index 000000000..641c26847 Binary files /dev/null and b/requirements/images/specifications/general/capabilities/image4.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image1.png b/requirements/images/specifications/general/capabilities/user-grants/image1.png new file mode 100644 index 000000000..c836daebf Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image1.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image2.png b/requirements/images/specifications/general/capabilities/user-grants/image2.png new file mode 100644 index 000000000..bc0c978ea Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image2.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image3.png b/requirements/images/specifications/general/capabilities/user-grants/image3.png new file mode 100644 index 000000000..96d73b0ab Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image3.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image4.png b/requirements/images/specifications/general/capabilities/user-grants/image4.png new file mode 100644 index 000000000..0c9246bce Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image4.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image5.png b/requirements/images/specifications/general/capabilities/user-grants/image5.png new file mode 100644 index 000000000..26c583d2d Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image5.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image6.png b/requirements/images/specifications/general/capabilities/user-grants/image6.png new file mode 100644 index 000000000..4761e5ea4 Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image6.png differ diff --git a/requirements/images/specifications/general/capabilities/user-grants/image7.png b/requirements/images/specifications/general/capabilities/user-grants/image7.png new file mode 100644 index 000000000..0b09b1b76 Binary files /dev/null and b/requirements/images/specifications/general/capabilities/user-grants/image7.png differ diff --git a/requirements/images/specifications/intents/user-interest/media/image1.png b/requirements/images/specifications/intents/user-interest/media/image1.png new file mode 100644 index 000000000..b0171a9a4 Binary files /dev/null and b/requirements/images/specifications/intents/user-interest/media/image1.png differ diff --git a/requirements/images/specifications/intents/user-interest/media/image2.png b/requirements/images/specifications/intents/user-interest/media/image2.png new file mode 100644 index 000000000..94102a60f Binary files /dev/null and b/requirements/images/specifications/intents/user-interest/media/image2.png differ diff --git a/requirements/images/specifications/intents/user-interest/media/image3.png b/requirements/images/specifications/intents/user-interest/media/image3.png new file mode 100644 index 000000000..c7ddb6405 Binary files /dev/null and b/requirements/images/specifications/intents/user-interest/media/image3.png differ diff --git a/requirements/images/specifications/intents/user-interest/media/image4.png b/requirements/images/specifications/intents/user-interest/media/image4.png new file mode 100644 index 000000000..6a15fe0c6 Binary files /dev/null and b/requirements/images/specifications/intents/user-interest/media/image4.png differ diff --git a/requirements/specifications/discovery/user-interest.md b/requirements/specifications/discovery/user-interest.md new file mode 100644 index 000000000..f53e239ba --- /dev/null +++ b/requirements/specifications/discovery/user-interest.md @@ -0,0 +1,361 @@ +# User Interest + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Eugene Chung | Comcast | +| Tim Dibben | Sky | +| Mike Horwitz | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview + +In additional to traditional discovery APIs such as Watch History and +Watch Next, Firebolt provides a more abstract API that facilitates +impromptu content discovery connections between first-party Aggregated +Experiences and third-party Apps. + +The User Interest Capability enables Apps to provide meta-data on +content that the user has expressed an interest in to Aggregated +Experience Apps that have been given access to use this Capability. + +This allows for open ended design of Aggregated Experience App features +that present App-specific content to re-engage the user with the content +inside the originating App. + +While the functionality and UX is left to the Aggregated Experience App, +typically designed by each Firebolt Distributor, the Firebolt API +enables events to register user interest and pass entity meta-data: + +![Diagram Description automatically +generated](../../../requirements/images/specifications/intents/user-interest/media/image1.png) + +Which generally enables Aggregated Experiences to present that entity +meta-data in some way that leads to re-launching the original App at a +later point, using a `navigateTo` notification: + +![Diagram Description automatically +generated](../../../requirements/images/specifications/intents/user-interest/media/image2.png) + +This is just one example of what an Aggregated Experience App might do +with the User Interest API. + +Note that this API **SHOULD NOT** be used to implement Watch History or +Watch Next features. These concepts are much more fundamental to +Firebolt and have explicit APIs so that Firebolt Distributors can keep +track of which apps are using them separately. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. User Interest Flows](#3-user-interest-flows) + - [3.1. User Interest from an in-app UX](#31-user-interest-from-an-in-app-ux) + - [3.2. User Interest from a platform UX](#32-user-interest-from-a-platform-ux) + - [User Interest Errors](#user-interest-errors) + - [3.3. Upstream User Interest Intent](#33-upstream-user-interest-intent) + - [3.4. User Interest Bulk Updates](#34-user-interest-bulk-updates) +- [4. Core SDK APIs](#4-core-sdk-apis) + - [4.1. InterestType](#41-interesttype) + - [4.2. InterestReason](#42-interestreason) + - [4.3. Discovery.userInterest](#43-discoveryuserinterest) + - [4.4. Discovery Interest Provider](#44-discovery-interest-provider) + - [4.5. InterestIntent](#45-interestintent) +- [5. Discovery SDK APIs](#5-discovery-sdk-apis) + - [5.1. Interest Types](#51-interest-types) + - [5.2. Content.requestUserInterest](#52-contentrequestuserinterest) + - [5.3. Content.onUserInterest](#53-contentonuserinterest) + + +## 3. User Interest Flows +### 3.1. User Interest from an in-app UX + +Some Apps will have a built-in user interface for users to express +interest in content from the App. This could be a "Favorite" button, +an in-app "My List" button, etc. + +If the App wants to leverage any additional exposure from the device's +Aggregated Experience, it can wire up its own UI to the Firebolt User +Interest API, in addition to any in-app features that it's already +invoking. + +By calling the `Discovery.userInterest` method with the relevant entity +meta-data, the device's Aggregated Experience will be notified of the +user's interest in that entity: + +```typescript +Discovery.userInterest(type: InterestType, reason: InterestReason, entity: EntityDetails) +``` + +The `type` parameter denotes the directionality of the interest: + +- `interest` +- `disinterest` + +The `reason` parameter denotes why or how the user has expressed interest: + +| Reason | Description | +| ------ | ----------- | +| `playlist` | Interested in adding to a list | +| `reaction` | Interested in submitting a reaction, e.g. like or dislike | +| `recording` | Interest in scheduling a recording | +| `share` | Interest in sharing the content on social media | + +**NOTE**: We can remove some of these (not `playlist`) these are here for now to illustrate the purpose for the reason paramater. + +An app **MUST** `provide` the `xrn:firebolt:capability:discovery:interest` +capability in order to call `Discovery.userInterest`. + +When this method is called with a valid `EntityDetails`, the platform +**MUST** dispatch a `Content.onUserInterest` notification to all Apps +that have registered for it (typically Aggregated Experience Apps) with +information about the app, interest type, and the entity. + +The `Content.onUserInterest` event has a result type of `Interest`: + +| property | type | description | +|---------|------|-------------| +| appId | string | The id of the app that pushed the user interest. | +| type | `InterestType` | the type of interest. | +| reason | `InterestReason` | the reason for the interest | +| entity | `EntityDetails` | The entity the user expressed interest in. | + +An Aggregated Experience can register for the `Content.onUserInterest` +notification, and it will receive notifications when an `EntityDetails` is +returned from the active App after a `Discovery.userInterest` call is +fulfilled. + +An app **MUST** have permissions to `use` the +`xrn:firebolt:capability:discovery:interest` capability in order to +listen to the `Content.onUserInterest` notification. + +If the result is not a valid entity, i.e. does not match +the [EntityDetails](../entities/) schema, then no `Content.onUserInterest` +notification will be dispatched. + +The `Discovery.userInterest` method **SHOULD NOT** be used in place of more +specific Discovery methods, e.g. `Discovery.watchNext` or +`Discovery.watched`. These methods facilitate specific UX flows that may +have separate legal opt-outs for each user. + +The `Discovery.userInterest` method **SHOULD NOT** be called unless the user +is activating a UI element in the app, or in a second screen experience +that is communicating with the app, that implies interest of some kind. + +### 3.2. User Interest from a platform UX + +Firebolt platforms may provide a platform UX, e.g. voice or and RCU, to +express user interest in content from an active App. To facilitate this +Apps will need to be told about the user's expressed interest in their +content. + +First, the Aggregated Experience (or some app with this +capability) detects that the user is interested in something. In this +picture the interest is triggered by an RCU button, but how this occurs +is outside the scope of this document. When this happens, the Aggregated +Experience app calls `Content.requestUserInterest()`, which will trigger the +platform to identify the best [Provider Candidate](../openrpc-extensions/app-passthrough-apis.md#5-provider-candidates) +and call that app's `userInterest` method via the Provider RPC method: +`Discovery.onRequestUserInterest`. + +![](../../../requirements/images/specifications/intents/user-interest/media/image3.png) + +Next, the provider app receives and responds to the request with an +EntityDetails, which is returned as the result to the pending +`Content.requestUserInterest` method: + +![](../../../requirements/images/specifications/intents/user-interest/media/image4.png) + +Once an App's callback is invoked, that app will have `interestTimeout` +milliseconds to return a value or throw an error. Values returned after +that time **MUST** be ignored. The timeout value is stored in the +device's configuration manifest. + +To be notified when a user expresses interest in the currently displayed +content, an App **MUST** provide the +`xrn:firebolt:capability:discovery:interest` capability by enabling the +`Discovery.onRequestUserInterest` notification. + +If there is a valid entity to return, then the method registered by the +App **MUST** return the currently displayed entity meta-data. + +If there is no valid entity to return, then the method **MUST** throw an +exception. + +If the provider app returns a valid `EntityDetails` before the timeout, +then, the returned value **MUST** be used. + +If there is no app registered the an error **MUST** be returned. + +#### User Interest Errors +An app is expected return either a valid result or an appriate error. + +If neither happens before `interestTimeout` expires then the platform **MUST** return a Provider timed-out error: + +```json +{ + "id": 1, + "error": { + "code": -50400, + "message": "Provider timed-out", + "data": { + "capability": "xrn:firebolt:capability:discovery:interest", + } + } +} +``` + +If an app recieves a request for user interest when there is nothing appropriate to return, e.g. nothing selected or presented that maps to an Entity, then the app **SHOULD** return an error with a valid JSON-RPC error response, e.g.: + +```json +{ + "id": 1, + "error": { + "code": -40400, + "message": "No entities currently presented." + } +} +``` + +The platform API Gateway **MUST** append, or overwrite, the `data.capability` value to any errors returned by the app, e.g.: + +```json +{ + "id": 1, + "error": { + "code": -40400, + "message": "No entities currently presented.", + "data": { + "capability": "xrn:firebolt:capability:discovery:interest", + } + } +} +``` + +### 3.3. Upstream User Interest Intent +In some cases, e.g. a voice assistant, some upstream component will inform +the platform that the user is interested in whatever is currently being presented. + +To do this, the upstream system **MUST** send a `Interest` intent, which describes the type of and reason for the interest. + +```json +{ + "action": "interest", + "data": { + "type": "interest", + "reason": "playlist" + } +} +``` + +When a Firebolt platform receives this intent, it **SHOULD** initiate the platform's [user interest flow](#4-user-interest-from-a-platform-ux). + +### 3.4. User Interest Bulk Updates + +Sending bulk interest updates, e.g. Entities the user expressed interest +in on a different platform, is not supported. + +## 4. Core SDK APIs + +The following APIs are exposed by the Firebolt Core SDK as part of the +`Discovery` module. + +### 4.1. InterestType +This is an enum with the following values: + +- `"interest"` +- `"disinterest"` + +### 4.2. InterestReason +This is an enum with the following values: + +| Reason | Description | +| ------ | ----------- | +| `playlist` | Interested in adding to a list | +| `reaction` | Interested in submitting a reaction, e.g. like or dislike | +| `recording` | Interest in scheduling a recording | +| `share` | Interest in sharing the content on social media | + +### 4.3. Discovery.userInterest + +This is a push API that allows Apps to push entities that the user has +expressed interest in to the platform. + +To push an entity that the user is interested in pass an `EntityDetails` +object to the method: + +```typescript +Discovery.userInterest(type: InterestType, reason: InterestReason, entity: EntityDetails): Promise +``` + +### 4.4. Discovery Interest Provider +To respond to requests for the current entity, because the user has +expressed interest in some way that the platform manages, register a +provider: + +```typescript +interface IDiscoveryInterestProvider { + function userInterest(type: InterestType, reason: InterestReason): Promise +} + +Discovery.provide("xrn:firbolt:capability:discovery:interest", IDiscoveryInterestProvider) +``` + +### 4.5. InterestIntent + +An `InterestIntent` denotes that the user has expressed interest in the +currently displayed and/or selected content: + +```typescript +type InterestIntent { + action: "interest" + data: { + type: "interest" | "disinterest", + reason: "playlist" | "reaction" | "recording" + }, + context: { + source: "rcu" | "voice" + } +} +``` + +## 5. Discovery SDK APIs + +The following APIs are exposed by the Firebolt Discovery SDK as part of the +`Content` module. + +### 5.1. Interest Types +This type stores the various attributes of an Interest response or event: + +```typescript +type InterestType = "interest" | "disinterest" +type InterestReason = "playlist" | "reaction" | "recording" | "share" + +type Interest { + appId: string + entity: EntityDetails + type?: InterestType + reason?: InterestReason +} +``` + +### 5.2. Content.requestUserInterest +This method triggers the corresponding Discovery provider API for the +provider app. + +```typescript +Content.requestUserInterest(type: InterestType, reason: InterestReason): Promise +``` + +### 5.3. Content.onUserInterest + +This notification allows Aggregated Experience Apps to be informed when +a user expresses interest in some Content, and the content resolves to a +valid Entity from some App. + +`Content.listen('userInterest', Interest => void): Promise` + +The callback will be passed an `Interest` object with +the appId, type, reason, and information about the entity that the user expressed interest in. diff --git a/requirements/specifications/general/capabilities/capabilities.md b/requirements/specifications/general/capabilities/capabilities.md new file mode 100644 index 000000000..30430ec06 --- /dev/null +++ b/requirements/specifications/general/capabilities/capabilities.md @@ -0,0 +1,660 @@ +# Capabilities + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Andrew Bennett | Sky | +| Tim Dibben | Sky | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Peter Yu | Comcast | + +## 1. Overview + +This document introduces Firebolt Capabilities, which enable discovery +of supported features, negotiation of App permissions, and end-user +grants for Apps to access sensitive features. + +Apps can detect if Capabilities are supported and available. If so, Apps +can **Use**, **Provide**, or **Manage** capabilities that they are given +access to. + +The most common case is for an App to `use` a Capability, the platform +to `provide` it, and the Distributor\'s Settings App to `manage` it: + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/image1.png) + +However, Apps may also provide Capabilities back to the platform: + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/image2.png) + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Introduction to Capabilities](#3-introduction-to-capabilities) + - [3.1. Capabilities](#31-capabilities) + - [3.2. Availability](#32-availability) + - [3.3. Permissions](#33-permissions) + - [3.4. Roles](#34-roles) + - [3.5. User Grants](#35-user-grants) +- [4. How Capabilities Work](#4-how-capabilities-work) + - [4.1. Supported Capabilities](#41-supported-capabilities) + - [4.2. Available Capabilities](#42-available-capabilities) + - [4.3. Permitted Capabilities](#43-permitted-capabilities) + - [4.4. User Granted Capabilities](#44-user-granted-capabilities) + - [4.5. Invoking Capabilities](#45-invoking-capabilities) +- [5. Configuring Device Capabilities](#5-configuring-device-capabilities) + - [5.1. Device Supported Capabilities](#51-device-supported-capabilities) + - [5.2. Device Grant Policy Overrides](#52-device-grant-policy-overrides) +- [6. Capability Schemas](#6-capability-schemas) + - [6.1. Firebolt Specification Manifest](#61-firebolt-specification-manifest) + - [6.2. Firebolt Device Manifest](#62-firebolt-device-manifest) +- [7. Capability to Feature Mapping](#7-capability-to-feature-mapping) + - [7.1. App installation](#71-app-installation) + - [7.2. Firebolt APIs](#72-firebolt-apis) + - [7.3. Extension APIs](#73-extension-apis) + - [7.4. Hidden Permissions](#74-hidden-permissions) +- [8. Firebolt Capability Catalog](#8-firebolt-capability-catalog) +- [9. APIs](#9-apis) + - [9.1. Core SDK APIs](#91-core-sdk-apis) + - [9.2. Manage SDK APIs](#92-manage-sdk-apis) + +## 3. Introduction to Capabilities + +This section is non-normative and defines the key concepts behind the +Firebolt Capabilities system. Each portion of this section provides a +background and conversational definitions of the terms used in the rest +of this document, and through all Firebolt Requirements Specifications. + +### 3.1. Capabilities + +A Capability is a discrete unit of functionality that a Firebolt device +might be able to perform. It is granular enough to enable appropriate +access controls across all Firebolt Apps, but useful enough to be a +meaningful functional unit that an App might care about. Bluetooth is a +good example of a Capability. + +The Firebolt Specification determines the range of possible +Capabilities. + +Firebolt platforms advertise which Capabilities are supported. The set +of capabilities supported by a device is an immutable set and will never +change at runtime. Supporting Wi-Fi and having an active Wi-Fi +connection are two different things. + +Firebolt platforms determine if an App is allowed to invoke the +different aspects of a Capability (see [Roles](#roles), below). + +Firebolt Apps list which Capabilities are required and optional for the +App to be installed. + +Firebolt Apps inspect which Capabilities are supported and active. + +Firebolt Distributors sign off on some, or all, of the App's listed +required and optional Capabilities. + +### 3.2. Availability + +A Capability may rely on intermittently available resources, for example +a network capability requires an Ethernet or Wi-Fi network connection. + +A supported capability is only considered available if those resources +could be used by the App right now (without taking into account any needed permissions or [User Grants](#user-grants)). For example, the needed +resources are not disabled, not tied up by the platform, and not experiencing +any intermittent network, hardware, or signal issues. + +A supported capability is always supported, but it may not always be +*available*. + +Availability of a capability is a global status, not a per-app status. + +If a Capability is available, then it is considered available globally. +Capabilities can not be available to one app, while simultaneously being +unavailable to another app. This is handled by permissions, or by +capability-specific error management, e.g. returning an error to an app that +attempts to use the video pipeline while in the Inactive Lifecycle state. + +### 3.3. Permissions + +A Permission is what allows an App to attempt to invoke an aspect of a +Capability. Permissions to a Capability are assigned to an App with a +[Role](#roles), by a Firebolt Distributor. + +Firebolt documents and APIs will use the term "Permission" +interchangeably with phrases like: + +- An App's Assigned Role for a Capability + +- App + Capability + Role + +- Etc. + +The Firebolt Specification determines which Capabilities require +Permissions. + +The Firebolt Specification determines which Permission requirements may +be overridden by Distributors. + +An App is considered to have Permission to a Capability if it is: + +- Listed with a Role in the App's manifest and signed by the App + provider + +- Listed and signed again by the Distributor on the App's behalf + +- Listed and signed by the App Publisher when running in self-signed developer + mode + +An App can invoke a Capability if: + +- It has permission, which includes a Role, for that capability + +- The capability is supported by the current device + +- The App is invoking aspects of the capability that it has the + appropriate Role for + +- The capability is [Available](#availability) at time of invocation + +See [Permitted Capabilities](#permitted-capabilities) for more info. + +### 3.4. Roles + +Every Firebolt Capability has exactly three roles: + +- Use + +- Manage + +- Provide + +While these roles will be defined on a case-by-case basis for each +capability, they should generally follow the guidelines set here. + +The `Use` role is for providing basic access so that an App can leverage +the standard use cases of the Capability. The `Use` role will not enable +an App to perform management tasks such as turning the Capability on and +off for the entire device. The `Use` role will not enable an App to +perform administrative tasks such as renaming HDMI inputs, etc. + +The `Manage` role is for providing access to a Capability's management +and administrative features. This role may be used to allow an App to +build a Settings UI for the Capability, for example. The `Manage` role +is not for creating tiers of permissions within a Capability, but for +separating out administrative APIs, for example turning a feature on and +off. + +Most Capabilities are provided by the platform, denoted by making the +`Provide` role `private` for that Capability. However, there are use +cases where Apps may provide Capabilities. The `Provide` role allows for +declaring that an App *implements* the Capability and can be registered +with the platform for fulfilling the Capability's features. This could +be used for functionality that needs to be customized from Distributor +to Distributor. The `Provide` role may also be used to allow Apps to +contribute to aggregated functionality, for example a federated search +feature. By providing a capability, an App is signing up to implement +any `Use` or `Manage` APIs required by that capability. + +Each role must be explicitly assigned. An App *never* inherits the +operations from one role by virtue of being granted another. Roles may +have overlapping functionality. + +A [Permission](#permissions) is the combination of a Capability w/ a +Role and determines which specific operations are permitted. + +### 3.5. User Grants + +A User Grant allows some Permissions to depend on the User of the +Firebolt Device to explicitly grant access for one or all Apps to use a +specific Capability. This an additional layer of access control on top +of Permissions. + +The Firebolt Specification determines which Permissions require User +Grants by default. + +It is not possible to require a User Grant for a Capability that is open +to all Apps. + +Distributors may override any User Grant details that are defined by the +Firebolt Specification if that User Grant Policy is set to +`overridable: true`. + +Consumers want to know that their Smart TV platform treats +security as a first-class design principal. As such, table-stakes User +Grant policies, e.g. App access to Bluetooth, may be denoted as +overridable: false in the Firebolt Specification, to remove any +possibility of a security flaw. + +An App is considered to have a User Grant to a Capability if it: + +- Has Permission to the Capability + +- The User Grant is for the same Role as the Permission above + +- The Capability is **securely** approved by the device user + +If an App invokes a Capability but does not have an active User Grant, +then the platform will block invocation, prompt the user for a grant, +and then continue with the original invocation, e.g. the App does not +have to call the originating API again (assuming the user did give their +approval). + +See [User Granted Capabilities](#user-granted-capabilities) for more +info. + +## 4. How Capabilities Work + +A given Capability may or may not be supported or available. +Additionally, a given Role may or may not be permitted or granted for a +given Capability. + +While support and availability of a Capability is static and global, the +permission and grant status may differ from App to App. + +Determining the status of a Role and Capability is fundamental to +both the Platform and the Apps that run on it. + +### 4.1. Supported Capabilities + +Once an App has been launched, it may need to check if a certain +capability is supported to present the appropriate user experience. For +example, an App may want to put Dolby Atmos badges next to its content, +but only if the platform supports Dolby Atmos. + +The Firebolt Specification determines which capabilities **MUST** be +supported by all Firebolt Devices, by listing those Capabilities in the +[Firebolt Specification Schema](#61-firebolt-specification-schema) as `level: "must"` in the Capabilities +array. + +For a capability to be supported, it **MUST** have *one* or *both* of +the following: + +> A supported capability **MUST** have the necessary hardware and +> software to invoke all required aspects of all Roles of the +> capability. +> +> **OR** +> +> A supported capability **MUST** have the necessary hardware and +> software to support a *certified*, after-market peripheral that +> provides the capability. Note that this includes peripherals that have +> not yet been connected to or installed on the device. + +However, a Firebolt device **MUST NOT** be considered to support a +capability if the capability is disabled by the static distributor +configuration. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.2. Available Capabilities + +Once an App has been launched, it may need to check if a certain +capability is available, to start the appropriate user experience. For +example, an App that uses an external camera may need to check if the +user has set up their camera before proceeding to the main user +experience. + +A Capability is available if **all** the following are true: + +> An available Capability **MUST** be supported. +> +> An available Capability **MUST** have a provider, either an App, an +> Extension SDK, or the OS itself. +> +> The provider of the Capability **MUST** consider it to be available +> +> An available Capability **MUST NOT** be currently disabled by any +> user, account, or device setting. +> +> An available Capability **MUST** be considered available by at least +> one provider of the capability. This is specified by the requirements +> for each feature. + +An available Capability **MAY** be tied to a User Grant, regardless of +whether the user has granted it yet. Secure user grants gate permission, +not availability. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.3. Permitted Capabilities + +Capabilities may be permitted to *all* Apps by the [Firebolt +Specification Schema](../../firebolt-specification.json), or to individual Apps by the Distributor-signed +App Manifest. + +An App may need to know if a Capability is permitted to it once it has +been launched. For example, it may need to check if a certain capability +is permitted, to enable the correct features for the current +distributor. For example, an App that has just been installed might not +show a Returns true for capability/role combinations that do not r +Sign-up option when running on a distributor that has not allowed it to +`use` the `commerce:subscribe` capability, and only allow existing users +to sign in. + +Determining if a Capability is permitted requires knowing which **Role** +is being leveraged. + +Permitted capabilities **MUST** be denoted as `public` in the Specification Schema](#61-firebolt-specification-schema). + +Additionally, **one** of the following **MUST** be true as well: + +> The Role **MUST** have `negotiable` set to `false` +> +> **OR** +> +> The Role **MUST** be approved for the capability by the distributor in +> the App Manifest + +A permitted Capability **MAY** be tied to a User Grant, regardless of +whether the user has granted it yet. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.4. User Granted Capabilities + +Some Capabilities may require a User Grant. It is the App's choice +whether it requests these grants at launch or allows the platform to +interrupt the App's experience when User Grant-gated Capabilities are +invoked. + +Determining if a Capability has been granted by the user requires +knowing which Role is being used. + +For a Capability to be considered granted, it **MUST** be supported. + +Additionally, a Capability + Role is granted to an App if **one** of the +following is true: + +> A granted capability **MUST** have the Role securely granted to the +> App by the user and that grant must not be expired. +> +> **OR** +> +> A granted capability **MUST** have the Role permanently granted to the +> App by the App Manifest, e.g., if the user implicitly granted these by +> virtue of an end user license agreement. + +Firebolt platforms **MUST** support acquiring a user grant *at the +moment the Capability is invoked*, without requiring any reinvocation of +the Capability. + +See [User Grants](./user-grants.md), for more info. + +The platform **MUST** return accurate responses based on these +requirements to all [APIs](#apis) outlined below. + +### 4.5. Invoking Capabilities + +When invoking a Capability, there are several factors that determine +whether the calling App will be allowed. The primary factor is which +Role is being leveraged by the invocation. + +A given Capability & Role can be public or not, and it can be negotiable +or not. + +If a Role for a Capability is public and non-negotiable, then all Apps +are allowed to invoke it, without any explicit permission from the +platform distributor. This is subject to support, availability, and any +required User Grants. + +If a Role for a Capability is public and negotiable, then Apps **MUST** +be permitted by each distributor to use it on that distributor\'s +devices. + +If a Role for a Capability is private, then it **MUST NOT** be permitted +or granted to any Apps. + +A Role for a Capability **MUST NOT** be flagged as negotiable if it is +private. + +If a Capability is gated by a User Grant requirement, then any +invocation **MUST** check the grant status for the Role in question, and +potentially re-acquire a User Grant for the App to invoke it. + +The following flow diagrams show the order of operations for determining +if a Firebolt API, that depends on one or more capabilities, may be +invoked. The checks in this diagram **MUST** be executed in this order +to ensure that error codes are consistent and User Grant prompts are not +displayed to end users in situations where the API call will still not +be allowed for other reasons. + +![](../../../images/specifications/general/capabilities/image4.png) + +Note that determining user grants may involve presenting a UX to the end +user. During this time, a necessary capability may become unavailable. +Due to this, necessary Capabilities MUST be reevaluated for availability +after determining user grant status. For a more detailed flow diagram +for evaluating User Grants, see [User Grants](./user-grants.md). + +## 5. Configuring Device Capabilities + +The Firebolt Specification describes all the possible, non-Extension +capabilities that a particular version of Firebolt allows. Individual +Firebolt devices, however, may not support every Capability and may want +to override certain aspects of those Capabilities. + +Every Firebolt-compliant device **MUST** include an official, versioned +Firebolt JSON configuration that conforms to the Specification Schema](#61-firebolt-specification-schema), so that the implementation +knows how to configure each capability, and which aspects are +overridable. + +Additionally, every Firebolt-compliant device **MUST** have a versioned + +Firebolt Device JSON configuration that conforms to the Firebolt Device +Schema, so that the implementation knows how each capability has been +overridden by the Distributor for this device. + +See [Firebolt Device Schema](#firebolt-device-schema) for more info. + +### 5.1. Device Supported Capabilities + +Firebolt-compliant devices **MUST** list all the Capabilities they +support in the Device Capabilities configuration file\'s `supported` +array. + +The `supported` array **MUST** contain a `CapabilityConfig` for every +Firebolt Capability supported by this device. + +The `supported` array **MUST** contain an entry for every Capability +from the Specification Schema](#61-firebolt-specification-schema) that has a level of `must`. + +The `supported` array **MAY** contain entries for any `should` or +`could` Capabilities. + +The supported array **MUST NOT** contain any entries for Capabilities +not found in the Firebolt Specification Schema. + +### 5.2. Device Grant Policy Overrides + +Firebolt-compliant devices **MAY** override any `GrantPolicies` that +have `overridable` set to `true`. + +This can be used to permanently disable a User Grant + +Firebolt-compliant devices **MUST NOT** override any `GrantPolicies` +that have `overridable` set to `false`. + +`GrantOverrides` are included in the `grantOverrides` array of the +`CapabilityConfig` for the Capability in question. + +If both the Firebolt Specification Schema and the Device Schema have +different, valid overrides for the same capability + appId, then the +device config **MUST** be used by that device. + +## 6. Capability Schemas + +This section describes how Capabilities are represented in the static +Firebolt configuration for a device. + +### 6.1. Firebolt Specification Manifest + +Each version of Firebolt **MUST** have a single Firebolt Specification +Manifest that is the source-of-truth for and contains all possible +capabilities provided, used, or managed by Apps or Firebolt platforms. + ++The Firebolt Specification Manifest **MUST** list all capabilities defined by that version of Firebolt. + +The Firebolt Specification Manifest **MUST** specify whether each capability `must`, `should`, or `could` be implemented by Firebolt devices. + +The Firebolt Specification Manifest **MUST** specify whether each role, i.e. `use`, `manage`, and `provide`, is a `public` permission that apps may call. + +See [Invoking Capabilities](#46-invoking-capabilities), for more info on public and negotiable capabilities. + +The Firebolt Specification Manifest **MUST** include the entire Firebolt OpenRPC specification for all APIs in the 'apis` block. + +The Firebolt Specification Manifest **MUST** specify which major versions of the Firebolt RPC APIs are required for backwards compatibility. + +The [Firebolt Version Manifest JSON-Schema](https://github.com/rdkcentral/firebolt-configuration/blob/main/src/schemas/version-manifest/version-manifest.json) defines the JSON semantics for this file. + +The latest version of the firebolt-specification.json **MUST** be available at this URL: + +``` +http://rdkcentral.github.io/firebolt/requirements/latest/specifications/firebolt-specification.json +``` + +The version of the firebolt-specification.json associated with this document **SHOULD** be available at [../../firebolt-specification.json](../../firebolt-specification.json). + +### 6.2. Firebolt Device Manifest + +Each Firebolt device will have a static configuration for overriding +which capabilities are supported, as well as any negotiable Capability +overrides. + +The Device Manifest **MUST** specify which capabilities the device supports. + +The Device Manfiest **MUST** include every capability from the Firebolt Specification Manifest that has a `level` of `must` in its supported list. + +The Device Manifest **MUST** specify which capabilities have distributor define Grant Policy Overrides. + +The Device Manfiest **MUST NOT** have any Grant Policies that override Grant Policies from the Firebolt Specification Manifest that have `overridable` set to `false`. + +The [Firebolt Device Manifest JSON-Schema](https://github.com/rdkcentral/firebolt-configuration/blob/main/src/schemas/device-manifest/device-manifest.json) defines the JSON semantics for this file. + +## 7. Capability to Feature Mapping + +Capabilities denote functionality, and functionality can manifest in several ways. + +### 7.1. App installation + +Some Apps may not be useful, and may even prove counter to their goals, +if installed on a device without certain capabilities. For example, a +Dolby Vision demonstration App that requires it only be installed on +devices that support Dolby Vision, to avoid playing back lower quality +content that users might mistake for Dolby Vision content. + +If an App includes a capability in one of its App Manifest's `required` +Capability lists: + +- `app.capabilities.used.required` + +- `app.capabilities.managed.required` + +- `app.capabilities.provided.required` + +Then that App **MUST NOT** be installable on Firebolt devices that do +not support that capability. + +Apps that have an unsupported capability inside one of its `optional` +lists **SHOULD NOT** be prevented from installation, unless there is +some other reason outside the scope of this document. + +### 7.2. Firebolt APIs + +Some Firebolt APIs may require the use of one or more Capabilities. +These methods **MUST** have all required Capabilities listed in the method's OpenRPC schema. + +Capabilities are listed in one of three OpenRPC extensions attached to +the `'capabilities' `tag on the method: `x-uses`, `x-manages`, +`x-provides`. + +If a method lists more than one Capability for a role, then it may +specify that those capabilities are either all required, any combination +of them is required, or one and only one is required. The platform **MUST parse any `x-uses-operator` values which will have values of either `allOf`, `anyOf`, or `oneOf`. This value defaults to `allOf` if not specified. An example of +this is an API to find and pair remotes, regardless of which connection +protocol is needed. This API requires `anyOf` `bluetooth:scan`, +`rf4ce:scan`, `wifi:scan`. If one or more of these capabilities is +available (and permitted) then the API will execute using the available +and permitted protocols. The same pattern applies to `x-manages-operator`. The `x-provides` extension only supports a single capability, so this pattern does not extend to providers. + +If a method *requires* a capability, and that capability requires a user +grant that the App does not have, then the platform **MUST** block and +initiate a User Grant flow. Once granted, the platform **MUST** return +the expected value without the App having to reinvoke the API. If not +granted after the User Grant flow, the platform **MUST** return an +error. + +Capabilities that enhance an API, but are not fundamentally required, +for example a `play` API optionally uses the `'hdr:dolbyvision'` +capability, **MUST NOT** be listed in the OpenRPC schema. These are considered *optional* capabilities of the method implementation. + +If a method leverages an *optional* Capability that is unavailable or +unpermitted, it **MUST** leave out or defer the optional functionality. + +If a method leverages an *optional* Capability that requires a user +grant the App does not have, it **MUST** leave out the optional +functionality, and it **MUST NOT** request a user grant. + +### 7.3. Extension APIs + +Extension SDKs implement their methods in the cloud but rely on +Firebolt's Permissions and Capabilities model. + +Requirements for Extension SDKS are outside of the scope of this document. + +### 7.4. Hidden Permissions + +A hidden permission arises when an API requires permission to one +Capability which in turn requires another Capability gated by a +different permission. This is not supported by Firebolt, and all +permission dependencies should be validated to avoid this. + +Firebolt Capabilities **MUST NOT** have hidden permissions. + +For example: + +- API `Module.methodOne()` requires permission to `use` the + `'contrived:capability1'` Capability + +- API `Module.methodTwo()` requires permission to `use` the + `'contrived:capability2'` Capability + +- `methodOne`'s implementation calls `methodTwo` + +There is now a hidden permission: `methodOne` requires both +`capability1` and `capabilty2`. + +Note that it's fine for a method to leverage an ungated, but also +unavailable Capability, such as a DIAL API failing because the network +capability is unavailable. + +## 8. Firebolt Capability Catalog + +Firebolt Capabilities are enumeraged in the [Firebolt Specification Manifest](../../firebolt-specification.json). + +## 9. APIs +All of the APIs below have full OpenRPC schemas in the [Firebolt OpenRPC JSON document](../../../specifications/firebolt-open-rpc.json). + +### 9.1. Core SDK APIs + +Several APIs are exposed by the Firebolt Core SDK as part of the +`Capabilities` module. This module is intended for App +developers to have one place to check for all aspects of "can I do +this." Including supported, available, permitted, and granted +Capabilities. It also provides bulk operations for figuring out which +needed Capabilities are unavailable, in order to wait for them, and +which ones are ungranted, in order to request them. + +### 9.2. Manage SDK APIs + +Several APIs are exposed by the Firebolt Manage SDK as part of the +`UserGrants` module. This module is intended for +Management UIs that show a list of grants per App or Capability, and +allow users to revoke them. diff --git a/requirements/specifications/general/capabilities/user-grants.md b/requirements/specifications/general/capabilities/user-grants.md new file mode 100644 index 000000000..f87342a5c --- /dev/null +++ b/requirements/specifications/general/capabilities/user-grants.md @@ -0,0 +1,593 @@ +# User Grants + +Document status: Candidate Specification + +See [Firebolt Requirements Governance](../../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Andrew Bennet | Sky | +| Tim Dibben | Sky | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Peter Yu | Comcast | + +## 1. Overview + +This document describes the requirements for Firebolt User Grants. User +Grants enable end-user control over which Apps have access to +potentially sensitive Firebolt Capabilities. For example, a user might +want to explicitly approve of any App attempting to purchase new content +by entering an account-holder PIN on the RCU. + +User Grants are also common when two apps need to share data, for +example, Firebolt has a `Discovery.watched` method that allows apps to +inform Firebolt that a user has finished watching some content. This +method allows an app to **provide** the watch history capability and the +aggregated experience to **use** it. See Firebolt +[Capabilities](./capabilities.md) requirements for more info on the `use` and `provide` roles of a +capability. + +This sort of data exchange involves several parties: minimally the user, +the publisher of the OTT app, and the distributor of the Firebolt +device. Additionally, this exchange could also involve privacy laws of +the user\'s home geo-political state, local I.T. best practices around +PII, or even a particular product\'s public position on their privacy +offering to the market. Because of the importance and complexity of +personal data, Firebolt allows each distributor to configure which +Firebolt capabilities require User Grants and what policies should be +applied to acquiring those grants. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image1.png) + +Distributors can configure what kind of user grant is required for a +particular capability, e.g. a simple acknowledgement of an \"OK\" +button, an account-owner PIN entry, an account-owner three-factor +authentication challenge, etc. + +Distributors can also configure whether certain user grants are opt-in +or opt-out, and whether explicit prompting of the user is required. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Introduction to User Grants](#3-introduction-to-user-grants) + - [3.1. Active Grant](#31-active-grant) + - [3.2. Denied Grant](#32-denied-grant) + - [3.3. Unset Grant](#33-unset-grant) + - [3.4. Granting Capability](#34-granting-capability) + - [3.5. Grant Policy](#35-grant-policy) + - [3.6. Privacy Setting](#36-privacy-setting) +- [4. User Grant Requirements](#4-user-grant-requirements) + - [4.1. Granting Capability](#41-granting-capability) + - [4.1.1. Acknowledgement](#411-acknowledgement) + - [4.1.2. Pin Challenge](#412-pin-challenge) + - [4.2. Grant Policy](#42-grant-policy) + - [4.2.1. Grant Requirements](#421-grant-requirements) + - [4.2.2. Grant Lifespan](#422-grant-lifespan) + - [4.2.3. Grant Privacy Setting](#423-grant-privacy-setting) + - [4.3. Distributor Overrides](#43-distributor-overrides) + - [4.4. Application Overrides](#44-application-overrides) +- [5. Grant Execution](#5-grant-execution) + - [5.1. Capability Check](#51-capability-check) + - [5.2. Grant Policy Resolution](#52-grant-policy-resolution) + - [5.3. Active Grant Check](#53-active-grant-check) + - [5.4. Grant Prompt and Resolution](#54-grant-prompt-and-resolution) +- [6. Schemas](#6-schemas) + - [6.1. Grant Policy](#61-grant-policy) + - [6.2. GrantRequirements](#62-grantrequirements) + - [6.3. GrantStep](#63-grantstep) + - [6.4. GrantKey](#64-grantkey) + - [6.4.1. GrantScope](#641-grantscope) + - [6.4.2. GrantLifespan](#642-grantlifespan) + - [6.4.3. PrivacySetting](#643-privacysetting) +- [7. APIs](#7-apis) + - [7.1. Manage SDK APIs](#71-manage-sdk-apis) + - [7.1.1. GrantInfo Object](#711-grantinfo-object) + - [7.1.2. App Method](#712-app-method) + - [7.1.3. Device Method](#713-device-method) + - [7.1.4. Capability Method](#714-capability-method) + - [7.1.5. Grant Method](#715-grant-method) + - [7.1.6. Deny Method](#716-deny-method) + - [7.1.7. Clear Method](#717-clear-method) + + +## 3. Introduction to User Grants + +This section defines the key concepts behind the Firebolt User Grant +system. User Grants build on top of [Firebolt +Capabilities](./capabilities.md). +Since Capabilities are fundamental to user grants, it is recommended to +read the Capabilities requirements first before reading this document. + +Each portion of this section provides a background and conversational +definitions of the terms used in the rest of this document, and through +other Firebolt Requirements Specifications. + +As described in the Overview, a User Grant allows an end user to +explicitly allow (or not allow) an app to use certain Firebolt +Capabilities. Firebolt Distributors need flexibility in configuring +which Capabilities require what types of user interaction, PIN vs +password, etc. + +The following concepts inform how the Firebolt User Grant APIs and +architecture are designed. + +### 3.1. Active Grant + +An **Active Grant** is a User Grant that has already been granted by the +user for a Capability to a specific app (if the Grant Policy is per-app) +or all apps. Active Grants do not need to be granted again (until they +expire) and may be revoked or expire. + +### 3.2. Denied Grant + +A **Denied Grant** is a User Grant that has already been explicitly +*denied* by the user for a Capability to a specific app (if the Grant +Policy is per-app) or all apps. Denied Grants do not need to be denied +again (until they expire) and may be revoked or expire. This serves to +allow the Grant Policy lifetime to be applied to explicit denials as +well. + +### 3.3. Unset Grant + +An **Unset Grant** is a User Grant that has no persisted state. This +could be because the user has never granted or denied it, or because it +was previously granted/denied, but has since expired. Additionally, the +user or platform may clear out an active or denied grant, which results +in this state. + +### 3.4. Granting Capability + +User grants typically require some sort of user experience. Firebolt +delegates display of these user experiences to (typically) first-party +apps, which must provide them as **Granting Capabilities**. Therefore, +it\'s quite possible that using a capability such as watch history +initiates a User Grant request which itself requires another capability, +e.g. the \"acknowledge\" capability, to fulfill the original API. + +In the following diagram, an OTT App is calling an API that would share +watch history data with the 1st party aggregated experience on the +device. This capability is configured with a [Grant +Policy](#grant-policy) (see below) that specifies use of an +Acknowledgement Challenge Capability. the \"Watch History\" capability +is what is being accessed, and the \"Acknowledgement Challenge\" +capability is how this device is configured to grant access to that +capability. Said another way, the Acknowledgement Challenge is the +*Granting Capability*. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image2.png) + +Note that the granting capability UI is provided by another app. The +Provider APIs for each granting capability type are out of scope for +this document. + +A granting capability is generally agnostic to the original capability +that it is helping to grant and can be reused by several capabilities +via a Grant Policy. + +### 3.5. Grant Policy + +A **Grant Policy** ties a set of user grant-related configuration values +to a capability. This allows a Firebolt distributor, or the Firebolt +specification itself, to define the business policy of a particular user +grant. + +Grant Policies specify details like how long the grant lasts and what is +the scope of the grant, e.g. a single app, or all apps. + +### 3.6. Privacy Setting + +A **Privacy Setting** is a link between a Grant Policy and any Firebolt API that is tagged with the Property pattern and returns a +`boolean`. This allows User Grant state to be linked to Privacy Settings +on the device or account. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image3.png) + +How Firebolt devices persist Privacy Settings is outside the scope of +this document. + +## 4. User Grant Requirements + +### 4.1. Granting Capability + +A granting capability **MUST** have the category portion of its +capability key set to `usergrant`. For example: + +`xrn:firebolt:capability:usergrant:acknowledge` + +In order for a granting capability to be available, it **MUST** be +provided by some app that is currently loaded. + +Each granting capability **MUST** have a schema, in the Firebolt +Specification Schema, to validate that any configuration associated with +it is valid. + +#### 4.1.1. Acknowledgement + +The Acknowledgement capability enables a user to acknowledge a user +grant by simply clicking a button. + +This capability has the following key: + +`xrn:firebolt:capability:usergrant:acknowledgechallenge` + +The configuration for this capability is always `null`, i.e., there is +no configuration. + +For more info on how an app can provide the acknowledge capability, see +Acknowledge Provider. **TODO**: add link. + +#### 4.1.2. Pin Challenge + +The Pin Challenge capability enables a user to confirm that they are the +account owner, or a delegate of, by responding to a numeric PIN +challenge. + +This capability has the following key: + +`xrn:firebolt:capability:usergrant:pinchallenge` + +For more info on how an app can provide the acknowledge capability, see +Pin Challenge Provider. **TODO**: add link. + +### 4.2. Grant Policy + +If a Capability is configured with a `GrantPolicy` then the User Grants +specified by the Grant Policy **MUST** be evaluated before a GrantPolicy +llowing access to that Capability. + +A Grant Policy **MUST** have a `scope` for the grant, which determines +whether the user will be granting the capability to the current app or +to all apps. + +A Grant Policy **MUST** have an `overridable` flag that determines if it +may be overridden downstream. For Grant Policies in the Firebolt Version +Manifest, the Device Manifest may override if `overridable` is `true`. +For Grant Policies in the Device Manifest, individual [App +Manifests](https://github.com/rdkcentral/firebolt-configuration/src/schemas/app-manifest/app/app.json) may override the grant if `overridable` is `true`. + +#### 4.2.1. Grant Requirements + +A Grant Policy **MUST** have at least one `GrantRequirements` object, +which itself has a list of zero or more [Granting +Capabilities](#granting-capability) and their configurations. If all the +granting capabilities are supported and available, then they all +**MUST** be invoked. This allows for multiple security checks, e.g. +allow watch history data to be collected if the user has opted into +usage data collection **and** they confirm via an acknowledgement +challenge UI. If one or more of the granting capabilities is not +supported or available, then the entire Grant Requirements block is not +valid for acquiring a user grant. + +A Grant Policy **MAY** have more than one `GrantRequirements` object, +which are ranked in order of preference. This allows for low-friction +but high-security methods to be preferred, e.g. allow in-app purchases +with a passive facial recognition scan, with higher-friction fallbacks +to ensure security on devices with less capabilities, e.g. allow in-app +purchases if the account owner performs a multi-factor authentication +flow. This list of `GrantRequirements` objects is stored in the Grant +Policy\'s `options` field. + +If a Grant Policy has more than one `GrantRequirements` option, then the +highest priority list with all its required capabilities supported and +available **MUST** be used. Note that the app which initiated the +original capability check **does not** need to have permission (or a +grant) to any of the granting capabilities that might be invoked. The +app is not using them, the Firebolt device is using them. + +#### 4.2.2. Grant Lifespan + +A Grant Policy **MUST** have a `lifespan`, which determines how long a +grant is valid for. + +> If the lifespan is set to `once`, then any grant resulting from this +> policy **MUST** be active for a single API transaction. +> +> If the lifespan is set to `forever`, then any grant resulting from +> this policy **MUST** be active until explicitly revoked. +> +> If the lifespan is set to `appActive`, then any grant resulting from +> this policy **MUST** be active until the app goes into one of the +> `inactive`, `suspended`, or `unloading` states. +> +> If the lifespan is set to `powerActive`, then any grant resulting from +> this policy **MUST** be active until the device power goes into any +> state other than `active`. +> +> If the lifespan is set to `seconds`, then any grant resulting from +> this policy **MUST** be active until `lifespanTtl` seconds have passed +> since the grant was issued. + +If a Grant Policy has the `lifespan` set to `seconds`, then the +`lifespanTtl` **MUST** be set to a non-zero, positive number of seconds. + +#### 4.2.3. Grant Privacy Setting + +A Grant Policy **MAY** have a `PrivacySetting` object, which +associates any Firebolt `boolean` property API with this Grant Policy. +The Privacy Setting points to the RPC name of the property\'s getter +method. + +The associated property API **MUST** have an `x-allow-value` extension +on the \"property\" tag set to true or false. + +If a Grant Policy has a Privacy Setting, then the `PrivacySetting` +**MUST** be evaluated **before** any `GrantRequirements`. + +> The Privacy Setting **MUST** have an `autoApplyPolicy` which **MUST** +> be one of the following values: +> +> `always` - Silently grant if the getter for the `property` returns the +> property\'s `x-allow-value`. Silently deny if the getter for the +> `property` returns `!x-allow-value`. +> +> `allowed` - Silently grant if the getter for the `property` returns +> the property\'s `x-allow-value`. +> +> `disallowed` - Silently deny if the getter for the `property` returns +> the property\'s `!x-allow-value`. +> +> `never` - Do not silently grant or deny based on this Grant Policy. +> +> If the Privacy Setting has `revokeGrantsOnDisallow` set to `true`, +> then **all active** user grants that resulted from this Grant Policy +> **MUST** be revoked if and when the property value specified by +> `property` ever changes to `!x-allow-value`. This enables +> distributors to decide whether changes to a Privacy Setting affects +> only new User Grants or existing, active User Grants as well. +> +> If the Privacy Setting has `updateProperty` set to `true`, then a +> successful user grant from this Grant Policy **MUST** also result in +> updating the property value specified by `property` to +> `x-allow-value`. +> +> If the Privacy Setting has `updateProperty` set to `true`, then a +> rejected **or expiring** user grant from this Grant Policy **MUST** +> also result in updating the property value specified by `property` to +> `!x-allow-value`. This is considered a \"disallow\" and +> **MUST** initiate evaluation of the `revokeGrantsOnDisallow` value. +> +> If the Grant Policy `scope` is set to `app` then the property +> specified by `property` **MUST** have a single context +> parameter of type `string` and the requesting appId **MUST** be passed +> to all get/set/subscribe calls fulfilling this section of requirements. + +### 4.3. Distributor Overrides + +Capability Grant Policies in the Firebolt Version Manifest are designed +to be overridden by Distributors to allow for different privacy use +cases across businesses and geographic regions. These overrides go in +the Device Manifest under the `grantPolicies` section of the +`capabilities` section. + +Distributor overrides **MUST** be for Grant Policies that are +`overridable`. + +See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +more information on the Firebolt Version Manifest and Device Manifest. + +### 4.4. Application Overrides + +Firebolt supports creating active grants via the App manifest, which +allows distributors and App publishers to decide that a particular app +will already be granted some capability. This is typically used for +first-party apps that come pre-installed but could be used for other +purposes. + +If an app has a role/capability listed in its App Manifest, then it is +considered to have an active grant for that capability if the manifest +has a valid signature. + +App Manifests overrides **MUST** be for Grant Policies that are +`overridable` and scoped to `app`. + +See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +more information on Firebolt App Manifests. + +## 5. Grant Execution + +When a Firebolt API is called the platform **MUST** first collate all +the device User Grant configurations that apply to every capability that +the API uses. This list **MUST** then be filtered to remove any User +Grants that have already been granted for the current capability for +this app and role. + +### 5.1. Capability Check + +First, all capabilities necessary to fulfill the API are collected. + +![](../../../images/specifications/general/capabilities/user-grants/image4.png) + +### 5.2. Grant Policy Resolution + +Next, each capability is checked to see if there is a Firebolt, +Distributor, or App Grant Policy that applies, and that none of them are +invalid, e.g. an override that is now allowed. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image5.png) + +### 5.3. Active Grant Check + +Then, each Grant Policy is evaluated to see if there is already an +active grant, or if it is linked to a Privacy Setting configured to skip +user-prompts. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image6.png) + +### 5.4. Grant Prompt and Resolution + +Finally, each needed Granting Capability is invoked to present a UX to +the end user, and any linked Privacy Settings are updated as +appropriate. If all succeeds, then the API is invoked. + +![Diagram Description automatically +generated](../../../images/specifications/general/capabilities/user-grants/image7.png) + +## 6. Schemas + +The following schemas give an overview of the schemas outlined by this +document. See the [Firebolt Configuration Schemas +repository](https://github.com/rdkcentral/firebolt-configuration/) for +the latest versions of these schemas. + +### 6.1. Grant Policy + +Grant Policies have the following properties. + +| Property | Type | Description | +|-------------|-----------------------|-------------------------------------| +| `options` | `GrantRequirements[]` | An array of GrantRequirements, any one of which could be used to Grant a requested capability/role to an App. The first one that is completely supported by the current device should be used. | +| `scope` | `string` | Whether the resulting user grant applies to all Apps or just the requesting App. | +| `lifespan` | `string` | How long the resulting user grant (or deny) will last. | +| `lifespanTtl` | `integer` | If lifespan is `'seconds'` this represents the number of seconds. | +| `privacySetting` | `PrivacySetting` | Links this Grant Policy to a privacy setting. | +| `overridable` | `boolean` | Whether a distributor may override this GrantPolicy with their own. | + +### 6.2. GrantRequirements + +A list of `GrantSteps` objects describing which capabilities and any +optional configuration needed to fulfill this grant policy. These +capabilities must be from the capability category `usergrant` which +denotes special capabilities that perform user grants, e.g. an +acknowledge challenge capability. + +| Property | Type | Description | +|-------------|-----------------|-------------------------------------------| +| `steps` | `GrantStep[]` | An array of GrantSteps, all of which need to be verified to fulfill this GrantPolicy. | + +### 6.3. GrantStep + +| Property | Type | Description | +|-------------|----------------|-------------------------------------------| +| `capability` | `string` | The Granting Capability to use for this step in the grant flow. | +| `configuration ` | `object` | The configuration for the Granting Capability, which is specific to each type. | + +### 6.4. GrantKey + +A CapabilityKey with the \ set to `usergrant`: + +`/\^xrn:firebolt:capability:usergrant:\[a-zA-Z0-9\\-\]{1,32}\$/` + +#### 6.4.1. GrantScope + +A `string` enumeration. + +| Value | Description | +|----------------|--------------------------------------------------------| +| `device` | The resulting user grant will apply to all Apps on the device. | +| `app` | The resulting user grant will apply to the requesting App only. | + +#### 6.4.2. GrantLifespan + +A `string` enumeration. + +The resulting user grant will only be valid: + +| Value | Description | +|----------------|--------------------------------------------------------| +| `once` | for a single usage, e.g. one API call. | +| `forever` | until the end of time. | +| `appActive` | until the app enters a non-Active Lifecycle state: inactive, suspended | +| `powerActive` | until the device leaves the Active power state. | +| `seconds` | until \ seconds have passed. | + +#### 6.4.3. PrivacySetting + +| Value | | Description | +|--------------------|----------|------------------------------------------| +| `property` | string | The fully qualified RPC method name of the associated property setter, e.g. `Privacy.limitAdTracking` | +| `autoApplyPolicy` | string | Set the auto grant policy to `always`, `allowed`, `disallowed`, `never` | +| `revokeGrantsOnDisallow` | boolean | Any grants made from this policy will be revoked if/when the property is ever set to the deny value | +| `updateProperty` | boolean | Whether to update the property value to match the grant. | + +## 7. APIs + +APIs for User Grants are covered in the [Capabilities Requirements +document](./capabilities.md). + +### 7.1. Manage SDK APIs + +These APIs are intended for trusted apps to expose a UI for end-users to +manage the grants given to the device and various apps. Permission for +these APIs should only be given to a trusted settings app performing +this function. + +#### 7.1.1. GrantInfo Object + +Object describing a persisted active or denied Grant. + +```typescript +type GrantInfo = { + appId: string, + state: "active" | "denied", + capability: string, + role: "use" | "manage" | "provide" + lifespan: "once" | "forever" | "appActive" | " powerActive" | "seconds" + expires: integer +} +``` + +#### 7.1.2. App Method + +Returns all active and denied user grants for the given App, **NOT** +including those granted to all apps via the device. + +```typescript +UserGrants.app(appId: string): GrantInfo[] +``` + +#### 7.1.3. Device Method + +Returns all active and denied user grants for the Device. + +```typescript +UserGrants.device(): GrantInfo[] +``` + +#### 7.1.4. Capability Method + +Returns all active and denied user grants for the given Capability. + +```typescript +UserGrants.capability(capability: string): GrantInfo [] +``` + +#### 7.1.5. Grant Method + +Grants a given Capability, to a specific app if appropriate. Calling +this results in a persisted Active Grant that lasts for the duration of +the Grant Policy lifespan. + + +```typescript +UserGrants.grant(role: string, capability: string, appId?:string): void +``` + +#### 7.1.6. Deny Method + +Denies a given Capability, to a specific app if appropriate. Calling +this results in a persisted Denied Grant that lasts for the duration of +the Grant Policy lifespan. + +```typescript +UserGrants.deny(role: string, capability: string, appId?: string):void +``` + +#### 7.1.7. Clear Method + +Clears any persisted active or denied grant for a Capability, for a +specific app if appropriate. This results in an Unset Grant. This method +may take a wildcard value of `'*'` for role, capability, or appId, in +order to clear grant state in bulk. + +```typescript +UserGrants.clear(role: string, capability: string, appId?:string): void +``` diff --git a/requirements/specifications/general/context-parameters.md b/requirements/specifications/general/context-parameters.md new file mode 100644 index 000000000..761a03fd7 --- /dev/null +++ b/requirements/specifications/general/context-parameters.md @@ -0,0 +1,303 @@ +# Context Parameters +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Jeremy LaCivita | Comcast | +| Yuri Pasquali | Sky | + +## 1. Overview + +**TODO**: This doc is old and need to be refreshed + +Context Parameters are parameters on an RPC method that provide context +for the call via a set of primitive types (string, number, integer, +boolean). This allows for sharing the context parameters across property +getters, setters, and subscribers, as well as filtering which events to +listen for by context. + +An example of a property method with context could be: + +```javascript +// get a context-driven property (context: appId=hulu) +const huluShare = await Privacy.shareWatchHistory('hulu') +``` + +```javascript +// set a context-driven property (context: appId=hulu) +Privacy.shareWatchHistory('hulu', false) +``` + +In the example above, 'hulu' is the context parameter for both the +shareWatchHistory getter and setter. + +Context parameters can also be applied to property subscribers, as well +as other, non-property events: + +```javascript +// subscribe to a context-driven property +Privacy.shareWatchHistory('hulu', (value) => { + console.log('hulu value changed to: ' + value) +}) + +Privacy.listen('shareWatchHistoryChanged', 'hulu', (value) => { + console.log('hulu value changed to: ' + value) +}) +``` + +For subscribers and events, the context parameters may be omitted, in +which case, all events will be dispatched to the listener: + +```javascript +// subscribe to a context-driven property w/out any context (get all of them) + +Privacy.shareWatchHistory((appId, value) => { + console.log(`App '${appId}' value changed to ${value}`) +}) + +Privacy.listen('shareWatchHistoryChanged', (appId, value) => { + console.log(`App '${appId}' value changed to: ${value}`) +}) +``` + +Context Parameters **MUST** be of a primitive type, to avoid complex +object-tree filtering. + +This document describes an OpenRPC pattern and JavaScript code +generation for a Firebolt method template that uses Context Parameters. + +## 2. Table of Contesnts +- [1. Overview](#1-overview) +- [2. Table of Contesnts](#2-table-of-contesnts) +- [3. Context Parameters Use Cases](#3-context-parameters-use-cases) +- [4. Context Parameters API](#4-context-parameters-api) + - [4.1. JSON-RPC API](#41-json-rpc-api) + - [4.1.1. Setter RPC generation](#411-setter-rpc-generation) + - [4.1.2. onChanged RPC generation](#412-onchanged-rpc-generation) + - [4.1.3. Temporal Set onAvailable / Unavailable RPC generation](#413-temporal-set-onavailable--unavailable-rpc-generation) + - [4.1.4. Event RPC Decoration](#414-event-rpc-decoration) + - [4.2. JavaScript API](#42-javascript-api) + - [4.2.1. Event Listener Signatures](#421-event-listener-signatures) + +## 3. Context Parameters Use Cases + +How each parameter affects it's corresponding API is out of scope for +this document. See each API spec for details on what each context +parameter does. + +Setting a context parameter to null is still setting it to a value. If a +context parameter is passed to the SDK with either a value of null or +undefined, then it **MUST** be explicitly set in the RPC request to the +value null. This is to avoid additional method signature permutations +being required for the SDK. + +An effort should be made to sort the context parameters in order of most +usefulness, since not all languages support undefined. + +## 4. Context Parameters API + +The section describes the RPC and JavaScript APIs. + +### 4.1. JSON-RPC API + +Simple getters and event listeners don't need any parameters. + +If a method is tagged as either a property (any kind) or an event, then +**all** the parameters in the RPC definition **MUST** be context +parameters. + +To facilitate this, the listen parameter that all events currently have +will be removed from the source module and inserted into the generated +RPC by the firebolt-openrpc tooling. + +If any Context Parameters have a type other than: + +- `string` +- `boolean` +- `number` +- `integer` + +Then the RPC method **MUST NOT** pass validation. This is to ensure that +implementing context parameters is not overly complicated. + +#### 4.1.1. Setter RPC generation + +When generating the setter for a property method, all the Context +Parameters **MUST** be copied to the setter. The context parameters +**MUST** be before the value parameter, which itself **MUST** be last. + +#### 4.1.2. onChanged RPC generation + +When generating the onChanged notification for a property +method, all the Context Parameters **MUST** be copied to the event +parameters. The context parameters **MUST** be before the listen +parameter, which itself **MUST** be last. + +#### 4.1.3. Temporal Set onAvailable / Unavailable RPC generation + +Generated Temporal Set events will treat the entire parameter list from +the original temporal-set method as Context Parameters and copy them to +the event parameters. The context parameters **MUST** be before the +listen parameter, which itself **MUST** be last. + +#### 4.1.4. Event RPC Decoration + +All RPC methods tagged as event **MUST** have the listen parameter, of +type boolean, automatically added when generating the final RPC. This +parameter will be added at the end of the parameters list. + +All RPC methods tagged as event that have context parameters **MUST** +have the result schema wrapped in an object. The original result schema +**MUST** be moved to a property called data. Each of the context +parameters **MUST** be copied to a property called context. + +So the following RPC event: + +```json +{ + "name": "onContextualEvent", + "tags": [ + { + "name": "event" + } + ], + "params": [ + { + "name": "a", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "b", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "c", + "required": true, + "schema": { + "type": "number" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "object", + "properties": { + "foo": { + "type": "boolean" + } + } + } + } +} +``` + +Would have its result transformed to: + +```json +{ + "name": "result", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "foo": { + "type": "boolean" + } + } + }, + "context": { + "type": "object", + "properties": { + "a": { + "type": "boolean" + }, + "b": { + "type": "string" + }, + "c": { + "type": "number" + } + }, + "required": [ + "a", "b", "c" + ] + } + } + } +} +``` + +### 4.2. JavaScript API + +TBD + +#### 4.2.1. Event Listener Signatures + +If any of the context parameters are optional, then a callback signature +must be generated for each left-to-right combination of the parameters. + +For example, the method: + +```json +{ + "name": "onFoo", + "tags": [ + { + "name": "event" + } + ], + "params": [ + { + "name": "a", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "b", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "c", + "required": false, + "schema": { + "type": "number" + } + } + ] +} +``` + +Would result in the following method signatures: + +```typescript +listen(event: 'foo', a: boolean, callback: (b: string, c: number, data: any) => {}) + +listen(event: 'foo', a: boolean, b: string, callback: (c: number, data: any) => {}) + +listen(event: 'foo', a: boolean, b: string, c: number, callback: (data: any) => {}) +``` + +Which allows parameters to be omitted, from right-to-left, and included +as part of the result, instead. + +When invoking the callback, the SDK **MUST** pass the data portion of +the result to the data parameter of the callback, and each context +property to the corresponding callback parameter. + +This pattern also applies to property subscribers. diff --git a/requirements/specifications/intents/command-and-control.md b/requirements/specifications/intents/command-and-control.md new file mode 100644 index 000000000..db799cde9 --- /dev/null +++ b/requirements/specifications/intents/command-and-control.md @@ -0,0 +1,984 @@ +# Command and Control Intents + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +| ---------------- | ------------ | +| Saras Arveti | Comcast | +| Eileen Bengston | Comcast | +| Michael Driscoll | Comcast | +| Simon Grist | Sky | +| Jeremy LaCivita | Comcast | + +## 1. Overview + +This document outlines several basic Intents for controlling a Firebolt +compliant device. + +### 1.1. Message.type + +Message.type should be a useful grouping to bucket related intents +together for easier forwarding to appropriate components. + +## 2. Table of Contents +- [1. Overview](#1-overview) + - [1.1. Message.type](#11-messagetype) +- [2. Table of Contents](#2-table-of-contents) +- [3. Control Intents](#3-control-intents) + - [3.1. Power Intent](#31-power-intent) + - [3.2. Volume Intents](#32-volume-intents) + - [3.2.1. Volume Intent](#321-volume-intent) + - [3.2.2. Mute Intent](#322-mute-intent) + - [3.3. Channel Intent](#33-channel-intent) + - [3.4. Media Control Intents](#34-media-control-intents) + - [3.4.1. Pause, Play, Replay, and Stop Intents](#341-pause-play-replay-and-stop-intents) + - [3.4.2. Seek Intent](#342-seek-intent) + - [3.4.3. Fast-forward and Rewind Intents](#343-fast-forward-and-rewind-intents) + - [3.5. Accessibility Intents](#35-accessibility-intents) + - [3.5.1. Closed Captions Intent](#351-closed-captions-intent) + - [3.5.2. Voice Guidance Intent](#352-voice-guidance-intent) + - [3.5.3. Audio Descritions Intent](#353-audio-descritions-intent) + - [3.5.4. High Contrast Intent](#354-high-contrast-intent) + - [3.5.5. Screen Magnification Intent](#355-screen-magnification-intent) + - [3.6. Interaction Intents](#36-interaction-intents) + - [3.6.1. Focus Intent](#361-focus-intent) + - [3.6.2. Select Intent](#362-select-intent) + - [3.6.3. Scroll Intent](#363-scroll-intent) + - [3.6.4. Back Intent](#364-back-intent) + - [3.6.5. Exit Intent](#365-exit-intent) +- [4. Launch Intents](#4-launch-intents) + - [4.1. Content Discovery Launch Intents](#41-content-discovery-launch-intents) + - [4.2. Device Settings Launch Intent](#42-device-settings-launch-intent) + +## 3. Control Intents + +Control intents are for user intentions that will be needed regardless +of whether there are any apps installed. + +For example, these intents are all useful even if only using your TV +with a single HDMI input, and not for apps. + +### 3.1. Power Intent + +This intent allows a user to turn the device on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent allows a user to set a timer for turning off +the power, aka a "sleep timer." + +This is handled by the optional field delay, which is measured in whole +seconds: + +```json +{ + "type": "xrn:firebolt:intent:platform:power", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "power", + "data": { + "value": true | false, + "delay": 3600 + }, + "context": { + "source": "voice" + } + } +} +``` + +To cancel a sleep timer, send a new intent without a delay. + +While it may not be implemented by all platforms, this could also be +used to turn on the TV with a timer. + +### 3.2. Volume Intents + +Volume Intents control the audio level of the device. + +#### 3.2.1. Volume Intent + +This intent allows setting the volume to an absolute or relative value. + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "volume", + "data": { + "value": 70 + }, + "context": { + "source": "VOICE" + } + } +} + +``` + +The value is an integer value from 0 to 100. + +This intent also supports relative volume changes, by providing the +optional relative field: + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "volume", + "data": { + "value": -10, + "relative": true + }, + "context": { + "source": "VOICE" + } + } +} + +``` + +The value is a positive or negative integer that is relative to a scale +of 0-100. + +Firebolt will not support complicated relative changes, e.g. "Set the +volume to 50% *of what it currently is\...*" + +Firebolt uses a size of 0-100 for this intent. It\'s up to each voice +integration if it wants to convert "5" to "50%" before generating +the intent, but convenience transformations like this are recommended. + +Whether or not a TV uses logarithmic or linear scale is irrelevant to +the VolumeIntent schema. + +#### 3.2.2. Mute Intent + +This intent allows the user to mute or unmute the device. + +```json +{ + "type": "xrn:firebolt:intent:platform:volume", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "mute", + "data": { + "value": true | false + }, + "context": { + "source": "VOICE" + } + } +} +``` + +### 3.3. Channel Intent + +For tuning to a specific channel, either OTA or in-app, see [Tune +Intents](./tune.md). + +The intents in this section are for relative next/previous channel user +intentions and are a separate type of Intent. This allows each app to +decide what "channel" means. For example, an App might simply take you +to the next section/genre if it doesn\'t have linear streams in it\'s +catalog. + +The goal of the action property to is tell the client how to parse the +Intent, so overloading the tune intent with a different structure is not +desirable. + +Also, +"tune" inherently means to zero in on a specific part of a +scale, e.g. tuning a harp. + +For relative "channel surfing" we\'ll use the more content-centric +action "channel" which will also align with non-linear apps that want +to leverage the channel up/down intent. + +The Channel Intent allows a user to scan "channels" in an app (or +actual OTA channels if not in an app). + +Users can scan to the next or previous channel. For scanning to the most +recent, i.e. "Last" channel, see [Interaction +Intent +](#interaction-intents). + +```json +{ + "type": "xrn:firebolt:intent:platform:channel", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "channel", + "data": { + "value": "next" | "previous" + }, + "context": { + "source": "voice" + } + } +} + +``` + +The value property MUST always be "next" or "previous". These are +chosen over up/down since not all use cases will be numeric. + +Since this intent is always relative to the current app, there is no +need for an appId. + +If this Intent needs to be passed to the current app, it can be passed +as-is, via the Discovery. onNavigateTo API, or a simulated RCU press of +one of the channel up/down buttons. + +### 3.4. Media Control Intents + +#### 3.4.1. Pause, Play, Replay, and Stop Intents + +These intents allow the user to pause and resume playback of the current +Media: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "pause" | "play" | "replay" | "stop", + "context": { + "source": "voice" + } + } +} +``` + +If the action is pause, then the currently playing media should be +paused, with the frames on-screen and the video decoder ready to resume. + +If the action is play, and the current media is paused, then the +currently paused media should resume. + +If the action is play, and there is something playbable selected, then +playback of the selected asset should be initiated. + +If the action is replay, then the currently paused or playing media should restart +from the beginning. This should work even if the decoder has finished, +and its resources have been released. + +If the action is stop, then the currently playing media should be +stopped, frames removed from the screen, and any decoder resources +should be released. + +#### 3.4.2. Seek Intent + +The seek intent allows users to jump to a relative or absolute position +in the currently playing media. + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "seek", + "data": { + "seconds": 3600 + }, + "context": { + "source": "voice" + } + } +} +``` + +The seconds value is a positive integer representing where to seek. + +This intent also supports relative seeking, by providing the optional +relative field: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "seek", + "data": { + "seconds": -30, + "relative": true + }, + "context": { + "source": "voice" + } + } +} +``` + +For relative seeking, the seconds value may be a positive or negative value. + +If a relative seek intent with a seconds value of `0` is received, the platform **SHOULD** ignore it, rather than rebuffering at the current position. + +#### 3.4.3. Fast-forward and Rewind Intents + +These intents allow users to fast-forward or rewind: + +```json +{ + "type": "xrn:firebolt:intent:platform:media-control", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "fast-forward" | "rewind", + "data": { + "speed": 2.5 + }, + "context": { + "source": "voice" + } + } +} +``` + +Speed is a float in the range of 0 (non-includsive) to 10 (inclusive), +with values between 0 and 1 denoting slow motion. + +It is a device-level decision how to implement different speeds, however +actual fast playback (with audio) should be used where possible and +reasonable, e.g. a speed of 1.5 should actually be playing the video w/ +sync\'d audio, while a speed of 10 will likely be using iframes and not +have audio. For rewind it is not important, and likely undesirable, to +provide audio. + +If speed is not provided then the device should cycle through a range +of speeds defined by the device. This range of speeds **COULD** include +the value `1` so that users can get back to normal speed if desired. + +### 3.5. Accessibility Intents + +These intents manipulate accessibility features on the device. + +#### 3.5.1. Closed Captions Intent + +This intent allows a user to turn closed captions on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "closed-captions", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "closed-captions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.2. Voice Guidance Intent + +This intent allows a user to turn voice guidance on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +The intent **MAY** specify `speed` `number` property that specifies a speed from 0 to 10: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "speed": 2 + }, + "context": { + "source": "voice" + } + } +} +``` + +When providing a `speed` this intent **MAY** also set the `relative` property to `true` denoting an increase or decrease in speed. The speed value may be between -5 and 5 inclusive: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "speed": -1, + "relative": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Finally, the intent **MAY** specify a `verbosity` property, which **MUST** use one of the following values is provided: + +| Value | Description | +|--------|-------------| +| `low` | to select shorter response, less context, and less detail; can use abbreviations and can selectively skip words | +| `high` | to select longer response, more context, and more detail; full comprehensive readout and explicit reflection of what is seen on screen | + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "voice-guidance", + "data": { + "value": true, + "verbosity": "low" + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.3. Audio Descritions Intent + +This intent allows a user to turn audio descriptions of content on or off. + + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +This intent may specify a language: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "value": true, + "language": "eng" + }, + "context": { + "source": "voice" + } + } +} +``` + +The `language` must be a three character ISO 639 1/2 code, e.g. `eng`. + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "audio-descriptions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.4. High Contrast Intent + +This intent allows a user to turn high contrast mode on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "high-contrast", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "high-contrast", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +#### 3.5.5. Screen Magnification Intent + +This intent allows a user to turn screen magnification on or off. + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "value": true | false + }, + "context": { + "source": "voice" + } + } +} + +``` + +Additionally, this intent may specify a toggle: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } +} +``` + +Finally, this intent may specify a magnification scale as a number: + +```json +{ + "type": "xrn:firebolt:intent:platform:accessibility", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "screen-magnification", + "data": { + "scale": 2.5 + }, + "context": { + "source": "voice" + } + } +} +``` + +Setting the scale to `1` turns off magnification. Setting the scale to a value greater than 1 turns on magnification. + +Even if a Firebolt platform does not support specifying the numeric scale, it **MUST** turn magnifacation on and off based on them. + +If the intent has the `toggle` property, then it **MUST NOT** have the `scale` or `value` property. + +If the intent has the `value` property, then it **MUST NOT** have the `toggle`. + +### 3.6. Interaction Intents + +Interaction Intents allow for voice (or other upstream intent service) +to control an on-screen UI without need for a keyboard or remote. + +#### 3.6.1. Focus Intent + +The Focus Intent allows users to move the focus / cursor +up/down/left/right: + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "focus", + "data": { + "direction": "up" | "down" | "left" | "right" + }, + "context": { + "source": "voice" + } + } +} + +``` + +Note that this does not give focus to a particular app, which is handled +by the "launch" action. + +These Intents will generate appropriate HTML browser keyCode events to +facilitate up/down/left/right key presses. + +#### 3.6.2. Select Intent + +The select intent allows users to tell an app select, e.g., +"click" on +whatever is focused. This is a platform-level intent that effectively +sends the "Ok" or "Select" key to the current app. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "select", + "context": { + "source": "voice" + } + } +} +``` + +#### 3.6.3. Scroll Intent + +The Scroll Intent allows users to move the current view port +up/down/left/right: + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "scroll", + "data": { + "direction": "up" | "down" | "left" | "right", + "unit": "page" | "line" | "percent" + }, + "context": { + "source": "voice" + } + } +} +``` + +Both `direction` and `unit` are required. + +These Intents will generate appropriate browser / DOM scrolling +operations that don\'t require custom APIs. + +#### 3.6.4. Back Intent + +The back intent allows users to tell an app go to "back" like a +browser. This is a platform-level intent and will initiate a browser +back flow for web apps. For native apps, this will be converted to an +app Navigation Intent by the client and surfaced through the navigateTo +API. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "back", + "context": { + "source": "voice" + } + } +} +``` + +#### 3.6.5. Exit Intent + +The exit intent allows users to tell an app close. This is a +platform-level intent and will simply move the current app into the +inactive state. + +```json +{ + "type": "xrn:firebolt:intent:platform:interaction", + "target": "client", + "metadata": { + "assistant": "XFINITY", + "lang": "eng-USA", + "micType": "NEAR_FIELD" + }, + "intent": { + "action": "exit", + "context": { + "source": "voice" + } + } +} +``` + +## 4. Launch Intents + +If a Firebolt app wants to launch the main or settings experience of the device, it can use one of the following abstract appIds with the `launch` intent. + +### 4.1. Content Discovery Launch Intents + +The following section IDs will be used, with the Firebolt application +type as the target App ID: + +`xrn:firebolt:application-type:main` + +### 4.2. Device Settings Launch Intent + +To launch the settings UI, a Launch Intent will be used, with the +Firebolt application type: + +`xrn:firebolt:application-type:settings` diff --git a/requirements/specifications/intents/index.md b/requirements/specifications/intents/index.md index 6925376e4..72d6138c8 100644 --- a/requirements/specifications/intents/index.md +++ b/requirements/specifications/intents/index.md @@ -7,6 +7,8 @@ See [Firebolt Requirements Governance](../../governance.md) for more info. | Contributor | Organization | | --------------- | ------------ | | Jeremy LaCivita | Comcast | +| Simon Grist | Sky | + ## 1. Overview Offen times an end-user has a specific intention that needs to be communicated @@ -27,18 +29,23 @@ additional `data` property. - [3. Intent Action](#3-intent-action) - [4. Intent Context](#4-intent-context) - [5. Intent Data](#5-intent-data) -- [Intent Types](#intent-types) +- [6. Intent Message](#6-intent-message) + - [6.1. App Intent Message](#61-app-intent-message) + - [6.2. Platform Intent Message](#62-platform-intent-message) + - [6.3. Intent Message Type](#63-intent-message-type) + - [6.4. Intent Message Metadata](#64-intent-message-metadata) +- [7. Intent Types](#7-intent-types) ## 3. Intent Action The intent `action` denotes what type of intent it is. -All intents **MUST** have a `string` attribute denoting the type of intent. +All intents **MUST** have an `action` `string` property denoting the type of intent. See the various [Intent Types](#intent-types) below for values. ## 4. Intent Context -The intent `context` provides information on where the intent orginated from. +The intent `context` provides information on where the intent orginated from. All intents **MUST** have a `context` property, which is an object. The `context` object **MUST** have a `source` string property with one of the @@ -56,7 +63,56 @@ any string value. This property denotes an editorial campaign. ## 5. Intent Data If an intent has any additional data, it **MUST** be in the `data` property. -## Intent Types +## 6. Intent Message +When an intent is sent to a Firebolt device from some other system, e.g. a cloud voice service, it **MUST** be wrapped in an `IntentMessage` object so that it can be properly routed after transport. + +An intent message **MUST** have an `intent` object property that is the intent being passed. + +An example intent message: + +```json +{ + "type": "xrn:firebolt:intent:app:launch", + "appId": "Netflix", + "intent": { + "action": "launch", + "context": { + "source": "voice" + } + }, + "metadata": { + "foo": "bar" + } +} +``` + +### 6.1. App Intent Message +If an intent is targeting a specific app, then the intent message **MUST** have an `appId` string property with the appId of the targeted app. + +### 6.2. Platform Intent Message +If an intent messagage does not have an `appId` property, then it **MUST** be targeting the device itself, e.g. a `power` intent to turn off the device. + +### 6.3. Intent Message Type +An intent message **MUST** have a `type` string property for categorizing the intent. + +The type property **MUST** match the regular expression: + +```regex +^xrn:firebolt:intent:(app|platform):[a-zA-Z]+$ +``` + +App Intent Messages **MUST** have the fourth section set to `app`. + +Platform Intent Messages **MUST** have the fourth section set to `platform` + +All Intent Messages **MUST** have the fifth section set to the same value as `intent.action`. + +Platforms may use this to route different types of intents to different subsystems without having to understand the internal structure of Firebolt intent objects. + +### 6.4. Intent Message Metadata +An intent message **MAY** have a `metadata` object property for adding distributor-specific metadata for logging or analytics. The values in `metadata` **MUST NOT** impact how the device interprets the intent. + +## 7. Intent Types - [Play](./play.md) - [Tune](./tune.md) diff --git a/requirements/specifications/intents/user-interest.md b/requirements/specifications/intents/user-interest.md new file mode 100644 index 000000000..eae60ecf7 --- /dev/null +++ b/requirements/specifications/intents/user-interest.md @@ -0,0 +1,15 @@ +# User Interest + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Eugene Chung | Comcast | +| Tim Dibben | Sky | +| Mike Horwitz | Comcast | +| Jeremy LaCivita | Comcast | + +## 1. Overview +This document describes the intent to initiate a [User Interest](../discovery/user-interest.md) flow from an upstream system, e.g. a voice assistant. diff --git a/requirements/specifications/json-schema/parameters.md b/requirements/specifications/json-schema/parameters.md index caf80aac2..1048ec0c4 100644 --- a/requirements/specifications/json-schema/parameters.md +++ b/requirements/specifications/json-schema/parameters.md @@ -1,3 +1,5 @@ +# Parameters + TODO: write this spec... If a parameter schema has a default value, then the Firebolt SDK **SHOULD** insert that value when an explicit value is not provided by the calling app. diff --git a/requirements/specifications/localization/language.md b/requirements/specifications/localization/language.md new file mode 100644 index 000000000..0b3df80ef --- /dev/null +++ b/requirements/specifications/localization/language.md @@ -0,0 +1,99 @@ +# Language Settings + +Document Status: Candidate Specification + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +| -------------- | -------------- | +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Tim Dibben | Sky | + +## 1. Overview + +This document describes the requirements that Firebolt platforms must +fulfill when surfacing user language preferences. + +Exposing these settings, e.g. the main device language, or a list of +preferred audio languages, allows Apps to respect the device's current +setting so that the user has a seamless experience when switching from +app to app. + +This document covers how Firebolt platforms manage language settings and +expose to Apps. It does not cover the use cases Apps might apply these +APIs to. + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +- [1. Overview](#1-overview) +- [2. Language](#2-language) +- [3. Locale](#3-locale) +- [4. Preferred Audio Languages](#4-preferred-audio-languages) +- [5. Core SDK APIs](#5-core-sdk-apis) +- [6. Manage SDK APIs](#6-manage-sdk-apis) + +## 2. Language + +Language describes theĀ ISO 639 1/2 code for the preferred language on +this device. All Apps **SHOULD** generally render their user experience +in this language. This is a guideline, not an absolute requirement, +since different Apps may have different target audiences with differing +languages prevalent within those audiences. + +This setting is represented by a mutable property which is a string +conforming to the ISO 639 1/2 standard, e.g. `'en'`. + +## 3. Locale + +Locale describes theĀ *full*Ā BCP 47 code, including script, region, +variant, etc., for the preferred language/locale on this device. Apps +**MAY** alter their user experience to match this locale to account for +local differences in the same language. + +This setting is represented by a mutable property which is a string +conforming to the full BCP 47 standard, e.g. `'en-US'`. + +## 4. Preferred Audio Languages + +The preferred audio languages setting provides a ranked list of +languages that the user prefers to be selected on this device. All +values are from the ISO 639 1/2 standard. Apps **MAY** use this list to +influence selection of an initial audio track when playing content with +multiple languages. For example, a bilingual user living in an English +speaking country may have the `language` set to `'en`\' and the +`preferredAudioLanguages` set to `['fr', 'en']`. This +enables them to typically consume content from apps whose catalogs are +mostly filmed in English, but automatically get the French language +track when watching a French movie that has both French and English +tracks. + +This setting is represented by a mutable property which is an array of +strings conforming to the ISO 639 1/2 standard, e.g. `'en'`. + +## 5. Core SDK APIs + +The following APIs are exposed by the Firebolt Core SDK as part of the +`core:localization` domain/module. + +Each of these APIs a read-only property. + +- `Localization.language():Promise` + +- `Localization.locale():Promise` + +- `Localization.preferredAudioLanguages():Promise` + +- `Localization.onLanguageChanged():Promise` + +- `Localization.onLocaleChanged():Promise` + +- `Localization.onPreferredAudioLanguagesChanged():Promise` + +## 6. Manage SDK APIs + +The following APIs are exposed by the Firebolt Manage SDK as part of the +`manage` domain. + +The Manage SDK APIs inclueare identical to the Core SDK, except that all +property APIs are mutable. diff --git a/requirements/specifications/media/media-info.md b/requirements/specifications/media/media-info.md index f18c32a87..323036786 100644 --- a/requirements/specifications/media/media-info.md +++ b/requirements/specifications/media/media-info.md @@ -9,50 +9,46 @@ See [Firebolt Requirements Governance](../../governance.md) for more info. | Anthony Borzota | Comcast | | Jeremy LaCivita | Comcast | | Stuart Harris | Sky | -| Farhan Mood | Liberty Global | +| Joe Martin | Comcast | +| Farhan Mood | Liberty Global | ## 1. Overview -App developers need to know which audio and video formats can be successfully played on a Firebolt device. -Video formats include... +App developers need to know which audio and video formats can be successfully played on a Firebolt device and its attached display. -**TODO**: Rewrite this section. +An audio format includes values such as the audio container, codec, codec level, and bit rate of the audio stream. -Apps may need to know what media format, e.g. HDR profile or video codec, is currently playing. +A video format may include values such as the video container, codec, HDR profile, and resolution of the video stream. -An app may need to check IP video playback that it has initiated to see if Dolby Audio is in fact active (as opposed to just present in the encoded data) in order to display metadata or badges to the user. Apps may also be playing [user-cultivated media](./media-access.md), and therefor have no metadata about the format of the files. +Further, apps may also need to know about the media format currently playing in the media pipeline. + +An app may need to check IP video playback that it has initiated to see if Dolby Audio is in fact active (as opposed to just present in the encoded data) in order to display metadata or badges to the user. Apps may also be playing [user-cultivated media](./media-access.md), and therefore have no metadata about the format of the files. A first-party app may need to check all [Media Pipelines](./media-pipeline.md) for media format characteristics to display a global badge. Additionally, apps may need to know what is supported by the device, *before* initiating any media playback. -As a W3C-based platform, there is no standard API for detecting media -formats or codecs that works in all cases, short of inspecting the bytes -of the media in the app itself. - -To solve this, Firebolt APIs will be created to detect the formats and -codecs currently being decoded by the [Media -Pipeline](./media-pipeline.md) and Firebolt APIs will be created to query device support for those formats. +To solve this, Firebolt APIs will be created to detect the formats and codecs currently being decoded by the [Media Pipeline](./media-pipeline.md). Firebolt APIs will also be created to query whether the device supports playing content of various formats. ### 1.1. User Stories -### 1.2. As an OTT App developer +#### 1.1.1. As an OTT App developer I want to know what is supported by the device and it's active AV chain: - I want to know if a video or audio format (Dolby Vision, Dolby Atmos, HEVC, etc.) will work if playback is attempted. - I want to know if a format profile or level (HEVC Main 10, VP9 Profile 2, etc.) is supported. - I want to know how many audio output channels (e.g. 7.1, 5.1) are available. -- I want to know what resolutions and framerates are supported (e.g. 1080p60). +- I want to know what resolutions and frame rates are supported (e.g. 1080p60). I want to know what kind of content I'm currently playing: - I want to know which video or audio format the media I'm currently playing is sending to the decoder. -- I want to know which video or audio format profile or level the media I'm currently playing is sending to the decoder. +- I want to know which video or audio format profile or level the media I'm currently playing is being sent to the decoder. - I want to know how many audio output channels (e.g. 7.1, 5.1) are currently being sent to the decoder. -- I want to know what resolution and framerate is currently being sent to the decoder. +- I want to know what resolution and frame rate is currently being sent to the decoder. -### 1.3. As a first-party App developer +#### 1.1.2. As a first-party App developer I want to show an audio/videophile overlay with detailed information: @@ -61,345 +57,576 @@ I want to show an audio/videophile overlay with detailed information: - I want to know all audio output channel profiles (e.g. 7.1, 5.1) currently being sent to a decoder. - I want to know all resolution and framerates currently being sent to a decoder. -I want to know what my device *would* support if i upgraded my AV peripherals: - -- I want to know if a video or audio format (Dolby Vision, Dolby Atmos, HEVC, etc.) *would* work with upgraded peripherals. -- I want to know if a codec profile-level (HEVC Main 10, VP9 Profile 2, etc.) *would* work with upgraded peripherals. -- I want to know how many audio output channels (e.g. 7.1, 5.1) *would* be available with upgraded peripherals. -- I want to know what resolutions and framerates *would* be supported with upgraded peripherals. (e.g. 1080p60). - ## 2. Table of Contents + - [1. Overview](#1-overview) - [1.1. User Stories](#11-user-stories) - - [1.2. As an OTT App developer](#12-as-an-ott-app-developer) - - [1.3. As a first-party App developer](#13-as-a-first-party-app-developer) + - [1.1.1. As an OTT App developer](#111-as-an-ott-app-developer) + - [1.1.2. As a first-party App developer](#112-as-a-first-party-app-developer) - [2. Table of Contents](#2-table-of-contents) -- [3. Media Constants](#3-media-constants) +- [3. Media Constants and Schemas](#3-media-constants-and-schemas) - [3.1. Media Container Types](#31-media-container-types) - - [3.2. Audio Codecs](#32-audio-codecs) - - [3.3. Video Codecs](#33-video-codecs) - - [3.4. Media Resolutions](#34-media-resolutions) - - [3.5. Media HRD Profiles](#35-media-hrd-profiles) + - [3.2. Media Codecs](#32-media-codecs) + - [3.3. Resolutions](#33-resolutions) + - [3.4. Resolution User-Friendly Name](#34-resolution-user-friendly-name) + - [3.5. Video Modes](#35-video-modes) + - [3.6. Media HDR Profiles](#36-media-hdr-profiles) + - [3.7. Colorimetry](#37-colorimetry) + - [3.8. Audio Output Mode](#38-audio-output-mode) - [4. Device Media Support](#4-device-media-support) - [4.1. Video Format Supported](#41-video-format-supported) - - [4.1.1. Audio Format Supported](#411-audio-format-supported) + - [4.2. Audio Format Supported](#42-audio-format-supported) - [5. Display Properties](#5-display-properties) - - [5.1. Display HDR](#51-display-hdr) - - [5.2. Display Width and Height](#52-display-width-and-height) - - [5.3. Current and Optimal Resolution](#53-current-and-optimal-resolution) - - [5.4. Supported Resolutions](#54-supported-resolutions) - - [5.5. Device Supported Resolutions](#55-device-supported-resolutions) - - [5.6. Use Source Framerate](#56-use-source-framerate) -- [6. Audio Output Properties](#6-audio-output-properties) - - [6.1. Mode](#61-mode) + - [5.1. Supported HDR Profiles](#51-supported-hdr-profiles) + - [5.2. Color Depth](#52-color-depth) + - [5.3. Display Size](#53-display-size) + - [5.4. Display Resolution](#54-display-resolution) + - [5.5. Display Resolution Name](#55-display-resolution-name) + - [5.6. Refresh Rate](#56-refresh-rate) + - [5.7. Colorimetry](#57-colorimetry) + - [5.8. Manufacturer](#58-manufacturer) + - [5.9. Product Name](#59-product-name) + - [5.10. Source Physical Address](#510-source-physical-address) +- [6. Device Properties](#6-device-properties) + - [6.1. Current Audio Mode](#61-current-audio-mode) + - [6.2. Current Video Mode](#62-current-video-mode) + - [6.3. Supported Video Modes](#63-supported-video-modes) + - [6.4. Video Resolution](#64-video-resolution) + - [6.5. Current HDR Profile](#65-current-hdr-profile) + - [6.6. Supported HDR Profiles](#66-supported-hdr-profiles) + - [6.7. Supported HDCP Version](#67-supported-hdcp-version) + - [6.8. Source Frame Rate Used](#68-source-frame-rate-used) + - [6.9. On Audio Output Changed](#69-on-audio-output-changed) + - [6.10. On Video Output Changed](#610-on-video-output-changed) - [7. Media Info](#7-media-info) - - [7.1. MediaInfo for current app](#71-mediainfo-for-current-app) + - [7.1. MediaInfo for Current App](#71-mediainfo-for-current-app) - [7.1.1. Video Format](#711-video-format) - [7.1.2. Audio Format](#712-audio-format) - [7.2. Global MediaInfo](#72-global-mediainfo) - [7.2.1. Active Video Formats](#721-active-video-formats) - [7.2.2. Active Audio Formats](#722-active-audio-formats) -## 3. Media Constants +## 3. Media Constants and Schemas ### 3.1. Media Container Types -The Firebolt `Media` module **MUST** have a `Container` enumeration of media container content types: - -| Name | Value | -| ------------ | ------------ | -| `AUDIO_MPEG` | `audio/mpeg` | -| `AUDIO_MP4` | `audio/mp4` | -| `AUDIO_OGG` | `audio/ogg` | -| `AUDIO_WEBM` | `audio/webm` | -| `VIDEO_MPEG` | `video/mpeg` | -| `VIDEO_MP2T` | `video/mp2t` | -| `VIDEO_MP4` | `video/mp4` | -| `VIDEO_OGG` | `video/ogg` | -| `VIDEO_WEBM` | `video/webm` | - -### 3.2. Audio Codecs + +The Firebolt `Media` module **MUST** have an `AudioContainer` enumeration of the following media container content types: + +| Name | Description | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `audio/mp4` | [MP4 Audio](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#mpeg-4_mp4) | +| `audio/mpeg` | [Moving Picture Experts Group (MPEG1/MPEG2)](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#mpegmpeg-2) | +| `audio/ogg` | [OGG](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#ogg) | +| `audio/webm` | [Web Media](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#webm) | + +The Firebolt `Media` module **MUST** have a `VideoContainer` enumeration of the following media container content types: + +| Name | Description | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `video/mp2t` | [MPEG transport stream](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) | +| `video/mp4` | [MP4 Audio](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/) | +| `video/mpeg` | [Moving Picture Experts Group (MPEG1/MPEG2)](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#mpegmpeg-2) | +| `video/webm` | [Web Media](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#webm) | + +### 3.2. Media Codecs + The Firebolt `Media` module **MUST** have an `AudioCodec` enumeration: -| Name | Value | -| ---- | ----- | -| `MPEG_L1` | `"mpeg1 audio layer 1"` | -| `MPEG_L2` | `"mpeg1 audio layer 2"` | -| `MPEG_L3` | `"mpeg1 audio layer 3"` | -| `MP4` | `"mp4a"` | -| `AAC` | `"aac"` | -| `AC3` | `"ac3"` | -| `EAC3` | `"eac3"` | -| `AC4` | `"ac4"` | -| `DTS` | `"dts"` | -| `DTS_X` | `"dts x"` | -| `OPUS` | `"opus"` | -| `TRUEHD` | `"true hd"` | -| `VORBIS` | `"vorbis"` | - -### 3.3. Video Codecs -The Firebolt `Media` module **MUST** have an `VideoCodec` enumeration: - -| Name | Value | -| ------- | ---------------- | -| `MPEG1` | `"mpeg1 part 2"` | -| `MPEG2` | `"mpeg2 part 2"` | -| `MP4` | `"mp4v"` | -| `AVC` | `"avc"` | -| `AV1` | `"av01"` | -| `3GPP` | `"3gpp"` | -| `HEVC` | `"hevc"` | -| `VP8` | `"vp8"` | -| `VP9` | `"vp9"` | -| `VP10` | `"vp10"` | - -### 3.4. Media Resolutions -The `Media.Resolution` enum **MUST** have one of the following values: - -- `"480i"` -- `"480p"` -- `"576i25"` -- `"576p50"` -- `"576p60"` -- `"720p50"` -- `"720p"` -- `"1080i50"` -- `"1080i"` -- `"1080p24"` -- `"1080p25"` -- `"1080p30"` -- `"1080p50"` -- `"1080p"` -- `UHD` // convenience value for `2160p*` -- `"2160p24"` -- `"2160p25"` -- `"2160p30"` -- `"2160p50"` -- `"2160p60"` -- `"4320p60"` - -### 3.5. Media HRD Profiles -The `Media.HDR` enum **MUST** have one of the following values: - -- `DOLBY_VISION` -- `HDR10` -- `HDR10PLUS` -- `ST2084` -- `HLG` +| Name | Description | +| -------- | ---------------------------------------------- | +| `aac` | Advanced Audio Coding | +| `ac3` | Dolby Digital / Dolby Audio Codec 3 | +| `ac4` | Dolby Audio Codec 4 | +| `dts-x` | Digital Theater Systems X | +| `eac3` | Dolby Digital Plus / Dolby Enhanced AC-3 / DD+ | +| `mpeg3` | MPEG-1 Part 3 & MPEG-2 Part 3 | +| `opus` | IETF Opus | +| `truehd` | Dolby TrueHD / MLP | +| `vorbis` | Xiph.org Vorbis | + +The Firebolt `Media` module **MUST** have a `VideoCodec` enumeration: + +| Name | Description | +| ------- | ------------------------------------ | +| `av1` | AOMedia Video 1 | +| `avc` | Advanced Video Coding (H.264) | +| `hevc` | High Efficiency Video Coding (H.265) | +| `mpeg1` | MPEG-1 Part 2 Visual | +| `mpeg2` | MPEG-2 Part 2 Visual | +| `vp8` | Video Processor 8 | +| `vp9` | Video Processor 9 | +| `vp10` | Video Processor 10 | + +### 3.3. Resolutions + +For the purposes of the Firebolt API, a `Resolution` shall be defined by two values: the width and height, in pixels. + +For example, the resolution for a display may be defined as `[1920, 1080]`. + +Any methods relating to a resolution (such as the supported resolution of a display or the output resolution of a device) **MUST** return two values: the width and height. + +### 3.4. Resolution User-Friendly Name + +The Firebolt `Media` module **MUST** have a `ResolutionName` enumeration: + +| Class | Applicable Resolutions | +| --------- | ---------------------- | +| `sd` | `576p` and lower | +| `hd` | `720p` | +| `fhd` | `1080p` | +| `uhd` | `2160` and higher | +| `unknown` | unknown or no display | + +### 3.5. Video Modes + +For the purposes of the Firebolt API, a `VideoMode` shall be defined as the shorthand vertical resolution and frame rate of video content. + +The Firebolt `Media` module **MUST** have a `VideoMode` enumeration: + +- `480i` +- `480p` +- `576i25` +- `576p50` +- `576p60` +- `720p50` +- `720p60` +- `1080i50` +- `1080i60` +- `1080p24` +- `1080p25` +- `1080p30` +- `1080p50` +- `1080p60` +- `2160p24` +- `2160p25` +- `2160p30` +- `2160p50` +- `2160p60` +- `4320p60` +- `unknown` + +Any methods relating to the video mode (such as a device's video output mode) **MUST** return `Media.VideoMode` values. + +### 3.6. Media HDR Profiles + +The Firebolt `Media` module **MUST** have an `HDRProfile` enumeration: + +- `dolbyVision` +- `hdr10` +- `hdr10plus` +- `hlg` +- `sdr` +- `unknown` + +### 3.7. Colorimetry + +The Firebolt `Media` module **MUST** have an `Colorimetry` enumeration: + +- `BT2020cYCC` +- `BT2020RGB` +- `BT2020YCC` +- `DCI-P3` +- `ICtCp` +- `opRGB` +- `opYCC601` +- `sYCC601` +- `xvYCC601` +- `xvYCC709` +- `unknown` + +### 3.8. Audio Output Mode + +The Firebolt `Media` module **MUST** have an `AudioMode` enumeration: + +- `auto` +- `mono` +- `none` +- `passthrough` +- `stereo` +- `surround` +- `unknown` ## 4. Device Media Support -Apps need to know what types of media support the current is capable of. -To facilitate this, the `Device` module will have a set of methods that -return possible media capabilities supported by the current device configuration. +Apps need to know what types of media support the device is capable of. + +To facilitate this, the `Device` module will have a set of methods that return possible media capabilities supported by the current device configuration. These values do not change without a settings change or a firmware update. ### 4.1. Video Format Supported -The `Device` module **MUST** have a `videoFormatSupported` API that returns -`true` or `false` depending on whether the format specified is supported by -the current device configuration. This API **MUST** return `boolean`. +The `Device` module **MUST** have a `videoFormatSupported` API that returns `true` or `false` depending on whether the format specified is supported by the current device and its AV chain. This API **MUST** return `boolean`. ```javascript -const hdr10plusWithH265 = videoFormatSupported(Media.VideoCodec.HEVC, { +const hdr10plusWithH265 = Device.videoFormatSupported(Media.VideoCodec.HEVC, { profile: "main10", - hdr: Media.HDR.HDR10_PLUS + hdr: Media.HDRProfile.HDR10_PLUS }) +//> true -const hdr10plusWithVP9 = videoFormatSupported(Media.VideoCodec.VP9, { +const hdr10plusWithVP9 = Device.videoFormatSupported(Media.VideoCodec.VP9, { profile: "p2", - hdr: Media.HDR.HDR10_PLUS + hdr: Media.HDRProfile.HDR10_PLUS, + resolution: [3840, 2160] }) +//> true ``` The `videoFormatSupported` API **MUST** have a required `codec` parameter with the type `Media.VideoCodec`. -The `videoFormatSupported` API **MUST** have an optional `info` parameter -which **MUST** be an object with zero or more of the following properties: +The `videoFormatSupported` API **MUST** have an optional `info` parameter which **MUST** be an object with zero or more of the following properties: -| Property | Type | Description | -|----------|------|-------------| -| container | `Media.Container` | The content container format | -| profile | `string` | the Codec profile:
**h.265**: "main", "high", "main10"
**vp9**: "p0", "p2"
**AAC**: "mp2lc", "mp4he" | -| level | `string` | the Codec level:
**h.265**: "4.1", "4.2", "5.0", "5.1"
**vp9**:"3.0", "3.1", "4.0", "4.1", "5.0", "5.1" || atmos | `boolean` | Whether or not Dolby Atmos support for the given format is being requested | -| resolution | `Media.Resolution` | The Resolution, e.g. `1080p` of the support being requested. | -| hdr | `Media.HDR` | The HDR profile that support is being checked for. | +| Property | Type | Description | +| ------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------- | +| `container` | `Media.VideoContainer` | The content container format | +| `hdr` | `Media.HDRProfile` | The HDR profile that support is being checked for | +| `level` | `string` | The codec level:
**hevc**: `4.1`, `4.2`, `5.0`, `5.1`
**vp9**:`3.0`, `3.1`, `4.0`, `4.1`, `5.0`, `5.1` | +| `profile` | `string` | The codec profile:
**hevc**: `main`, `high`, `main10`
**vp9**: `p0`, `p2` | +| `resolution` | `array` | The resolution in width and height (e.g. `[1920, 1080]`) of the media content being requested | -Note that a device supporting a particular HDR format and resolution does not mean that the current display does. See Display.properties() for more info on detecting display HDR support. +> **NOTE**: A device supporting a particular HDR profile and resolution does not mean that the current display also supports that profile and resolution. See `Display.hdrProfiles()` for more info on detecting display HDR support. -The `videoFormatSupported` API **MUST NOT** -return `true` unless the format specified is supported with **all** of the properties specified in `info` *at the same time*. +The `videoFormatSupported` API **MUST NOT** return `true` unless the format specified is supported with **all** of the properties specified in `options` *at the same time*. -Use of the `videoFormatSupported` API requires access to the `use` role of the -`xrn:firebolt:capability:device:info` capability. +Use of the `videoFormatSupported` API requires access to the `use` role of the `xrn:firebolt:capability:device:info` capability. -#### 4.1.1. Audio Format Supported +### 4.2. Audio Format Supported -The `Device` module **MUST** have an `audioFormatSupported` API that returns -`true` or `false` depending on whether the format specified is supported by -the current device configuration. This API **MUST** return a `boolean`. +The `Device` module **MUST** have an `audioFormatSupported` API that returns `true` or `false` depending on whether the format specified is supported by the current device configuration and its AV chain. This API **MUST** return a `boolean`. ```javascript -const atmosWithAC4 = audioFormatSupported(Media.AudioCodec.AC4, { +const atmosWithAC4 = Device.audioFormatSupported(Media.AudioCodec.AC4, { atmos: true }) +//> true -const atmosWithEAC3 = videoFormatSupported(Media.AudioCodec.EAC3, { +const atmosWithTrueHD = Device.audioFormatSupported(Media.AudioCodec.TRUEHD, { atmos: true }) +//> true + +const noAtmosOverMono = Device.audioFormatSupported(Media.AudioCodec.TRUEHD, { + atmos: true + mode: 'mono' +}) +//> false (mono output not supported with dolby atmos) ``` The `audioFormatSupported` API **MUST** have a required `codec` parameter with the type `Media.AudioCodec`. -The `audioFormatSupported` API **MUST** have an optional `info` parameter -which **MUST** be an object with zero or more of the following properties: +The `audioFormatSupported` API **MUST** have an optional `options` parameter which **MUST** be an object with zero or more of the following properties: + +| Property | Type | Description | +| -------------- | ----------------- | -------------------------------------------------------------------------- | +| `atmos` | `boolean` | Whether or not Dolby Atmos support for the given format is being requested | +| `codecLevel` | `string` | The codec level | +| `codecProfile` | `string` | The codec profile:
**aac**: `mp2lc`, `mp4he` | +| `container` | `Media.Container` | The container format type | +| `sampleRate` | `number` | The sample rate being requested, in kHz | -| Property | Type | Description | -|----------|------|-------------| -| container | `Media.Container` | The container format type | -| profile | `string` | the Codec profile:
**AAC**: "mp2lc", "mp4he" | -| level | `string | the Codec level. | -| atmos | `boolean` | Whether or not Dolby Atmos support for the given format is being requested | -| channels | `int` | Required number of audio channels | -| sampleRate | `int` | The sample rate being requested. | -| mode | `AudioOutput.Mode` | Specify which mode should be used to evaluate the request. Defaults to the current mode if not specified. | +If the `options` parameter is provided, then the `audioFormatSupported` API **MUST NOT** return `true` unless the format specified is supported with **all** of the properties specified by `options` *all at the same time*. -If the `info` parameter is provided, then the `audioFormatSupported` API **MUST NOT** -return `true` unless the format specified is supported with **all** of the properties specified by `info` *all at the same time*. +As multiple audio output modes may be set at the same time, the response **MUST** be based on the best possible audio configuration supported by the device. For instance, if the device is configured for stereo output (which cannot support Atmos) but the AV chain supports Surround 5.1 (which can support Atmos), the latter would be considered the best possible audio configuration and thus used as the basis for the decision. -Use of the `videoFormatSupported` API requires access to the `use` role of the -`xrn:firebolt:capability:device:info` capability. +Use of the `audioFormatSupported` API requires access to the `use` role of the `xrn:firebolt:capability:device:info` capability. ## 5. Display Properties -Apps need to know various aspects of the current (or built in) display on a device. +Apps need to know various aspects of the current (or built-in) display on a device. These will be surfaced in a new `Display` module. Access to these APIs is governed by the `xrn:firebolt:capability:display:info` capability. -### 5.1. Display HDR -The `Display` module **MUST** have an `hdr` method that return the supported HDR profiles as an array of `Media.HDR` values. +### 5.1. Supported HDR Profiles -The `hdr` method **MUST** have an optional `resolution` parameter of type `Media.Resolution`. +The `Display` module **MUST** have an `hdrProfiles` method that returns the display's supported HDR profiles as an array of `Media.HDRProfile` values. -If the `resolution` parameter is not provided the method should return values based on the current resolution. +If no display is present, an empty array is returned. -### 5.2. Display Width and Height +```javascript +Display.hdrProfiles() +//> ["dolbyVision", "hdr10", "hdr10plus", "hlg", "sdr"] +``` -The `Display` module **MUST** have a `width` and `height` method that return the width and height of the display, in centimeters from the HDMI edid. +### 5.2. Color Depth -For built-in displays `width` and `height` **MUST** also be provided. +The `Display` module **MUST** have a `colorDepth` method that returns a numerical value. -### 5.3. Current and Optimal Resolution +If no display is present, a value of zero is returned. -The `Display` module **MUST** have a `currentResolution` and `optimalResolution` method that returns a valid resolution for either the current state of the display, or the displays optimal resolution value. +```javascript +Display.colorDepth() +//> 10 +``` -This method **MUST** return a value from the `Display.Resolution` enum. +### 5.3. Display Size -The `optimalResolution` **MUST** come from the HDMI edid. +The `Display` module **MUST** have a `size` method that returns the width and height of the display, in centimeters. -For built-in displays `optimalResolution` **MUST** also be provided. +If no display is present, a value of zero is returned for both the width and height. -### 5.4. Supported Resolutions - -The `Display` module **MUST** have a `supportedResolutions` method that returns an array of valid resolutions that the display supports. +```javascript +Display.size() +//> [157, 91] +``` -This method **MUST** return a value from the `Display.Resolution` enum. +### 5.4. Display Resolution -### 5.5. Device Supported Resolutions -The `Device` module **MUST** have a `supportedResolutions` method that returns an array of valid resolutions that the device supports, regardless of any connected display. +The `Display` module **MUST** have a `resolution` method that returns the width and height of the display's native resolution. -This method **MUST** return an array with one or more of the following values from the `Display.Resolution` enum. +If no display is present, both returned values **MUST** be zero. -### 5.6. Use Source Framerate -The `Display` module **MUST** have a boolean `useSourceFrameRate` API. +```javascript +Display.resolution() +//> [1920, 1080] +``` -This API **MUST** return `true` if the hdmi output frame rate is set to follow video source frame rate. +### 5.5. Display Resolution Name -Otherwise, this API **MUST** return false. +The `Display` module **MUST** have a `resolutionName` method that returns a user-friendly name of the display's resolution as defined by `Media.ResolutionName`. -## 6. Audio Output Properties -Apps need to know various aspects of the current (or built in) audio output system on a device. +If no display is present, a value of `unknown` is returned. -These will be surfaced in a new `AudioOutput` module. +```javascript +Display.resolutionName() +//> "uhd" +``` -Access to these APIs is governed by the `xrn:firebolt:capability:audio-output:info` capability. +### 5.6. Refresh Rate -### 6.1. Mode -The `AudioOutput` module **MUST** include a `mode` string API that returns an `AudioOutput.Mode` enum that is one of the following values: +The `Display` module **MUST** have a `refreshRate` method that returns an number value for the optimal refresh rate that the display supports (in Hz). -- `AUTO` -- `SURROUND` -- `STEREO` -- `PASSTHROUGH` -- `UNKNOWN` -- `NONE` +If no display is present, a value of zero is returned. -## 7. Media Info +```javascript +Display.refreshRate() +//> 120 +``` -The Firebolt `MediaInfo` module consists of APIs to get information -about any media actively being decoded by the Media Pipeline or an active HDMI input. +### 5.7. Colorimetry -### 7.1. MediaInfo for current app +The `Display` module **MUST** have a `colorimetry` method that returns the display's supported colorimetry values as an array of `Media.Colorimetry` values. -Apps need a way to query the media info for media currently being played -by the app. All of the following methods take a single `pipeline` -parameter, which identifies the Media Pipeline in the current app's scope -that is being queried, e.g.: +If no display is present, an empty array is returned. ```javascript -import { MediaInfo } from '@firebolt-js/sdk' +Display.colorimetry() +//> ["BT2020RGB", "BT2020YCC", "xvYCC601", "xvYCC709"] +``` + +### 5.8. Manufacturer -MediaInfo.videoFormat(1) // return the video codec in the current app's media pipeline 1 -MediaInfo.videoFormat(2) // return the video codec in the current app's media pipeline 2 +The `Display` module **MUST** have a `manufacturer` method that returns the display's manufacturer. + +If no display is present, an empty string is returned. + +```javascript +Display.manufacturer() +//> "Samsung Electric Company" +``` + +### 5.9. Product Name + +The `Display` module **MUST** have a `productName` method that returns the display's product name / model number. + +If no display is present, an empty string is returned. + +```javascript +Display.productName() +//> "Q80A" +``` + +### 5.10. Source Physical Address + +The `Display` module **MUST** have a `sourcePhysicalAddress` method that returns the display's source physical address. + +If no display is present, an empty string is returned. + +```javascript +Display.sourcePhysicalAddress() +//> "3.0.0.0" +``` + +## 6. Device Properties + +Apps need to know various aspects of the device, including its media playing capabilities. + +These will be surfaced in the `Device` module. + +Access to these APIs is governed by the `xrn:firebolt:capability:device:info` capability. + +### 6.1. Current Audio Mode + +The `Device` module **MUST** include an `audioMode` API that returns the currently configured audio output mode on the device. + +The API **MUST** return a value from the `Media.AudioMode` enum. + +### 6.2. Current Video Mode + +The `Device` module **MUST** have a `videoMode` method that returns the current video modes used by the device. + +This method **MUST** return a value from the `Media.VideoMode` enum. + +If no display is present, a value of `unknown` is returned. + +```javascript +Device.videoMode() +//> 1080p60 +``` + +### 6.3. Supported Video Modes + +The `Device` module **MUST** have a `videoModes` method that returns an array of valid video modes that the device and display together support. + +This method **MUST** return an array with one or more values from the `Media.VideoMode` enum. + +```javascript +Device.supportedVideoModes() +//> ["720p50", "720p60", "1080p50", "1080p60"] +``` + +### 6.4. Video Resolution + +The `Device` module **MUST** have a `videoResolution` method that returns the width and height of the current video output resolution. + +If no display is present, both returned values **MUST** be zero. + +```javascript +Device.videoResolution() +//> [1920, 1080] +``` + +### 6.5. Current HDR Profile + +The `Device` module **MUST** have a `hdrProfile` method that returns the HDR profile currently used by the device for video output. + +This method **MUST** return a value from the `Media.HDRProfile` enum. + +```javascript +Device.hdrProfile() +//> "hdr10plus" +``` + +### 6.6. Supported HDR Profiles + +The `Device` module **MUST** have an `hdrProfiles` method that returns the HDR profiles that the device supports, regardless of any connected display. + +```javascript +Device.hdrProfile() +//> ["hdr10", "hdr10plus", "hlg", "sdr"] +``` + +### 6.7. Supported HDCP Version + +The `Device` module **MUST** have a `hdcpVersion` method that returns the latest HDCP version supported by the device. + +This method **MUST** return a value such as: + +- `1.4` +- `2.2` +- `unknown` + +```javascript +Device.hdcpVersion() +//> "2.2" +``` + +### 6.8. Source Frame Rate Used + +The `Device` module **MUST** have a boolean `sourceFrameRateUsed` API. + +This API **MUST** return `true` if the HDMI output frame rate is set to follow the video source's frame rate. + +Otherwise, this API **MUST** return `false`. + +```javascript +Device.sourceFrameRateUsed() +//> true +``` + +### 6.9. On Audio Output Changed + +The `Device` module **MUST** have an `onAudioOutputChanged` event API. + +This event must notify listeners when any of the following properties have changed: + +- `Device.audioMode` + +> TODO: Add more here + +This API **MUST** return the current property values of the above. + +```javascript +Device.onAudioOutputChanged() +//> { +//> "audioMode": "stereo" +//> } +``` + +### 6.10. On Video Output Changed + +The `Device` module **MUST** have an `onVideoOutputChanged` event API. + +This event must notify listeners when any of the following properties have changed: + +- `Device.hdrProfile` +- `Device.sourceFrameRateUsed` +- `Device.videoMode` + +This API **MUST** return the current property values of the above. + +```javascript +Device.onAudioOutputChanged() +//> { +//> "hdrProfile": "hlg", +//> "sourceFrameRateUsed": false, +//> "videoMode": "1080p60", +//> } +``` + +## 7. Media Info + +The Firebolt `MediaInfo` module consists of APIs to get information about any media actively being decoded by the Media Pipeline or an active HDMI input. + +### 7.1. MediaInfo for Current App + +Apps need a way to query the media info for media currently being played by the app. All of the following methods take a single `pipeline` parameter, which identifies the Media Pipeline in the current app's scope that is being queried, e.g.: + +```javascript +MediaInfo.videoFormat(1) // return the video format in the current app's media pipeline 1 +MediaInfo.videoFormat(2) // return the video format in the current app's media pipeline 2 ``` **TODO**: where do we map video tags to ids? need a spec for this? same spec, new spec? JL: i linked to the Media Pipeline spec and merged it into this branch... we should review. -The `pipeline` parameter is required for the JSON-RPC request, however, the Firebolt SDK **SHOULD** provide a default value of `1` if it is not provided by the calling app. +The `pipeline` parameter is required for the JSON-RPC request, however, the Firebolt SDK **SHOULD** provide a default value of `1` if not provided by the calling app. -For example: +For example, the following would query the video format for the app's pipeline `1` in JavaScript (which supports default values for parameters). ```javascript -MediaInfo.videoCodec() +MediaInfo.videoFormat() ``` -Would query the video codec for the app's pipeline `1` in JavaScript, which supports default values for parameters. - #### 7.1.1. Video Format -The `MediaInfo` module **MUST** have a `videoFormat` API that returns an `object` with the -video codec, e.g., H.265, VP9, etc., and resolution of the media currently in the -media pipeline (either playing or paused). +The `MediaInfo` module **MUST** have a `videoFormat` API that returns an `object` with the video codec (e.g. `avc`, `vp9`, etc.) and resolution of the media currently in the media pipeline (either playing or paused). -The `videoFormat` result **MUST** have a `type` property with one of the following values from the `Media.Formats` enum: +The `videoFormat` result **MUST** have an `pipelineId` integer property that denotes the media pipeline/session ID. -- `VIDEO_AV1` -- `VIDEO_DOLBYVISION` -- `VIDEO_H263` -- `VIDEO_H264` -- `VIDEO_H265` -- `VIDEO_H265_M10` -- `VIDEO_MPEG` -- `VIDEO_VP8` -- `VIDEO_VP9` -- `VIDEO_VP9_P2` -- `VIDEO_VP10` -- `VIDEO_VC1` -- `UNKNOWN` -- `NONE` +The `videoFormat` result **MUST** have a `codec` property with one of the values from the `Media.VideoCodec` enum. -The `videoFormat` result **MUST** have an `hdr` array property with zero or more Media.HDRProfile values. +The `videoFormat` result **MUST** have an `hdr` array property with zero or more `Media.HDRProfile` values. -If a value is included the `hdr` array then the media currently in the media pipeline **MUST** include the denoted HDR metadata in the decoded video. +If a value is included in the `hdr` array then the media currently in the media pipeline **MUST** include the denoted HDR metadata in the decoded video. -The `videoFormat` result **MUST** have a `resolution` string property with one of the `Display.Resolution` values. +The `videoFormat` result **MUST** have a `resolution` property with a `Media.Dimensions` value. -The `videoFormat` result **MAY** have a `profile` string property that denotes the profile of the codec. +The `videoFormat` result **MAY** have a `codecProfile` string property that denotes the profile of the codec. -The `videoFormat` result **MAY** have a `level` string property that denotes the level of the codec. +The `videoFormat` result **MAY** have a `codecLevel` string property that denotes the level of the codec. The `videoFormat` API **MUST** be a Firebolt `property:readonly` API, and have a corresponding `onVideoFormatChanged` notification. @@ -407,85 +634,126 @@ have a corresponding `onVideoFormatChanged` notification. Use of the `videoFormat` APIs require access to the `use` role of the `xrn:firebolt:capability:media-info:video-format` capability. +```javascript +MediaInfo.videoFormat(1) +/* +{ + "pipelineId": 1, + "codec": "hevc", + "codecLevel": "4.2", + "codecProfile": "main", + "container": "video/mp4", + "frameRate": 30, + "hdr": [ + "hdr10" + ], + "resolution": [ + 1920, + 1080 + ] +} +*/ +``` + #### 7.1.2. Audio Format -The `MediaInfo` module **MUST** have a `audioFormat` API that returns an `object` with the -audio codec, e.g., AAC, AC3, etc., and sample rate of the media currently in the -media pipeline (either playing or paused). +The `MediaInfo` module **MUST** have a `audioFormat` API that returns an `object` with the below values describing media currently in the media pipeline (either playing or paused). + +The `audioFormat` result **MUST** have an `pipelineId` integer property that denotes the media pipeline/session ID. -The `audioFormat` result **MUST** have a `type` property with one of the following values from the `Media.Formats` enum: +The `audioFormat` result **MUST** have a `biteRate` number property that denotes the audio bit rate. -- `AUDIO_AAC` -- `AUDIO_AC3` -- `AUDIO_AC4` -- `AUDIO_DOLBY_MAT` -- `AUDIO_DTS` -- `AUDIO_DTS_X` -- `AUDIO_EAC3` -- `AUDIO_MPEG` -- `AUDIO_MPEG1` -- `AUDIO_MPEG2` -- `AUDIO_MPEG4` -- `AUDIO_OPUS` -- `AUDIO_OGG` -- `AUDIO_TRUEHD` -- `AUDIO_WAV` +The `audioFormat` result **MUST** have a `channels` string property that denotes the audio output channels. +The `audioFormat` result **MUST** have a `codec` property with one of the values from the `Media.AudioCodec` enum. -The `audioFormat` result **MUST** have a `channels` integer property that denotes the number of audio channels. +The `audioFormat` result **MUST** have a `sampleRate` number property that denotes the audio sample rate. -The `audioFormat` result **MUST** have a `sampleRate` integer property that denotes the audio sample rate. +The `audioFormat` result **MAY** have a `codecLevel` string property that denotes the level of the codec. -The `audioFormat` result **MAY** have a `profile` string property that denotes the profile of the codec. +The `audioFormat` result **MAY** have a `codecProfile` string property that denotes the profile of the codec. -The `audioFormat` result **MAY** have a `level` string property that denotes the level of the codec. +The `audioFormat` API **MUST** be a Firebolt `property:readonly` API, and have a corresponding `onAudioFormatChanged` notification. -The `audioFormat` API **MUST** be a Firebolt `property:readonly` API, and -have a corresponding `onAudioFormatChanged` notification. +Use of the `audioFormat` APIs require access to the `use` role of the `xrn:firebolt:capability:media-info:audio-format` capability. -Use of the `audioFormat` APIs require access to the `use` role of the -`xrn:firebolt:capability:media-info:audio-format` capability. +```javascript +MediaInfo.audioFormat(1) +/* +{ + "pipelineId": 1, + "bitRate": 128, + "channels": 2, + "codec": "aac", + "container": "audio/mp4", + "sampleRate": 48 +} +*/ +``` ### 7.2. Global MediaInfo First party apps need a way to query which media formats are currently being output to the [media pipeline](./media-pipeline.md), without caring about which pipeline. #### 7.2.1. Active Video Formats -The `MediaInfo` module **MUST** have a `activeVideoFormats` API that returns an array of `objects` with the video codec, e.g., H.265, VP9, etc., of the media currently in each media pipeline (either playing or paused). -Each item in the `activeVideoFormats` result array **MUST** conform to the same requirements as the indivual results from the [`videoFormat` API](#611-video-format). +The `MediaInfo` module **MUST** have a `activeVideoFormats` API that returns an array of `objects` for all media currently in the media pipeline (either playing or paused). + +Each item in the `activeVideoFormats` result array **MUST** conform to the same requirements as the individual results from the [`videoFormat` API](#611-video-format). Additionally, the `MediaInfo` module **MUST** have an `onActiveVideoFormatsChanged` notifier that fires whenever any pipeline starts, stops, or changes its current video format. Example: -```typescript -const isDolbyVision:boolean = await MediaInfo.activeVideoFormats().find(f => f.type === Media.Formats.VIDEO_DOLBYVISION) - -MediaInfo.activeVideoFormats((active) => { - const dolbyVision = active.find(f => f.type === Media.Formats.VIDEO_DOLBYVISION) - console.log('Dolby Vision is now ' + (dolbyVision ? 'active' : 'inactive') + '.') -}) +```javascript +MediaInfo.activeVideoFormats().find(f => f.codec === Media.VideoCodec.HEVC) +/* +[ + { + "id": 1, + "codec": "hevc", + "codecLevel": "4.2", + "codecProfile": "main", + "container": "video/mp4", + "frameRate": 30, + "hdr": [ + "hdr10" + ], + "resolution": [ + 1920, + 1080 + ] + } +] +*/ ``` Access to these APIs is gated by `manage` access to the `xrn:firebolt:capability:media-info:video-format` capability. #### 7.2.2. Active Audio Formats -The `MediaInfo` module **MUST** have a `activeAudioFormats` API that returns an `object` with the audio codec, e.g., AAC, AC3, etc., of the media currently in the media pipeline (either playing or paused). -Each item in the `activeAudioFormats` result array **MUST** conform to the same requirements as the indivual results from the [`audioFormat` API](#612-audio-format). +The `MediaInfo` module **MUST** have a `activeAudioFormats` API that returns an array of `objects` for all media currently in the media pipeline (either playing or paused). + +Each item in the `activeAudioFormats` result array **MUST** conform to the same requirements as the individual results from the [`audioFormat` API](#612-audio-format). Additionally, the `MediaInfo` module **MUST** have an `onActiveAudioFormatsChanged` notifier that fires whenever any pipeline starts, stops, or changes its current audio format. Example: -```typescript -const isDolbyAtmos:boolean = await MediaInfo.activeAudioFormats().find(f => f.type === Media.Formats.AUDIO_DOLBY_MAT) - -MediaInfo.activeVideoFormats((active) => { - const dolbyAtmos = active.find(f => f.type === Media.Formats.AUDIO_DOLBY_MAT) - console.log('Dolby Vision is now ' + (dolbyAtmos ? 'active' : 'inactive') + '.') -}) +```javascript +MediaInfo.activeAudioFormats().find(f => f.codec === Media.AudioCodec.AAC) +/* +[ + { + "id": 1, + "bitRate": 128, + "channels": 2, + "codec": "aac", + "container": "audio/mp4", + "sampleRate": 48 + } +] +*/ ``` Access to these APIs is gated by `manage` access to the `xrn:firebolt:capability:media-info:audio-format` capability. diff --git a/requirements/specifications/media/media-pipeline.md b/requirements/specifications/media/media-pipeline.md deleted file mode 100644 index 1b620a368..000000000 --- a/requirements/specifications/media/media-pipeline.md +++ /dev/null @@ -1,288 +0,0 @@ -# Media Pipeline Requirements - -Document Status: Working Draft - -See [Firebolt Requirements Governance](./governance.md) for more info. - -**NOTE**: Update this link based on your directory depth ^^ - -| Contributor | Organization | -| -------------- | -------------- | -| Lucien Kennedy-Lamb | Sky | -| Bijal Shah | Sky | -| Yuri Pasquali | Sky | -| Stuart Pett | Sky | -| Wouter Meek | Comcast | -| Jeremy LaCivita | Comcast | -| Kevin Pearson | Comcast | -| Phillip Stroffolino | Comcast | - -## 1. Overview - -Playback of audio/video media is a first-class concern for Firebolt. As -such, Firebolt must provide a consistent, secure Media Pipeline API for -sending audio and video streams from an app container out to a decoder -and CDM for content decryption, decoding, and rasterization. - -Additionally, Firebolt browsers must leverage the same Media Pipeline -implementation as native apps, so that content plays back the same in -both environments and can have resources managed in the same way. - -This is achieved with the open source [Rialto Media -Pipeline](https://github.com/rdkcentral/rialto) API and implementation: - -TODO: we need a few additions to support Netflix: - -**TODO**: the rest of these need to move to Rialto: - - -- Preferred resolution/framerate -- atmos lock -- loudness eq -The audioSettings **MUST** include an `atmosOutputLock` boolean property. - -The audioSettings **MUST** include an `audioLoundnessEquivalence` boolean property. - -The audioSettings API **MUST** be a Firebolt `property:readonly` API, and -have a corresponding `onAudioSettingsChanged` notification. - -Use of the `audioSettings` and `onAudioSettingsChanged` APIs require access -to the `use` role of the `xrn:firebolt:capability:device:audio-settings` capability. - -**TODO**: Netflix needs to be able to *set* atmosOutputLock... - - -![Diagram Description automatically -generated](../../../../requirements/images/specifications/media/media-pipeline/media/image1.png) - -## 2. Table of Contents -- [1. Overview](#1-overview) -- [2. Table of Contents](#2-table-of-contents) -- [3. Media Pipeline](#3-media-pipeline) - - [3.1. Media Pipeline Commands](#31-media-pipeline-commands) - - [3.2. MediaPipeline Notifications](#32-mediapipeline-notifications) - - [3.3. Media Pipeline Management](#33-media-pipeline-management) -- [4. W3C Media APIs](#4-w3c-media-apis) - - [4.1. MediaSource](#41-mediasource) - - [4.2. MediaElement](#42-mediaelement) -- [5. Supported Media](#5-supported-media) - - [5.1. Container formats](#51-container-formats) - - [5.2. Video codecs](#52-video-codecs) - - [5.3. Audio codecs](#53-audio-codecs) -- [6. Supported Decryption](#6-supported-decryption) - - [6.1. DRM Key Systems](#61-drm-key-systems) - - [6.2. Decryption Schemes](#62-decryption-schemes) - -## 3. Media Pipeline - -The Firebolt Media Pipeline consists of an API for passing audio & video -streams *out* of individual app containers *into* managed media sessions -that support decryption, decoding, and rasterization. Additionally there -is an API for sending notifications out of the decoder and into the app -container. - -The goal of this abstraction is to decouple individual Firebolt Apps and -containers from the underlying implementations of these features. -Additionally, this abstraction allows for the same component to manage -media sessions in a consistent manner regardless of implementation. - -To ensure consistency, all native containers, including browsers, that -run on Firebolt platforms **MUST** use Rialto as the only pipeline to -Media decoders and CDMs. - -The Media Pipeline API uses a client-server model to allow Firebolt -devices to manage media pipeline resources and visibility. This enables -multiple media pipeline sessions to be running at once, even though they -will not all have access to the underlying decoder. Command messages are -passed using an efficient binary RPC protocol. Media data is passed -using memory shared by only the app container and its respective Rialto -session server. - -![Timeline Description automatically -generated](../../../requirements/images/specifications/media/media-pipeline/media/image2.png) - -### 3.1. Media Pipeline Commands - -Media Pipeline commands go from the app to the Rialto Media Pipeline -server. - -This section describes the use cases that the Rialto API solves. For -actual API semantics, please refer to the Rialto Github repository. - -The MediaPipeline API **MUST** support pushing data into the Pipeline, -in response to a notification that more data is needed. - -The MediaPipeline API **MUST** support informing the Pipeline that it -has reached the end of a stream and no more data is available. - -The MediaPipeline API **MUST** support initializing (aka loading) a new -Media session, typically done before starting a new stream. - -The MediaPipeline API **MUST** support attaching one video and one audio -source buffer. - -The MediaPipeline API **MUST** support removing source buffers. - -The MediaPipeline API **MUST** support pausing and playing. - -The MediaPipeline API **MUST** support stopping playback, such that it -cannot be resumed without reinitializing. - -The MediaPipeline API **MUST** support setting the playback rate. - -The MediaPipeline API **MUST** support setting the current playback -position. - -The MediaPipeline API **MUST** support setting the video location and -dimensions. - -The MediaPipeline API **MUST** support dynamic audio decode switching to -support Netflix use cases. - -### 3.2. MediaPipeline Notifications - -Media Pipeline notifications come from the Rialto Media Pipeline server -to the app. - -This section describes the use cases that the Rialto API solves. For -actual API semantics, please refer to the Rialto Github repository. - -The MediaPipeline API **MUST** support notifying the app when more audio -or video data is needed in order for playback to continue without error. - -The MediaPipeline API **MUST** support notifying the app when a need for -more audio or video data is no longer relevant, e.g. due to switching -buffers or stopping. - -The MediaPipeline API **MUST** support notifying the app of the current -Media duration. - -The MediaPipeline API **MUST** support notifying the app of the current -Media position. - -The MediaPipeline API **MUST** support notifying the app of the current -native dimensions of the current Media. - -The MediaPipeline API **MUST** support notifying the app of the current -buffer state, e.g. buffered, idle, error. - -The MediaPipeline API **MUST** support notifying the app of the current -playback state, e.g. playing, paused, seeking, stopped. - -The MediaPipeline API **MUST** support notifying the app whether the -current media contains video and/or audio data. - -The MediaPipeline API **MUST** support notifying the app when frames of -video or samples of audio are dropped due to performance. - -The MediaPipeline API **MUST** support notifying the app when EIA/CEA -608/708 closed caption data is extracted and ready for presentation. - -### 3.3. Media Pipeline Management - -Rialto also exposes a management API for deciding which Rialto session -is active and visible. The Firebolt Execution Environment, typically -Ripple interacts with this API as apps move in and out of focus. - -![Diagram Description automatically -generated](../../../requirements/images/specifications/media/media-pipeline/media/image3.png) - -**TODO**: add decode pool requirements, e.g. minimum decoders for a -Firebolt platform, etc. \-- This needs to be written out. - -**TODO**: add colloquial description of API surface in Rialto Server -Manager. We need this written out for the management api. - -## 4. W3C Media APIs - -The Media Source API enables the entire functional scope of the W3C -MediaSource and MediaElement APIs, (e.g. MediaSource.addSourceBuffer, -video.src, video.play(), etc.) - -Firebolt browsers will use Rialto to implement `MediaElement` and -`MediaSource` APIs. - -### 4.1. MediaSource - -Browser MediaSource APIs **MUST** be powered by Rialto. Higher level -concerns such as source buffer management, etc., are outside the scope -of this document. - -When using MediaSource APIs, demuxing is the concern of the app, not the -browser. - -![Graphical user interface, application, Teams Description automatically -generated](../../../requirements/images/specifications/media/media-pipeline/media/image4.png) - -### 4.2. MediaElement - -Browser Media Element implementations **MUST** support progressive -download and demuxing of the following media container formats: - -- Progressive MPEG4 video - -- Progressive MP3 audio - -Demuxed segments **MUST** be sent to Rialto for decoding. - -MediaElement implementations **MUST** not support additional formats, -e.g. HLS or DASH. These formats should be parsed and fetched by a player -implemented on top of MSE. - -Legacy support for direct playback of HLS is outside the scope of this -document. - -![Graphical user interface, application Description automatically -generated](../../../requirements/images/specifications/media/media-pipeline/media/image5.png) - -## 5. Supported Media - -The Rialto Media Pipeline supports the following media types. - -### 5.1. Container formats - -The Media Pipeline **MUST** support the following container formats: - -- Demuxed MP4 audio and video streams, via MSE - -- MPEG 1 for audio-only playback (progressively fetched upstream) - -### 5.2. Video codecs - -The Media Pipeline **MUST** support the following video codecs: - -- AVC - -- HEVC - -- VP9 - -- H.264 - -### 5.3. Audio codecs - -The Media Pipeline **MUST** support the following audio codecs: - -- HE-AAC - -- AAC-LC - -- HE-AACv2 - -- MPEG-1 Audio Layer III (for audio-only media) - -## 6. Supported Decryption - -The Rialto Media Pipeline supports the following media decryption types. - -### 6.1. DRM Key Systems - -- Widevine - -- PlayReady - -- *I know there\'s **legacy use cases**\... do we call them out?* - -### 6.2. Decryption Schemes - -- CMAF CBCS decryption diff --git a/requirements/specifications/openrpc-extensions/app-passthrough-apis.md b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md new file mode 100644 index 000000000..826f7bed3 --- /dev/null +++ b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md @@ -0,0 +1,463 @@ +# App Pass-through APIs + +Document Status: Working Draft + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +| Contributor | Organization | +|-----------------|----------------| +| Jeremy LaCivita | Comcast | +| Kevin Pearson | Comcast | +| Yuri Pasquali | Sky | + +## 1. Overview +This document describes how one Firebolt App can provide a capability that may be used by another Firebolt App, with the platform as a permission broker that passes the requests and responses to each app without feature-specific logic. + +This document covers the App Pass-through Firebolt OpenRPC extension as well as how Firebolt implementations should detect and execute app provided pass-through APIs. + +Some APIs require an app to fulfill the request on behalf of another app, e.g. to provide a UX or cross-app data sharing. Generally the calling app doesn't care, or have a say in, which other app provides the API, that is up to the Firebolt distributor. + +To facilitate these APIs, Firebolt denotes an OpenRPC tag with OpenRPC extensions to connect the `provide` API to the `use` API. + +This document is written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt) and should include the following summary in the Overview section: + +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. + +## 2. Table of Contents +- [1. Overview](#1-overview) +- [2. Table of Contents](#2-table-of-contents) +- [3. Open RPC Extensions](#3-open-rpc-extensions) + - [3.1. Provided By Extension](#31-provided-by-extension) +- [4. Routing App pass-through APIs](#4-routing-app-pass-through-apis) + - [4.1. No available providers](#41-no-available-providers) + - [4.2. Direct pass-through](#42-direct-pass-through) + - [4.4. Pass-through notifications](#44-pass-through-notifications) +- [5. Provider Candidates](#5-provider-candidates) +- [6. Best Candidate](#6-best-candidate) +- [7. Result Transformations](#7-result-transformations) +- [8. Provider Parameter Injection](#8-provider-parameter-injection) +- [9. API Gateway](#9-api-gateway) +- [10. Example: User Interest](#10-example-user-interest) + - [10.1. User Interest Pull](#101-user-interest-pull) + - [10.2. User Interest Push](#102-user-interest-push) + +## 3. Open RPC Extensions + +### 3.1. Provided By Extension +Firebolt OpenRPC **MUST** support a `string` `x-provided-by` extension property on the `capabilities` tag that denotes a method is provided by some app on the device registering for the specified provider API, e.g.: + +```json +{ + "methods": [ + { + "name": "Keyboard.standard", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Keyboard.onRequestStandard", + "x-uses": [ + "xrn:firebolt:capability:input:keyboard" + ] + } + ] + } + ] +} +``` + +The method denoted by `x-provided-by` is referred to as the "*provider*" or "*provider method*" for the remainder of this document. + +The method with the `x-provided-by` extension is referred to as the "*platform method*" for the remainder of this document. + +To prevent unresolvable chaining of methods the `x-provided-by` extension **MUST NOT** be used on a method with any value in the `x-provides` extension. + +To prevent compound methods a platform method **MUST** `use` a single capability or `manage` a single capability, but not both. + +The provider method **MUST** provide the same capability that the platform method either uses or manages. + +If a platform method has no provider method then it is not a valid Firebolt OpenRPC method schema, and a validation error **MUST** be generated. + +## 4. Routing App pass-through APIs +App pass-through APIs may be routed in one of several ways. + +When an app calls a platform method, i.e. one with an `x-provided-by` extension, the platform **MUST** use one of the routing methods defined in this section based on various properties of the method. + +### 4.1. No available providers +When an app calls a platform method with an `x-provided-by` extension, the platform **MUST** return an unavailable error if there is no [candidate app](#7-provider-candidates) to execute the provider method. + +```json +{ + "id": 1, + "error": { + "code": -50300, + "message": "Capability is unavailable." + } +} +``` + +Where `` is the capability XRN string, e.g. `xrn:firebolt:capabilities:example:foo`. + +### 4.2. Direct pass-through +A direct pass-through is where a single app provides a single response to a single request by another app. + +This section only applies to app provider methods that do not have an `event` tag. + +The platform method result schema **MUST** either: + +> Match the `x-response` schema on the provider method so that the result can be passed through. +> +> or +> +> Have a property that matches the `x-response-name` string and `x-response` schema on the +> provider method so that the result can be composed and passed through. + +The platform **MUST** call the provider method from the [best candidate](#8-best-candidate) app and acquire the result. + +If the platform method result schema matches the `x-response` schema on the provider method then the value **MUST** be used as-is. + +Otherwise if the platform method result schema has a property that matches the `x-response` schema on the provider method then the value **MUST** be composed into an object under the corresponding property name and the platform **MUST** apply any [result transformations](#9-result-transformations) to the composed result. + +### 4.4. Pass-through notifications +Firebolt events have a synchronous subscriber registration method, e.g. `Lifecycle.onInactive(true)`, in addition to asynchronous notifications when the event actually happens. For events powered by an app pass-through, only the asynchronous notifications are passed in by the providing app. The initial event registration is handled by the platform, and the success response is not handled by the providing app. + +This section only applies to platform methods that have an `event` tag. + +App provided event registration **MUST** not return an availability error due to a lack of providers, since one may be launched at a future point. + +To ensure that event provider methods all behave the same the provider method **MUST** have a `result` schema with `"type"` set to `"null"`, since it will not expect any data in the response from the platform after pushing the notification. + +The platform method result schema **MUST** either: + +> Match the *last* parameter schema on the provider method so that the result can be passed through. +> +> Have a property that matches the *last* parameter name and schema on the provider method so that the result can be passed through. + +Example platform method with context: +```json +{ + "name": "onFoo", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capabilities:example:foo" + ], + "x-provided-by": "foo" + }, + { + "name": "event" + } + ], + "params": [ + { + "name": "context1", + "schema":{ + "type": "string" + } + }, + { + "name": "context2", + "schema": { + "type": "number" + } + } + ], + "result": { + "name": "value", + "schema": { + "type": "boolean" + } + } +} +``` + +Matching provider method: + +```json +{ + "name": "foo", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capabilities:example:foo" + } + ], + "params": [ + { + "name": "context1", + "schema":{ + "type": "string" + } + }, + { + "name": "context2", + "schema": { + "type": "number" + } + }, + { + "name": "value", + "schema": { + "type": "boolean" + } + } + ] +} +``` + +When a provider app calls a provider method mapped to an event the platform **MUST** ignore the notification if the app is not a [candidate app](#7-provider-candidates) for this capability. + +If the platform method result schema matches the *last* parameter schema on the provider method then the value **MUST** be used as-is. + +Otherwise if the platform method result schema has a property that matches the *last* parameter schema on the provider method then the value **MUST** be composed into an object under the corresponding property name and the platform **MUST** apply any [result transformations](#9-result-transformations) to the composed result. + +If the value was composed into the platform method result under a matching property, then any context parameter values from the provider method that correspond to a property name and schema in the platform method result **MUST** also be composed into the platform method result under those properties. + +Finally the platform **MUST** dispatch the notification to the app that registered for the event via the original platform method, using all but the last parameter as context. + +## 5. Provider Candidates +When a platform method with an `x-provided-by` extension is called, then +all loaded apps that have permission to provide the capability **MUST** be +considered as candidates to fulfill the method. + +## 6. Best Candidate +Any provider candidates that have not registered to provide the method in +question **MUST NOT** be considered the best candidate and removed from +consideration. + +If there is only one candidate left then it **MUST** be the best candidate. + +If there is more than one candidate left, then the candidate app that most recently had RCU input focus **MUST** be the best candidate. + +If none of the candidates have had focus yet, then the candidate app that was most recently launched **MUST** be the best candidate. + +## 7. Result Transformations +A platform method may be configured to insert the providing app id into composite values. This is not allowed in non-composite results to avoid collisions with the provder method sending an appId and Firebolt overriding it. + +If a "composite result" was used to wrap the provider method value and the platform method's schema has an `appId` `string` property at the top level then the property's value **MUST** be set to the the appId of the providing app for that result. + +## 8. Provider Parameter Injection +If the provider method has a parameter named `appId` and the platform method *does not*, then the appId of the app calling the platform method **MUST** be sent to the provider in the `appId` parameter. + +If the platform method is an `event` and the provider method has context parameters then each context parameter from the provider that has a matching context parameter in the event **MUST** have it's value passed to that parameter. + +If the platform method is an `event` with a "composite result" and the provider method has context parameters then each context parameter from the provider that has a matching property on the `result` object **MUST** have it's value copied into that property. + +## 9. API Gateway +The Firebolt API Gateway **MUST** detect app-passthrough APIs and map the `use`/`manage` APIs to the corresponding `provide` APIs by parsing the Firebolt OpenRPC Specification and following the logic outline in this document. + +## 10. Example: User Interest + +The following schemas are referenced by these examples: + +```json +{ + "components": { + "schemas": { + "InterestType": { + "type": "string", + "enum": [ + "interest", + "disinterest" + ] + }, + "InterestReason": { + "type": "string", + "enum": [ + "playlist" + ] + }, + "EntityDetailsFromApp": { + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + }, + "required": [ + "appId", + "entity" + ] + } + } + } +} +``` + +### 10.1. User Interest Pull + +Platform method: + +```json +{ + "methods": [ + { + "name": "requestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.onRequestUserInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "#/components/schemas/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "#/components/schemas/InterestReason" + } + } + ], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/EntityDetailsFromApp", + } + } + } + ] +} +``` + +Provider method: + +```json +{ + "methods": [ + { + "name": "onRequestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + }, + { + "name": "event", + "x-response": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + ], + "result": { + "name": "request", + "schema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/InterestType", + }, + "reason": { + "$ref": "#/components/schemas/InterestReason", + } + } + } + } + } + ] +} +``` + +### 10.2. User Interest Push + +Provider method: + +```json +{ + "methods": [ + { + "name": "userInterest", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:discovery:interest" + } + ], + "params": [ + { + "name": "type", + "schema": { + "$ref": "#/components/schemas/InterestType", + } + }, + { + "name": "reason", + "schema": { + "$ref": "#/components/schemas/InterestReason", + } + }, + { + "name": "entity", + "schema": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + ], + "result": { + "name": "result", + "schema": { + "type": "null" + } + } + } + ] +} +``` + +Platform Method: + +```json +{ + "methods": [ + { + "name": "onUserInterest", + "tags": [ + { + "name": "capabilities", + "x-provided-by": "Discovery.userInterest", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + }, + { + "name": "event" + } + ], + "params": [], + "result": { + "name": "interest", + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/InterestType" + }, + "reason": { + "$ref": "#/components/schemas/InterestReason" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + } + + } + } + } + ] +} +``` diff --git a/requirements/style-guide-and-template.md b/requirements/style-guide-and-template.md index 2a9a1ed1d..b7da04121 100644 --- a/requirements/style-guide-and-template.md +++ b/requirements/style-guide-and-template.md @@ -6,9 +6,9 @@ See [Firebolt Requirements Governance](./governance.md) for more info. **NOTE**: Update this link based on your directory depth ^^ -| Contributor | Organization | -| -------------- | -------------- | -| TBD | TBD | +| Contributor | Organization | +| ----------- | ------------ | +| TBD | TBD | ## 1. Overview This document is both a style guide *and* a template for Firebolt Requirements Specifications. @@ -36,7 +36,7 @@ The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL **NOTE**: This is a simple table of contents. It should include links to all headers in the document, except for the top-level header (i.e. `# Title`). It is recommended to use a Markdown plugin to generate this based on headers ranging from level two to level six. Delete this note from your actual spec :) ## 3. Specification Style Requirements -Firebolt uses method templates in order to code-generate consistent APIs. For example, methods with the `"property"` tag only need to have the `getter` editorially defined. The Firebolt OpenRPC tools will auto-generate the `setter` and `subscriber` as OpenRPC methods with matching types. Additionally, the Firebolt OpenRPC tools wil then code-generate the getter, setter, and subscriber as APIs in various languages using templates. +Firebolt uses method templates in order to code-generate consistent APIs. For example, methods with the `"property"` tag only need to have the `getter` editorially defined. The Firebolt OpenRPC tools will auto-generate the `setter` and `subscriber` as OpenRPC methods with matching types. Additionally, the Firebolt OpenRPC tools will then code-generate the getter, setter, and subscriber as APIs in various languages using templates. This enables both consistent APIs (all properties have a recongnizable pattern) and consistent SDK implementation, which reduces the code that needs to be tested. diff --git a/src/openrpc/audio_output.json b/src/openrpc/audio_output.json deleted file mode 100644 index 874852984..000000000 --- a/src/openrpc/audio_output.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "openrpc": "1.2.4", - "info": { - "title": "Audio Output Properties", - "description": "A module for querying various aspects of the current (or built-in) audio output system of a device", - "version": "0.0.0" - }, - "methods": [ - { - "name": "mode", - "summary": "Return the audio mode currently supported by the platform.", - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:audio-output:info" - ] - } - ], - "params": [], - "result": { - "name": "audioMode", - "summary": "The audio mode supported by the platform.", - "schema": { - "$ref": "#/components/schemas/AudioMode" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [], - "result": { - "name": "Default Result", - "value": "Stereo" - } - } - ] - } - ], - "components": { - "schemas": { - "AudioMode": { - "title": "AudioMode", - "type": "string", - "enum": [ - "Mono", - "Stereo", - "Surround", - "Passthrough", - "Auto", - "StereoSurroundMatFollow", - "Unknown", - "None" - ], - "description": "The audio output mode supported by the platform" - } - } - } -} diff --git a/src/openrpc/content.json b/src/openrpc/content.json new file mode 100644 index 000000000..3232d43a0 --- /dev/null +++ b/src/openrpc/content.json @@ -0,0 +1,193 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "Content", + "version": "0.0.0", + "description": "" + }, + "methods": [ + { + "name": "requestUserInterest", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [ + { + "name": "type", + "required": true, + "schema": { + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/InterestType" + } + }, + { + "name": "reason", + "required": true, + "schema": { + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/InterestReason" + } + } + ], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/InterestResult" + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "type", + "value": "interest" + }, + { + "name": "reason", + "value": "playlist" + } + ], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + }, + { + "name": "onUserInterest", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:discovery:interest" + ] + } + ], + "summary": "Provide information about the entity currently displayed or selected on the screen.", + "description": "Provide information about the entity currently displayed or selected on the screen.", + "params": [], + "result": { + "name": "interest", + "schema": { + "$ref": "#/components/schemas/InterestEvent" + }, + "summary": "The EntityDetails data." + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "interest", + "value": { + "appId": "cool-app", + "type": "interest", + "reason": "playlist", + "entity": { + "identifiers": { + "entityId": "345", + "entityType": "program", + "programType": "movie" + }, + "info": { + "title": "Cool Runnings", + "synopsis": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pulvinar sapien et ligula ullamcorper malesuada proin libero nunc.", + "releaseDate": "1993-01-01T00:00:00.000Z", + "contentRatings": [ + { + "scheme": "US-Movie", + "rating": "PG" + }, + { + "scheme": "CA-Movie", + "rating": "G" + } + ] + } + } + } + } + } + ] + } + ], + "components": { + "schemas": { + "InterestResult": { + "title": "InterestResult", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + }, + "required": [ + "appId", + "entity" + ] + }, + "InterestEvent": { + "title": "InterestEvent", + "type": "object", + "properties": { + "appId": { + "type": "string" + }, + "type": { + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/InterestType" + }, + "reason": { + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/InterestReason" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entity#/definitions/EntityDetails" + } + }, + "required": [ + "appId", + "entity", + "type", + "reason" + ] + } + } + } +} \ No newline at end of file diff --git a/src/openrpc/device.json b/src/openrpc/device.json index 5d918fd29..6788dd245 100644 --- a/src/openrpc/device.json +++ b/src/openrpc/device.json @@ -360,9 +360,87 @@ ] }, { - "name": "hdcp", - "summary": "Get the supported HDCP profiles", + "name": "name", + "summary": "The human readable name of the device", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "Default Result", + "value": "Living Room" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "Default Result", + "value": "Kitchen" + } + } + ] + }, + { + "name": "onDeviceNameChanged", + "tags": [ + { + "name": "event" + }, + { + "name": "deprecated", + "x-since": "0.6.0", + "x-alternative": "Device.name()" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:name" + ] + } + ], + "summary": "Get the human readable name of the device", "params": [], + "result": { + "name": "value", + "summary": "the device friendly-name", + "schema": { + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "Living Room" + } + } + ] + }, + { + "name": "hdcp", + "summary": "Get the supported HDCP versions available for content transmission", "tags": [ { "name": "property:readonly" @@ -372,18 +450,24 @@ "x-uses": [ "xrn:firebolt:capability:device:info" ] + }, + { + "name": "deprecated", + "x-since": "1.2.0", + "x-alternative": "Device.hdcpVersionSupported()" } ], + "params": [], "result": { - "name": "supportedHdcpProfiles", - "summary": "the supported HDCP profiles", + "name": "hdcp", + "summary": "The supported HDCP versions", "schema": { "$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap" } }, "examples": [ { - "name": "Getting the supported HDCP profiles", + "name": "Default Example", "params": [], "result": { "name": "Default Result", @@ -395,23 +479,61 @@ } ] }, + { + "name": "hdcpVersionSupported", + "summary": "Get the HDCP version supported by the device", + "tags": [ + { + "name": "property:immutable" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "hdcpVersionSupported", + "summary": "The supported HDCP version", + "schema": { + "$ref": "#/components/schemas/HDCPVersion" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "2.2" + } + } + ] + }, { "name": "hdr", "summary": "Returns an array of valid HDR profiles that the device supports", - "params": [], "tags": [ { - "name": "property:readonly" + "name": "property:immutable" }, { "name": "capabilities", "x-uses": [ "xrn:firebolt:capability:device:info" ] + }, + { + "name": "deprecated", + "x-since": "1.2.0", + "x-alternative": "Device.hdrProfiles()" } ], + "params": [], "result": { - "name": "supportedHdrProfiles", + "name": "hdr", "summary": "The supported HDR profiles", "schema": { "$ref": "https://meta.comcast.com/firebolt/types#/definitions/BooleanMap" @@ -419,7 +541,7 @@ }, "examples": [ { - "name": "The supported HDR profiles", + "name": "Default Example", "params": [], "result": { "name": "Default Result", @@ -434,9 +556,8 @@ ] }, { - "name": "audio", - "summary": "Get the supported audio profiles", - "params": [], + "name": "hdrProfile", + "summary": "Get the current HDR profile set on the device for video output.", "tags": [ { "name": "property:readonly" @@ -448,36 +569,31 @@ ] } ], + "params": [], "result": { - "name": "supportedAudioProfiles", - "summary": "the supported audio profiles", + "name": "hdrProfile", + "summary": "The current HDR profile", "schema": { - "$ref": "#/components/schemas/AudioProfiles" + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" } }, "examples": [ { - "name": "Getting the supported audio profiles", + "name": "Default Example", "params": [], "result": { "name": "Default Result", - "value": { - "stereo": true, - "dolbyDigital5.1": true, - "dolbyDigital5.1+": true, - "dolbyAtmos": true - } + "value": "hdr10" } } ] }, { - "name": "screenResolution", - "summary": "Get the current screen resolution", - "params": [], + "name": "hdrProfiles", + "summary": "Get all HDR profiles supported by the device, regardless of any connected display.", "tags": [ { - "name": "property:readonly" + "name": "property:immutable" }, { "name": "capabilities", @@ -486,31 +602,53 @@ ] } ], + "params": [], "result": { - "name": "screenResolution", - "summary": "the resolution", + "name": "hdrProfiles", + "summary": "The supported HDR profiles", "schema": { - "$ref": "#/components/schemas/Resolution" + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" + } } }, "examples": [ { - "name": "Getting the screen resolution", + "name": "Example with a device and display that both support HDR", "params": [], "result": { "name": "Default Result", "value": [ - 1920, - 1080 + "hdr10", + "hdr10plus", + "hlg" + ] + } + }, + { + "name": "Example with either a device or display that does not support HDR", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "sdr" ] } + }, + { + "name": "Example where no display is present", + "params": [], + "result": { + "name": "Default Result", + "value": [] + } } ] }, { - "name": "videoResolution", - "summary": "Get the current video resolution", - "params": [], + "name": "audio", + "summary": "Get the supported audio profiles", "tags": [ { "name": "property:readonly" @@ -522,103 +660,78 @@ ] } ], + "params": [], "result": { - "name": "videoResolution", - "summary": "the resolution", + "name": "supportedAudioProfiles", + "summary": "the supported audio profiles", "schema": { - "$ref": "#/components/schemas/Resolution" + "$ref": "#/components/schemas/AudioProfiles" } }, "examples": [ { - "name": "Getting the video resolution", + "name": "Default Example", "params": [], "result": { "name": "Default Result", - "value": [ - 1920, - 1080 - ] + "value": { + "stereo": true, + "dolbyDigital5.1": true, + "dolbyDigital5.1+": true, + "dolbyAtmos": true + } } } ] }, { - "name": "videoFormatSupported", - "summary": "Check whether content of a given a video format and resolution is supported by the device's current configuration. These values may change as different AV inputs are activated or connected.", - "params": [ + "name": "screenResolution", + "summary": "Get the width and height of the current screen resolution.", + "tags": [ { - "name": "format", - "summary": "The video format used to check whether its supported by the device's current configuration.", - "required": true, - "schema": { - "$ref": "#/components/schemas/VideoFormat" - } + "name": "property:readonly" }, - { - "name": "resolution", - "summary": "The video resolution used to check whether its supported by the device's current configuration.", - "schema": { - "$ref": "#/components/schemas/VideoFormatResolution" - } - } - ], - "tags": [ { "name": "capabilities", "x-uses": [ "xrn:firebolt:capability:device:info" ] + }, + { + "name": "deprecated", + "x-since": "1.2.0", + "x-alternative": "Display.resolution()" } ], + "params": [], "result": { - "name": "videoFormatSupported", - "summary": "Whether content of the provided video format and resolution are supported by the device's current configuration.", + "name": "screenResolution", + "summary": "The resolution", "schema": { - "type": "boolean" + "$ref": "#/components/schemas/Resolution" } }, "examples": [ { - "name": "Specify the video format and resolution to check", - "params": [ - { - "name": "format", - "value": "av1" - }, - { - "name": "resolution", - "value": "1080i" - } - ], + "name": "Default Example", + "params": [], "result": { "name": "Default Result", - "value": true + "value": [ + 1920, + 1080 + ] } } ] }, { - "name": "videoFormatPossible", - "summary": "Check whether content of a given a video format and resolution is supported by the device regardless of its configuration. These values will never change without a restart of the device.", - "params": [ + "name": "videoResolution", + "summary": "Get the resolution of the current video output in pixels. Returns a zero value for width and height if no display is present.", + "tags": [ { - "name": "format", - "summary": "The video format used to check whether its supported by the device.", - "required": true, - "schema": { - "$ref": "#/components/schemas/VideoFormat" - } + "name": "property:readonly" }, - { - "name": "resolution", - "summary": "The video resolution used to check whether its supported by the device.", - "schema": { - "$ref": "#/components/schemas/VideoFormatResolution" - } - } - ], - "tags": [ { "name": "capabilities", "x-uses": [ @@ -626,79 +739,76 @@ ] } ], + "params": [], "result": { - "name": "videoFormatPossible", - "summary": "Whether content of the provided video format and resolution are supported by the device.", + "name": "videoResolution", + "summary": "The resolution", "schema": { - "type": "boolean" + "$ref": "#/components/schemas/Resolution" } }, "examples": [ { - "name": "Specify the video format and resolution to check.", - "params": [ - { - "name": "format", - "value": "av1" - }, - { - "name": "resolution", - "value": "1080i" - } - ], + "name": "Default Example", + "params": [], "result": { "name": "Default Result", - "value": true + "value": [ + 1920, + 1080 + ] } } ] }, { "name": "audioFormatSupported", - "summary": "Check whether content of a given audio format and channel output is supported by the device's current configuration. These values may change as different AV inputs are activated or connected.", + "summary": "Check whether content of a given audio format is supported by the device's current configuration. The result is based on the device's best possible audio output configuration. These values may change as different AV inputs or peripherals are activated or connected.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], "params": [ { - "name": "format", - "summary": "Audio format used to check whether its supported.", + "name": "codec", + "summary": "Audio codec used to check whether its supported.", "required": true, "schema": { - "$ref": "#/components/schemas/AudioFormat" + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/AudioCodec" } }, { - "name": "channels", - "summary": "An audio channels value used to check whether its supported.", + "name": "options", + "summary": "Additional options to use for checking whether an audio format is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/AudioChannels" + "$ref": "#/components/schemas/AudioFormatOptions" } } ], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], "result": { "name": "audioFormatSupported", - "summary": "Whether content of the provided audio format and channels value are supported by the device's current configuration.", + "summary": "Whether audio content of the given format is supported by the device's current configuration.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the audio format and channel to check", + "name": "Check whether EAC3 codec with Atmos is supported", "params": [ { - "name": "format", - "value": "AAC" + "name": "codec", + "value": "eac3" }, { - "name": "channels", - "value": "MONO" + "name": "options", + "value": { + "atmos": true + } } ], "result": { @@ -709,51 +819,56 @@ ] }, { - "name": "audioFormatPossible", - "summary": "Check whether content of a given audio format and channel output is supported by the device regardless of its configuration. These values will never change without a restart of the device.", + "name": "videoFormatSupported", + "summary": "Check whether video content of the given format is supported by the device's current configuration. These values may change as different AV inputs or peripherals are activated or connected.", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], "params": [ { - "name": "format", - "summary": "Audio format used to check whether its supported.", + "name": "codec", + "summary": "The video codec to check whether its supported by the device's current configuration.", "required": true, "schema": { - "$ref": "#/components/schemas/AudioFormat" + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/VideoCodec" } }, { - "name": "channels", - "summary": "An audio channels value used to check whether its supported.", + "name": "options", + "summary": "Additional options to use for checking whether a video is supported by the device. All values must be true for the content to be playable.", "schema": { - "$ref": "#/components/schemas/AudioChannels" + "$ref": "#/components/schemas/VideoFormatOptions" } } ], - "tags": [ - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:device:info" - ] - } - ], "result": { - "name": "audioFormatPossible", - "summary": "Whether content of the provided audio format and channels value are supported by the device.", + "name": "videoFormatSupported", + "summary": "Whether video content of the given format is supported by the device's current configuration.", "schema": { "type": "boolean" } }, "examples": [ { - "name": "Specify the audio format and channel to check", + "name": "Specify the video format to check", "params": [ { - "name": "format", - "value": "AAC" + "name": "codec", + "value": "avc" }, { - "name": "channels", - "value": "MONO" + "name": "options", + "value": { + "resolution": [ + 1920, + 1080 + ] + } } ], "result": { @@ -764,9 +879,12 @@ ] }, { - "name": "supportedResolutions", - "summary": "Returns an array of valid resolutions that the device supports, regardless of any connected display.", + "name": "audioMode", + "summary": "Get the current audio output mode of the device.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -776,14 +894,10 @@ ], "params": [], "result": { - "name": "resolutions", - "summary": "An array of valid resolutions that the device supports", + "name": "audioMode", + "summary": "The current audio output mode.", "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResolution" - }, - "minItems": 1 + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/AudioMode" } }, "examples": [ @@ -792,96 +906,85 @@ "params": [], "result": { "name": "Default Result", - "value": [ - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" - ] + "value": "stereo" } } ] }, { - "name": "name", - "summary": "The human readable name of the device", - "params": [], + "name": "videoMode", + "summary": "Get the current video output mode of the device.", "tags": [ { - "name": "property" + "name": "property:readonly" }, { "name": "capabilities", "x-uses": [ - "xrn:firebolt:capability:device:name" + "xrn:firebolt:capability:device:info" ] } ], + "params": [], "result": { - "name": "value", - "summary": "the device friendly-name", + "name": "videoMode", + "summary": "The current video output mode.", "schema": { - "type": "string" + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/VideoMode" } }, "examples": [ { - "name": "Default example #1", - "params": [], - "result": { - "name": "Default Result", - "value": "Living Room" - } - }, - { - "name": "Default example #2", + "name": "Default Example", "params": [], "result": { "name": "Default Result", - "value": "Kitchen" + "value": "1080p60" } } ] }, { - "name": "onDeviceNameChanged", + "name": "videoModes", + "summary": "Returns an array of all valid video output modes that the device and display together support.", "tags": [ { - "name": "event" - }, - { - "name": "deprecated", - "x-since": "0.6.0", - "x-alternative": "Device.name()" + "name": "property:readonly" }, { "name": "capabilities", "x-uses": [ - "xrn:firebolt:capability:device:name" + "xrn:firebolt:capability:device:info" ] } ], - "summary": "Get the human readable name of the device", "params": [], "result": { - "name": "value", - "summary": "the device friendly-name", + "name": "videoModes", + "summary": "An array of video output modes", "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/VideoMode" + } } }, "examples": [ { - "name": "Getting the device name", + "name": "Default Example", "params": [], "result": { "name": "Default Result", - "value": "Living Room" + "value": [ + "720p50", + "720p60", + "1080i50", + "1080i60", + "1080p24", + "1080p30", + "1080p50", + "1080p60" + ] } } ] @@ -889,7 +992,6 @@ { "name": "network", "summary": "Get the current network status and type", - "params": [], "tags": [ { "name": "property:readonly" @@ -901,6 +1003,7 @@ ] } ], + "params": [], "result": { "name": "networkInfo", "summary": "the status and type", @@ -922,7 +1025,7 @@ }, "examples": [ { - "name": "Getting the network info", + "name": "Default Example", "params": [], "result": { "name": "Default Result", @@ -997,7 +1100,7 @@ } }, { - "name": "With distributor id", + "name": "With distributor ID", "params": [ { "name": "accountId", @@ -1018,42 +1121,166 @@ } } ] + }, + { + "name": "sourceFrameRateUsed", + "summary": "Check whether the HDMI output frame rate is set to follow the video source frame rate.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "sourceFrameRateUsed", + "summary": "Whether the HDMI output frame rate is set to follow the video source frame rate.", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "onAudioOutputChanged", + "summary": "Get notified when any of the audio output properties have been changed.", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "onAudioOutputChanged", + "summary": "The current audio output properties.", + "schema": { + "type": "object", + "properties": { + "audioMode": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/AudioMode" + } + }, + "required": [ + "audioMode" + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": { + "audioMode": "stereo" + } + } + } + ] + }, + { + "name": "onVideoOutputChanged", + "summary": "Get notified when any of the video output settings have been changed.", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:device:info" + ] + } + ], + "params": [], + "result": { + "name": "onVideoOutputChanged", + "summary": "The current video output configuration.", + "schema": { + "type": "object", + "properties": { + "hdrProfile": { + "description": "", + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" + }, + "sourceFrameRateUsed": { + "description": "Whether the HDMI output frame rate is set to follow the video source frame rate.", + "type": "boolean" + }, + "videoMode": { + "description": "", + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/VideoMode" + } + }, + "required": [ + "hdrProfile", + "sourceFrameRateUsed", + "videoMode" + ] + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": { + "hdrProfile": "hdr10", + "sourceFrameRateUsed": true, + "videoMode": "1080p60" + } + } + } + ] } ], "components": { "schemas": { - "Resolution": { - "type": "array", - "items": [ - { - "type": "integer" + "AudioFormatOptions": { + "description": "Options for checking audio playback support", + "type": "object", + "properties": { + "atmos": { + "description": "Whether Dolby Atmos support is being requested", + "type": "boolean" }, - { - "type": "integer" + "codecLevel": { + "description": "The level of the audio codec", + "type": "string" + }, + "codecProfile": { + "description": "The profile of the audio codec", + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/AudioCodecProfile" + }, + "container": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/AudioContainer" + }, + "sampleRate": { + "description": "The sample rate of the audio, in kHz", + "type": "number" } - ], - "additionalItems": false, - "minItems": 2, - "maxItems": 2 - }, - "NetworkType": { - "title": "NetworkType", - "type": "string", - "enum": [ - "wifi", - "ethernet", - "hybrid" - ], - "description": "The type of network that is currently active" - }, - "NetworkState": { - "title": "NetworkState", - "type": "string", - "enum": [ - "connected", - "disconnected" - ], - "description": "The type of network that is currently active" + } }, "AudioProfiles": { "title": "AudioProfiles", @@ -1069,98 +1296,92 @@ } ] }, - "VideoFormat": { - "title": "VideoFormat", + "HDCPVersion": { + "description": "The HDCP version", "type": "string", + "enumKeyPrefix": "hdcp", "enum": [ - "av1", - "dolbyVision", - "h263", - "h264", - "h265", - "h265M10", - "mpeg", - "vp8", - "vp9", - "vp9_p2", - "vp10", - "vc1" - ], - "description": "The video format supported by the platform" + "1.4", + "2.2", + "unknown" + ] }, - "VideoFormatResolution": { - "title": "VideoFormatResolution", + "NetworkState": { + "description": "The state of the network interface", "type": "string", "enum": [ - "480i", - "480p", - "576i", - "576p", - "576p50", - "720p", - "720p50", - "1080i", - "1080p", - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" + "connected", + "disconnected" ] }, - "AudioFormat": { - "title": "AudioFormat", + "NetworkType": { + "description": "The type of network that is currently active", "type": "string", "enum": [ - "AAC", - "AC3", - "AC4", - "DOLBY_MAT", - "DTS", - "DTS_X", - "EAC3", - "MPEG", - "MPEG1", - "MPEG2", - "MPEG4", - "OPUS", - "OGG", - "TRUEHD", - "WAV" - ], - "description": "The audio format supported by the platform" + "ethernet", + "hybrid", + "wifi" + ] }, - "AudioChannels": { - "title": "AudioChannels", - "type": "string", - "enum": [ - "MONO", - "STEREO", - "SURROUND", - "SURROUND_5_1", - "SURROUND_7_1" + "Resolution": { + "type": "array", + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } ], - "description": "The audio channels supported by the platform" + "additionalItems": false, + "minItems": 2, + "maxItems": 2 }, - "DeviceResolution": { - "title": "DeviceResolution", - "type": "string", - "enum": [ - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" - ], - "description": "The list of resolutions supported by the device" + "VideoFormatOptions": { + "description": "Options for checking video playback support", + "type": "object", + "properties": { + "atmos": { + "description": "Whether Dolby Atmos support is being requested", + "type": "boolean" + }, + "codecLevel": { + "description": "The level of the video codec", + "type": "string", + "enum": [ + "4.1", + "4.2", + "5.0", + "5.1", + "high", + "main" + ] + }, + "codecProfile": { + "description": "The profile of the video codec", + "type": "string", + "enum": [ + "high", + "main", + "main10", + "p0", + "p2" + ] + }, + "container": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/VideoContainer" + }, + "frameRate": { + "description": "The frame rate of the video content", + "type": "integer" + }, + "hdr": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/HDRProfile" + }, + "resolution": { + "$ref": "https://meta.comcast.com/firebolt/schemas/media#/definitions/Dimensions" + } + } } } } diff --git a/src/openrpc/discovery.json b/src/openrpc/discovery.json index eb7530a35..353348bc2 100644 --- a/src/openrpc/discovery.json +++ b/src/openrpc/discovery.json @@ -52,6 +52,9 @@ { "name": "capabilities", "x-provides": "xrn:firebolt:capability:discovery:entity-info" + }, + { + "name": "deprecated" } ], "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", @@ -409,7 +412,7 @@ } ], "result": { - "name": "success", + "name": "result", "value": true } } @@ -424,6 +427,9 @@ { "name": "capabilities", "x-provides": "xrn:firebolt:capability:discovery:purchased-content" + }, + { + "name": "deprecated" } ], "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.", @@ -1788,4 +1794,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/openrpc/display.json b/src/openrpc/display.json index 51e3d1ccb..8b1aa6fa7 100644 --- a/src/openrpc/display.json +++ b/src/openrpc/display.json @@ -1,15 +1,19 @@ { "openrpc": "1.2.4", "info": { - "title": "Display Properties", + "title": "Display", "description": "A module for querying various aspects of the current (or built-in) display on a device", "version": "0.0.0" }, "methods": [ { - "name": "width", - "summary": "Get the width of the display (in centimeters) from the HDMI EDID.", + "name": "colorDepth", + "summary": "Get the maximum color depth supported by the display panel.", + "params": [], "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -17,10 +21,9 @@ ] } ], - "params": [], "result": { - "name": "width", - "summary": "Width of the display device", + "name": "colorDepth", + "summary": "The color depth supported by the display panel.", "schema": { "type": "number" } @@ -31,15 +34,67 @@ "params": [], "result": { "name": "Default Result", - "value": 2166 + "value": 10 + } + }, + { + "name": "Example with no display", + "params": [], + "result": { + "name": "Default Result", + "value": 0 + } + } + ] + }, + { + "name": "colorimetry", + "summary": "Get all colorimetry values from the display panel.", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } + ], + "result": { + "name": "colorimetry", + "summary": "The colorimetry values supported by the display panel.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Colorimetry" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + "BT2020RGB", + "BT2020YCC", + "xvYCC601", + "xvYCC709" + ] } } ] }, { - "name": "height", - "summary": "Get the height of the display (in centimeters) from the HDMI EDID.", + "name": "hdrProfiles", + "summary": "Get all HDR profiles supported by the display.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -49,10 +104,14 @@ ], "params": [], "result": { - "name": "height", - "summary": "Height of the display device in centimeters", + "name": "hdrProfiles", + "summary": "An array of all valid HDR profiles that the display supports.", "schema": { - "type": "number" + "type": "array", + "items": { + "$ref": "#/components/schemas/HDRProfile" + }, + "minItems": 1 } }, "examples": [ @@ -61,15 +120,23 @@ "params": [], "result": { "name": "Default Result", - "value": 1980 + "value": [ + "dolbyVision", + "hdr10", + "hdr10plus", + "hlg" + ] } } ] }, { - "name": "currentResolution", - "summary": "Get the current resolution of the display device.", + "name": "manufacturer", + "summary": "Get the manufacturer of the display device.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -79,10 +146,10 @@ ], "params": [], "result": { - "name": "resolution", - "summary": "The current resolution of the display device.", + "name": "manufacturer", + "summary": "The manufacturer of the display device.", "schema": { - "$ref": "#/components/schemas/DisplayResolution" + "type": "string" } }, "examples": [ @@ -91,15 +158,18 @@ "params": [], "result": { "name": "Default Result", - "value": "1080p24" + "value": "Samsung Electric Company" } } ] }, { - "name": "optimalResolution", - "summary": "Get the optimal resolution of the display device. This will return null if no display is present.", + "name": "productName", + "summary": "Get the product/model name of the display device.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -109,18 +179,44 @@ ], "params": [], "result": { - "name": "resolution", - "summary": "Optional resolution of the display device.", + "name": "productName", + "summary": "The product/model name of the display device.", "schema": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/DisplayResolution" - } + "type": "string" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "Q80A" + } + } + ] + }, + { + "name": "refreshRate", + "summary": "Get the native refresh rate of the display device.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" ] } + ], + "params": [], + "result": { + "name": "refreshRate", + "summary": "The refresh rate of the display device.", + "schema": { + "type": "number" + } }, "examples": [ { @@ -128,15 +224,18 @@ "params": [], "result": { "name": "Default Result", - "value": "2160p60" + "value": 60 } } ] }, { - "name": "supportedResolutions", - "summary": "Returns an array of valid resolutions that the display supports", + "name": "resolution", + "summary": "Get the resolution of the display device in pixels. Returns a zero value for width and height if no display is present.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -147,13 +246,9 @@ "params": [], "result": { "name": "resolution", - "summary": "An array of valid resolutions that the display supports", + "summary": "The resolution of the display device.", "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DisplayResolution" - }, - "minItems": 1 + "$ref": "#/components/schemas/Dimensions" } }, "examples": [ @@ -163,24 +258,31 @@ "result": { "name": "Default Result", "value": [ - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" + 1920, + 1080 + ] + } + }, + { + "name": "No Display Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + 0, + 0 ] } } ] }, { - "name": "hdr", - "summary": "Returns an array of valid HDR profiles that the display supports. ", + "name": "resolutionName", + "summary": "Get a user-friendly resolution name of the display device.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -188,52 +290,68 @@ ] } ], - "params": [ + "params": [], + "result": { + "name": "resolutionName", + "summary": "The resoltuion name of the display device.", + "schema": { + "$ref": "#/components/schemas/ResolutionName" + } + }, + "examples": [ { - "name": "resolution", - "summary": "The video resolution to check against HDR profiles supported by the display. When provided, the result includes only HDR profiles supported by this resolution.", - "schema": { - "$ref": "#/components/schemas/DisplayResolution" + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": "uhd" } } + ] + }, + { + "name": "size", + "summary": "Get the width and height of the display panel (in centimeters).", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:display:info" + ] + } ], + "params": [], "result": { - "name": "HDR profiles", - "summary": "An array of valid HDR profiles that the display supports.", + "name": "size", + "summary": "The width and height of the display.", "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HdrProfile" - }, - "minItems": 1 + "$ref": "#/components/schemas/Dimensions" } }, "examples": [ { "name": "Default Example", - "params": [ - { - "name": "resolution", - "value": "1080p60" - } - ], + "params": [], "result": { "name": "Default Result", "value": [ - "DolbyVision", - "Hdr10", - "Hdr10Plus", - "St2084", - "hlg" + 157, + 91 ] } } ] }, { - "name": "useSourceFrameRate", - "summary": "Set the HDMI output frame rate to follow the video source frame rate.", + "name": "sourcePhysicalAddress", + "summary": "Get the source physical address of the display device.", "tags": [ + { + "name": "property:readonly" + }, { "name": "capabilities", "x-uses": [ @@ -243,10 +361,10 @@ ], "params": [], "result": { - "name": "useSourceFrameRate", - "summary": "Whether the HDMI output frame rate was set to follow video source frame rate", + "name": "sourcePhysicalAddress", + "summary": "The source physical address of the display device.", "schema": { - "type": "boolean" + "type": "string" } }, "examples": [ @@ -255,7 +373,7 @@ "params": [], "result": { "name": "Default Result", - "value": true + "value": "3.0.0.0" } } ] @@ -263,33 +381,78 @@ ], "components": { "schemas": { - "DisplayResolution": { - "title": "DisplayResolution", + "EDIDProperties": { + "description": "Properties of the display", + "type": "object", + "properties": { + "productName": { + "description": "Product name of the display device", + "type": "string" + }, + "manufacturerName": { + "description": "Manufacturer of the display device", + "type": "string" + }, + "sourcePhysicalAddress": { + "description": "Source physical address of the display device", + "type": "string" + } + } + }, + "Dimensions": { + "type": "array", + "description": "The dimensions specified as width and height.", + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "Colorimetry": { + "description": "Colorimetry", "type": "string", "enum": [ - "1080p24", - "1080i25", - "1080p30", - "1080i50", - "1080p50", - "1080p60", - "2160p30", - "2160p50", - "2160p60" - ], - "description": "The list of resolutions supported by the display" + "BT2020cYCC", + "BT2020RGB", + "BT2020YCC", + "DCI-P3", + "ICtCp", + "opRGB", + "opYCC601", + "sYCC601", + "xvYCC601", + "xvYCC709", + "unknown" + ] }, - "HdrProfile": { - "title": "HdrProfile", + "HDRProfile": { "type": "string", + "description": "HDR profile", "enum": [ - "DolbyVision", - "Hdr10", - "Hdr10Plus", - "St2084", - "hlg" - ], - "description": "The list of HDR profiles supported by the display" + "dolbyVision", + "hdr10", + "hdr10plus", + "hlg", + "sdr", + "unknown" + ] + }, + "ResolutionName": { + "description": "User-friendly resolution name", + "type": "string", + "enum": [ + "sd", + "hd", + "fhd", + "uhd", + "unknown" + ] } } } diff --git a/src/openrpc/media-info.json b/src/openrpc/media-info.json deleted file mode 100644 index 1b53863b0..000000000 --- a/src/openrpc/media-info.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "openrpc": "1.2.4", - "info": { - "title": "MediaInfo", - "description": "A module for query info about the media currently being played by the app.", - "version": "0.0.0" - }, - "methods": [ - { - "name": "videoCodec", - "summary": "Get the video codec of the specified media session.", - "tags": [ - { - "name": "property", - "x-session": "sessionId", - "x-session-name": "mediaSession" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:media-info:video-codec" - ] - } - ], - "params": [ - { - "name": "pipeline", - "schema": { - "type": "integer", - "default": 1 - }, - "required": true - } - ], - "result": { - "name": "Video codec", - "summary": "Video codec for the pipeline.", - "schema": { - "$ref": "#/components/schemas/VideoCodec" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "pipeline", - "value": 1 - } - ], - "result": { - "name": "Default Result", - "value": "h265" - } - } - ] - }, - { - "name": "audioCodec", - "summary": "Get the audio codec of the specified media session.", - "tags": [ - { - "name": "property", - "x-session": "sessionId", - "x-session-name": "mediaSession" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:media-info:audio-codec" - ] - } - ], - "params": [ - { - "name": "sessionId", - "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true - } - ], - "result": { - "name": "codec", - "summary": "the codec", - "schema": { - "$ref": "#/components/schemas/AudioCodec" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "sessionId", - "value": 0 - } - ], - "result": { - "name": "Default Result", - "value": "ac3" - } - } - ] - }, - { - "name": "dynamicRangeProfile", - "summary": "Get the High Dynamic Range (HDR) profile of the specified media session.", - "tags": [ - { - "name": "property", - "x-session": "sessionId", - "x-session-name": "mediaSession" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:media-info:hdr" - ] - } - ], - "params": [ - { - "name": "sessionId", - "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true - } - ], - "result": { - "name": "profile", - "summary": "the hdr profile", - "schema": { - "$ref": "#/components/schemas/DynamicRangeProfile" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "sessionId", - "value": 0 - } - ], - "result": { - "name": "Default Result", - "value": "hdr10plus" - } - } - ] - }, - { - "name": "audioProfile", - "summary": "Get the audio profile of the specified media session.", - "tags": [ - { - "name": "interface", - "x-interface": "MediaInfoContext" - }, - { - "name": "capabilities", - "x-uses": [ - "xrn:firebolt:capability:media-info:audio-profile" - ] - } - ], - "params": [ - { - "name": "sessionId", - "schema": { - "type": "integer", - "minimum": 0, - "maximum": 15 - }, - "required": true - } - ], - "result": { - "name": "profile", - "summary": "the audio profile", - "schema": { - "$ref": "#/components/schemas/AudioProfile" - } - }, - "examples": [ - { - "name": "Default Example", - "params": [ - { - "name": "sessionId", - "value": 0 - } - ], - "result": { - "name": "Default Result", - "value": "dolbyAtmos" - } - } - ] - } - ], - "components": { - "schemas": { - "DynamicRangeProfile": { - "type": "string", - "description": "Enumeration of possible HDR profiles.", - "enum": [ - "dolbyVision", - "hdr10", - "hdr10plus", - "hlg", - "none", - "slHdr1", - "unknown" - ] - }, - "AudioProfile": { - "type": "string", - "description": "Enumeration of possible immersive audio profiles.", - "enum": [ - "auro3d", - "dolbyAtmos", - "dtsx", - "mpegh", - "none", - "unknown" - ] - }, - "AudioCodec": { - "type": "string", - "description": "Enumeration of possible audio codecs.", - "enum": [ - "aac", - "ac3", - "ac3plus", - "eac3", - "ac4", - "dts", - "mpeg1", - "mpeg2", - "mpeg3", - "mpeg4", - "opus", - "ogg", - "trueHd", - "wav", - "unknown", - "none" - ] - }, - "VideoCodec": { - "type": "string", - "description": "Enumeration of possible video codecs.", - "enum": [ - "av1", - "h263", - "h264", - "h265", - "mpeg", - "vp8", - "vp9", - "vp10", - "vc1", - "unknown", - "none" - ] - }, - "MimeType": { - "type": "string", - "description": "Enumeration of possible Mimetypes.", - "enum": [ - "audio/mp4a-latm", - "audio/ac3", - "audio/ac4", - "audio/vnd.dolby.mat", - "audio/vnd.dts", - "audio/vnd.dts.uhd;profile=p2", - "audio/eac3", - "audio/mpeg", - "audio/mpeg-L1", - "audio/mpeg-L2", - "audio/mp4", - "audio/opus", - "audio/ogg", - "audio/true-hd", - "audio/wav", - "video/av01", - "video/dolbyVision", - "video/3gpp", - "video/avc", - "video/hevc", - "video/hevc;profile=main10", - "video/mpeg", - "video/x-vnd.on2.vp8", - "video/x-vnd.on2.vp9", - "video/x-vnd.on2.vp9;profile=p2", - "video/x-vnd.on2.vp10", - "video/wvc1", - "unknown", - "none" - ] - } - } - } -} diff --git a/src/openrpc/media_info.json b/src/openrpc/media_info.json new file mode 100644 index 000000000..2e9ae98c4 --- /dev/null +++ b/src/openrpc/media_info.json @@ -0,0 +1,597 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "MediaInfo", + "description": "A module for query info about the media currently in the media pipeline (either playing or paused).", + "version": "0.0.0" + }, + "methods": [ + { + "name": "activeAudioFormats", + "summary": "Get a list of the active audio formats currently used across all media pipelines.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [], + "result": { + "name": "activeAudioFormats", + "summary": "The active audio formats used across all pipelines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AudioFormat" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + { + "bitRate": 128, + "channels": "2", + "codec": "aac", + "codecProfile": "mp2lc", + "container": "audio/mp4", + "pipelineId": 1, + "sampleRate": 48 + } + ] + } + } + ] + }, + { + "name": "activeVideoFormats", + "summary": "Get a list of the active video formats currently used across all media pipelines.", + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:media-info:video-format" + ] + } + ], + "params": [], + "result": { + "name": "activeVideoFormats", + "summary": "The active video formats used across all pipelines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoFormat" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + { + "codec": "hevc", + "codecLevel": "4.2", + "codecProfile": "main", + "container": "video/mp4", + "frameRate": 30, + "hdr": [ + "hdr10" + ], + "pipelineId": 1, + "resolution": [ + 1920, + 1080 + ] + } + ] + } + } + ] + }, + { + "name": "audioFormat", + "summary": "Get the audio format currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [ + { + "name": "pipelineId", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "audioFormat", + "summary": "Audio format used by the pipeline.", + "schema": { + "$ref": "#/components/schemas/AudioFormat" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipelineId", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": { + "bitRate": 128, + "channels": "2", + "codec": "aac", + "container": "audio/mp4", + "pipelineId": 1, + "sampleRate": 48 + } + } + } + ] + }, + { + "name": "onActiveAudioFormatsChanged", + "summary": "Get notified when the active audio formats used across all media pipelines starts, stops, or changes.", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:media-info:audio-format" + ] + } + ], + "params": [], + "result": { + "name": "onActiveAudioFormatsChanged", + "summary": "The updated audio formats used across all pipelines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AudioFormat" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + { + "bitRate": 128, + "channels": "5.1", + "codec": "aac", + "container": "audio/mp4", + "pipelineId": 1, + "sampleRate": 48 + } + ] + } + } + ] + }, + { + "name": "onActiveVideoFormatsChanged", + "summary": "Get notified when the active video formats used across all media pipelines starts, stops, or changes.", + "tags": [ + { + "name": "event" + }, + { + "name": "capabilities", + "x-manages": [ + "xrn:firebolt:capability:media-info:video-format" + ] + } + ], + "params": [], + "result": { + "name": "onActiveVideoFormatsChanged", + "summary": "The updated video formats used across all pipelines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoFormat" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": [ + { + "codec": "hevc", + "codecLevel": "4.2", + "codecProfile": "main", + "container": "video/mp4", + "frameRate": 30, + "hdr": [ + "hdr10" + ], + "pipelineId": 1, + "resolution": [ + 1920, + 1080 + ] + } + ] + } + } + ] + }, + { + "name": "videoFormat", + "summary": "Get the video format currently used by the specified media pipeline.", + "tags": [ + { + "name": "property:readonly", + "x-session": "sessionId", + "x-session-name": "mediaSession" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:media-info:video-format" + ] + } + ], + "params": [ + { + "name": "pipelineId", + "required": true, + "schema": { + "$ref": "#/components/schemas/PipelineId" + } + } + ], + "result": { + "name": "videoFormat", + "summary": "Video format used by the pipeline.", + "schema": { + "$ref": "#/components/schemas/VideoFormat" + } + }, + "examples": [ + { + "name": "Default Example", + "params": [ + { + "name": "pipelineId", + "value": 1 + } + ], + "result": { + "name": "Default Result", + "value": { + "codec": "hevc", + "codecLevel": "4.2", + "codecProfile": "main", + "container": "video/mp4", + "frameRate": 30, + "hdr": [ + "hdr10" + ], + "pipelineId": 1, + "resolution": [ + 1920, + 1080 + ] + } + } + } + ] + } + ], + "components": { + "schemas": { + "AudioFormat": { + "type": "object", + "description": "Details on the audio content format.", + "properties": { + "bitRate": { + "description": "The audio bitrate in kbps.", + "type": "number" + }, + "channels": { + "description": "The audio output channels.", + "type": "string" + }, + "codec": { + "$ref": "#/components/schemas/AudioCodec" + }, + "codecLevel": { + "$ref": "#/components/schemas/AudioCodecLevel" + }, + "codecProfile": { + "$ref": "#/components/schemas/AudioCodecProfile" + }, + "container": { + "$ref": "#/components/schemas/AudioContainer" + }, + "pipelineId": { + "$ref": "#/components/schemas/PipelineId" + }, + "sampleRate": { + "description": "The audio sample rate in kHz.", + "type": "number" + } + }, + "required": [ + "codec", + "channels", + "pipelineId", + "sampleRate" + ] + }, + "PipelineId": { + "type": "integer", + "description": "The media pipeline/session ID", + "minimum": 0, + "maximum": 15 + }, + "VideoFormat": { + "type": "object", + "description": "Details on the video content format.", + "properties": { + "codec": { + "$ref": "#/components/schemas/VideoCodec" + }, + "codecLevel": { + "type": "string", + "enum": [ + "4.1", + "4.2", + "5.0", + "5.1", + "high", + "main" + ] + }, + "codecProfile": { + "type": "string", + "enum": [ + "high", + "main", + "main10", + "p0", + "p2" + ] + }, + "container": { + "$ref": "#/components/schemas/VideoContainer" + }, + "frameRate": { + "type": "number" + }, + "hdr": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HDRProfile" + } + }, + "pipelineId": { + "$ref": "#/components/schemas/PipelineId" + }, + "resolution": { + "$ref": "#/components/schemas/Dimensions" + } + }, + "required": [ + "codec", + "pipelineId", + "resolution" + ] + }, + "AudioCodec": { + "type": "string", + "description": "Audio codec", + "enum": [ + "aac", + "ac3", + "ac4", + "dts-x", + "eac3", + "mpeg3", + "opus", + "truehd", + "unknown", + "vorbis" + ] + }, + "AudioCodecLevel": { + "description": "Audio codec level", + "type": "string", + "enumKeyPrefix": "level", + "enum": [ + "3.0", + "3.1", + "4.0", + "4.1", + "4.2", + "5.0", + "5.1" + ] + }, + "AudioCodecProfile": { + "description": "Audio codec profile", + "type": "string", + "enum": [ + "high", + "main", + "main10", + "mp2lc", + "mp4he", + "p0", + "p2" + ] + }, + "AudioContainer": { + "description": "Audio container", + "type": "string", + "enum": [ + "audio/mpeg", + "audio/mp4", + "audio/ogg", + "audio/webm" + ] + }, + "AudioMode": { + "description": "Audio output mode", + "type": "string", + "enum": [ + "auto", + "mono", + "none", + "passthrough", + "stereo", + "surround", + "unknown" + ] + }, + "Colorimetry": { + "description": "Colorimetry", + "type": "string", + "enum": [ + "BT2020cYCC", + "BT2020RGB", + "BT2020YCC", + "DCI-P3", + "ICtCp", + "opRGB", + "opYCC601", + "sYCC601", + "xvYCC601", + "xvYCC709", + "unknown" + ] + }, + "Dimensions": { + "type": "array", + "description": "The dimensions specified as width and height.", + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "HDRProfile": { + "type": "string", + "description": "HDR profile", + "enum": [ + "dolbyVision", + "hdr10", + "hdr10plus", + "hlg", + "sdr", + "unknown" + ] + }, + "ResolutionName": { + "description": "User-friendly resolution name", + "type": "string", + "enum": [ + "sd", + "hd", + "fhd", + "uhd", + "unknown" + ] + }, + "VideoCodec": { + "type": "string", + "description": "video codec", + "enum": [ + "av1", + "avc", + "hevc", + "mpeg1", + "mpeg2", + "vp8", + "vp9", + "vp10" + ] + }, + "VideoContainer": { + "description": "Video container format", + "type": "string", + "enum": [ + "video/mpeg", + "video/mp2t", + "video/mp4", + "video/webm" + ] + }, + "VideoMode": { + "description": "Video output mode; the shorthand resolution and frame rate", + "type": "string", + "enumKeyPrefix": "mode", + "enum": [ + "480i", + "480p", + "576i25", + "576p50", + "576p60", + "720p50", + "720p60", + "1080i50", + "1080i60", + "1080p24", + "1080p25", + "1080p30", + "1080p50", + "1080p60", + "2160p24", + "2160p25", + "2160p30", + "2160p50", + "2160p60", + "4320p60", + "unknown" + ] + } + } + } +} diff --git a/src/schemas/advertising.json b/src/schemas/advertising.json new file mode 100644 index 000000000..e3aca3ede --- /dev/null +++ b/src/schemas/advertising.json @@ -0,0 +1,23 @@ +{ + "$id": "https://meta.comcast.com/firebolt/advertising", + "title": "Advertising", + "oneOf": [ + { + "$ref": "#/definitions/SkipRestriction" + } + ], + "definitions": { + "SkipRestriction": { + "title": "SkipRestriction", + "$comment": "xrn:advertising:policy:skipRestriction:", + "type": "string", + "enum": [ + "none", + "adsUnwatched", + "adsAll", + "all" + ], + "description": "The advertisement skip restriction.\n\nApplies to fast-forward/rewind (e.g. trick mode), seeking over an entire opportunity (e.g. jump), seeking out of what's currently playing, and \"Skip this ad...\" features. Seeking over multiple ad opportunities only requires playback of the _last_ opportunity, not all opportunities, preceding the seek destination.\n\n| Value | Description |\n|--------------|--------------------------------------------------------------------------------|\n| none |No fast-forward, jump, or skip restrictions |\n| adsUnwatched | Restrict fast-forward, jump, and skip for unwatched ad opportunities only. |\n| adsAll | Restrict fast-forward, jump, and skip for all ad opportunities |\n| all | Restrict fast-forward, jump, and skip for all ad opportunities and all content |\n\nNamespace: `xrn:advertising:policy:skipRestriction:`\n\n" + } + } +} \ No newline at end of file diff --git a/src/schemas/discovery.json b/src/schemas/discovery.json new file mode 100644 index 000000000..1c13435a7 --- /dev/null +++ b/src/schemas/discovery.json @@ -0,0 +1,79 @@ +{ + "$id": "https://meta.comcast.com/firebolt/discovery", + "title": "Discovery", + "anyOf": [ + { + "$ref": "#/definitions/PurchasedContentResult" + } + ], + "definitions": { + "PurchasedContentResult": { + "title": "PurchasedContentResult", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "totalCount": { + "type": "integer", + "minimum": 0 + }, + "entries": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" + } + } + }, + "required": [ + "expires", + "totalCount", + "entries" + ], + "additionalProperties": false + }, + "EntityInfoResult": { + "title": "EntityInfoResult", + "description": "The result for an `entityInfo()` push or pull.", + "type": "object", + "properties": { + "expires": { + "type": "string", + "format": "date-time" + }, + "entity": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" + }, + "related": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" + } + } + }, + "required": [ + "expires", + "entity" + ], + "additionalProperties": false + }, + "InterestType": { + "title": "InterestType", + "type": "string", + "enum": [ + "interest", + "disinterest" + ] + }, + "InterestReason": { + "title": "InterestReason", + "type": "string", + "enum": [ + "playlist", + "reaction", + "recording" + ] + } + } + } diff --git a/src/schemas/entertainment.json b/src/schemas/entertainment.json index 8fd14ee38..8f94854e8 100644 --- a/src/schemas/entertainment.json +++ b/src/schemas/entertainment.json @@ -80,7 +80,6 @@ "required": [ "identifiers", "entityType", - "programType", "title" ], "properties": { diff --git a/src/schemas/entity.json b/src/schemas/entity.json new file mode 100644 index 000000000..2e486e865 --- /dev/null +++ b/src/schemas/entity.json @@ -0,0 +1,456 @@ +{ + "$id": "https://meta.comcast.com/firebolt/entity", + "title": "Entity", + "oneOf": [ + { + "$ref": "#/definitions/Entity" + }, + { + "$ref": "#/definitions/PlayableEntity" + }, + { + "$ref": "#/definitions/EntityDetails" + } + ], + "definitions": { + "Entity": { + "oneOf": [ + { + "$ref": "#/definitions/ProgramEntity" + }, + { + "$ref": "#/definitions/MusicEntity" + }, + { + "$ref": "#/definitions/ChannelEntity" + }, + { + "$ref": "#/definitions/UntypedEntity" + }, + { + "$ref": "#/definitions/PlaylistEntity" + } + ] + }, + "EntityDetails": { + "title": "EntityDetails", + "type": "object", + "required": [ + "identifiers" + ], + "properties": { + "identifiers": { + "$ref": "#/definitions/Entity" + }, + "info": { + "$ref": "#/definitions/Metadata" + }, + "waysToWatch": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/WayToWatch" + }, + "description": "An array of ways a user is might watch this entity, regardless of entitlements." + } + } + }, + "ChannelEntity": { + "title": "ChannelEntity", + "type": "object", + "properties": { + "entityType": { + "const": "channel" + }, + "channelType": { + "type": "string", + "enum": [ + "streaming", + "overTheAir" + ] + }, + "entityId": { + "type": "string", + "description": "ID of the channel, in the target App's scope." + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "required": [ + "entityType", + "channelType", + "entityId" + ], + "additionalProperties": false + }, + "ProgramEntity": { + "title": "ProgramEntity", + "oneOf": [ + { + "$ref": "#/definitions/MovieEntity" + }, + { + "$ref": "#/definitions/TVEpisodeEntity" + }, + { + "$ref": "#/definitions/TVSeasonEntity" + }, + { + "$ref": "#/definitions/TVSeriesEntity" + }, + { + "$ref": "#/definitions/AdditionalEntity" + } + ] + }, + "MusicEntity": { + "title": "MusicEntity", + "type": "object", + "properties": { + "entityType": { + "const": "music" + }, + "musicType": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/MusicType" + }, + "entityId": { + "type": "string" + } + }, + "required": [ + "entityType", + "musicType", + "entityId" + ] + }, + "MovieEntity": { + "title": "MovieEntity", + "description": "A Firebolt compliant representation of a Movie entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "description": "A Firebolt compliant representation of a TV Episode entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "seasonId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/definitions/MovieEntity" + }, + { + "$ref": "#/definitions/TVEpisodeEntity" + }, + { + "$ref": "#/definitions/PlaylistEntity" + }, + { + "$ref": "#/definitions/MusicEntity" + }, + { + "$ref": "#/definitions/AdditionalEntity" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "description": "A Firebolt compliant representation of the remaining program entity types.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "type": "string", + "enum": [ + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" + ] + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "Metadata": { + "title": "Metadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the entity." + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." + } + } + } + } +} \ No newline at end of file diff --git a/src/schemas/intents.json b/src/schemas/intents.json index 6fa2a5807..f90373187 100644 --- a/src/schemas/intents.json +++ b/src/schemas/intents.json @@ -243,12 +243,33 @@ { "$ref": "#/definitions/ButtonIntent" }, + { + "$ref": "#/definitions/FocusIntent" + }, + { + "$ref": "#/definitions/SelectIntent" + }, + { + "$ref": "#/definitions/BackIntent" + }, + { + "$ref": "#/definitions/ExitIntent" + }, + { + "$ref": "#/definitions/ChannelIntent" + }, + { + "$ref": "#/definitions/ScrollIntent" + }, { "$ref": "#/definitions/PowerIntent" }, { "$ref": "#/definitions/VolumeIntent" }, + { + "$ref": "#/definitions/MuteIntent" + }, { "$ref": "#/definitions/MicrophoneIntent" }, @@ -257,15 +278,36 @@ }, { "$ref": "#/definitions/TuneIntent" + }, + { + "$ref": "#/definitions/VoiceGuidanceIntent" + }, + { + "$ref": "#/definitions/HighContrastIntent" + }, + { + "$ref": "#/definitions/ScreenMagnificationIntent" } ] }, "PlaybackControlIntent": { "description": "A Firebolt compliant representation of a user intention to control some aspect of in-progress playback.", "anyOf": [ + { + "$ref": "#/definitions/PlayIntent" + }, { "$ref": "#/definitions/PauseIntent" }, + { + "$ref": "#/definitions/ReplayIntent" + }, + { + "$ref": "#/definitions/StopIntent" + }, + { + "$ref": "#/definitions/PlaybackSpeedIntent" + }, { "$ref": "#/definitions/SeekIntent" }, @@ -273,13 +315,16 @@ "$ref": "#/definitions/SkipIntent" }, { - "$ref": "#/definitions/TrickPlayIntent" + "$ref": "#/definitions/FastForwardIntent" + }, + { + "$ref": "#/definitions/RewindIntent" }, { "$ref": "#/definitions/ClosedCaptionsIntent" }, { - "$ref": "#/definitions/AudioDescriptionIntent" + "$ref": "#/definitions/AudioDescriptionsIntent" } ] }, @@ -307,6 +352,9 @@ "action": { "const": "launch" } + }, + "not": { + "required": [ "data" ] } } ], @@ -338,6 +386,9 @@ "action": { "const": "home" } + }, + "not": { + "required": [ "data" ] } } ], @@ -386,9 +437,6 @@ { "$ref": "#/definitions/MusicEntity" }, - { - "$ref": "#/definitions/PlaylistEntity" - }, { "$ref": "#/definitions/AdditionalEntity" }, @@ -414,401 +462,241 @@ } ] }, - "ChannelEntity": { - "title": "ChannelEntity", - "type": "object", - "properties": { - "entityType": { - "const": "channel" - }, - "channelType": { - "type": "string", - "enum": [ - "streaming", - "overTheAir" - ] - }, - "entityId": { - "type": "string", - "description": "ID of the channel, in the target App's scope." - }, - "appContentData": { - "type": "string", - "maxLength": 256 - } - }, - "required": [ - "entityType", - "channelType", - "entityId" - ], - "additionalProperties": false - }, - "ProgramEntity": { - "title": "ProgramEntity", - "type": "object", - "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/ProgramType" - }, - "entityId": { - "type": "string" - } - }, - "required": [ - "entityType", - "programType", - "entityId" - ] - }, - "MusicEntity": { - "title": "MusicEntity", - "type": "object", - "properties": { - "entityType": { - "const": "music" - }, - "musicType": { - "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/MusicType" - }, - "entityId": { - "type": "string" - } - }, - "required": [ - "entityType", - "musicType", - "entityId" - ] - }, - "MovieEntity": { - "title": "MovieEntity", + "ChannelIntent": { + "description": "A Firebolt compliant representation of a user intent to 'surf' to the next or previous channel.", + "title": "ChannelIntent", "allOf": [ { - "$ref": "#/definitions/ProgramEntity" + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" }, { - "description": "A Firebolt compliant representation of a Movie entity.", - "title": "MovieEntity", "type": "object", - "required": [ - "entityType", - "programType", - "entityId" - ], + "required": [ "data" ], "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "const": "movie" - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" + "action": { + "const": "channel" }, - "appContentData": { + "data": { "type": "string", - "maxLength": 256 + "enum": [ + "next", + "previous" + ] } - }, - "additionalProperties": false - } - ], - "examples": [ - { - "entityType": "program", - "programType": "movie", - "entityId": "el-camino" + } } ] }, - "TVEpisodeEntity": { - "title": "TVEpisodeEntity", + "TuneIntent": { + "description": "A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App.", + "title": "TuneIntent", "allOf": [ { - "$ref": "#/definitions/ProgramEntity" + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" }, { - "description": "A Firebolt compliant representation of a TV Episode entity.", - "title": "TVEpisodeEntity", "type": "object", "required": [ - "entityType", - "programType", - "entityId", - "seriesId", - "seasonId" + "data" ], "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "const": "episode" - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "seriesId": { - "$ref": "#/definitions/Identifier" - }, - "seasonId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" + "action": { + "const": "tune" }, - "appContentData": { - "type": "string", - "maxLength": 256 + "data": { + "type": "object", + "required": [ + "entity" + ], + "additionalProperties": false, + "properties": { + "entity": { + "$ref": "#/definitions/ChannelEntity" + }, + "options": { + "description": "The options property of the data property MUST have only one of the following fields.", + "type": "object", + "required": [], + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "assetId": { + "type": "string", + "description": "The ID of a specific 'listing', as scoped by the target App's ID-space, which the App should begin playback from." + }, + "restartCurrentProgram": { + "type": "boolean", + "description": "Denotes that the App should start playback at the most recent program boundary, rather than 'live.'" + }, + "time": { + "type": "string", + "format": "date-time", + "description": "ISO 8601 Date/Time where the App should begin playback from." + } + } + } + } } - }, - "additionalProperties": false + } } ], "examples": [ { - "entityType": "program", - "programType": "episode", - "entityId": "breaking-bad-pilot", - "seriesId": "breaking-bad", - "seasonId": "breaking-bad-season-1" + "action": "tune", + "data": { + "entity": { + "entityType": "channel", + "channelType": "streaming", + "entityId": "an-ott-channel" + }, + "options": { + "restartCurrentProgram": true + } + }, + "context": { + "source": "voice" + } } ] }, - "TVSeasonEntity": { - "title": "TVSeasonEntity", - "description": "A Firebolt compliant representation of a TV Season entity.", + "PlaybackIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlaybackIntent", "allOf": [ { - "$ref": "#/definitions/ProgramEntity" + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" }, { "type": "object", "required": [ - "entityType", - "programType", - "entityId", - "seriesId" + "data" ], "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "const": "season" - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "seriesId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" + "action": { + "const": "playback" }, - "appContentData": { - "type": "string", - "maxLength": 256 + "data": { + "$ref": "#/definitions/PlayableEntity" } - }, - "additionalProperties": false + } } ], "examples": [ { - "entityType": "program", - "programType": "season", - "entityId": "breaking-bad-season-1", - "seriesId": "breaking-bad" + "action": "playback", + "data": { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + }, + "context": { + "source": "voice" + } } ] }, - "TVSeriesEntity": { - "title": "TVSeriesEntity", - "allOf": [ + "SearchIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed.", + "title": "SearchIntent", + "allOf": [ { - "$ref": "#/definitions/ProgramEntity" + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" }, { - "description": "A Firebolt compliant representation of a TV Series entity.", "type": "object", - "required": [ - "entityType", - "programType", - "entityId" - ], "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "const": "series" - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" + "action": { + "const": "search" }, - "appContentData": { - "type": "string", - "maxLength": 256 + "data": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string" + } + }, + "additionalProperties": false } - }, - "additionalProperties": false - } - ], - "examples": [ - { - "entityType": "program", - "programType": "series", - "entityId": "breaking-bad" + } } - ] - }, - "PlaylistEntity": { - "title": "PlaylistEntity", - "description": "A Firebolt compliant representation of a Playlist entity.", - "type": "object", - "required": [ - "entityType", - "entityId" ], - "properties": { - "entityType": { - "const": "playlist" - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" - }, - "appContentData": { - "type": "string", - "maxLength": 256 - } - }, - "additionalProperties": false, "examples": [ { - "entityType": "playlist", - "entityId": "playlist/xyz" + "action": "search", + "data": { + "query": "walter white" + }, + "context": { + "source": "voice" + } } ] }, - "PlayableEntity": { - "title": "PlayableEntity", - "anyOf": [ - { - "$ref": "#/definitions/MovieEntity" - }, - { - "$ref": "#/definitions/TVEpisodeEntity" - }, - { - "$ref": "#/definitions/PlaylistEntity" - }, + "SectionIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed.", + "title": "SectionIntent", + "allOf": [ { - "$ref": "#/definitions/MusicEntity" + "$ref": "#/definitions/Intent" }, { - "$ref": "#/definitions/AdditionalEntity" - } - ] - }, - "AdditionalEntity": { - "title": "AdditionalEntity", - "allOf": [ - { - "$ref": "#/definitions/ProgramEntity" + "$ref": "#/definitions/IntentProperties" }, { - "description": "A Firebolt compliant representation of the remaining entity types.", "type": "object", - "required": [ - "entityType", - "entityId" - ], "properties": { - "entityType": { - "const": "program" - }, - "programType": { - "type": "string", - "enum": [ - "concert", - "sportingEvent", - "preview", - "other", - "advertisement", - "musicVideo", - "minisode", - "extra" - ] - }, - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" + "action": { + "const": "section" }, - "appContentData": { - "type": "string", - "maxLength": 256 + "data": { + "type": "object", + "required": [ + "sectionName" + ], + "properties": { + "sectionName": { + "type": "string" + } + }, + "additionalProperties": false } }, - "additionalProperties": false + "required": [ "data" ] } ], "examples": [ { - "entityType": "program", - "programType": "concert", - "entityId": "live-aid" - } - ] - }, - "UntypedEntity": { - "title": "UntypedEntity", - "allOf": [ - { - "description": "A Firebolt compliant representation of the remaining entity types.", - "type": "object", - "required": [ - "entityId" - ], - "properties": { - "entityId": { - "$ref": "#/definitions/Identifier" - }, - "assetId": { - "$ref": "#/definitions/Identifier" - }, - "appContentData": { - "type": "string", - "maxLength": 256 - } + "action": "section", + "data": { + "sectionName": "settings" }, - "additionalProperties": false - } - ], - "examples": [ - { - "entityId": "an-entity" + "context": { + "source": "voice" + } } ] }, - "TuneIntent": { - "description": "A Firebolt compliant representation of a user intention to 'tune' to a traditional over-the-air broadcast, or an OTT Stream from an OTT or vMVPD App.", - "title": "TuneIntent", + "PlayEntityIntent": { + "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", + "title": "PlayEntityIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -823,41 +711,69 @@ ], "properties": { "action": { - "const": "tune" + "const": "play-entity" }, "data": { "type": "object", - "required": [ - "entity" - ], - "additionalProperties": false, "properties": { "entity": { - "$ref": "#/definitions/ChannelEntity" + "$ref": "#/definitions/PlayableEntity" }, "options": { - "description": "The options property of the data property MUST have only one of the following fields.", "type": "object", - "required": [], - "additionalProperties": false, - "minProperties": 1, - "maxProperties": 1, "properties": { - "assetId": { - "type": "string", - "description": "The ID of a specific 'listing', as scoped by the target App's ID-space, which the App should begin playback from." - }, - "restartCurrentProgram": { - "type": "boolean", - "description": "Denotes that the App should start playback at the most recent program boundary, rather than 'live.'" + "playFirstId": { + "type": "string" }, - "time": { - "type": "string", - "format": "date-time", - "description": "ISO 8601 Date/Time where the App should begin playback from." + "playFirstTrack": { + "type": "integer", + "minimum": 1 + } + }, + "additionalProperties": false + } + }, + "required": [ + "entity" + ], + "propertyNames": { + "enum": [ + "entity", + "options" + ] + }, + "if": { + "properties": { + "entity": { + "type": "object", + "required": [ + "entityType" + ], + "properties": { + "entityType": { + "const": "playlist" + } } } } + }, + "then": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 1 + } + } + }, + "else": { + "type": "object", + "properties": { + "options": { + "type": "object", + "maxProperties": 0 + } + } } } } @@ -865,243 +781,14 @@ ], "examples": [ { - "action": "tune", + "action": "play-entity", "data": { "entity": { - "entityType": "channel", - "channelType": "streaming", - "entityId": "an-ott-channel" + "entityType": "playlist", + "entityId": "playlist/xyz" }, "options": { - "restartCurrentProgram": true - } - }, - "context": { - "source": "voice" - } - } - ] - }, - "PlaybackIntent": { - "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", - "title": "PlaybackIntent", - "allOf": [ - { - "$ref": "#/definitions/Intent" - }, - { - "$ref": "#/definitions/IntentProperties" - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "action": { - "const": "playback" - }, - "data": { - "$ref": "#/definitions/PlayableEntity" - } - } - } - ], - "examples": [ - { - "action": "playback", - "data": { - "entityType": "program", - "programType": "episode", - "entityId": "breaking-bad-pilot", - "seriesId": "breaking-bad", - "seasonId": "breaking-bad-season-1" - }, - "context": { - "source": "voice" - } - } - ] - }, - "SearchIntent": { - "description": "A Firebolt compliant representation of a user intention to navigate an app to it's search UI with a search term populated, and bring that app to the foreground if needed.", - "title": "SearchIntent", - "allOf": [ - { - "$ref": "#/definitions/Intent" - }, - { - "$ref": "#/definitions/IntentProperties" - }, - { - "type": "object", - "properties": { - "action": { - "const": "search" - }, - "data": { - "type": "object", - "required": [ - "query" - ], - "properties": { - "query": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - ], - "examples": [ - { - "action": "search", - "data": { - "query": "walter white" - }, - "context": { - "source": "voice" - } - } - ] - }, - "SectionIntent": { - "description": "A Firebolt compliant representation of a user intention to navigate an app to a section not covered by `home`, `entity`, `player`, or `search`, and bring that app to the foreground if needed.", - "title": "SectionIntent", - "allOf": [ - { - "$ref": "#/definitions/Intent" - }, - { - "$ref": "#/definitions/IntentProperties" - }, - { - "type": "object", - "properties": { - "action": { - "const": "section" - }, - "data": { - "type": "object", - "required": [ - "sectionName" - ], - "properties": { - "sectionName": { - "type": "string" - } - }, - "additionalProperties": false - } - } - } - ], - "examples": [ - { - "action": "section", - "data": { - "sectionName": "settings" - }, - "context": { - "source": "voice" - } - } - ] - }, - "PlayEntityIntent": { - "description": "A Firebolt compliant representation of a user intention to navigate an app to a the video player for a specific, playable entity, and bring that app to the foreground if needed.", - "title": "PlayEntityIntent", - "allOf": [ - { - "$ref": "#/definitions/Intent" - }, - { - "$ref": "#/definitions/IntentProperties" - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "action": { - "const": "play-entity" - }, - "data": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/PlayableEntity" - }, - "options": { - "type": "object", - "properties": { - "playFirstId": { - "type": "string" - }, - "playFirstTrack": { - "type": "integer", - "minimum": 1 - } - }, - "additionalProperties": false - } - }, - "required": [ - "entity" - ], - "propertyNames": { - "enum": [ - "entity", - "options" - ] - }, - "if": { - "properties": { - "entity": { - "type": "object", - "required": [ - "entityType" - ], - "properties": { - "entityType": { - "const": "playlist" - } - } - } - } - }, - "then": { - "type": "object", - "properties": { - "options": { - "maxProperties": 1 - } - } - }, - "else": { - "type": "object", - "properties": { - "options": { - "maxProperties": 0 - } - } - } - } - } - } - ], - "examples": [ - { - "action": "play-entity", - "data": { - "entity": { - "entityType": "playlist", - "entityId": "playlist/xyz" - }, - "options": { - "playFirstId": "song/xyz" + "playFirstId": "song/xyz" } }, "context": { @@ -1272,7 +959,7 @@ "menus": { "type": "array", "items": { - "$ref": "#/definitions/Identifier" + "type": "string" }, "minItems": 1, "maxItems": 100 @@ -1283,7 +970,7 @@ "type": "object", "properties": { "appId": { - "$ref": "#/definitions/Identifier" + "type": "string" }, "exclude": { "type": "boolean" @@ -1391,7 +1078,7 @@ "type": "object", "properties": { "appId": { - "$ref": "#/definitions/Identifier" + "type": "string" }, "entity": { "anyOf": [ @@ -1419,7 +1106,7 @@ "menus": { "type": "array", "items": { - "$ref": "#/definitions/Identifier" + "type": "string" }, "minItems": 1, "maxItems": 100 @@ -1430,7 +1117,7 @@ "type": "object", "properties": { "appId": { - "$ref": "#/definitions/Identifier" + "type": "string" }, "exclude": { "type": "boolean" @@ -1487,9 +1174,9 @@ } ] }, - "ButtonIntent": { - "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing one of the remote buttons.", - "title": "ButtonIntent", + "FocusIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing remote directional pad buttons.", + "title": "FocusIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1499,30 +1186,24 @@ }, { "type": "object", + "required": [ "data" ], "properties": { "action": { - "const": "button" + "const": "focus" }, "data": { "type": "object", "required": [ - "operation" + "direction" ], "properties": { - "operation": { + "direction": { "type": "string", "enum": [ - "down", "up", - "prev", - "next", - "enter", - "exit", - "info", - "menu", - "back", - "cancel", - "record" + "down", + "left", + "right" ] } }, @@ -1533,9 +1214,9 @@ ], "examples": [ { - "action": "button", + "action": "focus", "data": { - "operation": "menu" + "direction": "up" }, "context": { "source": "voice" @@ -1543,9 +1224,9 @@ } ] }, - "VolumeIntent": { - "description": "A Firebolt compliant representation of a user intention to change the device volume.", - "title": "VolumeIntent", + "SelectIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing the remote 'select' button.", + "title": "SelectIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1557,79 +1238,57 @@ "type": "object", "properties": { "action": { - "const": "volume" - }, - "data": { - "anyOf": [ - { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "toggle": { - "const": true - } - }, - "minProperties": 1, - "maxProperties": 1, - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "value": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "relative": { - "const": true - } - }, - "additionalProperties": false - } - ] + "const": "select" } + }, + "not": { + "required": [ "data" ] } } ], "examples": [ { - "action": "volume", - "data": { - "toggle": true - }, + "action": "select", "context": { "source": "voice" } + } + ] + }, + "BackIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing the remote 'back' button.", + "title": "BackIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" }, { - "action": "volume", - "data": { - "value": 0.7 - }, - "context": { - "source": "voice" - } + "$ref": "#/definitions/IntentProperties" }, { - "action": "volume", - "data": { - "value": 0.1, - "relative": true + "type": "object", + "properties": { + "action": { + "const": "back" + } }, + "not": { + "required": [ "data" ] + } + } + ], + "examples": [ + { + "action": "back", "context": { "source": "voice" } } ] }, - "PowerIntent": { - "description": "A Firebolt compliant representation of a user intention to turn their device on or off.", - "title": "PowerIntent", + "ExitIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing the remote 'back' button.", + "title": "ExitIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1641,28 +1300,74 @@ "type": "object", "properties": { "action": { - "const": "power" - }, - "data": { - "$ref": "#/definitions/BooleanToggle" + "const": "exit" } + }, + "not": { + "required": [ "data" ] } } ], "examples": [ { - "action": "power", - "data": { - "value": false - }, + "action": "exit", "context": { "source": "voice" } + } + ] + }, + "ScrollIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing remote directional pad buttons.", + "title": "ScrollIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" }, { - "action": "power", + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "required": [ "data" ], + "properties": { + "action": { + "const": "scroll" + }, + "data": { + "type": "object", + "required": [ + "direction" + ], + "properties": { + "direction": { + "type": "string", + "enum": [ + "up", + "down", + "left", + "right" + ] + }, + "unit": { + "type": "string", + "enum": [ + "line", + "page", + "percent" + ] + } + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "scroll", "data": { - "toggle": true + "direction": "up" }, "context": { "source": "voice" @@ -1670,9 +1375,9 @@ } ] }, - "MicrophoneIntent": { - "description": "A Firebolt compliant representation of a user intention to turn their microphone on or off.", - "title": "MicrophoneIntent", + "ButtonIntent": { + "description": "A Firebolt compliant representation of a user intention to interact with their device in a way analogous to pressing one of the remote buttons.", + "title": "ButtonIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1684,28 +1389,41 @@ "type": "object", "properties": { "action": { - "const": "microphone" + "const": "button" }, "data": { - "$ref": "#/definitions/BooleanToggle" + "type": "object", + "required": [ + "operation" + ], + "properties": { + "operation": { + "type": "string", + "enum": [ + "down", + "up", + "prev", + "next", + "enter", + "exit", + "info", + "menu", + "back", + "cancel", + "record" + ] + } + }, + "additionalProperties": false } } } ], "examples": [ { - "action": "microphone", - "data": { - "value": false - }, - "context": { - "source": "voice" - } - }, - { - "action": "microphone", + "action": "button", "data": { - "toggle": true + "operation": "menu" }, "context": { "source": "voice" @@ -1713,9 +1431,9 @@ } ] }, - "InputIntent": { - "description": "A Firebolt compliant representation of a user intention to change which video input is active.", - "title": "InputIntent", + "VolumeIntent": { + "description": "A Firebolt compliant representation of a user intention to change the device volume.", + "title": "VolumeIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1727,27 +1445,38 @@ "type": "object", "properties": { "action": { - "const": "input" + "const": "volume" }, "data": { "type": "object", - "required": [ - "interface" - ], "properties": { - "interface": { - "type": "string", - "enum": [ - "hdmi", - "rca", - "vga", - "etc..." - ] + "value": { + "type": "number" }, - "number": { - "type": "integer", - "minimum": 1, - "maximum": 100 + "relative": { + "const": true + } + }, + "required": [ "value" ], + "if": { + "required": [ "relative" ] + }, + "then": { + "properties": { + "value": { + "type": "number", + "minimum": -50, + "maximum": 50 + } + } + }, + "else": { + "properties": { + "value": { + "type": "number", + "minimum": 0, + "maximum": 100 + } } }, "additionalProperties": false @@ -1757,19 +1486,19 @@ ], "examples": [ { - "action": "input", + "action": "volume", "data": { - "interface": "hdmi" + "value": 70 }, "context": { "source": "voice" } }, { - "action": "input", + "action": "volume", "data": { - "interface": "hdmi", - "number": 1 + "value": 10, + "relative": true }, "context": { "source": "voice" @@ -1777,9 +1506,9 @@ } ] }, - "PauseIntent": { - "description": "A Firebolt compliant representation of a user intention to pause/unpause in-progress playback.", - "title": "PauseIntent", + "MuteIntent": { + "description": "A Firebolt compliant representation of a user intention to mute or unmute the device.", + "title": "MuteIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1791,7 +1520,7 @@ "type": "object", "properties": { "action": { - "const": "pause" + "const": "mute" }, "data": { "$ref": "#/definitions/BooleanToggle" @@ -1801,7 +1530,7 @@ ], "examples": [ { - "action": "pause", + "action": "mute", "data": { "value": false }, @@ -1810,7 +1539,7 @@ } }, { - "action": "pause", + "action": "mute", "data": { "toggle": true }, @@ -1820,9 +1549,9 @@ } ] }, - "PlaybackSpeedIntent": { - "description": "A Firebolt compliant representation of a user intention to change the speed of in-progress playback.", - "title": "PlaybackSpeedIntent", + "PowerIntent": { + "description": "A Firebolt compliant representation of a user intention to turn their device on or off.", + "title": "PowerIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1834,22 +1563,33 @@ "type": "object", "properties": { "action": { - "const": "speed" + "const": "power" }, "data": { "type": "object", "properties": { "value": { - "type": "number", - "exclusiveMinimum": 0, - "maximum": 4 + "type": "boolean" }, "toggle": { - "type": "boolean" + "const": true + }, + "delay": { + "type": "integer", + "minimum": 0 } }, - "minProperties": 1, - "maxProperties": 1, + "if": { + "required": [ "value" ] + }, + "then": { + "not": { + "required": [ "toggle" ] + } + }, + "else": { + "required": [ "toggle" ] + }, "additionalProperties": false } } @@ -1857,28 +1597,38 @@ ], "examples": [ { - "action": "speed", + "action": "power", "data": { - "value": 2 + "value": false }, "context": { "source": "voice" } }, { - "action": "speed", + "action": "power", "data": { "toggle": true }, "context": { "source": "voice" } - } + }, + { + "action": "power", + "data": { + "value": false, + "delay": 900 + }, + "context": { + "source": "voice" + } + } ] }, - "TrickPlayIntent": { - "description": "A Firebolt compliant representation of a user intention to fast-forward or rewind in-progress playback.", - "title": "TrickPlayIntent", + "MicrophoneIntent": { + "description": "A Firebolt compliant representation of a user intention to turn their microphone on or off.", + "title": "MicrophoneIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1890,50 +1640,28 @@ "type": "object", "properties": { "action": { - "const": "trickplay" + "const": "microphone" }, "data": { - "allOf": [ - { - "$ref": "#/definitions/DirectionalOperation" - }, - { - "type": "object", - "properties": { - "speed": { - "type": "number", - "exclusiveMinimum": 0, - "maximum": 10 - } - }, - "propertyNames": { - "enum": [ - "direction", - "speed" - ] - } - } - ] + "$ref": "#/definitions/BooleanToggle" } } } ], "examples": [ { - "action": "trickplay", + "action": "microphone", "data": { - "direction": "forward", - "speed": 2 + "value": false }, "context": { "source": "voice" } }, { - "action": "trickplay", + "action": "microphone", "data": { - "direction": "backward", - "speed": 2 + "toggle": true }, "context": { "source": "voice" @@ -1941,9 +1669,9 @@ } ] }, - "SeekIntent": { - "description": "A Firebolt compliant representation of a user intention to seek to a different time for in-progress playback.", - "title": "SeekIntent", + "InputIntent": { + "description": "A Firebolt compliant representation of a user intention to change which video input is active.", + "title": "InputIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -1955,69 +1683,84 @@ "type": "object", "properties": { "action": { - "const": "seek" + "const": "input" }, "data": { - "allOf": [ - { - "$ref": "#/definitions/DirectionalOperation" + "type": "object", + "required": [ + "interface" + ], + "properties": { + "interface": { + "type": "string", + "enum": [ + "hdmi" + ] }, - { - "type": "object", - "properties": { - "seconds": { - "type": "number", - "minimum": 0, - "maximum": 1800 - } - }, - "propertyNames": { - "enum": [ - "direction", - "seconds" - ] - } + "number": { + "type": "integer", + "minimum": 1, + "maximum": 100 } - ] + }, + "additionalProperties": false } } } ], "examples": [ { - "action": "seek", + "action": "input", "data": { - "seconds": 300 + "interface": "hdmi" }, "context": { "source": "voice" } }, { - "action": "seek", + "action": "input", "data": { - "direction": "forward", - "seconds": 30 + "interface": "hdmi", + "number": 1 }, "context": { "source": "voice" } + } + ] + }, + "PauseIntent": { + "description": "A Firebolt compliant representation of a user intention to pause in-progress playback.", + "title": "PauseIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" }, { - "action": "seek", - "data": { - "direction": "backward", - "seconds": 30 - }, + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "pause" + } + } + } + ], + "examples": [ + { + "action": "pause", "context": { "source": "voice" } } ] }, - "SkipIntent": { - "description": "A Firebolt compliant representation of a user intention to skip a scene/chapter/ad during in-progress playback.", - "title": "SkipIntent", + "PlayIntent": { + "description": "A Firebolt compliant representation of a user intention to play/resume content.", + "title": "PlayIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -2029,60 +1772,79 @@ "type": "object", "properties": { "action": { - "const": "skip" - }, - "data": { - "allOf": [ - { - "$ref": "#/definitions/DirectionalOperation" - }, - { - "type": "object", - "properties": { - "count": { - "type": "number", - "exclusiveMinimum": 0, - "maximum": 100 - } - }, - "propertyNames": { - "enum": [ - "direction", - "count" - ] - } - } - ] + "const": "play" } } } ], "examples": [ { - "action": "skip", - "data": { - "direction": "forward", - "count": 1 - }, + "action": "play", "context": { "source": "voice" } + } + ] + }, + "ReplayIntent": { + "description": "A Firebolt compliant representation of a user intention to replay content.", + "title": "ReplayIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" }, { - "action": "skip", - "data": { - "direction": "backward", - "count": 1 - }, + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "replay" + } + } + } + ], + "examples": [ + { + "action": "replay", "context": { "source": "voice" } } ] - }, - "ClosedCaptionsIntent": { - "description": "A Firebolt compliant representation of a user intention to enable/disable closed captions.", - "title": "ClosedCaptionsIntent", + }, + "StopIntent": { + "description": "A Firebolt compliant representation of a user intention to stop content.", + "title": "StopIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "stop" + } + } + } + ], + "examples": [ + { + "action": "stop", + "context": { + "source": "voice" + } + } + ] + }, + "PlaybackSpeedIntent": { + "description": "A Firebolt compliant representation of a user intention to change the speed of in-progress playback.", + "title": "PlaybackSpeedIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -2094,26 +1856,39 @@ "type": "object", "properties": { "action": { - "const": "closedcaptions" + "const": "speed" }, "data": { - "$ref": "#/definitions/BooleanToggle" + "type": "object", + "properties": { + "value": { + "type": "number", + "exclusiveMinimum": 0, + "maximum": 4 + }, + "toggle": { + "type": "boolean" + } + }, + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false } } } ], "examples": [ { - "action": "closedcaptions", + "action": "speed", "data": { - "value": false + "value": 2 }, "context": { "source": "voice" } }, { - "action": "closedcaptions", + "action": "speed", "data": { "toggle": true }, @@ -2123,9 +1898,9 @@ } ] }, - "AudioDescriptionIntent": { - "description": "A Firebolt compliant representation of a user intention to enable/disable audio descriptions.", - "title": "AudioDescriptionIntent", + "FastForwardIntent": { + "description": "A Firebolt compliant representation of a user intention to fast-forward in-progress playback.", + "title": "FastForwardIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -2137,38 +1912,51 @@ "type": "object", "properties": { "action": { - "const": "audiodescriptions" + "const": "fast-forward" }, "data": { - "$ref": "#/definitions/BooleanToggle" + "type": "object", + "properties": { + "speed": { + "type": "number", + "exclusiveMinimum": 0, + "maximum": 10 + } + } } } } ], "examples": [ { - "action": "audiodescriptions", + "action": "fast-forward", "data": { - "value": false + "speed": 2 }, "context": { "source": "voice" } }, { - "action": "audiodescriptions", + "action": "fast-forward", "data": { - "toggle": true + "speed": 0.5 }, "context": { "source": "voice" } - } + }, + { + "action": "fast-forward", + "context": { + "source": "voice" + } + } ] }, - "MessageIntent": { - "description": "A Firebolt compliant representation of a platform intention to display a message on the device.", - "title": "MessageIntent", + "RewindIntent": { + "description": "A Firebolt compliant representation of a user intention to rewind in-progress playback.", + "title": "RewindIntent", "allOf": [ { "$ref": "#/definitions/Intent" @@ -2180,13 +1968,15 @@ "type": "object", "properties": { "action": { - "const": "message" + "const": "rewind" }, "data": { "type": "object", "properties": { - "value": { - "type": "string" + "speed": { + "type": "number", + "exclusiveMinimum": 0, + "maximum": 10 } } } @@ -2195,80 +1985,1043 @@ ], "examples": [ { - "action": "message", + "action": "rewind", "data": { - "value": "Here's a message" + "speed": 2 }, "context": { "source": "voice" } - } - ] - }, - "Identifier": { - "type": "string" - }, - "Filter": { - "type": "object", - "properties": { - "key": { - "type": "string" }, - "value": { - "type": "string" - } - } - }, - "Keyword": { - "type": "object", - "properties": { - "keyword": { - "type": "string" + { + "action": "rewind", + "data": { + "speed": 0.5 + }, + "context": { + "source": "voice" + } }, - "type": { - "type": "string" + { + "action": "rewind", + "context": { + "source": "voice" + } + } + ] + }, + "SeekIntent": { + "description": "A Firebolt compliant representation of a user intention to seek to a different time for in-progress playback.", + "title": "SeekIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" }, - "appId": { - "$ref": "#/definitions/Identifier" - } - } - }, - "DirectionalOperation": { - "type": "object", + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "seek" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/DirectionalOperation" + }, + { + "type": "object", + "properties": { + "seconds": { + "type": "number" + }, + "relative": { + "const": true + } + }, + "required": [ "seconds" ], + "if": { + "not": { + "required": [ "relative" ] + } + }, + "then": { + "properties": { + "seconds": { + "type": "number", + "minimum": 0, + "maximum": 86400 + } + } + }, + "else": { + "properties": { + "seconds": { + "type": "number", + "minimum": -43200, + "maximum": 43200 + } + } + } + } + ] + } + } + } + ], + "examples": [ + { + "action": "seek", + "data": { + "seconds": 300 + }, + "context": { + "source": "voice" + } + }, + { + "action": "seek", + "data": { + "relative": true, + "seconds": -30 + }, + "context": { + "source": "voice" + } + } + ] + }, + "SkipIntent": { + "description": "A Firebolt compliant representation of a user intention to skip a scene/chapter/ad during in-progress playback.", + "title": "SkipIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "skip" + }, + "data": { + "allOf": [ + { + "$ref": "#/definitions/DirectionalOperation" + }, + { + "type": "object", + "properties": { + "count": { + "type": "number", + "exclusiveMinimum": 0, + "maximum": 100 + } + }, + "propertyNames": { + "enum": [ + "direction", + "count" + ] + } + } + ] + } + } + } + ], + "examples": [ + { + "action": "skip", + "data": { + "direction": "forward", + "count": 1 + }, + "context": { + "source": "voice" + } + }, + { + "action": "skip", + "data": { + "direction": "backward", + "count": 1 + }, + "context": { + "source": "voice" + } + } + ] + }, + "ClosedCaptionsIntent": { + "description": "A Firebolt compliant representation of a user intention to enable/disable closed captions.", + "title": "ClosedCaptionsIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "closed-captions" + }, + "data": { + "$ref": "#/definitions/BooleanToggle" + } + } + } + ], + "examples": [ + { + "action": "closed-captions", + "data": { + "value": false + }, + "context": { + "source": "voice" + } + }, + { + "action": "closed-captions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } + ] + }, + "VoiceGuidanceIntent": { + "description": "A Firebolt compliant representation of a user intention to enable/disable voice guidance.", + "title": "VoiceGuidanceIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "voice-guidance" + }, + "data": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + }, + "toggle": { + "const": true + }, + "speed": { + "type": "integer" + }, + "relative": { + "const": true + }, + "verbosity": { + "type": "string", + "enum": [ + "low", + "hight" + ] + } + }, + "if": { + "required": [ "value" ] + }, + "then": { + "not": { + "required": [ "toggle" ] + }, + "if": { + "required": [ "relative" ] + }, + "then": { + "properties": { + "speed": { + "type": "integer", + "minimum": -10, + "maximum": 10 + } + } + }, + "else": { + "properties": { + "speed": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 10 + } + } + } + }, + "else": { + "if": { + "required": [ "toggle" ] + }, + "then": { + "not": { + "required": [ "value" ] + } + } + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "voice-guidance", + "data": { + "value": true, + "verbosity": "low" + }, + "context": { + "source": "voice" + } + }, + { + "action": "voice-guidance", + "data": { + "speed": -1, + "relative": true + }, + "context": { + "source": "voice" + } + }, + { + "action": "voice-guidance", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } + ] + }, + "AudioDescriptionsIntent": { + "description": "A Firebolt compliant representation of a user intention to enable/disable audio descriptions.", + "title": "AudioDescriptionsIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "audio-descriptions" + }, + "data": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + }, + "toggle": { + "const": true + }, + "language": { + "$ref": "https://meta.comcast.com/firebolt/localization#/definitions/ISO639_2Language" + } + }, + "if": { + "required": [ "value" ] + }, + "then": { + "not": { + "required": [ "toggle" ] + } + }, + "else": { + "required": [ "toggle" ] + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "audio-descriptions", + "data": { + "value": false + }, + "context": { + "source": "voice" + } + }, + { + "action": "audio-descriptions", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + }, + { + "action": "audio-descriptions", + "data": { + "value": true, + "language": "eng" + }, + "context": { + "source": "voice" + } + } + ] + }, + "HighContrastIntent": { + "description": "A Firebolt compliant representation of a user intention to enable or disable high contrast mode.", + "title": "HighContrastIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "high-contrast" + }, + "data": { + "$ref": "#/definitions/BooleanToggle" + } + } + } + ], + "examples": [ + { + "action": "high-contrast", + "data": { + "value": false + }, + "context": { + "source": "voice" + } + }, + { + "action": "high-contrast", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + } + ] + }, + "ScreenMagnificationIntent": { + "description": "A Firebolt compliant representation of a user intention to turn screen magnification on or off.", + "title": "ScreenMagnificationIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "screen-magnification" + }, + "data": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + }, + "toggle": { + "const": true + }, + "scale": { + "type": "number", + "minimum": 1, + "maximum": 10 + } + }, + "if": { + "required": [ + "toggle" + ] + }, + "then": { + "type": "object", + "maxProperties": 1 + }, + "additionalProperties": false + } + } + } + ], + "examples": [ + { + "action": "screen-magnification", + "data": { + "value": false + }, + "context": { + "source": "voice" + } + }, + { + "action": "screen-magnification", + "data": { + "value": true, + "scale": 2.5 + }, + "context": { + "source": "voice" + } + }, + { + "action": "screen-magnification", + "data": { + "toggle": true + }, + "context": { + "source": "voice" + } + }, + { + "action": "screen-magnification", + "data": { + "value": false + }, + "context": { + "source": "voice" + } + } + ] + }, + "MessageIntent": { + "description": "A Firebolt compliant representation of a platform intention to display a message on the device.", + "title": "MessageIntent", + "allOf": [ + { + "$ref": "#/definitions/Intent" + }, + { + "$ref": "#/definitions/IntentProperties" + }, + { + "type": "object", + "properties": { + "action": { + "const": "message" + }, + "data": { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + } + } + ], + "examples": [ + { + "action": "message", + "data": { + "value": "Here's a message" + }, + "context": { + "source": "voice" + } + } + ] + }, + + "Identifier": { + "type": "string" + }, + "Filter": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "Keyword": { + "type": "object", + "properties": { + "keyword": { + "type": "string" + }, + "type": { + "type": "string" + }, + "appId": { + "type": "string" + } + } + }, + "DirectionalOperation": { + "type": "object", + "properties": { + "direction": { + "type": "string", + "enum": [ + "forward", + "backward" + ] + } + } + }, + "BooleanToggle": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + }, + "toggle": { + "const": true + } + }, + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false + }, + "IntentMessage": { + "type": "object", + "properties": { + "type": { + "type": "string", + "pattern": "^xrn:firebolt:intent:(app|platform):[a-zA-Z]+$" + } + }, + "required": [ + "type" + ] + }, + "MovieEntity": { + "title": "MovieEntity", + "description": "A Firebolt compliant representation of a Movie entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "movie" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "movie", + "entityId": "el-camino" + } + ] + }, + "TVEpisodeEntity": { + "title": "TVEpisodeEntity", + "description": "A Firebolt compliant representation of a TV Episode entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId", + "seasonId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "episode" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "seasonId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "episode", + "entityId": "breaking-bad-pilot", + "seriesId": "breaking-bad", + "seasonId": "breaking-bad-season-1" + } + ] + }, + "TVSeasonEntity": { + "title": "TVSeasonEntity", + "description": "A Firebolt compliant representation of a TV Season entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId", + "seriesId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "season" + }, + "entityId": { + "type": "string" + }, + "seriesId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "season", + "entityId": "breaking-bad-season-1", + "seriesId": "breaking-bad" + } + ] + }, + "TVSeriesEntity": { + "title": "TVSeriesEntity", + "description": "A Firebolt compliant representation of a TV Series entity.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], "properties": { - "direction": { + "entityType": { + "const": "program" + }, + "programType": { + "const": "series" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "series", + "entityId": "breaking-bad" + } + ] + }, + "PlaylistEntity": { + "title": "PlaylistEntity", + "description": "A Firebolt compliant representation of a Playlist entity.", + "type": "object", + "required": [ + "entityType", + "entityId" + ], + "properties": { + "entityType": { + "const": "playlist" + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "playlist", + "entityId": "playlist/xyz" + } + ] + }, + "PlayableEntity": { + "title": "PlayableEntity", + "anyOf": [ + { + "$ref": "#/definitions/MovieEntity" + }, + { + "$ref": "#/definitions/TVEpisodeEntity" + }, + { + "$ref": "#/definitions/PlaylistEntity" + }, + { + "$ref": "#/definitions/MusicEntity" + }, + { + "$ref": "#/definitions/AdditionalEntity" + } + ] + }, + "AdditionalEntity": { + "title": "AdditionalEntity", + "description": "A Firebolt compliant representation of the remaining program entity types.", + "type": "object", + "required": [ + "entityType", + "programType", + "entityId" + ], + "properties": { + "entityType": { + "const": "program" + }, + "programType": { "type": "string", "enum": [ - "forward", - "backward" + "concert", + "sportingEvent", + "preview", + "other", + "advertisement", + "musicVideo", + "minisode", + "extra" ] + }, + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false, + "examples": [ + { + "entityType": "program", + "programType": "concert", + "entityId": "live-aid" + } + ] + }, + "UntypedEntity": { + "title": "UntypedEntity", + "allOf": [ + { + "description": "A Firebolt compliant representation of the remaining entity types.", + "type": "object", + "required": [ + "entityId" + ], + "properties": { + "entityId": { + "type": "string" + }, + "assetId": { + "type": "string" + }, + "appContentData": { + "type": "string", + "maxLength": 256 + } + }, + "additionalProperties": false + } + ], + "examples": [ + { + "entityId": "an-entity" + } + ] + }, + "Metadata": { + "title": "Metadata", + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the entity." + }, + "synopsis": { + "type": "string", + "description": "Short description of the entity." + }, + "seasonNumber": { + "type": "number", + "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." + }, + "seasonCount": { + "type": "number", + "description": "For TV series, seasons, and episodes, the total number of seasons." + }, + "episodeNumber": { + "type": "number", + "description": "For TV episodes, the episode number." + }, + "episodeCount": { + "type": "number", + "description": "For TV seasons and episodes, the total number of episodes in the current season." + }, + "releaseDate": { + "type": "string", + "format": "date-time", + "description": "The date that the program or entity was released or first aired." + }, + "contentRatings": { + "type": "array", + "items": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/ContentRating" + }, + "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." } } }, - "BooleanToggle": { + "MusicEntity": { + "title": "MusicEntity", "type": "object", "properties": { - "value": { - "type": "boolean" + "entityType": { + "const": "music" }, - "toggle": { - "const": true + "musicType": { + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/MusicType" + }, + "entityId": { + "type": "string" } }, - "minProperties": 1, - "maxProperties": 1, - "additionalProperties": false + "required": [ + "entityType", + "musicType", + "entityId" + ] }, - "IntentMessage": { + "ChannelEntity": { + "title": "ChannelEntity", "type": "object", "properties": { - "type": { + "entityType": { + "const": "channel" + }, + "channelType": { "type": "string", - "pattern": "^xrn:firebolt:intent:(app|platform):[a-zA-Z]+$" + "enum": [ + "streaming", + "overTheAir" + ] + }, + "entityId": { + "type": "string", + "description": "ID of the channel, in the target App's scope." + }, + "appContentData": { + "type": "string", + "maxLength": 256 } }, "required": [ - "type" + "entityType", + "channelType", + "entityId" + ], + "additionalProperties": false + }, + "ProgramEntity": { + "title": "ProgramEntity", + "oneOf": [ + { + "$ref": "#/definitions/MovieEntity" + }, + { + "$ref": "#/definitions/TVEpisodeEntity" + }, + { + "$ref": "#/definitions/TVSeasonEntity" + }, + { + "$ref": "#/definitions/TVSeriesEntity" + }, + { + "$ref": "#/definitions/AdditionalEntity" + } ] } } diff --git a/src/schemas/lifecycle.json b/src/schemas/lifecycle.json new file mode 100644 index 000000000..906cf41ea --- /dev/null +++ b/src/schemas/lifecycle.json @@ -0,0 +1,38 @@ +{ + "$id": "https://meta.comcast.com/firebolt/lifecycle", + "title": "Lifecycle", + "oneOf": [ + { + "$ref": "#/definitions/LifecycleState" + }, + { + "$ref": "#/definitions/CloseReason" + } + ], + "definitions": { + "LifecycleState": { + "title": "LifecycleState", + "description": "The application lifecycle state", + "type": "string", + "enum": [ + "initializing", + "inactive", + "foreground", + "background", + "unloading", + "suspended" + ] + }, + "CloseReason": { + "title": "CloseReason", + "description": "The application close reason", + "type": "string", + "enum": [ + "remoteButton", + "userExit", + "done", + "error" + ] + } + } +} diff --git a/src/schemas/media.json b/src/schemas/media.json new file mode 100644 index 000000000..e35716f41 --- /dev/null +++ b/src/schemas/media.json @@ -0,0 +1,179 @@ +{ + "$id": "https://meta.comcast.com/firebolt/schemas/media", + "title": "Media", + "definitions": { + "AudioCodec": { + "type": "string", + "description": "Audio codec", + "enum": [ + "aac", + "ac3", + "ac4", + "dts-x", + "eac3", + "mpeg3", + "opus", + "truehd", + "unknown", + "vorbis" + ] + }, + "AudioCodecLevel": { + "description": "Audio codec level", + "type": "string", + "enumKeyPrefix": "level", + "enum": [ + "3.0", + "3.1", + "4.0", + "4.1", + "4.2", + "5.0", + "5.1" + ] + }, + "AudioCodecProfile": { + "description": "Audio codec profile", + "type": "string", + "enum": [ + "high", + "main", + "main10", + "mp2lc", + "mp4he", + "p0", + "p2" + ] + }, + "AudioContainer": { + "description": "Audio container", + "type": "string", + "enum": [ + "audio/mpeg", + "audio/mp4", + "audio/ogg", + "audio/webm" + ] + }, + "AudioMode": { + "description": "Audio output mode", + "type": "string", + "enum": [ + "auto", + "mono", + "none", + "passthrough", + "stereo", + "surround", + "unknown" + ] + }, + "Colorimetry": { + "description": "Colorimetry", + "type": "string", + "enum": [ + "BT2020cYCC", + "BT2020RGB", + "BT2020YCC", + "DCI-P3", + "ICtCp", + "opRGB", + "opYCC601", + "sYCC601", + "xvYCC601", + "xvYCC709", + "unknown" + ] + }, + "Dimensions": { + "type": "array", + "description": "The dimensions specified as width and height.", + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "additionalItems": false, + "minItems": 2, + "maxItems": 2 + }, + "HDRProfile": { + "type": "string", + "description": "HDR profile", + "enum": [ + "dolbyVision", + "hdr10", + "hdr10plus", + "hlg", + "sdr", + "unknown" + ] + }, + "ResolutionName": { + "description": "User-friendly resolution name", + "type": "string", + "enum": [ + "sd", + "hd", + "fhd", + "uhd", + "unknown" + ] + }, + "VideoCodec": { + "type": "string", + "description": "video codec", + "enum": [ + "av1", + "avc", + "hevc", + "mpeg1", + "mpeg2", + "vp8", + "vp9", + "vp10" + ] + }, + "VideoContainer": { + "description": "Video container format", + "type": "string", + "enum": [ + "video/mpeg", + "video/mp2t", + "video/mp4", + "video/webm" + ] + }, + "VideoMode": { + "description": "Video output mode; the shorthand resolution and frame rate", + "type": "string", + "enumKeyPrefix": "mode", + "enum": [ + "480i", + "480p", + "576i25", + "576p50", + "576p60", + "720p50", + "720p60", + "1080i50", + "1080i60", + "1080p24", + "1080p25", + "1080p30", + "1080p50", + "1080p60", + "2160p24", + "2160p25", + "2160p30", + "2160p50", + "2160p60", + "4320p60", + "unknown" + ] + } + } +} diff --git a/src/schemas/types.json b/src/schemas/types.json new file mode 100644 index 000000000..0caa49c1f --- /dev/null +++ b/src/schemas/types.json @@ -0,0 +1,194 @@ +{ + "$id": "https://meta.comcast.com/firebolt/types", + "title": "Types", + "definitions": { + "SemanticVersion": { + "title": "SemanticVersion", + "type": "object", + "properties": { + "major": { + "type": "integer", + "minimum": 0 + }, + "minor": { + "type": "integer", + "minimum": 0 + }, + "patch": { + "type": "integer", + "minimum": 0 + }, + "readable": { + "type": "string" + } + }, + "required": [ + "major", + "minor", + "patch", + "readable" + ], + "additionalProperties": false + }, + "AudioProfile": { + "title": "AudioProfile", + "type": "string", + "enum": [ + "stereo", + "dolbyDigital5.1", + "dolbyDigital7.1", + "dolbyDigital5.1+", + "dolbyDigital7.1+", + "dolbyAtmos" + ] + }, + "BooleanMap": { + "title": "BooleanMap", + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + "FlatMap": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "LocalizedString": { + "title": "LocalizedString", + "description": "Localized string supports either a simple `string` or a Map of language codes to strings. When using a simple `string`, the current preferred langauge from `Localization.langauge()` is assumed.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ], + "examples": [ + "A simple string, with no language code", + { + "en": "This is english", + "es": "esto es espaƱol" + } + ] + }, + "ListenResponse": { + "title": "ListenResponse", + "type": "object", + "required": [ + "event", + "listening" + ], + "properties": { + "event": { + "type": "string", + "pattern": "[a-zA-Z]+\\.on[A-Z][a-zA-Z]+" + }, + "listening": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ProviderRequest": { + "title": "ProviderRequest", + "type": "object", + "required": [ + "correlationId" + ], + "additionalProperties": false, + "properties": { + "correlationId": { + "type": "string", + "description": "The id that was passed in to the event that triggered a provider method to be called" + }, + "parameters": { + "description": "The result of the provider response.", + "type": ["object", "null"] + } + } + }, + "ProviderResponse": { + "title": "ProviderResponse", + "type": "object", + "required": [ + "correlationId" + ], + "additionalProperties": false, + "properties": { + "correlationId": { + "type": "string", + "description": "The id that was passed in to the event that triggered a provider method to be called" + }, + "result": { + "description": "The result of the provider response." + } + } + }, + "Timeout": { + "title": "Timeout", + "description": "Defines the timeout in seconds. If the threshold for timeout is passed for any operation without a result it will throw an error.", + "type": "integer", + "default": 0, + "minimum": 0, + "maximum": 9999 + }, + "Dimensions": { + "type": "object", + "properties": { + "width": { + "type": "integer", + "minimum": 1 + }, + "height": { + "type": "integer", + "minimum": 1 + } + }, + "required": [ "width", "height" ] + }, + "Image": { + "type": "object", + "properties": { + "uri": { + "description": "URI for the image. May be a relative path (e.g. ./foo/image.png) or absolute (e.g. https://foo.com/bar.png) depending on usage.", + "type": "string" + }, + "aspectRatio": { + "description": "The aspect ratio of the image", + "type": "string", + "pattern": "^\\d+x\\d+" + }, + "description": { + "description": "Description of the image.", + "type": "string" + }, + "type": { + "description": "The type of the image.", + "type": "string", + "enum": [ + "icon", "poster", "banner", "splash", "hero" + ] + } + }, + "required": [ + "uri", "aspectRatio", "type" + ] + } + } +} \ No newline at end of file diff --git a/src/sdks/core/CHANGELOG.md b/src/sdks/core/CHANGELOG.md index 17b2ff8bb..7946afebf 100644 --- a/src/sdks/core/CHANGELOG.md +++ b/src/sdks/core/CHANGELOG.md @@ -1,9 +1,22 @@ +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + +### Bug Fixes + +* Add PlaylistEntity to EntityIntent (9769d6d (https://github.com/rdkcentral/firebolt-apis/commit/9769d6d7d43f1d61dfcda16ba4806175c5cf7658)) +* Remove x-alternatives that don't exist (#278 (https://github.com/rdkcentral/firebolt-apis/issues/278)) (e38ad5a (https://github.com/rdkcentral/firebolt-apis/commit/e38ad5a508fccb5c724cf0f03cbd67ad4a28378c)) +* Removed sdk as required field from Device.version (#231 (https://github.com/rdkcentral/firebolt-apis/issues/231)) (ef3de3e (https://github.com/rdkcentral/firebolt-apis/commit/ef3de3e68619c6f666dd1d751b0acc25f6438122)) + +### Features + +* [Command and Control Intents](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/intents/command-and-control.md) (#251 (https://github.com/rdkcentral/firebolt-apis/issues/251)) (c8f8dae (https://github.com/rdkcentral/firebolt-apis/commit/c8f8dae5a9a0f14a3815c04df5a55763823d4898)) +* [User Interest](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/discovery/user-interest.md) (#170 (https://github.com/rdkcentral/firebolt-apis/issues/170)) (48a1094 (https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) + # [1.1.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.0.0...v1.1.0) (2024-02-09) ### Bug Fixes - * Add Music to Playable entities (#225 (https://github.com/rdkcentral/firebolt-apis/issues/225)) (22c9b71 (https://github.com/rdkcentral/firebolt-apis/commit/22c9b71d3c0ee98d32585d1b365afabf8e64d6ed)) - * Modified account:uid to SHOULD (#224 (https://github.com/rdkcentral/firebolt-apis/issues/224)) (70c8b24 (https://github.com/rdkcentral/firebolt-apis/commit/70c8b24decfcbff2c32fb1b0d21290afc00a8432)) +* Add Music to Playable entities (#225 (https://github.com/rdkcentral/firebolt-apis/issues/225)) (22c9b71 (https://github.com/rdkcentral/firebolt-apis/commit/22c9b71d3c0ee98d32585d1b365afabf8e64d6ed)) +* Modified account:uid to SHOULD (#224 (https://github.com/rdkcentral/firebolt-apis/issues/224)) (70c8b24 (https://github.com/rdkcentral/firebolt-apis/commit/70c8b24decfcbff2c32fb1b0d21290afc00a8432)) # [1.0.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.1...v1.0.0) (2023-11-03) @@ -11,12 +24,12 @@ Upgraded to 1.0 at part of RDK6 release. This API is still compatibile with 0.x ### Bug Fixes - * Updated Discovery.launch example with xrn:firebolt: application-type (#187 (https://github.com/rdkcentral/firebolt-apis/issues/187)) (4dbbab3 (https://github.com/rdkcentral/firebolt-apis/commit/4dbbab3d9fa68c0e5185ca72fd0170bae8a30139)) +* Updated Discovery.launch example with xrn:firebolt: application-type (#187 (https://github.com/rdkcentral/firebolt-apis/issues/187)) (4dbbab3 (https://github.com/rdkcentral/firebolt-apis/commit/4dbbab3d9fa68c0e5185ca72fd0170bae8a30139)) ### Features - * Added scope parameter for advertisingId (#188 (https://github.com/rdkcentral/firebolt-apis/issues/188)) - * Play Intent (#151 (https://github.com/rdkcentral/firebolt-apis/issues/151)) (d1ddf3f (https://github.com/rdkcentral/firebolt-apis/commit/d1ddf3fb3b1f758315686ad2f6dc57c2b270f33a)) +* Added scope parameter for advertisingId (#188 (https://github.com/rdkcentral/firebolt-apis/issues/188)) +* Play Intent (#151 (https://github.com/rdkcentral/firebolt-apis/issues/151)) (d1ddf3f (https://github.com/rdkcentral/firebolt-apis/commit/d1ddf3fb3b1f758315686ad2f6dc57c2b270f33a)) # [0.17.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.0...v0.17.1) (2023-09-15) diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index bc10e6ae5..09af630c9 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdk", - "version": "1.2.0-next.2", + "version": "1.2.0", "description": "The Firebolt JS SDK", "main": "./dist/lib/firebolt.mjs", "types": "./dist/lib/firebolt.d.ts", diff --git a/src/sdks/core/sdk.config.json b/src/sdks/core/sdk.config.json index f406f8bea..30a5371a1 100644 --- a/src/sdks/core/sdk.config.json +++ b/src/sdks/core/sdk.config.json @@ -69,13 +69,20 @@ ], "provide": [ "xrn:firebolt:capability:discovery:entity-info", - "xrn:firebolt:capability:discovery:purchased-content" + "xrn:firebolt:capability:discovery:purchased-content", + "xrn:firebolt:capability:discovery:interest" + ] + }, + { + "module": "Display", + "use": [ + "xrn:firebolt:capability:display:info" ] }, { "module": "Internal", "use": [ - "xrn:firebolt:capability:lifecycle:initialize" + "xrn:firebolt:capability:lifecycle:initialize" ] }, { @@ -110,6 +117,13 @@ "xrn:firebolt:capability:metrics:media" ] }, + { + "module": "MediaInfo", + "use": [ + "xrn:firebolt:capability:media-info:audio-format", + "xrn:firebolt:capability:media-info:video-format" + ] + }, { "module": "Parameters", "use": [ @@ -138,4 +152,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/sdks/core/test/suite/discovery.test.ts b/src/sdks/core/test/suite/discovery.test.ts index 638c57432..7402dce42 100644 --- a/src/sdks/core/test/suite/discovery.test.ts +++ b/src/sdks/core/test/suite/discovery.test.ts @@ -150,3 +150,12 @@ test("clear()", () => { const result: boolean = Discovery.clear(-1000); expect(result).toBeFalsy(); }); + +test("details() provider", () => { + + class myUserInterestProvider implements Discovery.UserInterestProvider { + userInterest(parameters?: object, session?: Discovery.ProviderSession): Promise { + return null + } + } +}) \ No newline at end of file diff --git a/src/sdks/discovery/.npmignore b/src/sdks/discovery/.npmignore new file mode 100644 index 000000000..0e2ba4d22 --- /dev/null +++ b/src/sdks/discovery/.npmignore @@ -0,0 +1,6 @@ +build/* +src/* +test/* +.DS_Store +jest.config.* +tsconfig.* \ No newline at end of file diff --git a/src/sdks/discovery/CHANGELOG.md b/src/sdks/discovery/CHANGELOG.md new file mode 100644 index 000000000..af3ac672a --- /dev/null +++ b/src/sdks/discovery/CHANGELOG.md @@ -0,0 +1,6 @@ +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + +### Features + +* Introduced Discovery SDK for first-party aggregated experiences to connect with third-party apps. +* [User Interest](https://github.com/rdkcentral/firebolt-apis/blob/main/requirements/specifications/discovery/user-interest.md) (#170 (https://github.com/rdkcentral/firebolt-apis/issues/170)) (48a1094 (https://github.com/rdkcentral/firebolt-apis/commit/48a1094aaab6418f09db662dbc81f090a34f32ed)) diff --git a/src/sdks/discovery/CONTRIBUTING.md b/src/sdks/discovery/CONTRIBUTING.md new file mode 120000 index 000000000..c97564d93 --- /dev/null +++ b/src/sdks/discovery/CONTRIBUTING.md @@ -0,0 +1 @@ +../../../CONTRIBUTING.md \ No newline at end of file diff --git a/src/sdks/discovery/LICENSE b/src/sdks/discovery/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/src/sdks/discovery/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/src/sdks/discovery/NOTICE b/src/sdks/discovery/NOTICE new file mode 120000 index 000000000..295f6bdb3 --- /dev/null +++ b/src/sdks/discovery/NOTICE @@ -0,0 +1 @@ +../../../NOTICE \ No newline at end of file diff --git a/src/sdks/discovery/README.md b/src/sdks/discovery/README.md new file mode 100644 index 000000000..2ec46b95d --- /dev/null +++ b/src/sdks/discovery/README.md @@ -0,0 +1,26 @@ +--- +title: Firebolt Discovery SDK +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt Discovery SDK +For building Firebolt compliant apps for discovering first-party content on Firebolt devices. + +## Usage +To install, run: + +``` +npm install @firebolt-js/discovery-sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Content } from '@firebolt-js/discovery-sdk' +``` + +## Contributing +The Firebolt SDKs are built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info. diff --git a/src/sdks/discovery/jest.config.json b/src/sdks/discovery/jest.config.json new file mode 100644 index 000000000..745370cfa --- /dev/null +++ b/src/sdks/discovery/jest.config.json @@ -0,0 +1,8 @@ +{ + "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|js?)$", + "transform": {}, + "testPathIgnorePatterns": ["/node_modules/", "/../../../test"], + "moduleFileExtensions": ["js", "jsx", "mjs"], + "verbose": true, + "testEnvironment": "jest-environment-jsdom" + } \ No newline at end of file diff --git a/src/sdks/discovery/package.json b/src/sdks/discovery/package.json new file mode 100644 index 000000000..a5459d8f8 --- /dev/null +++ b/src/sdks/discovery/package.json @@ -0,0 +1,53 @@ +{ + "name": "@firebolt-js/discovery-sdk", + "version": "1.2.0", + "description": "The Firebolt Discovery JS SDK", + "main": "./dist/lib/firebolt-discovery.mjs", + "types": "./dist/lib/firebolt-discovery.d.ts", + "exports": { + ".": "./dist/lib/firebolt-discovery.mjs" + }, + "type": "module", + "scripts": { + "validate": "npx firebolt-openrpc validate --input ./dist/firebolt-discovery-open-rpc.json", + "sdk": "npx firebolt-openrpc sdk --input ./dist/firebolt-discovery-open-rpc.json --template ./src/js --output ./build/javascript/src", + "native": "npx firebolt-openrpc sdk --input ./dist/firebolt-discovery-open-rpc.json --template ./src/js --output ./build/c/src --language ../../../node_modules/@firebolt-js/openrpc/languages/c", + "compile": "cd ../../.. && npm run compile", + "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-discovery-open-rpc.json", + "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-discovery-open-rpc.json --output build/docs/markdown --as-path", + "wiki": "npx firebolt-openrpc docs --input ./dist/firebolt-discovery-open-rpc.json --output build/docs/markdown", + "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run prettier && npm run dist:copy && echo 'Firebolt Discovery SDK /dist/ is ready.\n'", + "dist:copy": "npm run dist:copy:sdk && npm run dist:copy:docs", + "dist:copy:sdk": "mkdirp ./dist && cp -R build/javascript/src dist/lib && cp ./dist/firebolt-discovery-open-rpc.json ../../../dist/firebolt-discovery-open-rpc.json", + "dist:copy:docs": "mkdirp ./dist && cp -R build/docs/markdown dist/docs", + "dist": "npm run dist:notest && npm run test", + "clean": "rm -rf ./build && rm -rf ./dist", + "test:setup": "rm -rf test/transpiled-suite && npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite", + "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", + "prepack": "node ../../js/version.mjs validate && npm run broilerplate", + "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", + "prettier": "prettier build/**/*.mjs --write --parser babel && prettier build/**/*.md --write --parser markdown" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/rdkcentral/firebolt-core-sdk", + "directory": "src/sdks/discovery" + }, + "author": "", + "bugs": { + "url": "https://github.com/rdkcentral/firebolt-core-sdk/issues" + }, + "homepage": "https://github.com/rdkcentral/firebolt-core-sdk#readme", + "devDependencies": { + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.3", + "prettier": "^3.1.0", + "typescript": "^4.6.4" + }, + "keywords": [ + "firebolt", + "apps", + "sdk" + ], + "license": "Apache-2.0" +} \ No newline at end of file diff --git a/src/sdks/discovery/sdk.config.json b/src/sdks/discovery/sdk.config.json new file mode 100644 index 000000000..535d3bb12 --- /dev/null +++ b/src/sdks/discovery/sdk.config.json @@ -0,0 +1,15 @@ +{ + "info": { + "title": "Firebolt Discovery SDK" + }, + "methods": [ + { + "module": "Content", + "use": [ + "xrn:firebolt:capability:discovery:purchased-content", + "xrn:firebolt:capability:discovery:entity-info", + "xrn:firebolt:capability:discovery:interest" + ] + } + ] +} diff --git a/src/sdks/discovery/src/js/sdk/index.mjs b/src/sdks/discovery/src/js/sdk/index.mjs new file mode 100644 index 000000000..a9f2f5ca6 --- /dev/null +++ b/src/sdks/discovery/src/js/sdk/index.mjs @@ -0,0 +1,30 @@ +/* + * Copyright 2021 Comcast Cable Communications Management, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { setMockResponses } from './Transport/MockTransport.mjs' + +/* ${MOCK_IMPORTS} */ + +setMockResponses({ + /* ${MOCK_OBJECTS} */ +}) + +/* ${EXPORTS} */ +export { default as Log } from './Log/index.mjs' +export { default as Events } from './Events/index.mjs' +export { default as Settings } from './Settings/index.mjs' diff --git a/src/sdks/discovery/test/suite/content.test.ts b/src/sdks/discovery/test/suite/content.test.ts new file mode 100644 index 000000000..1ab4e98c8 --- /dev/null +++ b/src/sdks/discovery/test/suite/content.test.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021 Comcast Cable Communications Management, LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import { test, expect } from "@jest/globals"; +import { Content } from "../../build/javascript/src/firebolt-discovery"; + +test("Content.requestUserInterest()", () => { + return Content.requestUserInterest(Content.InterestType.INTEREST, Content.InterestReason.PLAYLIST).then((interest: Content.InterestResult) => { + const entity = interest.entity + const appId = interest.appId + expect(appId).toBeDefined() + expect(entity).toBeDefined() + expect(entity.info.title).toBe("Cool Runnings") + }) +}); + +test("Content.onUserInterest()", () => { + return Content.listen('userInterest', (interest: Content.InterestEvent) => { + const entity = interest.entity + const appId = interest.appId + const reason = interest.reason + expect(interest['type']).toBeDefined() + expect(reason).toBeDefined() + expect(appId).toBeDefined() + expect(entity).toBeDefined() + expect(entity.info.title).toBe("Cool Runnings") + }) +}); diff --git a/src/sdks/discovery/tsconfig.json b/src/sdks/discovery/tsconfig.json new file mode 100644 index 000000000..56ff58bc8 --- /dev/null +++ b/src/sdks/discovery/tsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "test/suite/*" + ] +} \ No newline at end of file diff --git a/src/sdks/manage/CHANGELOG.md b/src/sdks/manage/CHANGELOG.md index 167fdf9b0..23aeda267 100644 --- a/src/sdks/manage/CHANGELOG.md +++ b/src/sdks/manage/CHANGELOG.md @@ -1,3 +1,5 @@ +# 1.2.0 (https://github.com/rdkcentral/firebolt-apis/compare/v1.1.0...v1.2.0) (2024-06-14) + # [1.1.0](https://github.com/rdkcentral/firebolt-apis/compare/v1.0.0...v1.1.0) (2024-02-09) ### Bug Fixes diff --git a/src/sdks/manage/package.json b/src/sdks/manage/package.json index 6bd96bfda..a11ea5ab2 100644 --- a/src/sdks/manage/package.json +++ b/src/sdks/manage/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/manage-sdk", - "version": "1.2.0-next.2", + "version": "1.2.0", "description": "The Firebolt Manage JS SDK", "main": "./dist/lib/firebolt-manage.mjs", "types": "./dist/lib/firebolt-manage.d.ts", diff --git a/src/sdks/manage/test/suite/keyboard.test.ts b/src/sdks/manage/test/suite/keyboard.test.ts index c40b7d40e..6ee3a5aed 100644 --- a/src/sdks/manage/test/suite/keyboard.test.ts +++ b/src/sdks/manage/test/suite/keyboard.test.ts @@ -82,19 +82,19 @@ class DelegatingKBProvider implements Keyboard.KeyboardInputProvider { standard( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { return this.delegate.standard(parameters, session) } password( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { return this.delegate.password(parameters, session) } email( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { return this.delegate.email(parameters, session) } } @@ -103,21 +103,19 @@ class KBProvider implements Keyboard.KeyboardInputProvider { standard( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { - return Promise.resolve({ - text: 'foo' - }); + ): Promise { + return Promise.resolve('foo'); } password( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { return Promise.resolve(null); } email( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { return Promise.resolve(null); } } @@ -126,19 +124,19 @@ class KBProviderWithError implements Keyboard.KeyboardInputProvider { async standard( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { throw new Error('failed') } async password( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { throw new Error('failed') } async email( parameters: Keyboard.KeyboardParameters, session: Keyboard.FocusableProviderSession - ): Promise { + ): Promise { throw new Error('failed') } } @@ -156,7 +154,7 @@ test("Keyboard.provide() declarations", async () => { let result = await promise console.log(result) expect(result.method).toStrictEqual('keyboard.standardResponse') - expect(result.params.result.text).toStrictEqual('foo') + expect(result.params.result).toStrictEqual('foo') }); test("Keyboard.provide() with blank object", () => { diff --git a/tsconfig.json b/tsconfig.json index 0e5a8d3af..014e7a98a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "include": [ "src/sdks/core/test/suite/*", - "src/sdks/manage/test/suite/*" + "src/sdks/manage/test/suite/*", + "src/sdks/discovery/test/suite/*" ] } \ No newline at end of file