mattermost-mobile/app/constants/calls.ts
Christopher Poile 4e68662899
[MM-57019] Calls: Live captions support for mobile (#7854)
* mobile support for live captions

* add the 'Live captions turned on' ephemeral notice

* PR comments

* message should be translatable

* run i18n-extract

* call_recording_state -> call_job_state; ccAvailable is now dynamic

* backwards compatibility with pre calls v0.26.0

* correct mobile version in deprecation comments

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2024-03-20 09:10:05 -04:00

52 lines
1.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {toMilliseconds} from '@utils/datetime';
const RefreshConfigMillis = toMilliseconds({minutes: 20});
const RequiredServer = {
FULL_VERSION: '6.3.0',
MAJOR_VERSION: 6,
MIN_VERSION: 3,
PATCH_VERSION: 0,
};
const MultiSessionCallsVersion = {
FULL_VERSION: '0.21.0',
MAJOR_VERSION: 0,
MIN_VERSION: 21,
PATCH_VERSION: 0,
};
const PluginId = 'com.mattermost.calls';
const REACTION_TIMEOUT = 10000;
const REACTION_LIMIT = 20;
const CALL_QUALITY_RESET_MS = toMilliseconds({minutes: 1});
const CAPTION_TIMEOUT = 5000;
export enum MessageBarType {
Microphone,
CallQuality,
}
// The JobTypes from calls plugin's server/public/job.go
const JOB_TYPE_RECORDING = 'recording';
const JOB_TYPE_TRANSCRIBING = 'transcribing';
const JOB_TYPE_CAPTIONING = 'captioning';
export default {
RefreshConfigMillis,
RequiredServer,
MultiSessionCallsVersion,
PluginId,
REACTION_TIMEOUT,
REACTION_LIMIT,
MessageBarType,
CALL_QUALITY_RESET_MS,
CAPTION_TIMEOUT,
JOB_TYPE_RECORDING,
JOB_TYPE_TRANSCRIBING,
JOB_TYPE_CAPTIONING,
};