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.
//Changes the captions font size to large
sambaFrame.configureCaptions({fontSize: 'large'});
//Changes the spoken language of the local user to German
sambaFrame.configureCaptions({spokenLanguage: 'de'});
//Changes the spoken language of all room users to German
sambaFrame.configureCaptions({spokenLanguage: 'de', applySpokenLanguageToAll: true});
Language name
Code to use as spokenLanguage param
Dutch
nl
English
en
French
fr
German
de
Italian
it
Portuguese
pt
Romanian
ro
Spanish
es
Swedish
sv
Sample use cases:
You may want to control captions appearance and language with custom buttons or dropdowns outside the DigitalSamba room interface.
Last updated