You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+62-17
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,64 @@
1
1
# Mux Meet
2
2
3
-
Mux Meet is a reference implementation of [Mux Real-Time Video](https://mux.com/real-time-video), in React, using the [Next.js](https://nextjs.org/) framework.
3
+
Mux Meet is a video conferencing app powered by [Mux Real-Time Video](https://mux.com/real-time-video), written in React, using the [Next.js](https://nextjs.org/) framework.
4
4
5
-

5
+

6
6
7
-
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmuxinc%2Fmeet&env=MUX_TOKEN_ID,MUX_TOKEN_SECRET,MUX_SIGNING_KEY,MUX_PRIVATE_KEY&envDescription=Mux%20Meet%20needs%20API%20keys%20generated%20from%20the%20Mux%20Dashboard.&envLink=https%3A%2F%2Fdocs.mux.com%2Fguides%2Fvideo%2Fmake-api-requests)
7
+
# Getting Started
8
8
9
-
## Getting Started
9
+
In order for Meet to connect to Mux's APIs, an access token and signing key must be provided. These are generated in the Mux Dashboard and should be set as environment variables.
10
10
11
-
First, create a space to meet in. For all of these steps we will be using the 'Development' environment. But feel free to use 'Production' when ready.
11
+
The easiest way to use Mux Meet is to deploy it to Vercel.
12
12
13
-
Log in to https://dashboard.mux.com. In the left navigation menu, click on Spaces from within the "/VIDEO" section. Click 'Create New Space' and follow the prompts to create a new space.
13
+
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fmuxinc%2Fmeet&env=MUX_TOKEN_ID,MUX_TOKEN_SECRET,MUX_SIGNING_KEY,MUX_PRIVATE_KEY&envDescription=Mux%20Meet%20needs%20API%20keys%20generated%20from%20the%20Mux%20Dashboard.&envLink=https%3A%2F%2Fdocs.mux.com%2Fguides%2Fvideo%2Fmake-api-requests&project-name=mux-meet&repository-name=mux-meet)
14
14
15
-
Now, create a .env.local file at the root of the repo with the following secrets:
15
+
After creating your project, you will be prompted to configure it.
In a separate window, open https://dashboard.mux.com and sign in. You will need to create an account, if you don't already have one.
20
+
21
+
From the [Mux Dashboard](https://dashboard.mux.com), open Settings from the bottom left and click Access Tokens. Then click "Generate new token" and select Mux Video from the list of permissions. Optionally, give the access token a name like Mux Meet.
22
+
23
+

24
+
25
+
Once your token is generated, copy and paste the ID and Secret as the values for `MUX_TOKEN_ID` and `MUX_TOKEN_SECRET` in Vercel.
26
+
27
+
Now go back to https://dashboard.mux.com to generate the Signing Key.
28
+
29
+
From the [Mux Dashboard](https://dashboard.mux.com), open Settings from the bottom left and click Signing Keys. Then click "Generate new key" and make sure you use the same environment as you did for the Access Token. The Product selection should default to Video.
30
+
31
+

32
+
33
+
Once your key is generated, copy and paste the ID and Secret as the values for `MUX_SIGNING_KEY` and `MUX_PRIVATE_KEY` in Vercel.
34
+
35
+
_Both the Access Token and Signing Key are sensitive. DO NOT MAKE THEM PUBLIC. It is safe to store them in Vercel as Environment Variables or locally during development._
36
+
37
+
Once all 4 environment variables are filled in. Click Deploy for Vercel to build and start your app.
38
+
39
+
## Cleanup Spaces after Meeting
40
+
41
+
Joining a new Space creates a Space in Mux, but in order to clean up Spaces after a meeting is over, set up a simple [webhook from Mux](https://docs.mux.com/guides/video/listen-for-webhooks).
42
+
43
+
From the [Mux Dashboard](https://dashboard.mux.com), open Settings from the bottom left and click Webhooks. Then click "Generate new webhook" and make sure you use the same environment as you did for the Access Token. The URL to notify will be your app's URL + `/api/webhooks`.
44
+
45
+

46
+
47
+
Now generate the Webhook and copy the Signing Secret by clicking Show Signing Secret.
48
+
49
+
Configure your deployed app with a new environment variable named `WEBHOOK_SECRET` with the value of the Webhook Signing Secret.
50
+
51
+
_Make sure you redeploy for your new environment variable to take affect._
52
+
53
+
## Limit Access
54
+
55
+
To limit the number of active Spaces, set an integer value for an environment variable `ACTIVE_SPACE_LIMIT`.
56
+
57
+
To limit the amount of time participants are allowed to spend in a temporary Space, set an integer value in seconds for an environment variable `SPACE_DURATION_SECONDS`.
58
+
59
+
# Develop locally
60
+
61
+
Create an .env.local file at the root of the repo with the following secrets:
16
62
17
63
```bash
18
64
MUX_TOKEN_ID=
@@ -21,12 +67,6 @@ MUX_SIGNING_KEY=
21
67
MUX_PRIVATE_KEY=
22
68
```
23
69
24
-
To generate the MUX_TOKEN_ID and MUX_TOKEN_SECRET, log in to https://dashboard.mux.com. Open API Access Tokens from the navigation menu on the left. And generate a new token with Mux Video permissions. You will be given a MUX_TOKEN_ID and a MUX_TOKEN_SECRET. Fill in the values for the .env.local file and don't commit them into the repo.
25
-
26
-
To generate the MUX_SIGNING_KEY and MUX_PRIVATE_KEY, log in to https://dashboard.mux.com. Open Signing Keys from the navigation menu on the left. And generate a new Video key. You will be given the MUX_SIGNING_KEY as well as the MUX_PRIVATE_KEY. Fill in the values for the .env.local file and don't commit them into the repo. For MUX_PRIVATE_KEY make sure you use the base64-encoded version rather than the raw .pem file download.
27
-
28
-
Then, run the development server:
29
-
30
70
```bash
31
71
npm run dev
32
72
```
@@ -35,11 +75,16 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
35
75
36
76
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
37
77
38
-
##Learn More
78
+
# Learn More
39
79
40
-
To learn more about Next.js, take a look at the following resources:
0 commit comments