This page explains how to set up and run a sample using the TypeScript reference client implementation. To learn about the C++ client instead, see the C++ reference client quickstart.
Prerequisites
To run this quickstart, you need the following prerequisites:
- You've cloned the GitHub repository.
- Webpack.
- Node.js.
- Yarn.
gcloud
CLI.- A Google Cloud project.
- A Google Workspace account with Google Meet enabled.
- Use a Chrome browser with version >= 94.
Generate OAuth tokens
To connect to the Meet Media API, your app must use OAuth to generate access tokens. To learn more about accessing Google APIs with OAuth, see Using OAuth 2.0 to Access Google APIs.
When building a web app, you can generate OAuth tokens using the implicit grant flow. This TypeScript sample uses this flow to generate OAuth tokens.
Run the sample
Within the
web/samples
directory, build the sample:$ yarn install --frozen-lockfile $ webpack
Follow the Authenticate for using the gcloud CLI guide to sign in and select your Google Cloud project.
Deploy your server to Google App Engine.
$ gcloud app deploy app.yaml
Navigate to your endpoint:
$ gcloud app browse
Follow the Create access credentials guide to create OAuth 2.0 credentials with these scopes:
https://www.googleapis.com/auth/meetings.conference.media.readonly
https://www.googleapis.com/auth/meetings.space.readonly
Add your deployed app's URL to Authorized JavaScript Origins and Authorized Redirect URIs.
Copy the client ID and paste it into the deployed web page.
Tap the sign-in button and follow the prompts. If you run into an error, note that it might take a few minutes for the redirect URIs to propagate.
Create and join a meeting. Copy the meeting code, pasting it into the "meeting code" input on the page.
Select the number of video streams and enable audio.
Click Create Client, then Join Meeting.
Observe the video and audio streams.