🎥 Make videos programmatically with React
remove fingerprint and telemetry from remotion/webcodecs
Jonny Burger16782ff78dfe
diff --git a/bun.lock b/bun.lockindex 121fde99c1..c688cb9920 100644--- a/bun.lock+++ b/bun.lock@@ -2148,7 +2148,6 @@"name": "@remotion/webcodecs","version": "4.0.398","dependencies": {- "@remotion/licensing": "workspace:*","@remotion/media-parser": "workspace:*",},"devDependencies": {diff --git a/packages/docs/docs/webcodecs/telemetry.mdx b/packages/docs/docs/webcodecs/telemetry.mdxdeleted file mode 100644index 4b25837290..0000000000--- a/packages/docs/docs/webcodecs/telemetry.mdx+++ /dev/null@@ -1,64 +0,0 @@-----image: /generated/articles-docs-webcodecs-telemetry.png-sidebar_label: Telemetry-id: telemetry-title: Telemetry in @remotion/webcodecs-slug: /webcodecs/telemetry-crumb: '@remotion/webcodecs'------:::warning-[We are phasing out Remotion WebCodecs and are moving to Mediabunny](/blog/mediabunny)!-:::--Upon finishing a conversion with [`convertMedia()`](/docs/webcodecs/convert-media), a HTTP request is sent to an endpoint on [`remotion.pro`](https://remotion.pro), registering the domain and whether the conversion was successful.--Telemetry will never cause any conversions to fail.--import {LicenseDisclaimer} from './LicenseDisclaimer';--<details>- <summary>💼 Important License Disclaimer</summary>- <LicenseDisclaimer />-</details>--## Data collection--No user data is collected, however the IP address may be used to reject invalid telemetry.--## Use of data--Telemetry data helps Remotion understand which sites use the [`@remotion/webcodecs`](/docs/webcodecs) package.--Historically, it's been difficult to understand which sites use Remotion and various sizable companies have been using it without getting the appropriate license.--Hence we have decided to add telemetry to this new package.--Remotion will not share any telemetry data with others.--## Track conversions with an API key--You may add an API key that you obtained from [`remotion.pro`](https://remotion.pro) to the [`convertMedia()`](/docs/webcodecs/convert-media) function.--```tsx twoslash title="Adding an API key"-import {convertMedia} from '@remotion/webcodecs';--await convertMedia({- src: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',- container: 'webm',- apiKey: 'rm_pub_abcdefghijklo',-});-```--You will then be able to see the amount of conversions you did on your dashboard.-For now, you still need to adjust the license manually to cover your WebCodecs conversions.--## Disabling telemetry--A version of [`@remotion/webcodecs`](/docs/webcodecs) without telemetry can be obtained with an Remotion Enterprise License.-Contact [email protected] to request an Enterprise License.--## See also--- [`@remotion/licensing`](/docs/licensing)-- [`convertMedia()`](/docs/webcodecs/convert-media)diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex cedd968c79..656db863cc 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1394,7 +1394,6 @@ const sidebars: SidebarsConfig = {'webcodecs/resample-audio-16khz','webcodecs/track-transformation','webcodecs/pause-resume-abort',- 'webcodecs/telemetry','webcodecs/misconceptions',],},diff --git a/packages/docs/static/generated/articles-docs-webcodecs-telemetry.png b/packages/docs/static/generated/articles-docs-webcodecs-telemetry.pngdeleted file mode 100644index 787a8355ec..0000000000Binary files a/packages/docs/static/generated/articles-docs-webcodecs-telemetry.png and /dev/null differdiff --git a/packages/webcodecs/package.json b/packages/webcodecs/package.jsonindex 0c98eb5696..62303e1909 100644--- a/packages/webcodecs/package.json+++ b/packages/webcodecs/package.json@@ -27,8 +27,7 @@"author": "Jonny Burger <[email protected]>","license": "Remotion License (See https://remotion.dev/docs/webcodecs#license)","dependencies": {- "@remotion/media-parser": "workspace:*",- "@remotion/licensing": "workspace:*"+ "@remotion/media-parser": "workspace:*"},"peerDependencies": {},"devDependencies": {diff --git a/packages/webcodecs/src/convert-media.ts b/packages/webcodecs/src/convert-media.tsindex bdb8ef8100..b0ee4e1afe 100644--- a/packages/webcodecs/src/convert-media.ts+++ b/packages/webcodecs/src/convert-media.ts@@ -37,13 +37,11 @@ import {availableVideoCodecs,type ConvertMediaVideoCodec,} from './get-available-video-codecs';-import {Log} from './log';import {makeAudioTrackHandler} from './on-audio-track';import {type ConvertMediaOnAudioTrackHandler} from './on-audio-track-handler';import {makeVideoTrackHandler} from './on-video-track';import {type ConvertMediaOnVideoTrackHandler} from './on-video-track-handler';import type {ResizeOperation} from './resizing/mode';-import {sendUsageEvent} from './send-telemetry-event';import {throttledStateUpdate} from './throttled-state-update';import {webcodecsController,@@ -96,8 +94,6 @@ export const convertMedia = async function <writer,progressIntervalInMs,rotate,- apiKey,- licenseKey,resize,onAudioCodec,onContainer,@@ -154,11 +150,6 @@ export const convertMedia = async function <progressIntervalInMs?: number;rotate?: number;resize?: ResizeOperation;- /**- * @deprecated Use `licenseKey` instead- */- apiKey?: string | null;- licenseKey?: string | null;fields?: F;seekingHints?: ParseMediaOptions<F>['seekingHints'];} & MediaParserInternalTypes['ParseMediaCallbacks']): Promise<ConvertMediaResult> {@@ -361,21 +352,8 @@ export const convertMedia = async function <finalState: throttledState.get(),});})- .then(() => {- sendUsageEvent({- succeeded: true,- licenseKey: licenseKey ?? apiKey ?? null,- }).catch((err) => {- Log.error('Failed to send usage event', err);- });- })+ .then(() => {}).catch((err) => {- sendUsageEvent({- succeeded: false,- licenseKey: licenseKey ?? apiKey ?? null,- }).catch((err2) => {- Log.error('Failed to send usage event', err2);- });reject(err);}).finally(() => {diff --git a/packages/webcodecs/src/index.ts b/packages/webcodecs/src/index.tsindex 5ebaa63e85..62dc40ef6a 100644--- a/packages/webcodecs/src/index.ts+++ b/packages/webcodecs/src/index.ts@@ -2,7 +2,6 @@ import {normalizeVideoRotation,rotateAndResizeVideoFrame,} from './rotate-and-resize-video-frame';-import {setRemotionImported} from './set-remotion-imported';export {createAudioEncoder} from './audio-encoder';export type {WebCodecsAudioEncoder} from './audio-encoder';@@ -66,5 +65,3 @@ export const WebCodecsInternals = {rotateAndResizeVideoFrame,normalizeVideoRotation,};--setRemotionImported();diff --git a/packages/webcodecs/src/send-telemetry-event.ts b/packages/webcodecs/src/send-telemetry-event.tsdeleted file mode 100644index 68ddb0fcec..0000000000--- a/packages/webcodecs/src/send-telemetry-event.ts+++ /dev/null@@ -1,26 +0,0 @@-import {registerUsageEvent} from '@remotion/licensing';--export const sendUsageEvent = async ({- licenseKey,- succeeded,-}: {- licenseKey: string | null;- succeeded: boolean;-}) => {- const host =- typeof window === 'undefined'- ? null- : typeof window.location === 'undefined'- ? null- : (window.location.origin ?? null);- if (host === null) {- return;- }-- await registerUsageEvent({- licenseKey,- event: 'webcodec-conversion',- host,- succeeded,- });-};diff --git a/packages/webcodecs/src/set-remotion-imported.ts b/packages/webcodecs/src/set-remotion-imported.tsdeleted file mode 100644index d74c6e3882..0000000000--- a/packages/webcodecs/src/set-remotion-imported.ts+++ /dev/null@@ -1,32 +0,0 @@-import {VERSION} from '@remotion/media-parser';--declare global {- interface Window {- remotion_imported: string | boolean;- }-}--// We set the `window.remotion_imported` variable for the sole purpose-// of being picked up by Wappalyzer.-// The Wappalyzer Chrome extension is used to detect the technologies-// used on websites, and it looks for this variable.-// Remotion is a customer of Wappalyzer and buys a list of domains-// where Remotion is used from time to time.--// Remotion uses this data to ensure companies which are required to get-// a company license for this pacakge are actually doing so.--export const setRemotionImported = () => {- if (typeof globalThis === 'undefined') {- return;- }-- if ((globalThis as unknown as Window).remotion_imported) {- return;- }-- (globalThis as unknown as Window).remotion_imported = VERSION;- if (typeof window !== 'undefined') {- window.remotion_imported = `${VERSION}-webcodecs`;- }-};diff --git a/packages/webcodecs/tsconfig.json b/packages/webcodecs/tsconfig.jsonindex 907cb69a50..3ba15528dc 100644--- a/packages/webcodecs/tsconfig.json+++ b/packages/webcodecs/tsconfig.json@@ -11,9 +11,6 @@"references": [{"path": "../media-parser"- },- {- "path": "../licensing"}]}