123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- ---
- slug: /zoom
- ---
- import Tabs from '@theme/Tabs';
- import TabItem from '@theme/TabItem';
- import UppyCdnExample from '/src/components/UppyCdnExample';
- # Zoom
- The `@uppy/zoom` plugin lets users import cloud video recordings from their
- [Zoom](https://zoom.com) account. Note that
- [only licensed](https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0063923)
- Zoom accounts can store their recordings in the cloud, so this functionality
- will only be available to users with a paid Zoom account.
- :::tip
- [Try out the live example](/examples) or take it for a spin in
- [StackBlitz](https://stackblitz.com/edit/vitejs-vite-zaqyaf?file=main.js).
- :::
- ## When should I use this?
- When you want to let users import cloud video recordings from their
- [Zoom](https://zoom.com) account.
- A [Companion](/docs/companion) instance is required for the Zoom plugin to work.
- Companion handles authentication with Zoom, downloads the files, and uploads
- them to the destination. This saves the user bandwidth, especially helpful if
- they are on a mobile connection.
- You can self-host Companion or get a hosted version with any
- [Transloadit plan](https://transloadit.com/pricing/).
- <Tabs>
- <TabItem value="npm" label="NPM" default>
- ```shell
- npm install @uppy/zoom
- ```
- </TabItem>
- <TabItem value="yarn" label="Yarn">
- ```shell
- yarn add @uppy/zoom
- ```
- </TabItem>
- <TabItem value="cdn" label="CDN">
- <UppyCdnExample>
- {`
- import { Uppy, Zoom } from "{{UPPY_JS_URL}}"
- const uppy = new Uppy()
- uppy.use(Zoom, {
- // Options
- })
- `}
- </UppyCdnExample>
- </TabItem>
- </Tabs>
- ## Use
- Using Zoom requires setup in both Uppy and Companion.
- ### Use in Uppy
- ```js {10-13} showLineNumbers
- import Uppy from '@uppy/core';
- import Dashboard from '@uppy/dashboard';
- import Zoom from '@uppy/zoom';
- import '@uppy/core/dist/style.min.css';
- import '@uppy/dashboard/dist/style.min.css';
- new Uppy()
- .use(Dashboard, { inline: true, target: '#dashboard' })
- .use(Zoom, { companionUrl: 'https://your-companion.com' });
- ```
- ### Use with Transloadit
- ```js
- import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit';
- import Zoom from '@uppy/zoom';
- uppy.use(Zoom, {
- companionUrl: COMPANION_URL,
- companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
- });
- ```
- You may also hit rate limits, because the OAuth application is shared between
- everyone using Transloadit.
- To solve that, you can use your own OAuth keys with Transloadit’s hosted
- Companion servers by using Transloadit Template Credentials. [Create a Template
- Credential][template-credentials] on the Transloadit site. Select “Companion
- OAuth” for the service, and enter the key and secret for the provider you want
- to use. Then you can pass the name of the new credentials to that provider:
- ```js
- import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit';
- import Zoom from '@uppy/zoom';
- uppy.use(Zoom, {
- companionUrl: COMPANION_URL,
- companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
- companionKeysParams: {
- key: 'YOUR_TRANSLOADIT_API_KEY',
- credentialsName: 'my_companion_dropbox_creds',
- },
- });
- ```
- ### Use in Companion
- To sign up for API keys, go through the following steps:
- 1. Sign up on [Zoom Marketplace](https://marketplace.zoom.us)
- 2. Go to [https://marketplace.zoom.us](https://marketplace.zoom.us). There will
- be a dropdown in the header called “Develop”. From that dropdown, select
- “Build app”.
- 3. In the “Basic Information” tab, Zoom shows your new “Client ID” and “Client
- Secret” - copy them.
- With the standalone Companion server, specify environment variables:
- ```shell
- export COMPANION_ZOOM_KEY="Zoom API key"
- export COMPANION_ZOOM_SECRET="Zoom API secret"
- ```
- When using the Companion Node.js API, configure these options:
- ```js
- companion.app({
- providerOptions: {
- zoom: {
- key: 'Zoom API key',
- secret: 'Zoom API secret',
- },
- },
- });
- ```
- 4. In the “Basic Information” tab, set “OAuth Redirect URL” input field to:
- ```
- https://$YOUR_COMPANION_HOST_NAME/zoom/redirect
- ```
- If you are using Transloadit hosted Companion:
- ```
- https://api2.transloadit.com/companion/zoom/redirect
- ```
- 5. In the “Scopes” tab, add “cloud_recording:read:list_user_recordings” and
- “user:read:user” scopes. If Zoom asks for further permissions when you
- interact with your Zoom integration - add those too.
- ## API
- ### Options
- #### `id`
- A unique identifier for this plugin (`string`, default: `'Zoom'`).
- #### `title`
- Title / name shown in the UI, such as Dashboard tabs (`string`, default:
- `'Zoom'`).
- #### `target`
- DOM element, CSS selector, or plugin to place the drag and drop area into
- (`string`, `Element`, `Function`, or `UIPlugin`, default:
- [`Dashboard`](/docs/dashboard)).
- #### `companionUrl`
- URL to a [Companion](/docs/companion) instance (`string`, default: `null`).
- #### `companionHeaders`
- Custom headers that should be sent along to [Companion](/docs/companion) on
- every request (`Object`, default: `{}`).
- #### `companionAllowedHosts`
- The valid and authorised URL(s) from which OAuth responses should be accepted
- (`string` or `RegExp` or `Array`, default: `companionUrl`).
- This value can be a `string`, a `RegExp` pattern, or an `Array` of both. This is
- useful when you have your [Companion](/docs/companion) running on several hosts.
- Otherwise, the default value should do fine.
- #### `companionCookiesRule`
- This option correlates to the
- [RequestCredentials value](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials)
- (`string`, default: `'same-origin'`).
- This tells the plugin whether to send cookies to [Companion](/docs/companion).
- #### `locale`
- ```js
- export default {
- strings: {
- pluginNameZoom: 'Zoom',
- },
- };
- ```
- [template-credentials]:
- https://transloadit.com/docs/#how-to-create-template-credentials
|