Accessibility Features API
To comply with accessibility standards, including the European Accessibility Act (EEA), and to deliver an inclusive experience for users with disabilities, Titan OS provides essential accessibility features. As an app developer with an app on Titan OS, integrating these features into your app will enable it to respond to TV settings and ensure an accessible experience for all users.
Supported Platforms: These features are supported on 2024-2025 Philips EU TV models, as well as upcoming models from other manufacturers.
Under Development: These APIs are under active development and may undergo changes in the near future.
Below is a reference for the TitanSDK.accessibility
interface methods.
Text-to-Speech
Provides functionality for converting text into spoken audio.
speak
Initiates text-to-speech synthesis for the provided text string.
Parameters:
text
: Thestring
or an array ofstring
of text to be spoken.options
: Optional TTS configuration. (Note: This parameter is currently under development and its structure is likely to change.)
Returns:
- A
Promise<void>
that resolves when the speech request has been successfully initiated.
Throws:
TitanSDKError
with codeFEATURE_UNSUPPORTED
if the text-to-speech feature is not available on the current platform.TitanSDKError
with codeTTS_ERROR
if a general failure occurs during speech synthesis initiation.
stopSpeaking
Immediately stops any text-to-speech audio currently being played by the SDK.
Returns:
- A
Promise<void>
that resolves once the speech has been successfully stopped.
Throws:
TitanSDKError
with codeFEATURE_UNSUPPORTED
if the text-to-speech feature is not available on the current platform.
Accessibility Settings
Allows retrieving and monitoring system accessibility preferences.
getSettings
Retrieves the current accessibility settings relevant to the SDK.
Returns:
- A
Promise<AccessibilitySettings>
that resolves with an object containing the current settings.
Throws:
TitanSDKError
with codePLATFORM_ERROR
if the settings cannot be retrieved from the underlying platform.
AccessibilitySettings Type
Defines the structure of the accessibility settings object returned by getSettings
and provided by onSettingsChanged
.
Events
Provides mechanisms to subscribe to accessibility-related events.
onSettingsChanged
Subscribes a listener function to be called whenever relevant accessibility settings change.
Parameters:
listener
: A callback function that will be invoked with the updatedAccessibilitySettings
object when a change occurs.
Returns:
- A function that, when called, unsubscribes the provided
listener
, preventing it from receiving further updates.
Example Usage
This example demonstrates how to subscribe to setting changes, apply them, and clean up the subscription.