Skip to content

Commit

Permalink
update 1.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ylkjick532428 committed May 13, 2021
1 parent 9430458 commit dbdb7ac
Show file tree
Hide file tree
Showing 15 changed files with 321 additions and 254 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.

2 changes: 2 additions & 0 deletions CDN/js/meeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ function websdkready() {
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
5 changes: 1 addition & 4 deletions CDN/meeting.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
<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
19 changes: 10 additions & 9 deletions CDN/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"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'),
}),
],
};
80 changes: 16 additions & 64 deletions Local/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,68 +1,20 @@
{
"extends": "airbnb",
"parser": "@babel/eslint-parser",
"extends": [
"airbnb", "prettier"
],
"plugins": ["prettier"],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"semi": [
"error",
"always"
],
"comma-dangle": 0,
"no-console": "off",
"react/jsx-filename-extension": [1, {
"extensions": [".js", ".jsx"]
}],
"global-require": "off",
"react/prop-types": [
1,
{ "ignore": "ignore", "customValidators": "customValidator" }
],
"react/destructuring-assignment": [true , "always", { "ignoreClassFields": true }],
"react/jsx-indent": [true, 4],
"max-len": 0,
"class-methods-use-this": 0,
"react/jsx-indent-props": 0,
"import/no-named-as-default": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/interactive-supports-focus": 0,
"no-bitwise": 0,
"no-trailing-spaces": ["error", { "ignoreComments": true }],
"react/no-string-refs": 0,
"jsx-a11y/no-static-element-interactions": [
"error",
{
"handlers": [
"onClick",
"onMouseDown",
"onMouseUp",
"onKeyPress",
"onKeyDown",
"onKeyUp",
"onMouseOver",
"onMouseOut"
]
}
]
"prettier/prettier": ["warn", {
"singleQuote": true,
"semi": true,
"trailingComma": "none"
}],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"env": {
"amd": true,
"browser": true,
"jquery": true,
"node": true,
"es6": true,
"worker": true
},
"globals": {
"document": true,
"window": true,
"$": true,
"_": true
},
"parser": "babel-eslint"
"ignorePatterns": [
"js/index.js",
"js/meeting.js",
"js/tool.js"
]
}
44 changes: 44 additions & 0 deletions Local/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 Local/helper.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Local/js/meeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function beginJoin(signature) {
ZoomMtg.init({
leaveUrl: meetingConfig.leaveUrl,
webEndpoint: meetingConfig.webEndpoint,
webEndpoint: meetingConfig.webEndpoint,
disableCORP: !window.crossOriginIsolated, // default true
// disablePreview: false, // default false
success: function () {
console.log(meetingConfig);
console.log("signature", signature);
Expand Down
Loading

0 comments on commit dbdb7ac

Please sign in to comment.