English | 中文
This tutorial shows you how to quickly create an open video call using the Agora sample app.
- Node.js 6.9.1+
- A web server that supports SSL (https)
This section shows you how to prepare, build, and run the sample application.
To build and run the sample application, get an App ID:
-
Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
-
Navigate in the Dashboard tree on the left to Projects > Project List.
-
Save the App ID from the Dashboard for later use.
-
Generate a temp Access Token (valid for 24 hours) from dashboard page with given channel name, save for later use.
-
Open the src/utils/Settings.js file. At the bottom of the file, replace
<#YOUR APP ID#>
with the App ID, and assign the token variable with the temp Access Token generated from dashboard.Note: Place the App ID/Token within single or double quotes.
export const APP_ID = <#YOUR APP ID#>; // Assign Token to null if you have not enabled app certificate export const Token = "<#YOUR TEMP TOKEN HERE#>";
To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
Temporary tokens are for demonstration and testing purposes only and remain valid for 24 hours. In a production environment, you need to deploy your own server for generating tokens. See [Generate a Token](https://docs.agora.io/en/Interactive Broadcast/token_server)for details.
- Using the Terminal app, enter the
install
command in your project directory. This command installs libraries that are required to run the sample application.# install dependencies npm install
- Start the application by entering the
run dev
orrun build
command. Therun dev
command is for development purposes.The# serve with hot reload at localhost:8080 npm run dev
run build
command is for production purposes and minifies code.# build for production with minification npm run build
- Your default browser should open and display the sample application.
Note: In some cases, you may need to open a browser and enter
http://localhost:8080
as the URL.
- For potential issues, take a look at our FAQ first
- Dive into Agora SDK Samples to see more tutorials
- Take a look at Agora Use Case for more complicated real use case
- Repositories managed by developer communities can be found at Agora Community
- You can find full API documentation at Document Center
- If you encounter problems during integration, you can ask question in Stack Overflow
- You can file bugs about this sample at issue
The MIT License (MIT)