From 04e116f436c6697ac0c49762796b479053f0b6f0 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Fri, 15 Sep 2023 14:46:30 +0200 Subject: [PATCH] Expose ProcessorPipeline and VideoTransformer (#15) --- .changeset/five-trains-matter.md | 6 ++++++ package.json | 4 ++-- src/index.ts | 2 ++ tsconfig.json | 1 + yarn.lock | 16 ++++++++-------- 5 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .changeset/five-trains-matter.md diff --git a/.changeset/five-trains-matter.md b/.changeset/five-trains-matter.md new file mode 100644 index 0000000..909c96e --- /dev/null +++ b/.changeset/five-trains-matter.md @@ -0,0 +1,6 @@ +--- +"@livekit/track-processors": patch +--- + +Expose ProcessorPipeline and VideoTransformer +Update media vision SDK diff --git a/package.json b/package.json index f9e086c..6eee410 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ ], "dependencies": { "@mediapipe/holistic": "0.5.1675471629", - "@mediapipe/tasks-vision": "0.10.1" + "@mediapipe/tasks-vision": "0.10.5" }, "peerDependencies": { "livekit-client": "^1.12.0" @@ -32,7 +32,7 @@ "@changesets/cli": "^2.26.2", "@livekit/changesets-changelog-github": "^0.0.4", "@trivago/prettier-plugin-sort-imports": "^4.1.1", - "@types/dom-mediacapture-transform": "^0.1.5", + "@types/dom-mediacapture-transform": "^0.1.6", "@types/offscreencanvas": "^2019.7.0", "@typescript-eslint/eslint-plugin": "^4.31.2", "eslint": "8.39.0", diff --git a/src/index.ts b/src/index.ts index b7a7ea8..8056db2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,8 @@ import BackgroundTransformer, { SegmenterBaseOptions } from './transformers/Back import DummyTransformer from './transformers/DummyTransformer'; export * from './transformers/types'; +export { default as VideoTransformer } from './transformers/VideoTransformer'; +export { ProcessorPipeline }; export const BackgroundBlur = ( blurRadius: number = 10, diff --git a/tsconfig.json b/tsconfig.json index 46ad1ff..07a0fbb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "lib": ["DOM", "ES2017"], "target": "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "ES2020" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "rootDir": "./", diff --git a/yarn.lock b/yarn.lock index fbfbf30..6b80ecd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,10 +690,10 @@ resolved "https://registry.yarnpkg.com/@mediapipe/holistic/-/holistic-0.5.1675471629.tgz#f1127d43161ff27e8889d5d39aaea164f9730980" integrity sha512-qY+cxtDeSOvVtevrLgnodiwXYaAtPi7dHZtNv/bUCGEjFicAOYtMmrZSqMmbPkTB2+4jLnPF1vgshkAqQRSYAw== -"@mediapipe/tasks-vision@0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@mediapipe/tasks-vision/-/tasks-vision-0.10.1.tgz#68047459352019cc141dc9c1d15c05b8ab689423" - integrity sha512-/zIKjOAIABx+KVfqe8hA6X2pxBGsBYlEtvD7/gpXecvzKefo/JQO6XaggmJul7+noaqiPYM0CVGZxmFJ2oTdSQ== +"@mediapipe/tasks-vision@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@mediapipe/tasks-vision/-/tasks-vision-0.10.5.tgz#09cfcf873a1056e1e80b9c6fe3b9f2c1836cb1ea" + integrity sha512-pCLvVEx917KHMYlIP/TqJH0XnO3ryObl5ox2l8cKSFGIWvmT9bKCq+lsD4N89UaslxEkB6ofPLRD2mOm01n1qA== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -728,10 +728,10 @@ javascript-natural-sort "0.7.1" lodash "^4.17.21" -"@types/dom-mediacapture-transform@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@types/dom-mediacapture-transform/-/dom-mediacapture-transform-0.1.5.tgz#66e0bc919c4c18542644c6658d4e4dc1abd49740" - integrity sha512-Mgu6H5LVJPgJuAumx0xFEdZvn9whHy+J3gEJbJz5xdWrUJ8ZwZ/JTvWwYOQPkCGzGWykPN7ufQn94iil+VCWGw== +"@types/dom-mediacapture-transform@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@types/dom-mediacapture-transform/-/dom-mediacapture-transform-0.1.6.tgz#26890dbfa4b3e5d81fba370e49f579892bcf89a3" + integrity sha512-sl2o+PVeciAozjEmj6UOnxOB3n4qv9bs2mw7PFYWYxpUKTHRIpDvm8TTfsWoRI86byQXWjQKecckaGSx/ExDPA== dependencies: "@types/dom-webcodecs" "*"