snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
28
react/features/recording/components/LiveStream/functions.ts
Normal file
28
react/features/recording/components/LiveStream/functions.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import { sanitizeUrl } from '../../../base/util/uri';
|
||||
|
||||
import {
|
||||
FOUR_GROUPS_DASH_SEPARATED,
|
||||
GOOGLE_PRIVACY_POLICY,
|
||||
JITSI_LIVE_STREAMING_HELP_LINK,
|
||||
YOUTUBE_TERMS_URL
|
||||
} from './constants';
|
||||
|
||||
/**
|
||||
* Get the live streaming options.
|
||||
*
|
||||
* @param {Object} state - The global state.
|
||||
* @returns {LiveStreaming}
|
||||
*/
|
||||
export function getLiveStreaming(state: IReduxState) {
|
||||
const { liveStreaming = {} } = state['features/base/config'];
|
||||
const regexp = liveStreaming.validatorRegExpString && new RegExp(liveStreaming.validatorRegExpString);
|
||||
|
||||
return {
|
||||
enabled: Boolean(liveStreaming.enabled),
|
||||
helpURL: sanitizeUrl(liveStreaming.helpLink || JITSI_LIVE_STREAMING_HELP_LINK)?.toString(),
|
||||
termsURL: sanitizeUrl(liveStreaming.termsLink || YOUTUBE_TERMS_URL)?.toString(),
|
||||
dataPrivacyURL: sanitizeUrl(liveStreaming.dataPrivacyLink || GOOGLE_PRIVACY_POLICY)?.toString(),
|
||||
streamLinkRegexp: regexp || FOUR_GROUPS_DASH_SEPARATED
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user