-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(subtitles): created separate helpers for sending transcription c…
…hunks events
- Loading branch information
1 parent
ffa704e
commit 655e643
Showing
12 changed files
with
108 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable max-params, max-len */ | ||
|
||
import { IStore } from '../app/types'; | ||
import { sendEvent } from '../mobile/external-api/functions'; | ||
|
||
|
||
/** | ||
* Event which will be emitted on the native side to indicate that the transcription chunk was received. | ||
*/ | ||
const TRANSCRIPTION_CHUNK_RECEIVED = 'TRANSCRIPTION_CHUNK_RECEIVED'; | ||
|
||
/** | ||
* Logs when about the received transcription chunk. | ||
* | ||
* @param {string} transcriptMessageID - Transcription message id. | ||
* @param {string} language - The language of the transcribed message. | ||
* @param {Object} participant - The participant who send the message. | ||
* @param {any} text - The message text. | ||
* @param {IStore} _store - The store. | ||
* @returns {Event} | ||
*/ | ||
export const notifyTranscriptionChunkReceived = (transcriptMessageID: string, language: string, participant: Object, text: any, _store?: IStore) => | ||
sendEvent( | ||
_store, | ||
TRANSCRIPTION_CHUNK_RECEIVED, | ||
{ | ||
messageID: transcriptMessageID, | ||
language, | ||
participant, | ||
text | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable max-params, max-len */ | ||
|
||
import { IStore } from '../app/types'; | ||
|
||
|
||
/** | ||
* Logs when about the received transcription chunk. | ||
* | ||
* @param {string} transcriptMessageID - Transcription message id. | ||
* @param {string} language - The language of the transcribed message. | ||
* @param {Object} participant - The participant who send the message. | ||
* @param {any} text - The message text. | ||
* @param {IStore} _store - The store. | ||
* @returns {Event} | ||
*/ | ||
export const notifyTranscriptionChunkReceived = (transcriptMessageID: string, language: string, participant: Object, text: any, _store?: IStore) => | ||
APP.API.notifyTranscriptionChunkReceived({ | ||
messageID: transcriptMessageID, | ||
language, | ||
participant, | ||
text | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters