pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

safely generate watch party code

Pas 56c14945 c19fe775

+4 -2
+4 -2
src/stores/watchParty.ts
··· 25 25 } 26 26 27 27 // Generate a random 4-digit code 28 - const generateRoomCode = (): string => { 29 - return Math.floor(1000 + Math.random() * 9000).toString(); 28 + export const generateRoomCode = (): string => { 29 + const array = new Uint32Array(1); 30 + crypto.getRandomValues(array); 31 + return (1000 + (array[0] % 9000)).toString(); 30 32 }; 31 33 32 34 // Helper function to reset playback rate to 1x