diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aca9e12e..a350104e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,112 @@ -# [0.14.0-next.8](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0-next.7...v0.14.0-next.8) (2023-06-27) +# [0.16.0-next.3](https://github.com/rdkcentral/firebolt-apis/compare/v0.16.0-next.2...v0.16.0-next.3) (2023-08-14) ### Bug Fixes +* Update package.json to point to release 2.0.4 of `firebolt-openrpc` ([9e3cf55](https://github.com/rdkcentral/firebolt-apis/commit/9e3cf55d465d3b429ebcba0167e888eb7d7f0588)) + +# [0.16.0-next.2](https://github.com/rdkcentral/firebolt-apis/compare/v0.16.0-next.1...v0.16.0-next.2) (2023-08-10) + + +### Bug Fixes + +* Unit test cases for setting null value ([#159](https://github.com/rdkcentral/firebolt-apis/issues/159)) ([7e011e2](https://github.com/rdkcentral/firebolt-apis/commit/7e011e2937842902c6b111646492b33a057b23c8)) +* Update firebolt-openrpc, fix tests ([9480984](https://github.com/rdkcentral/firebolt-apis/commit/948098490595ffa374df08f3f44157d70beb7990)) +* Update firebolt-openrpc, fix tests ([312b5ec](https://github.com/rdkcentral/firebolt-apis/commit/312b5ec627e9b494ac455475efe7851bed70c34e)) + +# [0.16.0-next.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0...v0.16.0-next.1) (2023-08-07) + + +### Features + +* Added manage apis for windlowColor and windowOpacity ([#157](https://github.com/rdkcentral/firebolt-apis/issues/157)) ([f508358](https://github.com/rdkcentral/firebolt-apis/commit/f508358aeb2f58bb3893bbfaf09e2340fcadac8f)) + +# [0.15.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0) (2023-07-31) + + +### Bug Fixes + +* CHANGELOGs for 0.15 ([#152](https://github.com/rdkcentral/firebolt-apis/issues/152)) ([667f7a4](https://github.com/rdkcentral/firebolt-apis/commit/667f7a4620b3726a48e9071af6f5a9cfaf1c3ec8)) +* CI weirdness ([b72990f](https://github.com/rdkcentral/firebolt-apis/commit/b72990f5363b5ce37aa09e80a2b2daffc209216a)) +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* Update package-lock.json ([767fc65](https://github.com/rdkcentral/firebolt-apis/commit/767fc658b5ac2020f5d6eca82c8734baf0200fd8)) +* Updating package.json ([dd438b7](https://github.com/rdkcentral/firebolt-apis/commit/dd438b77c18c4565fd91a88e3394e5ce7c2cecff)) +* Upgrade to `firebolt-js/openrpc` version 2.0.3 ([c0a2647](https://github.com/rdkcentral/firebolt-apis/commit/c0a26475dba5059f9fc6ceb11bcb103bb355cceb)) +* window fix from firebolt-openrpc 2.0.3-next.1 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + + +### Features + +* Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) +* Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + +# [0.15.0-next.4](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0-next.3...v0.15.0-next.4) (2023-07-31) + + +### Bug Fixes + +* CHANGELOGs for 0.15 ([#152](https://github.com/rdkcentral/firebolt-apis/issues/152)) ([667f7a4](https://github.com/rdkcentral/firebolt-apis/commit/667f7a4620b3726a48e9071af6f5a9cfaf1c3ec8)) +* Update package-lock.json ([767fc65](https://github.com/rdkcentral/firebolt-apis/commit/767fc658b5ac2020f5d6eca82c8734baf0200fd8)) + +# [0.15.0-next.3](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0-next.2...v0.15.0-next.3) (2023-07-31) + + +### Features + +* Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + +# [0.15.0-next.2](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0-next.1...v0.15.0-next.2) (2023-07-28) + + +### Bug Fixes + +* CI weirdness ([b72990f](https://github.com/rdkcentral/firebolt-apis/commit/b72990f5363b5ce37aa09e80a2b2daffc209216a)) +* Updating package.json ([dd438b7](https://github.com/rdkcentral/firebolt-apis/commit/dd438b77c18c4565fd91a88e3394e5ce7c2cecff)) + +# [0.15.0-next.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0-next.1) (2023-07-27) + + +### Bug Fixes + +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* window fix from firebolt-openrpc 2.0.3-next.1 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + + +### Features + +* Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) + +# [0.14.0-next.10](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0-next.8...v0.14.0-next.11) (2023-07-26) + +### Features + +* Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) + +### Bug Fixes + +* window fix from firebolt-openrpc 2.0.3-next.1 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) * Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +# [0.14.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.13.0...v0.14.0) (2023-06-22) + +* Add Capabilities ToC to github.io docs ([0d23136](https://github.com/rdkcentral/firebolt-apis/commit/0d23136bfa4976686795158bdfe179430598af9e)) +* **Advertising:** put resetAdvertisingIdentifier back in manage sdk ([ce92ae7](https://github.com/rdkcentral/firebolt-apis/commit/ce92ae7bfff58fa1d3e4bee78c88d5edf0266473)) +* event links in capability toc ([31a8a85](https://github.com/rdkcentral/firebolt-apis/commit/31a8a85c0749ebfa872f2a158975697396ebdf8c)) +* **governance:** Add governance process docs ([a80ab53](https://github.com/rdkcentral/firebolt-apis/commit/a80ab53c5cdd914b5acbce1effbdb464475bed63)) +* Move to `firebolt-openrpc` 2.0.2 ([52fe2a7](https://github.com/rdkcentral/firebolt-apis/commit/52fe2a78b17f1e36ec854fedd52d136cfa60b4e2)) +* package-lock.json ([dd8025c](https://github.com/rdkcentral/firebolt-apis/commit/dd8025c637a5ae58ce2e0355b995d55feeab9713)) +* Update path in publish docs ([9881383](https://github.com/rdkcentral/firebolt-apis/commit/98813833a074a6e25b012d2aac376377d8c5d5a9)) + + +### Features + +* Add an event when apps call signIn or signOut ([#133](https://github.com/rdkcentral/firebolt-apis/issues/133)) ([8ba2515](https://github.com/rdkcentral/firebolt-apis/commit/8ba2515948c433ccc38662f223f5fb399cf34841)) +* Allow granted in capability.info and capability.granted to be null ([#134](https://github.com/rdkcentral/firebolt-apis/issues/134)) ([c5c31ee](https://github.com/rdkcentral/firebolt-apis/commit/c5c31ee3c744ec018a57232d2e7b1caf41158ed6)) +* Change voice guidance limits to 0.5 and 2 ([#137](https://github.com/rdkcentral/firebolt-apis/issues/137)) ([b8f1944](https://github.com/rdkcentral/firebolt-apis/commit/b8f19449efd808639599b162aba61c08ec089c41)) + # [0.14.0-next.7](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0-next.6...v0.14.0-next.7) (2023-06-22) diff --git a/package.json b/package.json index fe9fecbe8..e283058d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdks", - "version": "0.14.0-next.8", + "version": "0.16.0-next.3", "description": "The Firebolt JS SDK", "type": "module", "bin": { diff --git a/requirements/images/specifications/media/media-pipeline/media/image1.png b/requirements/images/specifications/media/media-pipeline/media/image1.png new file mode 100644 index 000000000..a93c8d392 Binary files /dev/null and b/requirements/images/specifications/media/media-pipeline/media/image1.png differ diff --git a/requirements/images/specifications/media/media-pipeline/media/image2.png b/requirements/images/specifications/media/media-pipeline/media/image2.png new file mode 100644 index 000000000..a73586c8d Binary files /dev/null and b/requirements/images/specifications/media/media-pipeline/media/image2.png differ diff --git a/requirements/images/specifications/media/media-pipeline/media/image3.png b/requirements/images/specifications/media/media-pipeline/media/image3.png new file mode 100644 index 000000000..27a83ec3c Binary files /dev/null and b/requirements/images/specifications/media/media-pipeline/media/image3.png differ diff --git a/requirements/images/specifications/media/media-pipeline/media/image4.png b/requirements/images/specifications/media/media-pipeline/media/image4.png new file mode 100644 index 000000000..abd84556f Binary files /dev/null and b/requirements/images/specifications/media/media-pipeline/media/image4.png differ diff --git a/requirements/images/specifications/media/media-pipeline/media/image5.png b/requirements/images/specifications/media/media-pipeline/media/image5.png new file mode 100644 index 000000000..1b5275806 Binary files /dev/null and b/requirements/images/specifications/media/media-pipeline/media/image5.png differ diff --git a/requirements/specifications/media/media-pipeline.md b/requirements/specifications/media/media-pipeline.md new file mode 100644 index 000000000..a929d4fd3 --- /dev/null +++ b/requirements/specifications/media/media-pipeline.md @@ -0,0 +1,267 @@ +# 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: + +![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/src/openrpc/accessibility.json b/src/openrpc/accessibility.json index 2f1e226a4..8e805965d 100644 --- a/src/openrpc/accessibility.json +++ b/src/openrpc/accessibility.json @@ -48,7 +48,9 @@ "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", - "textAlignVertical": "middle" + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 } } } @@ -95,7 +97,9 @@ "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", - "textAlignVertical": "middle" + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 } } } @@ -175,9 +179,56 @@ } } ] - } + }, + { + "name": "audioDescriptionSettings", + "summary": "Get the user's preferred audio description settings", + "params": [], + "tags": [ + { + "name": "property:readonly" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "result": { + "name": "settings", + "summary": "the audio description settings", + "schema": { + "$ref": "#/components/schemas/AudioDescriptionSettings" + } + }, + "examples": [ + { + "name": "Getting the audio description settings", + "params": [], + "result": { + "name": "Default Result", + "value": { + "enabled": true + } + } + } + ] + } ], "components": { - "schemas": {} + "schemas": { + "AudioDescriptionSettings": { + "title": "AudioDescriptionSettings", + "type": "object", + "required": ["enabled"], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not audio descriptions should be enabled by default" + } + } + } + } } } \ No newline at end of file diff --git a/src/openrpc/audio_descriptions.json b/src/openrpc/audio_descriptions.json new file mode 100644 index 000000000..fb909285e --- /dev/null +++ b/src/openrpc/audio_descriptions.json @@ -0,0 +1,57 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "AudioDescriptions", + "description": "A module for managing audio-description Settings.", + "version": "0.0.0" + }, + "methods": [ + { + "name": "enabled", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + } + ], + "summary": "Whether or not audio-descriptions are enabled.", + "params": [ + ], + "result": { + "name": "enabled", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [ + ], + "result": { + "name": "enabled", + "value": true + } + }, + { + "name": "Default example #2", + "params": [ + ], + "result": { + "name": "enabled", + "value": false + } + } + ] + } + ], + "components": { + "schemas": { + } + } +} \ No newline at end of file diff --git a/src/openrpc/closed_captions.json b/src/openrpc/closed_captions.json index a3a0c6659..f04ab7cbc 100644 --- a/src/openrpc/closed_captions.json +++ b/src/openrpc/closed_captions.json @@ -59,7 +59,7 @@ ] } ], - "summary": "The prefered font family for displaying closed-captions.", + "summary": "The preferred font family for displaying closed-captions.", "params": [], "result": { "name": "family", @@ -83,6 +83,14 @@ "name": "family", "value": "cursive" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "family", + "value": null + } } ] }, @@ -99,7 +107,7 @@ ] } ], - "summary": "The prefered font size for displaying closed-captions.", + "summary": "The preferred font size for displaying closed-captions.", "params": [], "result": { "name": "size", @@ -123,6 +131,14 @@ "name": "size", "value": 1 } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "size", + "value": null + } } ] }, @@ -139,7 +155,7 @@ ] } ], - "summary": "The prefered font color for displaying closed-captions.", + "summary": "The preferred font color for displaying closed-captions.", "params": [], "result": { "name": "color", @@ -163,6 +179,14 @@ "name": "color", "value": "#000000" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } } ] }, @@ -179,7 +203,7 @@ ] } ], - "summary": "The prefered font edge style for displaying closed-captions.", + "summary": "The preferred font edge style for displaying closed-captions.", "params": [], "result": { "name": "edge", @@ -203,6 +227,14 @@ "name": "edge", "value": "solid" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "edge", + "value": null + } } ] }, @@ -219,7 +251,7 @@ ] } ], - "summary": "The prefered font edge color for displaying closed-captions.", + "summary": "The preferred font edge color for displaying closed-captions.", "params": [], "result": { "name": "color", @@ -243,6 +275,14 @@ "name": "color", "value": "#ffffff" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } } ] }, @@ -259,7 +299,7 @@ ] } ], - "summary": "The prefered opacity for displaying closed-captions characters.", + "summary": "The preferred opacity for displaying closed-captions characters.", "params": [], "result": { "name": "opacity", @@ -283,6 +323,14 @@ "name": "opacity", "value": 100 } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } } ] }, @@ -299,7 +347,7 @@ ] } ], - "summary": "The prefered background color for displaying closed-captions, .", + "summary": "The preferred background color for displaying closed-captions, .", "params": [], "result": { "name": "color", @@ -323,6 +371,14 @@ "name": "color", "value": "#ffffff" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } } ] }, @@ -339,7 +395,7 @@ ] } ], - "summary": "The prefered opacity for displaying closed-captions backgrounds.", + "summary": "The preferred opacity for displaying closed-captions backgrounds.", "params": [], "result": { "name": "opacity", @@ -363,6 +419,14 @@ "name": "opacity", "value": 100 } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } } ] }, @@ -379,10 +443,10 @@ ] } ], - "summary": "The prefered horizontal alignment for displaying closed-captions characters.", + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", "params": [], "result": { - "name": "opacity", + "name": "alignment", "schema": { "$ref": "https://meta.comcast.com/firebolt/accessibility#/definitions/HorizontalAlignment" } @@ -392,7 +456,7 @@ "name": "Default example #1", "params": [], "result": { - "name": "aligment", + "name": "alignment", "value": "center" } }, @@ -400,9 +464,17 @@ "name": "Default example #2", "params": [], "result": { - "name": "aligment", + "name": "alignment", "value": "left" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } } ] }, @@ -419,10 +491,10 @@ ] } ], - "summary": "The prefered horizontal alignment for displaying closed-captions characters.", + "summary": "The preferred horizontal alignment for displaying closed-captions characters.", "params": [], "result": { - "name": "opacity", + "name": "alignment", "schema": { "$ref": "https://meta.comcast.com/firebolt/accessibility#/definitions/VerticalAlignment" } @@ -432,7 +504,7 @@ "name": "Default example #1", "params": [], "result": { - "name": "alignement", + "name": "alignment", "value": "middle" } }, @@ -440,9 +512,113 @@ "name": "Default example #2", "params": [], "result": { - "name": "alignement", + "name": "alignment", "value": "top" } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "alignment", + "value": null + } + } + ] + }, + { + "name": "windowColor", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window color for displaying closed-captions, .", + "params": [], + "result": { + "name": "color", + "schema": { + "$ref": "https://meta.comcast.com/firebolt/accessibility#/definitions/Color" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "color", + "value": "#000000" + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "color", + "value": "white" + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "color", + "value": null + } + } + ] + }, + { + "name": "windowOpacity", + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:accessibility:closedcaptions" + ] + } + ], + "summary": "The preferred window opacity for displaying closed-captions backgrounds.", + "params": [], + "result": { + "name": "opacity", + "schema": { + "$ref": "https://meta.comcast.com/firebolt/accessibility#/definitions/Opacity" + } + }, + "examples": [ + { + "name": "Default example #1", + "params": [], + "result": { + "name": "opacity", + "value": 99 + } + }, + { + "name": "Default example #2", + "params": [], + "result": { + "name": "opacity", + "value": 100 + } + }, + { + "name": "Default example #3", + "params": [], + "result": { + "name": "opacity", + "value": null + } } ] } diff --git a/src/openrpc/localization.json b/src/openrpc/localization.json index 1327529a0..544847c54 100644 --- a/src/openrpc/localization.json +++ b/src/openrpc/localization.json @@ -168,6 +168,50 @@ } ] }, + { + "name": "preferredAudioLanguages", + "summary": "A prioritized list of ISO 639 1/2 codes for the preferred audio languages on this device.", + "params": [], + "tags": [ + { + "name": "property" + }, + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:localization:language" + ] + } + ], + "result": { + "name": "languages", + "summary": "the preferred audio languages", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "examples": [ + { + "name": "Default Example", + "params": [], + "result": { + "name": "Default Result", + "value": ["es", "en"] + } + }, + { + "name": "Default Example #2", + "params": [], + "result": { + "name": "Default Result", + "value": ["en", "es"] + } + } + ] + }, { "name": "locale", "tags": [ diff --git a/src/openrpc/secure_storage.json b/src/openrpc/secure_storage.json index a790631a4..1d65c1d4b 100644 --- a/src/openrpc/secure_storage.json +++ b/src/openrpc/secure_storage.json @@ -318,7 +318,7 @@ }, "examples": [ { - "name": "Set a refresh token with name authRefreshToken with optional paramter for appId foo", + "name": "Set a refresh token with name authRefreshToken with optional parameter for appId foo", "params": [ { "name": "appId", diff --git a/src/schemas/accessibility.json b/src/schemas/accessibility.json new file mode 100644 index 000000000..5c4692b71 --- /dev/null +++ b/src/schemas/accessibility.json @@ -0,0 +1,147 @@ +{ + "$id": "https://meta.comcast.com/firebolt/accessibility", + "title": "Accessibility", + "anyOf": [ + { + "$ref": "#/definitions/ClosedCaptionsStyles" + }, + { + "$ref": "#/definitions/ClosedCaptionsSettings" + } + ], + "definitions": { + "FontFamily": { + "type": ["string", "null"] + }, + "FontSize": { + "type": ["number", "null"], + "minimum": 0 + }, + "FontEdge": { + "type": ["string", "null"] + }, + "Color": { + "type": ["string", "null"] + }, + "Opacity": { + "type": ["number", "null"], + "minimum": 0, + "maximum": 100 + }, + "HorizontalAlignment": { + "type": ["string", "null"] + }, + "VerticalAlignment": { + "type": ["string", "null"] + }, + "ClosedCaptionsStyles": { + "title": "ClosedCaptionsStyles", + "type": "object", + "description": "The default styles to use when displaying closed-captions", + "properties": { + "fontFamily": { + "$ref": "#/definitions/FontFamily" + }, + "fontSize": { + "$ref": "#/definitions/FontSize" + }, + "fontColor": { + "$ref": "#/definitions/Color" + }, + "fontEdge": { + "$ref": "#/definitions/FontEdge" + }, + "fontEdgeColor": { + "$ref": "#/definitions/Color" + }, + "fontOpacity": { + "$ref": "#/definitions/Opacity" + }, + "backgroundColor": { + "$ref": "#/definitions/Color" + }, + "backgroundOpacity": { + "$ref": "#/definitions/Opacity" + }, + "textAlign": { + "$ref": "#/definitions/HorizontalAlignment" + }, + "textAlignVertical": { + "$ref": "#/definitions/VerticalAlignment" + }, + "windowColor": { + "$ref": "#/definitions/Color" + }, + "windowOpacity": { + "$ref": "#/definitions/Opacity" + } + } + }, + "ClosedCaptionsSettings": { + "title": "ClosedCaptionsSettings", + "type": "object", + "required": [ + "enabled", + "styles" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not closed-captions should be enabled by default" + }, + "styles": { + "$ref": "#/definitions/ClosedCaptionsStyles" + } + }, + "examples": [ + { + "enabled": true, + "styles": { + "fontFamily": "Monospace sans-serif", + "fontSize": 1, + "fontColor": "#ffffff", + "fontEdge": "none", + "fontEdgeColor": "#7F7F7F", + "fontOpacity": 100, + "backgroundColor": "#000000", + "backgroundOpacity": 100, + "textAlign": "center", + "textAlignVertical": "middle", + "windowColor": "white", + "windowOpacity": 50 + } + } + ] + }, + "VoiceSpeed": { + "title": "VoiceSpeed", + "type": "number", + "minimum": 0.5, + "maximum": 2 + }, + "VoiceGuidanceSettings": { + "title": "VoiceGuidanceSettings", + "type": "object", + "required": [ + "enabled", + "speed" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not voice guidance should be enabled by default" + }, + "speed": { + "$ref": "https://meta.comcast.com/firebolt/accessibility#/definitions/VoiceSpeed", + "description": "The speed at which voice guidance speech will be read back to the user" + } + }, + "examples": [ + { + "enabled": true, + "speed": 2 + } + ] + } + } +} \ No newline at end of file diff --git a/src/sdks/core/CHANGELOG.md b/src/sdks/core/CHANGELOG.md index 0331a9425..119627c7c 100644 --- a/src/sdks/core/CHANGELOG.md +++ b/src/sdks/core/CHANGELOG.md @@ -1,3 +1,16 @@ +# [0.15.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0) (2023-07-31) + +### Bug Fixes + +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* window fix from firebolt-openrpc 2.0.3 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + +### Features + +* **Nullable CC Styles** Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* **Window CC Styles** Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) +* **Audio Descriptions** Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + # [0.14.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.13.0...v0.14.0) (2023-06-22) ### Bug Fixes diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index 58aafa879..6613ee3f0 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/sdk", - "version": "0.14.0-next.8", + "version": "0.16.0-next.3", "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 5af0e4a18..f406f8bea 100644 --- a/src/sdks/core/sdk.config.json +++ b/src/sdks/core/sdk.config.json @@ -7,7 +7,8 @@ "module": "Accessibility", "use": [ "xrn:firebolt:capability:accessibility:closedcaptions", - "xrn:firebolt:capability:accessibility:voiceguidance" + "xrn:firebolt:capability:accessibility:voiceguidance", + "xrn:firebolt:capability:accessibility:audiodescriptions" ] }, { diff --git a/src/sdks/core/src/js/sdk/Lifecycle/defaults.mjs b/src/sdks/core/src/js/sdk/Lifecycle/defaults.mjs index 3cdf2deeb..324d4267a 100644 --- a/src/sdks/core/src/js/sdk/Lifecycle/defaults.mjs +++ b/src/sdks/core/src/js/sdk/Lifecycle/defaults.mjs @@ -28,7 +28,8 @@ const emit = (value) => { MockTransport.event('Lifecycle', value.state, value) } -const automation = window.__firebolt ? !!window.__firebolt.automation : false +const win = typeof window !== 'undefined' ? window : {} +const automation = win.__firebolt ? !!win.__firebolt.automation : false export default { ready: function() { @@ -56,7 +57,8 @@ export default { }, finished: function() { - if (window.location) - window.location.href = "about:blank" + if (win.location) + win.location.href = "about:blank" }, } + diff --git a/src/sdks/core/test/suite/lazy-transport.test.ts b/src/sdks/core/test/suite/lazy-transport.test.ts new file mode 100644 index 000000000..ebfb739fe --- /dev/null +++ b/src/sdks/core/test/suite/lazy-transport.test.ts @@ -0,0 +1,115 @@ +/* + * 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 + */ + +// NOTE: this test SHOULD NOT include Setup, since it does it's own +// setup for Firebolt SDK/TL handshake +const win = globalThis || window + +import Setup from '../../../../../test/Setup' +import { beforeAll, test, expect } from '@jest/globals'; +import { Lifecycle, Discovery } from "../../build/javascript/src/firebolt"; + +// holds test transport layer state, e.g. callback +type stateType = { + callback: (arg0: string) => void | null +} + +const state:stateType = { + callback: null +} + +let navigateToListenCount = 0 +let pullEntityInfoListenCount = 0 +let callbackWiredUp = false +let sendCalled = false + +const transport = { + send: function(message) { + sendCalled = true + const json = JSON.parse(message) + console.log('transport.send: ' + json.method) + if (json.method.toLowerCase() === 'lifecycle.ready') { + // we'll assert on this later... + navigateToListenCount++ + if (state.callback) { + // we'll assert on this later... + callbackWiredUp = true + let response = { + jsonrpc: '2.0', + id: json.id, + result: true + } + // catching errors, so all tests don't fail if this breaks + try { + // send back the onInactive event immediately, to test for race conditions + state.callback(JSON.stringify(response)) + } + catch (err) { + // fail silenetly (the boolean-based tests below will figure it out...) + } + } + } + else if (json.method.toLowerCase() === 'discovery.onpullentityinfo') { + pullEntityInfoListenCount++ + } + }, + receive: function(callback) { + console.log('transport.receive') + // store the callback + state.callback = callback + } +} + +beforeAll(()=> { + + // listen twice, using event-specific call FIRST + Discovery.listen("navigateTo", (value) => { callbackWiredUp = true }) + Discovery.listen("navigateTo", (value) => { /* this just adds more listen calls to make sure we don't spam */ }) + Discovery.listen((event, value) => { /* testing both listen signatures */ }) + Discovery.listen((event, value) => { /* testing both listen signatures */ }) + // listen three more times, using wildcard FIRST (from above) + + let p = new Promise( (resolve, reject) => { + setTimeout( _ => { + resolve(null) + }, 4000) + }) + + Lifecycle.ready() + + win.__firebolt.setTransportLayer(transport) + + return p +}) + + +test('Transport injected after SDK', () => { + expect(callbackWiredUp).toBe(true) +}); + +test('Transport send method working', () => { + expect(sendCalled).toBe(true) +}); + +test('Transport was sent listeners', () => { + expect(navigateToListenCount).toBeGreaterThan(0) +}); + +test('Transport was sent each listener only once', () => { + expect(navigateToListenCount).toBe(1) +}); diff --git a/src/sdks/manage/CHANGELOG.md b/src/sdks/manage/CHANGELOG.md index 3e2204b10..9fbc74237 100644 --- a/src/sdks/manage/CHANGELOG.md +++ b/src/sdks/manage/CHANGELOG.md @@ -1,3 +1,23 @@ +# [0.16.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.15.0...v0.16.0) (2023-08-14) + + +### Features + +* Added Manage APIs for `windlowColor` and `windowOpacity` ([#157](https://github.com/rdkcentral/firebolt-apis/issues/157)) ([f508358](https://github.com/rdkcentral/firebolt-apis/commit/f508358aeb2f58bb3893bbfaf09e2340fcadac8f)) + +# [0.15.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.14.0...v0.15.0) (2023-07-31) + +### Bug Fixes + +* Rename Advisory "Committee" to "Board" ([#135](https://github.com/rdkcentral/firebolt-apis/issues/135)) ([ef410c4](https://github.com/rdkcentral/firebolt-apis/commit/ef410c43bbb32414c3aa1d11b43093565cc90edf)) +* window fix from firebolt-openrpc 2.0.3 ([8c06dd1](https://github.com/rdkcentral/firebolt-apis/commit/8c06dd1432822719f5634e2877b36efdf02a4809)) + +### Features + +* **Nullable CC Styles** Added support to set and get null in ClosedCaptions style fields ([#150](https://github.com/rdkcentral/firebolt-apis/issues/150)) ([9c511e4](https://github.com/rdkcentral/firebolt-apis/commit/9c511e4fddebcdf5dfc04e9e8e31f98ab7eef680)) +* **Window CC Styles** Added windowColor and windowOpacity to closedCaptions style ([#145](https://github.com/rdkcentral/firebolt-apis/issues/145)) ([f65b901](https://github.com/rdkcentral/firebolt-apis/commit/f65b9019bda22400df9b9634c332e720db38118d)) +* **Audio Descriptions** Audio Description and Preferred Audio Languages Settings ([#45](https://github.com/rdkcentral/firebolt-apis/issues/45)) ([58f6ea1](https://github.com/rdkcentral/firebolt-apis/commit/58f6ea1dde7a819883eb3da24f879b6a9ecc9a41)) + # [0.14.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.13.0...v0.14.0) (2023-06-22) ### Bug Fixes diff --git a/src/sdks/manage/package.json b/src/sdks/manage/package.json index 81fa2189a..9ad290f9e 100644 --- a/src/sdks/manage/package.json +++ b/src/sdks/manage/package.json @@ -1,6 +1,6 @@ { "name": "@firebolt-js/manage-sdk", - "version": "0.14.0-next.8", + "version": "0.16.0-next.3", "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/sdk.config.json b/src/sdks/manage/sdk.config.json index 8d67b1396..56d869412 100644 --- a/src/sdks/manage/sdk.config.json +++ b/src/sdks/manage/sdk.config.json @@ -48,6 +48,15 @@ "xrn:firebolt:capability:accessibility:closedcaptions" ] }, + { + "module": "AudioDescriptions", + "use": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ], + "manage": [ + "xrn:firebolt:capability:accessibility:audiodescriptions" + ] + }, { "module": "VoiceGuidance", "use": [ diff --git a/src/sdks/manage/test/suite/closedCaptions.test.ts b/src/sdks/manage/test/suite/closedCaptions.test.ts index d43da3f13..8d48bcf6d 100644 --- a/src/sdks/manage/test/suite/closedCaptions.test.ts +++ b/src/sdks/manage/test/suite/closedCaptions.test.ts @@ -87,7 +87,7 @@ test("ClosedCaptions.textAlignVertical()", () => { test("ClosedCaptions.listen()", () => { return ClosedCaptions.listen("fontColorChanged", () => {}).then( - (res: Number) => { + (res: number) => { expect(res > 0).toBe(true); } ); @@ -95,7 +95,7 @@ test("ClosedCaptions.listen()", () => { test("ClosedCaptions.once()", () => { return ClosedCaptions.once("fontColorChanged", () => {}).then( - (res: Number) => { + (res: number) => { expect(res > 0).toBe(true); } ); @@ -104,4 +104,19 @@ test("ClosedCaptions.once()", () => { test("clear", () => { const result = ClosedCaptions.clear(-1000); expect(result).toBeFalsy(); -}); \ No newline at end of file +}); + +test("ClosedCaptions.setFontColor() with null", async () => { + const oldValue = await ClosedCaptions.fontColor() + return ClosedCaptions.fontColor(null).then(async (res: null) => { + expect(res).toBe(null); + const newValue = await ClosedCaptions.fontColor() + expect(newValue).toBe(null) + }); +}); + +test("ClosedCaptions.setFontColor() with ffffff", () => { + return ClosedCaptions.fontColor("#ffffff").then((res: null) => { + expect(res).toBe(null); + }); +});