A npm package that exports utility function used across services
npm install @dyteinternals/utilssh
npm install @dyteinternals/utils
`or if using
yarn:`sh
yarn add @dyteinternals/utils
`Usage Example
$3
1. Import flagsmith`js
import { globalFlagsmith as flagsmith } from '@dyteinternals/utils';
`2. Identify the user to flagsmith
`js
await flagsmith.identify(
'A_RANDOM_USER_ID',
JSON.parse(JSON.stringify({traitKey1: traitValue1, traitKey2: traitValue:2})),
false, // force evaluate, appends a fake string to userId to make it unique and treat it as new user
5000, // timeout
flagsEndpoint, // default edge.api.flagsmith.com
console, // logs would be passed to console, pass any logger of your choice
);
`$3
`js
import {
getDefaultPresetV2,
LivestreamViewerMediaQualityType,
MediaProductionPermissionType,
PresetTypeV2,
RecorderType,
ViewType,
WaitingRoomTypes,
MediaScreenShareQualityType,
MediaVideoQualityType,
PluginAccessControls,
BorderRadius,
BorderWidth,
Theme,
convertHybridPresetToV1,
convertHybridPresetToV2
} from '@dyteinternals/utils';console.log(getDefaultPresetV2());
``