9bf3f54183
* feat(html5): initial implementation of Gladia transcriptions to BBB 3.0 * fix(transcription): Add missing locales and fix invalid cc menu key * fix(bbb-transcription-controller): Bump transcription controller to fix some bugs * fix: adjust yq syntax for setting fs esl password in transctiption-controller * fix(transcription): Use newer useSettings format from transcription options * fix(captions): Correctly use captions settings --------- Co-authored-by: João Victor <joaovictornunes973@gmail.com> Co-authored-by: Anton Georgiev <anto.georgiev@gmail.com> Co-authored-by: Ramón Souza <contato@ramonsouza.com>
24 lines
578 B
TypeScript
24 lines
578 B
TypeScript
import { useCallback } from 'react';
|
|
import { useMutation } from '@apollo/client';
|
|
import { USER_SET_SPEECH_OPTIONS } from '../mutations';
|
|
|
|
const useSetSpeechOptions = () => {
|
|
const [userSetSpeechOptions] = useMutation(USER_SET_SPEECH_OPTIONS);
|
|
|
|
const setSpeechOptions = (
|
|
partialUtterances: boolean,
|
|
minUtteranceLength: number,
|
|
) => {
|
|
userSetSpeechOptions({
|
|
variables: {
|
|
partialUtterances,
|
|
minUtteranceLength,
|
|
},
|
|
});
|
|
};
|
|
|
|
return useCallback(setSpeechOptions, [userSetSpeechOptions]);
|
|
};
|
|
|
|
export default useSetSpeechOptions;
|