diff --git a/package-lock.json b/package-lock.json index 00b2b4c..bb8e8ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.1.4", "license": "MIT", "dependencies": { - "@daily-co/daily-js": "^0.46.0", - "@opentok/client": "^2.23.0", + "@daily-co/daily-js": "^0.57.1", + "@opentok/client": "^2.27.1", "events": "^3.3.0", "jwt-decode": "^3.1.2" }, @@ -25,7 +25,6 @@ "fake-mediastreamtrack": "^1.1.6", "jest-environment-jsdom": "^29.0.3", "npm-run-all": "^4.1.5", - "opentok-network-test-js": "^2.4.4", "prettier": "2.7.1", "terser": "^5.17.6", "ts-jest": "^29.1.1", @@ -786,11 +785,12 @@ } }, "node_modules/@daily-co/daily-js": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@daily-co/daily-js/-/daily-js-0.46.0.tgz", - "integrity": "sha512-Ukvvuhbhe+5O4WzLyqtG87eZCChZG5zciar9SP7Wu2oLKAMDN+mz3VHEtp+zE5HCWuKqzP69TgOhb7hVMngH8Q==", + "version": "0.57.1", + "resolved": "https://registry.npmjs.org/@daily-co/daily-js/-/daily-js-0.57.1.tgz", + "integrity": "sha512-E1aFeasf0pztdB8yBvX07maoZqeY3bIYxbDRuabxqLHAav59Mycb/27GtucfPV6e64HTs0/7alVVHLC3frzViw==", "dependencies": { "@babel/runtime": "^7.12.5", + "@sentry/browser": "^7.60.1", "bowser": "^2.8.1", "dequal": "^2.0.3", "events": "^3.1.0", @@ -1913,9 +1913,111 @@ } }, "node_modules/@opentok/client": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@opentok/client/-/client-2.23.0.tgz", - "integrity": "sha512-sgtzXaeKzvY4xgq29n2K05PlqVM6LE3h0iAx2B3HJpBcWaxviO00vzKZdl7XQR7JaNqmbz4oJf9UDqzKhgtJwA==" + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@opentok/client/-/client-2.27.1.tgz", + "integrity": "sha512-6oFBvrvS3q72mPsovbK1PW9jNfX/bqbp1ZOc91q1nkIM6iRZqYPg4jZ/4HCsdAG+MaKuY8jRlKTc+If8eL/Kgw==" + }, + "node_modules/@sentry-internal/feedback": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.98.0.tgz", + "integrity": "sha512-t/mATvwkLcQLKRlx8SO5vlUjaadF6sT3lfR0PdWYyBy8qglbMTHDW4KP6JKh1gdzTVQGnwMByy+/4h9gy4AVzw==", + "dependencies": { + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sentry-internal/replay-canvas": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.98.0.tgz", + "integrity": "sha512-vAR6KIycyazaY9HwxG5UONrPTe8jeKtZr6k04svPC8OvcoI0xF+l1jMEYcarffuzKpZlPfssYb5ChHtKuXCB+Q==", + "dependencies": { + "@sentry/core": "7.98.0", + "@sentry/replay": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sentry-internal/tracing": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.98.0.tgz", + "integrity": "sha512-FnhD2uMLIAJvv4XsYPv3qsTTtxrImyLxiZacudJyaWFhxoeVQ8bKKbWJ/Ar68FAwqTtjXMeY5evnEBbRMcQlaA==", + "dependencies": { + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/browser": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.98.0.tgz", + "integrity": "sha512-/MzTS31N2iM6Qwyh4PSpHihgmkVD5xdfE5qi1mTlwQZz5Yz8t7MdMriX8bEDPlLB8sNxl7+D6/+KUJO8akX0nQ==", + "dependencies": { + "@sentry-internal/feedback": "7.98.0", + "@sentry-internal/replay-canvas": "7.98.0", + "@sentry-internal/tracing": "7.98.0", + "@sentry/core": "7.98.0", + "@sentry/replay": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/core": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.98.0.tgz", + "integrity": "sha512-baRUcpCNGyk7cApQHMfqEZJkXdvAKK+z/dVWiMqWc5T5uhzMnPE8/gjP1JZsMtJSQ8g5nHimBdI5TwOyZtxPaA==", + "dependencies": { + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/replay": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.98.0.tgz", + "integrity": "sha512-CQabv/3KnpMkpc2TzIquPu5krpjeMRAaDIO0OpTj5SQeH2RqSq3fVWNZkHa8tLsADxcfLFINxqOg2jd1NxvwxA==", + "dependencies": { + "@sentry-internal/tracing": "7.98.0", + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@sentry/types": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.98.0.tgz", + "integrity": "sha512-pc034ziM0VTETue4bfBcBqTWGy4w0okidtoZJjGVrYAfE95ObZnUGVj/XYIQ3FeCYWIa7NFN2MvdsCS0buwivQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/utils": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.98.0.tgz", + "integrity": "sha512-0/LY+kpHxItVRY0xPDXPXVsKRb95cXsGSQf8sVMtfSjz++0bLL1U4k7PFz1c5s2/Vk0B8hS6duRrgMv6dMIZDw==", + "dependencies": { + "@sentry/types": "7.98.0" + }, + "engines": { + "node": ">=8" + } }, "node_modules/@sinclair/typebox": { "version": "0.24.51", @@ -2482,27 +2584,12 @@ "node": ">=8" } }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, "node_modules/babel-jest": { "version": "29.2.2", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.2.tgz", @@ -5887,26 +5974,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opentok-network-test-js": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/opentok-network-test-js/-/opentok-network-test-js-2.4.4.tgz", - "integrity": "sha512-Z2b+D+pcEDUWB2Z+BsENVuuWLgA9zR6Jz4o4Qkm88kzt7uQmJhd2iQwkOR2+8OXvsF1W0BO0q46WLoqHAnRkmw==", - "dev": true, - "dependencies": { - "axios": "^0.21.1", - "opentok-solutions-logging": "^1.1.1", - "promise": "^8.0.1" - } - }, - "node_modules/opentok-solutions-logging": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/opentok-solutions-logging/-/opentok-solutions-logging-1.1.4.tgz", - "integrity": "sha512-Ha2wpndW99+jjbAUjoE9O715a71qt8aZwnVkuwNZH1mlo8wpQVvSRDiITTI1raYKA7MJkzRgBBkQy9BSH/PsxA==", - "dev": true, - "dependencies": { - "axios": "^0.21.1" - } - }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -6245,15 +6312,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", - "dev": true, - "dependencies": { - "asap": "~2.0.6" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -8150,11 +8208,12 @@ } }, "@daily-co/daily-js": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@daily-co/daily-js/-/daily-js-0.46.0.tgz", - "integrity": "sha512-Ukvvuhbhe+5O4WzLyqtG87eZCChZG5zciar9SP7Wu2oLKAMDN+mz3VHEtp+zE5HCWuKqzP69TgOhb7hVMngH8Q==", + "version": "0.57.1", + "resolved": "https://registry.npmjs.org/@daily-co/daily-js/-/daily-js-0.57.1.tgz", + "integrity": "sha512-E1aFeasf0pztdB8yBvX07maoZqeY3bIYxbDRuabxqLHAav59Mycb/27GtucfPV6e64HTs0/7alVVHLC3frzViw==", "requires": { "@babel/runtime": "^7.12.5", + "@sentry/browser": "^7.60.1", "bowser": "^2.8.1", "dequal": "^2.0.3", "events": "^3.1.0", @@ -8911,9 +8970,87 @@ } }, "@opentok/client": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@opentok/client/-/client-2.23.0.tgz", - "integrity": "sha512-sgtzXaeKzvY4xgq29n2K05PlqVM6LE3h0iAx2B3HJpBcWaxviO00vzKZdl7XQR7JaNqmbz4oJf9UDqzKhgtJwA==" + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@opentok/client/-/client-2.27.1.tgz", + "integrity": "sha512-6oFBvrvS3q72mPsovbK1PW9jNfX/bqbp1ZOc91q1nkIM6iRZqYPg4jZ/4HCsdAG+MaKuY8jRlKTc+If8eL/Kgw==" + }, + "@sentry-internal/feedback": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.98.0.tgz", + "integrity": "sha512-t/mATvwkLcQLKRlx8SO5vlUjaadF6sT3lfR0PdWYyBy8qglbMTHDW4KP6JKh1gdzTVQGnwMByy+/4h9gy4AVzw==", + "requires": { + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry-internal/replay-canvas": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.98.0.tgz", + "integrity": "sha512-vAR6KIycyazaY9HwxG5UONrPTe8jeKtZr6k04svPC8OvcoI0xF+l1jMEYcarffuzKpZlPfssYb5ChHtKuXCB+Q==", + "requires": { + "@sentry/core": "7.98.0", + "@sentry/replay": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry-internal/tracing": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.98.0.tgz", + "integrity": "sha512-FnhD2uMLIAJvv4XsYPv3qsTTtxrImyLxiZacudJyaWFhxoeVQ8bKKbWJ/Ar68FAwqTtjXMeY5evnEBbRMcQlaA==", + "requires": { + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry/browser": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.98.0.tgz", + "integrity": "sha512-/MzTS31N2iM6Qwyh4PSpHihgmkVD5xdfE5qi1mTlwQZz5Yz8t7MdMriX8bEDPlLB8sNxl7+D6/+KUJO8akX0nQ==", + "requires": { + "@sentry-internal/feedback": "7.98.0", + "@sentry-internal/replay-canvas": "7.98.0", + "@sentry-internal/tracing": "7.98.0", + "@sentry/core": "7.98.0", + "@sentry/replay": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry/core": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.98.0.tgz", + "integrity": "sha512-baRUcpCNGyk7cApQHMfqEZJkXdvAKK+z/dVWiMqWc5T5uhzMnPE8/gjP1JZsMtJSQ8g5nHimBdI5TwOyZtxPaA==", + "requires": { + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry/replay": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.98.0.tgz", + "integrity": "sha512-CQabv/3KnpMkpc2TzIquPu5krpjeMRAaDIO0OpTj5SQeH2RqSq3fVWNZkHa8tLsADxcfLFINxqOg2jd1NxvwxA==", + "requires": { + "@sentry-internal/tracing": "7.98.0", + "@sentry/core": "7.98.0", + "@sentry/types": "7.98.0", + "@sentry/utils": "7.98.0" + } + }, + "@sentry/types": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.98.0.tgz", + "integrity": "sha512-pc034ziM0VTETue4bfBcBqTWGy4w0okidtoZJjGVrYAfE95ObZnUGVj/XYIQ3FeCYWIa7NFN2MvdsCS0buwivQ==" + }, + "@sentry/utils": { + "version": "7.98.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.98.0.tgz", + "integrity": "sha512-0/LY+kpHxItVRY0xPDXPXVsKRb95cXsGSQf8sVMtfSjz++0bLL1U4k7PFz1c5s2/Vk0B8hS6duRrgMv6dMIZDw==", + "requires": { + "@sentry/types": "7.98.0" + } }, "@sinclair/typebox": { "version": "0.24.51", @@ -9345,27 +9482,12 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.0" - } - }, "babel-jest": { "version": "29.2.2", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.2.tgz", @@ -11914,26 +12036,6 @@ "mimic-fn": "^2.1.0" } }, - "opentok-network-test-js": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/opentok-network-test-js/-/opentok-network-test-js-2.4.4.tgz", - "integrity": "sha512-Z2b+D+pcEDUWB2Z+BsENVuuWLgA9zR6Jz4o4Qkm88kzt7uQmJhd2iQwkOR2+8OXvsF1W0BO0q46WLoqHAnRkmw==", - "dev": true, - "requires": { - "axios": "^0.21.1", - "opentok-solutions-logging": "^1.1.1", - "promise": "^8.0.1" - } - }, - "opentok-solutions-logging": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/opentok-solutions-logging/-/opentok-solutions-logging-1.1.4.tgz", - "integrity": "sha512-Ha2wpndW99+jjbAUjoE9O715a71qt8aZwnVkuwNZH1mlo8wpQVvSRDiITTI1raYKA7MJkzRgBBkQy9BSH/PsxA==", - "dev": true, - "requires": { - "axios": "^0.21.1" - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -12160,15 +12262,6 @@ } } }, - "promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", - "dev": true, - "requires": { - "asap": "~2.0.6" - } - }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", diff --git a/package.json b/package.json index efc5c1b..588860b 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "lintFix": "eslint . --fix && prettier --write ." }, "dependencies": { - "@daily-co/daily-js": "^0.46.0", - "@opentok/client": "^2.23.0", + "@daily-co/daily-js": "^0.57.1", + "@opentok/client": "^2.27.1", "events": "^3.3.0", "jwt-decode": "^3.1.2" }, @@ -46,7 +46,6 @@ "fake-mediastreamtrack": "^1.1.6", "jest-environment-jsdom": "^29.0.3", "npm-run-all": "^4.1.5", - "opentok-network-test-js": "^2.4.4", "prettier": "2.7.1", "terser": "^5.17.6", "ts-jest": "^29.1.1", diff --git a/src/example.ts b/src/example.ts index dac9193..8dc9c27 100644 --- a/src/example.ts +++ b/src/example.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/non-nullable-type-assertion-style */ import "./example.css"; -import NetworkTest from "opentok-network-test-js"; // import * as OT from "@opentok/client"; // const { @@ -16,7 +15,7 @@ import { Publisher } from "./publisher/Publisher"; const { VITE_DAILY_MEETING_TOKEN } = import.meta.env; // apiKey can be blank, Daily's API key is not needed for the shim to work const apiKey = ""; -const sessionId = "https://hush.daily.co/sfu"; +const sessionId = ""; const token = typeof VITE_DAILY_MEETING_TOKEN === "string" ? VITE_DAILY_MEETING_TOKEN : ""; @@ -267,34 +266,6 @@ document .getElementById("force-disconnect-btn") ?.addEventListener("click", forceDisconnect); -function networkTest() { - const otNetworkTest = new NetworkTest( - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error - window.OT, - { - apiKey: apiKey.length > 0 ? apiKey : "daily-test", - sessionId, - token: token.length > 0 ? token : "daily-test", - }, - {} - ); - otNetworkTest - .testConnectivity() - .then((results) => { - console.log("OpenTok connectivity test results", results); - }) - .catch(function (error) { - console.log("OpenTok connectivity test error", error); - }) - .finally(() => { - console.log("FINALLY"); - }); -} -document - .getElementById("network-test-btn") - ?.addEventListener("click", networkTest); - function sendSignal() { console.log("click send signal"); connections.forEach((connection) => { diff --git a/src/session/DailyEventHandler.ts b/src/session/DailyEventHandler.ts index a0d25e5..6e9bbf5 100644 --- a/src/session/DailyEventHandler.ts +++ b/src/session/DailyEventHandler.ts @@ -151,6 +151,7 @@ export class DailyEventHandler { hasVideo, // This can be set when a user calls publish() https://tokbox.com/developer/sdks/js/reference/Stream.html name: "", + initials: "", videoDimensions: { height, width,