From 216ef3750dd4acfa69247565c5480a6955570de5 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Wed, 20 Dec 2023 10:29:14 +0100 Subject: [PATCH] Mock tracks works in an insecure context (#62) --- package-lock.json | 26 +++++++++++++++++++++++--- package.json | 2 ++ src/components/AudioDevicePanel.tsx | 3 ++- src/components/MockVideoPanel.tsx | 3 ++- src/components/ScreensharingPanel.tsx | 5 +++-- src/components/VideoDevicePanel.tsx | 3 ++- src/containers/Dashboard.tsx | 9 ++++++++- 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index afd4528..d6fc8cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0", "react-router-dom": "^6.20.1", + "uuid": "^9.0.1", "vite-plugin-mkcert": "^1.17.1" }, "devDependencies": { @@ -37,6 +38,7 @@ "@types/phoenix": "^1.6.4", "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.13.2", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.16", @@ -1074,6 +1076,14 @@ "uuid": "^8.3.2" } }, + "node_modules/@jellyfish-dev/membrane-webrtc-js/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@jellyfish-dev/react-client-sdk": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@jellyfish-dev/react-client-sdk/-/react-client-sdk-0.1.6.tgz", @@ -1830,6 +1840,12 @@ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, + "node_modules/@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.13.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz", @@ -5567,9 +5583,13 @@ "dev": true }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } diff --git a/package.json b/package.json index f7326ed..c851f90 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0", "react-router-dom": "^6.20.1", + "uuid": "^9.0.1", "vite-plugin-mkcert": "^1.17.1" }, "devDependencies": { @@ -45,6 +46,7 @@ "@types/phoenix": "^1.6.4", "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.13.2", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.16", diff --git a/src/components/AudioDevicePanel.tsx b/src/components/AudioDevicePanel.tsx index 15e12da..05319e2 100644 --- a/src/components/AudioDevicePanel.tsx +++ b/src/components/AudioDevicePanel.tsx @@ -1,6 +1,7 @@ import { FaMicrophone } from "react-icons/fa"; import { getUserMedia } from "../utils/browser-media-utils"; import { DeviceInfo } from "../containers/StreamingSettingsCard"; +import { v4 as uuidv4 } from "uuid"; type AudioDevicePanelProps = { deviceId: string; @@ -19,7 +20,7 @@ export const AudioDevicePanel = ({