forked from AgoraIO/Basic-Video-Call
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AgoraIO#45 from AgoraIO/dev/2.4.1_improve-web
Dev/2.4.1 improve web
- Loading branch information
Showing
87 changed files
with
28,518 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ cscope.out | |
cscope.po.out | ||
tags | ||
|
||
node_modules | ||
**/*.js~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build | ||
dist | ||
package-lock.json |
3 changes: 3 additions & 0 deletions
3
One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/basic-communication/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# AgoraRTC Web Tutorial Webpack Sample | ||
|
||
## Basic Communication Example |
72 changes: 72 additions & 0 deletions
72
One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/basic-communication/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Basic Communication</title> | ||
</head> | ||
|
||
<body> | ||
<div class="sections-container"> | ||
<div class="section-container"> | ||
<div class="section-body"> | ||
<div class="notice"></div> | ||
<div class="section-title"> | ||
<div class="title" id="basic">Basic Communication</div> | ||
<hr/> | ||
</div> | ||
<!-- form --> | ||
<form id="form"> | ||
<div class="section-form"> | ||
<div class="form-row"> | ||
<div class="form-item"> | ||
<label for="appID">APPID: </label> | ||
<input placeholder="Enter APPID" type="text" id="appID" name="appID"/> | ||
</div> | ||
<div class="form-item"> | ||
<label for="channel">Channel: </label> | ||
<input placeholder="Enter Channel" type="text" id="channel" name="channel"/> | ||
</div> | ||
<div class="form-item"> | ||
<label for="uid">UID: </label> | ||
<input placeholder="Enter UID" type="text" id="uid" name="uid"/> | ||
</div> | ||
<div class="form-item"> | ||
<label for="token">Token: </label> | ||
<input placeholder="Enter Token" type="text" id="token" name="token"/> | ||
</div> | ||
<div class="form-item"> | ||
<label for="microphoneId">Audio Device: </label> | ||
<select id="microphoneId" name="microphoneId" class="custom-select"> | ||
</select> | ||
</div> | ||
<div class="form-item"> | ||
<label for="cameraId">Video Ddevice: </label> | ||
<select id="cameraId" name="cameraId" class="custom-select"> | ||
</select> | ||
</div> | ||
</div> | ||
<hr/> | ||
<div class="form-row button-list"> | ||
<a class="btn" id="create">create room</a> | ||
<a class="btn" id="publish">publish</a> | ||
<a class="btn" id="unpublish">unpublish</a> | ||
<a class="btn leave" id="leave">leave</a> | ||
</div> | ||
<hr/> | ||
<div class="video-grid" id="video"> | ||
<div id="local_stream" class="video-placeholder"> | ||
<div id="local_video_info" class="video-info"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
<!-- from --> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
36 changes: 36 additions & 0 deletions
36
One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/basic-communication/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "Agora-Web-Tutorial-Webpack-1to1-Basic-Communication", | ||
"version": "2.6.1", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "cross-env NODE_ENV=development webpack-dev-server --config ./scripts --mode development", | ||
"build": "cross-env NODE_ENV=production webpack --config ./scripts --mode production" | ||
}, | ||
"dependencies": { | ||
"agora-rtc-sdk": "^2.6.1", | ||
"jquery": "^3.4.1", | ||
"toastify-js": "^1.5.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.4.5", | ||
"@babel/preset-env": "^7.4.5", | ||
"babel-loader": "^8.0.6", | ||
"clean-webpack-plugin": "^2.0.1", | ||
"cross-env": "^5.2.0", | ||
"css-loader": "^2.1.1", | ||
"file-loader": "^3.0.1", | ||
"friendly-errors-webpack-plugin": "^1.7.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"mini-css-extract-plugin": "^0.5.0", | ||
"node-sass": "^4.11.0", | ||
"sass-loader": "^7.1.0", | ||
"style-loader": "^0.23.1", | ||
"webpack": "^4.29.6", | ||
"webpack-cli": "^3.3.0", | ||
"webpack-dev-server": "^3.2.1" | ||
}, | ||
"keywords": ["agora", "agora-rtc-sdk", "webrtc"], | ||
"author": "agora", | ||
"license": "ISC" | ||
} |
37 changes: 37 additions & 0 deletions
37
One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/basic-communication/scripts/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const path = require("path"); | ||
const loaders = require("./loaders"); | ||
const plugins = require("./plugins"); | ||
|
||
const NODE_ENV = process.env.NODE_ENV | ||
|
||
const distPath = NODE_ENV == 'development' ? '../dist' : '../build' | ||
|
||
module.exports = { | ||
entry: { | ||
index: "./src/index.js", | ||
}, | ||
devtool: "inline-source-map", | ||
module: loaders, | ||
plugins, | ||
resolve: { | ||
extensions: [ ".js" ], | ||
}, | ||
output: { | ||
filename: "[name].[hash].js", | ||
path: path.resolve(__dirname, distPath), | ||
}, | ||
optimization: { | ||
minimize: false, | ||
}, | ||
devServer: { | ||
overlay: { | ||
warnings: true, | ||
errors: true, | ||
}, | ||
hot: true, | ||
contentBase: path.join(__dirname, "./"), | ||
compress: true, | ||
progress: true, | ||
open: true | ||
}, | ||
}; |
Oops, something went wrong.