configureCaptions()
configureCaptions({ fontSize, spokenLanguage })
Changes the captions settings according to the provided params. You are able to change the font size of the captions (small, medium, large) and also the spoken language of the user. There is no autodetection of the speaking language, so if user is speaking in some other language than the default English, then the spoken language needs to be set for the captions to be proper.
Language name | Code to use as spokenLanguage param |
---|---|
Chinese | zh |
Chinese (China) | zh-CN |
Chinese (Taiwan) | zh-TW |
Danish | da |
Dutch | nl |
English | en |
English (Australia) | en-AU |
English (United Kingdom) | en-GB |
English (India) | en-IN |
English (New Zealand) | en-NZ |
English (United States) | en-US |
French | fr |
French (Canada) | fr-CA |
German | de |
Hindi | hi |
Hindi (Roman Script) | hi-Latn |
Indonesian | id |
Italian | it |
Japanese | ja |
Korean | ko |
Norwegian | no |
Polish | pl |
Portuguese | pt |
Portuguese (Brazil) | pt-BR |
Portuguese (Portugal) | pt-PT |
Russian | ru |
Spanish | es |
Spanish (Latin America) | es-419 |
Swedish | sv |
Tamil | ta |
Turkish | tr |
Ukrainian | uk |
Sample use cases:
You may want to control captions appearance and language with custom buttons or dropdowns outside the DigitalSamba room interface.
The related events are captionsFontSizeChanged and captionsSpokenLanguageChanged if you want to be informed when the captions settings have been changed.
Last updated