bootstrap: simplify video clientId

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/888/head
Varun Patil 2023-10-19 11:57:26 -07:00
parent 77d91f81e8
commit 545088de1c
1 changed files with 2 additions and 3 deletions

View File

@ -52,9 +52,8 @@ __webpack_public_path__ = generateFilePath('memories', '', 'js/');
// Generate client id for this instance
// Does not need to be cryptographically secure
const getClientId = (): string => Math.random().toString(36).substring(2, 15).padEnd(12, '0');
_m.video.clientId = getClientId();
_m.video.clientIdPersistent = localStorage.getItem('videoClientIdPersistent') ?? getClientId();
_m.video.clientId = Math.random().toString(36).substring(2, 15).padEnd(12, '0');
_m.video.clientIdPersistent = localStorage.getItem('videoClientIdPersistent') ?? _m.video.clientId;
localStorage.setItem('videoClientIdPersistent', _m.video.clientIdPersistent);
// Turn on virtual keyboard support