From 32c1e9c61a97c74bee7f405a158a9d3beaea3118 Mon Sep 17 00:00:00 2001 From: juancarmore Date: Tue, 20 Aug 2024 19:07:57 +0200 Subject: [PATCH] Upload initial openvidu-recording tutorial --- advanced-features/openvidu-recording/.env | 3 + .../openvidu-recording/.gitignore | 129 +++ .../openvidu-recording/README.md | 30 + advanced-features/openvidu-recording/index.js | 54 ++ .../openvidu-recording/package-lock.json | 901 ++++++++++++++++++ .../openvidu-recording/package.json | 16 + .../openvidu-recording/public/app.js | 178 ++++ .../public/images/favicon.ico | Bin 0 -> 5430 bytes .../public/images/openvidu_logo.png | Bin 0 -> 11746 bytes .../openvidu-recording/public/index.html | 91 ++ .../openvidu-recording/public/styles.css | 272 ++++++ 11 files changed, 1674 insertions(+) create mode 100644 advanced-features/openvidu-recording/.env create mode 100644 advanced-features/openvidu-recording/.gitignore create mode 100644 advanced-features/openvidu-recording/README.md create mode 100644 advanced-features/openvidu-recording/index.js create mode 100644 advanced-features/openvidu-recording/package-lock.json create mode 100644 advanced-features/openvidu-recording/package.json create mode 100644 advanced-features/openvidu-recording/public/app.js create mode 100644 advanced-features/openvidu-recording/public/images/favicon.ico create mode 100644 advanced-features/openvidu-recording/public/images/openvidu_logo.png create mode 100644 advanced-features/openvidu-recording/public/index.html create mode 100644 advanced-features/openvidu-recording/public/styles.css diff --git a/advanced-features/openvidu-recording/.env b/advanced-features/openvidu-recording/.env new file mode 100644 index 00000000..0fda5182 --- /dev/null +++ b/advanced-features/openvidu-recording/.env @@ -0,0 +1,3 @@ +SERVER_PORT=6080 +LIVEKIT_API_KEY=devkey +LIVEKIT_API_SECRET=secret \ No newline at end of file diff --git a/advanced-features/openvidu-recording/.gitignore b/advanced-features/openvidu-recording/.gitignore new file mode 100644 index 00000000..fa6a20f5 --- /dev/null +++ b/advanced-features/openvidu-recording/.gitignore @@ -0,0 +1,129 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/advanced-features/openvidu-recording/README.md b/advanced-features/openvidu-recording/README.md new file mode 100644 index 00000000..88262159 --- /dev/null +++ b/advanced-features/openvidu-recording/README.md @@ -0,0 +1,30 @@ +# OpenVidu Recording + +Simple video-call application with recording capabilities. It includes a backend built with Node.js with Express and a frontend built with plain HTML, CSS and JavaScript. + +For further information, check the [tutorial documentation](https://livekit-tutorials.openvidu.io/tutorials/advanced-tutorials/node/). + +## Prerequisites + +- [Node](https://nodejs.org/en/download) + +## Run + +1. Download repository + +```bash +git clone https://github.com/OpenVidu/openvidu-livekit-tutorials.git +cd openvidu-livekit-tutorials/advanced-features/openvidu-recording +``` + +2. Install dependencies + +```bash +npm install +``` + +3. Run the application + +```bash +npm start +``` diff --git a/advanced-features/openvidu-recording/index.js b/advanced-features/openvidu-recording/index.js new file mode 100644 index 00000000..ac44d302 --- /dev/null +++ b/advanced-features/openvidu-recording/index.js @@ -0,0 +1,54 @@ +import "dotenv/config"; +import express from "express"; +import cors from "cors"; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { AccessToken, WebhookReceiver } from "livekit-server-sdk"; + +const SERVER_PORT = process.env.SERVER_PORT || 6080; +const LIVEKIT_API_KEY = process.env.LIVEKIT_API_KEY || "devkey"; +const LIVEKIT_API_SECRET = process.env.LIVEKIT_API_SECRET || "secret"; + +const app = express(); + +app.use(cors()); +app.use(express.json()); +app.use(express.raw({ type: "application/webhook+json" })); + +// Set the static files location +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +app.use(express.static(__dirname + "/public")); + +app.post("/token", async (req, res) => { + const roomName = req.body.roomName; + const participantName = req.body.participantName; + + if (!roomName || !participantName) { + res.status(400).json({ errorMessage: "roomName and participantName are required" }); + return; + } + + const at = new AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET, { + identity: participantName + }); + at.addGrant({ roomJoin: true, room: roomName }); + const token = await at.toJwt(); + res.json({ token }); +}); + +const webhookReceiver = new WebhookReceiver(LIVEKIT_API_KEY, LIVEKIT_API_SECRET); + +app.post("/livekit/webhook", async (req, res) => { + try { + const event = await webhookReceiver.receive(req.body, req.get("Authorization")); + console.log(event); + } catch (error) { + console.error("Error validating webhook event", error); + } + res.status(200).send(); +}); + +app.listen(SERVER_PORT, () => { + console.log("Server started on port:", SERVER_PORT); +}); diff --git a/advanced-features/openvidu-recording/package-lock.json b/advanced-features/openvidu-recording/package-lock.json new file mode 100644 index 00000000..4a45624f --- /dev/null +++ b/advanced-features/openvidu-recording/package-lock.json @@ -0,0 +1,901 @@ +{ + "name": "openvidu-recording", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "openvidu-recording", + "version": "1.0.0", + "dependencies": { + "cors": "2.8.5", + "dotenv": "16.4.5", + "express": "4.19.2", + "livekit-server-sdk": "2.6.1" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", + "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@livekit/protocol": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.20.0.tgz", + "integrity": "sha512-2RJQwzBa+MfUoy0zBWuyj8S2MTBxeTgREeG0r/1bNmkAFiBhsdgr87gIvblyqJxffUxJpALMu1Ee0M1XHX+9Ug==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "^1.7.2" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-9.1.3.tgz", + "integrity": "sha512-Rircqi9ch8AnZscQcsA1C47NFdaO3wukpmIRzYcDOrmvgt78hM/sj5pZhZNec2NM12uk5vTwRHZ4anGcrC4ZTg==", + "license": "MIT", + "dependencies": { + "camelcase": "^8.0.0", + "map-obj": "5.0.0", + "quick-lru": "^6.1.1", + "type-fest": "^4.3.2" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/jose": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.7.0.tgz", + "integrity": "sha512-3P9qfTYDVnNn642LCAqIKbTGb9a1TBxZ9ti5zEVEr48aDdflgRjhspWFb6WM4PzAfFbGMJYC4+803v8riCRAKw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/livekit-server-sdk": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/livekit-server-sdk/-/livekit-server-sdk-2.6.1.tgz", + "integrity": "sha512-j/8TOlahIyWnycNkuSzTv6q+win4JTbDGNH48iMsZDMnJBks9hhC9UwAO4ES42sAorIAxGkrH58hxt4KdTkZaQ==", + "license": "Apache-2.0", + "dependencies": { + "@livekit/protocol": "^1.19.0", + "camelcase-keys": "^9.0.0", + "jose": "^5.1.2" + }, + "engines": { + "node": ">=19" + } + }, + "node_modules/map-obj": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-5.0.0.tgz", + "integrity": "sha512-2L3MIgJynYrZ3TYMriLDLWocz15okFakV6J12HXvMXDHui2x/zgChzg1u9mFFGbbGWE+GsLpQByt4POb9Or+uA==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/quick-lru": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz", + "integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-fest": { + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.25.0.tgz", + "integrity": "sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/advanced-features/openvidu-recording/package.json b/advanced-features/openvidu-recording/package.json new file mode 100644 index 00000000..65fbee71 --- /dev/null +++ b/advanced-features/openvidu-recording/package.json @@ -0,0 +1,16 @@ +{ + "name": "openvidu-recording", + "version": "1.0.0", + "description": "Simple video-call application with recording capabilities", + "main": "index.js", + "type": "module", + "scripts": { + "start": "node index.js" + }, + "dependencies": { + "cors": "2.8.5", + "dotenv": "16.4.5", + "express": "4.19.2", + "livekit-server-sdk": "2.6.1" + } +} diff --git a/advanced-features/openvidu-recording/public/app.js b/advanced-features/openvidu-recording/public/app.js new file mode 100644 index 00000000..d7e8c6b3 --- /dev/null +++ b/advanced-features/openvidu-recording/public/app.js @@ -0,0 +1,178 @@ +// When running OpenVidu locally, leave this variable empty +// For other deployment type, configure it with correct URL depending on your deployment +var LIVEKIT_URL = ""; +configureLiveKitUrl(); + +const LivekitClient = window.LivekitClient; +var room; + +function configureLiveKitUrl() { + // If LIVEKIT_URL is not configured, use default value from OpenVidu Local deployment + if (!LIVEKIT_URL) { + if (window.location.hostname === "localhost") { + LIVEKIT_URL = "ws://localhost:7880/"; + } else { + LIVEKIT_URL = "wss://" + window.location.hostname + ":7443/"; + } + } +} + +async function joinRoom() { + // Disable 'Join' button + document.getElementById("join-button").disabled = true; + document.getElementById("join-button").innerText = "Joining..."; + + // Initialize a new Room object + room = new LivekitClient.Room(); + + // Specify the actions when events take place in the room + // On every new Track received... + room.on(LivekitClient.RoomEvent.TrackSubscribed, (track, _publication, participant) => { + addTrack(track, participant.identity); + }); + + // On every new Track destroyed... + room.on(LivekitClient.RoomEvent.TrackUnsubscribed, (track, _publication, participant) => { + track.detach(); + document.getElementById(track.sid)?.remove(); + + if (track.kind === "video") { + removeVideoContainer(participant.identity); + } + }); + + try { + // Get the room name and participant name from the form + const roomName = document.getElementById("room-name").value; + const userName = document.getElementById("participant-name").value; + + // Get a token from your application server with the room name and participant name + const token = await getToken(roomName, userName); + + // Connect to the room with the LiveKit URL and the token + await room.connect(LIVEKIT_URL, token); + + // Hide the 'Join room' page and show the 'Room' page + document.getElementById("room-title").innerText = roomName; + document.getElementById("join").hidden = true; + document.getElementById("room").hidden = false; + + // Publish your camera and microphone + await room.localParticipant.enableCameraAndMicrophone(); + const localVideoTrack = this.room.localParticipant.videoTrackPublications.values().next().value.track; + addTrack(localVideoTrack, userName, true); + } catch (error) { + console.log("There was an error connecting to the room:", error.message); + await leaveRoom(); + } +} + +function addTrack(track, participantIdentity, local = false) { + const element = track.attach(); + element.id = track.sid; + + /* If the track is a video track, we create a container and append the video element to it + with the participant's identity */ + if (track.kind === "video") { + const videoContainer = createVideoContainer(participantIdentity, local); + videoContainer.append(element); + appendParticipantData(videoContainer, participantIdentity + (local ? " (You)" : "")); + } else { + document.getElementById("layout-container").append(element); + } +} + +async function leaveRoom() { + // Leave the room by calling 'disconnect' method over the Room object + await room.disconnect(); + + // Remove all HTML elements inside the layout container + removeAllLayoutElements(); + + // Back to 'Join room' page + document.getElementById("join").hidden = false; + document.getElementById("room").hidden = true; + + // Enable 'Join' button + document.getElementById("join-button").disabled = false; + document.getElementById("join-button").innerText = "Join!"; +} + +window.onbeforeunload = () => { + room?.disconnect(); +}; + +window.onload = generateFormValues; + +function generateFormValues() { + document.getElementById("room-name").value = "Test Room"; + document.getElementById("participant-name").value = "Participant" + Math.floor(Math.random() * 100); +} + +function createVideoContainer(participantIdentity, local = false) { + const videoContainer = document.createElement("div"); + videoContainer.id = `camera-${participantIdentity}`; + videoContainer.className = "video-container"; + const layoutContainer = document.getElementById("layout-container"); + + if (local) { + layoutContainer.prepend(videoContainer); + } else { + layoutContainer.append(videoContainer); + } + + return videoContainer; +} + +function appendParticipantData(videoContainer, participantIdentity) { + const dataElement = document.createElement("div"); + dataElement.className = "participant-data"; + dataElement.innerHTML = `

${participantIdentity}

`; + videoContainer.prepend(dataElement); +} + +function removeVideoContainer(participantIdentity) { + const videoContainer = document.getElementById(`camera-${participantIdentity}`); + videoContainer?.remove(); +} + +function removeAllLayoutElements() { + const layoutElements = document.getElementById("layout-container").children; + Array.from(layoutElements).forEach((element) => { + element.remove(); + }); +} + +/** + * -------------------------------------------- + * GETTING A TOKEN FROM YOUR APPLICATION SERVER + * -------------------------------------------- + * The method below request the creation of a token to + * your application server. This prevents the need to expose + * your LiveKit API key and secret to the client side. + * + * In this sample code, there is no user control at all. Anybody could + * access your application server endpoints. In a real production + * environment, your application server must identify the user to allow + * access to the endpoints. + */ +async function getToken(roomName, participantName) { + const response = await fetch("/token", { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ + roomName, + participantName + }) + }); + + if (!response.ok) { + const error = await response.json(); + throw new Error(`Failed to get token: ${error.errorMessage}`); + } + + const token = await response.json(); + return token.token; +} diff --git a/advanced-features/openvidu-recording/public/images/favicon.ico b/advanced-features/openvidu-recording/public/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..0e2249ada68ec5cab2034721dc193285c27175b5 GIT binary patch literal 5430 zcmc&&eN2^Q6o2ox;0z74F{f9TU#+!9X2#sY&6#cG+%jk7$GvdHRGeG+hii#qr9`BK zC}qeHvGgi7)2x{@AZJeQ2i$vM6vot;IU_|SM7+HB^gGY{zHsji5d!CRKhN_%yyy9y z=RD^*=iDnvI!P}LA1>iDPFi7n3LB+bNp^oNLalA8=H z`-6iYNhVd-0{wN8JM*q}0bsYHpWyM3&HpH+LU-f&>6Fv>650J0N)zjuDZSc6C3#&o z_*8vxN9x<4|6}uZ>X2_!&8_cgL&Ni8P1fJjXZ?H%g+e5UI_YNcD%N;b@b^{!L~|as zb>5(}El$d8mIy_@DizA(Ef{Umop0o%=3L z^zNk@HLHP)NK~()6z}r(9R;IG5d)tho~Gi=Phk!9{FF1`IJgHmKAUu|POBE<&`n0{ z`~Z38{s^(X>5?n*o?(vf0mpJ*5OLQf2{sP^oM*-XGXX8nWQp8_iLj5h--j)QuU!4l zcm1^+@nJ!H#Q|OZ7U$!lB*+;+9Dv+6c(yQ?ig?KRuwfJA2(}$O93#xR6=(vGv*`&y z~xQi3P znSt>+$PP%p-|K*(fL5#6->6em58#f9dwT`8?80~sWW3~-#d&2N8zSU^9Ld0NMuE9` zU0^h@05}9(1DKb=<5>W|Bh~^3^C#l|mcS33GlBq1_=8XjLYX?ZoD}Q18pHgh+Z66- ze$}R7*k=mX&IQf`8gEb?pMo3@gvTHA^LejSIn_MHHi(?nVsPI+KE`|0k$G@(@{ufk za@hw`GHPh@;V|Gi<mXv<+e z?JUxZx*lZ%pG7N>0j{Tk)4)w2h#25=kKmu+-A8Zu9~bq?9x%)HTCzBv z<}(v)1WdH7#zYzCO!UcqJ;5j8e$dXO7+miGTFj}u8oyGnCVO|&BL7&yuk%i zsKG{Z1cr3|jsG4FTb-HKRv4)`Ul+lTz4KX=g1b=NZ`i&g`KPG-4s~s=+cv*}R@5fY z^4bx!s75b1H9NxVI(!8m80m{I2Zui`V8NdClu`E>xo&(z{#z#~@8WCVA4-dTdicT8 z z^&i{7;OFL!i&WH<-o?MF$|U?hxcu7wWwjTU;e#OEk^iAfw|%th58DIf&uq~6m3`ll z+vv~sU(ws|L~J~V80GI655oUS{H_4L!-1#x4w~zmNelgx=yl(OK4W2E0;N`2gZaB-FQW#Z2Y(}YtARXVOz-?$ zhq`ST!m( zi)i-rQ~rkcXLa|*I`Mr#?Y$f-H}m%b?o0kRPC_@yT2a&0b85DL6Me7fyL#Eb=7)Yt z<+qnctna`%57RiqCFc1ItiTf3xEV5c5b-Y7nuT@a!Z~{y<30WkGz^lziwzJVMc>6e TedKQfJ#jzGxv-xC9?I}vocwV} literal 0 HcmV?d00001 diff --git a/advanced-features/openvidu-recording/public/images/openvidu_logo.png b/advanced-features/openvidu-recording/public/images/openvidu_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e0309e62181608cf3543664ced79b6355779533b GIT binary patch literal 11746 zcma)ibyO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S(gvSne}aqQL8_i#@%oQ5>7Phf5ihgvslWuk~=EMvjX$3S_||?tQyQ`jO551LEOkDioR91T@;~JS&^Ha1iSB0O7`|iY z0q1WvBZY7#`1^4PUTJgXf7M09A1X2gka`x z__B6x8Q~GhtmjNm$B`hClC6c1s zn7tl$6M4bk18N=z`DcO(=NTiGHWaS)>)vbykx9-I{CY8N22JU9wOZ^>!;;hmYNkwLQGJA`i zV)*@bto3`%okh!|cDA1u^$A`gb;r*qJnbnNb?P08+no~eLH>hF+Ito-&OlE1`VUDn z`x%^xc0T-YE{_@>u)nI){FcI*zE+CzEw^pq-*IjY>8Sa*Q}wJ7l#ymOg>${wlj2Eq zTu>1W8T}ZMa6V7rPjLGm$DWfJE)hE{mh)Ik~Thb0Jj5JUhmG=nD z&@F^zR9+DD1u^l=Sz8=>(Pu+!3q zV`!OOhz~-MsT?iQCARH)IT2_4)EIgtWUQZTf$qvY({wu5jLkGHAFRMIIxyF>i~QDS z;YW8XmNpo-giF@`E?(@b&m#qx{|nV!-50)>VaccO7<-i#H}z*a-Vr+AT%81+^MQe< z(i=TTPN0AS5`L)d`$eNKp){9}J@p7XQt|!-ESXF`RBN*5d+n@Gx=SOqYhNz?R%VU6 zQmV7Pk(=XqOe}~F>=)$G2O}IlK(St-pD5uB#auw^G&j5X{dDl*Kn0!-!VFk3+eMj& zM{U+7#k_aqZeAs6A``Df$Y__q93S-URx_+hG5)i~n8|lcgnfMfjQNv{!Lr~eZ7F>$ zaw{{NkCLg6gRPIFxV^U{@&*v#;}?C!C;Cc2$dI2;TtG-%nEw@@kT@S7PkZn8|AWEZ z)4};|!2g@U`T)xl$w2*|1Ov~vKK{1ejsSmue;#KK*Z20eU`HNL?{@{qk~BynfSQuF KVuQR* + + + OpenVidu Recording + + + + + + + + + + + + + + + + + +
+

OpenVidu Recording

+ +
+ +
+
+
+

Join a Video Room

+
+
+ + +
+
+ + +
+ +
+
+
+ + +
+ + + + diff --git a/advanced-features/openvidu-recording/public/styles.css b/advanced-features/openvidu-recording/public/styles.css new file mode 100644 index 00000000..de4037d7 --- /dev/null +++ b/advanced-features/openvidu-recording/public/styles.css @@ -0,0 +1,272 @@ +html { + height: 100%; +} + +body { + margin: 0; + padding: 0; + padding-top: 50px; + display: flex; + flex-direction: column; + height: 100%; +} + +header { + height: 50px; + width: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1; + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px 30px; + background-color: #4d4d4d; +} + +header h1 { + margin: 0; + font-size: 1.5em; + font-weight: bold; +} + +header a { + color: #ccc; + text-decoration: none; +} + +header a:hover { + color: #a9a9a9; +} + +header i { + padding: 5px 5px; + font-size: 2em; +} + +main { + flex: 1; + padding: 20px; +} + +#join { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; +} + +#join-dialog { + width: 70%; + max-width: 900px; + padding: 60px; + border-radius: 6px; + background-color: #f0f0f0; +} + +#join-dialog h2 { + color: #4d4d4d; + font-size: 60px; + font-weight: bold; + text-align: center; +} + +#join-dialog form { + text-align: left; +} + +#join-dialog label { + display: block; + margin-bottom: 10px; + color: #0088aa; + font-weight: bold; + font-size: 20px; +} + +.form-control { + width: 100%; + padding: 8px; + margin-bottom: 10px; + box-sizing: border-box; + color: #0088aa; + font-weight: bold; +} + +.form-control:focus { + color: #0088aa; + border-color: #0088aa; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(0, 136, 170, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(0, 136, 170, 0.6); +} + +#join-dialog button { + display: block; + margin: 20px auto 0; +} + +.btn { + font-weight: bold; +} + +.btn-success { + background-color: #06d362; + border-color: #06d362; +} + +.btn-success:hover { + background-color: #1abd61; + border-color: #1abd61; +} + +#room { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +#room-header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + max-width: 1000px; + padding: 0 20px; + margin-bottom: 20px; +} + +#room-title { + font-size: 2em; + font-weight: bold; + margin: 0; +} + +#layout-container { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 10px; + justify-content: center; + align-items: center; + width: 100%; + max-width: 1000px; + height: 100%; +} + +.video-container { + position: relative; + background: #3b3b3b; + aspect-ratio: 16/9; + border-radius: 6px; + overflow: hidden; +} + +.video-container video { + width: 100%; + height: 100%; +} + +.video-container .participant-data { + position: absolute; + top: 0; + left: 0; +} + +.participant-data p { + background: #f8f8f8; + margin: 0; + padding: 0 5px; + color: #777777; + font-weight: bold; + border-bottom-right-radius: 4px; +} + +footer { + height: 60px; + width: 100%; + padding: 10px 30px; + display: flex; + justify-content: space-between; + align-items: center; + background-color: #4d4d4d; +} + +footer a { + color: #ffffff; + text-decoration: none; +} + +footer .text { + color: #ccc; + margin: 0; +} + +footer .text span { + color: white; + font-weight: bold; +} + +#openvidu-logo { + height: 35px; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} + +#openvidu-logo:hover { + -webkit-filter: grayscale(0.5); + filter: grayscale(0.5); +} + +/* Media Queries */ +@media screen and (max-width: 768px) { + header { + padding: 10px 15px; + } + + #join-dialog { + width: 90%; + padding: 30px; + } + + #join-dialog h2 { + font-size: 50px; + } + + #layout-container { + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + } + + footer { + padding: 10px 15px; + } +} + +@media screen and (max-width: 480px) { + header { + padding: 10px; + } + + #join-dialog { + width: 100%; + padding: 20px; + } + + #join-dialog h2 { + font-size: 40px; + } + + #layout-container { + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + } + + .video-container { + aspect-ratio: 9/16; + } + + footer { + padding: 10px; + } +}