Skip to content

Commit

Permalink
Merge pull request #34 from zoom/1.9.5
Browse files Browse the repository at this point in the history
1.9.5
  • Loading branch information
mayk-zoom authored May 18, 2021
2 parents e5fff7f + dbdb7ac commit 20723e4
Show file tree
Hide file tree
Showing 20 changed files with 387 additions and 300 deletions.
11 changes: 11 additions & 0 deletions CDN/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"env": {
"production": {
"presets": [
]
},
"development": {
}
},
"presets": []
}
68 changes: 0 additions & 68 deletions CDN/.eslintrc

This file was deleted.

44 changes: 44 additions & 0 deletions CDN/corp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const webpackConfig = require('./webpack.config.dev');

function runFunc(err) {
if (err) {
console.log(err);
}
console.log('Listening at http://127.0.0.1:9999/index.html');
}

new WebpackDevServer(webpack(webpackConfig), {
publicPath: '/static',
hot: true,
host: '0.0.0.0',
open: 'chrome',
after(app, server) {
},
headers: {
// 'Cross-Origin-Embedder-Policy': 'unsafe-none',
// 'Cross-Origin-Opener-Policy': 'unsafe-none',
},
openPage: 'http://127.0.0.1:9999/index.html',
disableHostCheck: true,
historyApiFallback: true,
proxy: [{
path: '/meeting.html',
target: 'http://127.0.0.1:9998/'
}]
}).listen(9999, '0.0.0.0', runFunc);

new WebpackDevServer(webpack(webpackConfig), {
publicPath: '/static',
hot: true,
host: '0.0.0.0',
after(app, server) {
},
headers: {
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
},
disableHostCheck: true,
historyApiFallback: true,
}).listen(9998, '0.0.0.0', runFunc);
9 changes: 9 additions & 0 deletions CDN/helper.html

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions CDN/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<title>Zoom WebSDK</title>
<meta charset="utf-8" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.1/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.1/css/react-select.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.5/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.5/css/react-select.css" />
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Expand Down Expand Up @@ -62,7 +62,7 @@
<div id="navbar" class="websdktest">
<form class="navbar-form navbar-right" id="meeting_form">
<div class="form-group">
<input type="text" name="display_name" id="display_name" value="1.9.1#CDN" maxLength="100"
<input type="text" name="display_name" id="display_name" value="1.9.5#CDN" maxLength="100"
placeholder="Name" class="form-control" required>
</div>
<div class="form-group">
Expand Down Expand Up @@ -139,12 +139,12 @@
})
</script>

<script src="https://source.zoom.us/1.9.1/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.9.1.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.9.5.min.js"></script>
<script src="js/tool.js"></script>
<script src="js/vconsole.min.js"></script>
<script src="js/index.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions CDN/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function websdkready() {
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));

// it's option if you want to change the WebSDK dependency link resources. setZoomJSLib must be run at first
// if (!china) ZoomMtg.setZoomJSLib('https://source.zoom.us/1.9.1/lib', '/av'); // CDN version default
// else ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.9.1/lib', '/av'); // china cdn option
// if (!china) ZoomMtg.setZoomJSLib('https://source.zoom.us/1.9.5/lib', '/av'); // CDN version default
// else ZoomMtg.setZoomJSLib('https://jssdk.zoomus.cn/1.9.5/lib', '/av'); // china cdn option
// ZoomMtg.setZoomJSLib('http://localhost:9999/node_modules/@zoomus/websdk/dist/lib', '/av'); // Local version default, Angular Project change to use cdn version
ZoomMtg.preLoadWasm(); // pre download wasm file to save time.

Expand Down
6 changes: 4 additions & 2 deletions CDN/js/meeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,17 @@ function websdkready() {
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));

// it's option if you want to change the WebSDK dependency link resources. setZoomJSLib must be run at first
// ZoomMtg.setZoomJSLib("https://source.zoom.us/1.9.1/lib", "/av"); // CDN version defaul
// ZoomMtg.setZoomJSLib("https://source.zoom.us/1.9.5/lib", "/av"); // CDN version defaul
if (meetingConfig.china)
ZoomMtg.setZoomJSLib("https://jssdk.zoomus.cn/1.9.1/lib", "/av"); // china cdn option
ZoomMtg.setZoomJSLib("https://jssdk.zoomus.cn/1.9.5/lib", "/av"); // china cdn option
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
function beginJoin(signature) {
ZoomMtg.init({
leaveUrl: meetingConfig.leaveUrl,
webEndpoint: meetingConfig.webEndpoint,
disableCORP: !window.crossOriginIsolated, // default true
// disablePreview: false, // default false
success: function () {
console.log(meetingConfig);
console.log("signature", signature);
Expand Down
21 changes: 9 additions & 12 deletions CDN/meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,26 @@
<head>
<title>Zoom WebSDK</title>
<meta charset="utf-8" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.1/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.1/css/react-select.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.5/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.9.5/css/react-select.css" />
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="origin-trial" content="">
</head>

<body>
<script src="https://source.zoom.us/1.9.1/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.9.1/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.9.1.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.9.5/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.9.5.min.js"></script>
<script src="js/tool.js"></script>
<script src="js/vconsole.min.js"></script>
<script src="js/meeting.js"></script>

<script>
const simd = async () => WebAssembly.validate(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 10, 9, 1, 7, 0, 65, 0, 253, 15, 26, 11]))
simd().then((res) => {
console.log("simd check", res);
});

</script>
</body>

Expand Down
21 changes: 11 additions & 10 deletions CDN/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "websdk-cdn",
"version": "1.9.1",
"version": "1.9.5",
"description": "Zoom sample app for web client WebSDK",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"concurrently": "^3.5.1",
"http-server": "^0.12.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "concurrently \"http-server -a 0.0.0.0 -p 9999 -c-1 -o index.html\"",
"https": "concurrently \"http-server -a 0.0.0.0 -p 9999 -c-1 -S -C localhost.crt -K localhost.key -o https://localhost:9999/index.html\""
"start": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js",
"https": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js --https",
"corp": "set NODE_ENV=development && set BABEL_ENV=development && node corp.js --corp"
},
"author": "Yang Jack",
"license": "ISC"
"author": "Jack Jack",
"license": "ISC",
"devDependencies": {
"webpack": "5.28.0",
"webpack-cli": "4.5.0",
"webpack-dev-server": "3.11.2"
}
}
41 changes: 41 additions & 0 deletions CDN/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const path = require('path');
const webpack = require('webpack');
const args = process.argv.slice(2);
let https = false;
let disableCORP = true;
if (args.includes('--https')) https = true;
if (args.includes('--corp')) disableCORP = false;


module.exports = {
devtool: 'eval',
entry: {
},
context: __dirname,
target: 'web',
devServer: {
https,
cert: './localhost.crt',
key: './localhost.key',
host: '0.0.0.0',
port: 9999,
hot: true,
overlay: true,
historyApiFallback: false,
watchContentBase: true,
disableHostCheck: true,
headers: {
'Access-Control-Allow-Origin': https ? 'https://0.0.0.0:9999' : 'http://0.0.0.0:9999'
},
open: 'chrome',
openPage: https ? 'https://127.0.0.1:9999' : 'http://127.0.0.1:9999',
},
mode: 'development',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.BABEL_ENV': JSON.stringify('development'),
}),
],
};
Loading

0 comments on commit 20723e4

Please sign in to comment.