toggleCaptions()
toggleCaptions(newState?: boolean)
Toggles the captions panel visibility state.
If the captions panel is currently shown, then it will be hidden. And vice-versa -> if the captions panel is currently hidden, then it will be shown. There is also an optional param to set a concrete target visibility state, but you may use hideCaptions() and showCaptions() to achieve similar functionality.
//This will toggle the captions panel visibility state
sambaFrame.toggleCaptions();
//This will show the captions panel, equivalent to sambaFrame.showCaptions();
sambaFrame.toggleCaptions(true);
//This will hide the captions panel, equivalent to sambaFrame.hideCaptions();
sambaFrame.toggleCaptions(false);
Sample use case: You may have a custom button in your application to control the captions panel visibility.
Last updated