Skip to content

Commit

Permalink
1.2.0 update (#15)
Browse files Browse the repository at this point in the history
* update 1.2.0

* update

* update

* update callout demo

* update

* Update for 1.2.0

Co-authored-by: JackYang <[email protected]>
  • Loading branch information
mayk-zoom and ylkjick532428 authored Mar 4, 2022
1 parent 9de70ab commit 05681fc
Show file tree
Hide file tree
Showing 42 changed files with 7,490 additions and 26,895 deletions.
8 changes: 4 additions & 4 deletions purejs-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema": "http://json.schemastore.org/coffeelint",
"name": "videosdk-demo-purejs",
"version": "1.1.7",
"version": "1.2.0",
"description": "Zoom Web Video SDK Pure JS Demo",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js",
"start": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js --env corp",
"https": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js --env https",
"corp": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js --env corp"
"nosab": "set NODE_ENV=development && set BABEL_ENV=development && webpack serve --config webpack.config.dev.js"
},
"keywords": [
"zoom",
Expand Down Expand Up @@ -51,6 +51,6 @@
"webpack-dev-server": "3.11.2"
},
"dependencies": {
"@zoom/videosdk": "^1.1.7"
"@zoom/videosdk": "^1.2.0"
}
}
27 changes: 24 additions & 3 deletions purejs-demo/src/js/tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ import { KJUR } from 'jsrsasign';
* @param passWord your session password
*/
// eslint-disable-next-line import/prefer-default-export
export function generateSessionToken(sdkKey, sdkSecret, topic, passWord = '', sessionKey = '', userIdentity = '',
export function generateSessionToken(
sdkKey,
sdkSecret,
topic,
passWord = '',
sessionKey = '',
userIdentity = '',
roleType = 1,
) {
let signature = '';
try {
Expand All @@ -28,9 +35,9 @@ export function generateSessionToken(sdkKey, sdkSecret, topic, passWord = '', se
tpc: topic,
pwd: passWord,
user_identity: userIdentity,
session_key: sessionKey
session_key: sessionKey,
role_type: roleType, // role=1, host, role=0 is attendee, only role=1 can start session when session not start
};
// Sign JWT, password=616161
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, sdkSecret);
Expand All @@ -39,3 +46,17 @@ export function generateSessionToken(sdkKey, sdkSecret, topic, passWord = '', se
}
return signature;
}


export function isSupportWebCodecs(){
return typeof MediaStreamTrackProcessor ==='function'
}


export function isAndroidBrowser() {
return /android/i.test(navigator.userAgent);
}

export function isSupportOffscreenCanvas() {
return typeof OffscreenCanvas === 'function';
}
3 changes: 2 additions & 1 deletion react-demo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ yarn-debug.log*
yarn-error.log*
dist
/public/lib
.eslintcache
.eslintcache
src/config/dev.ts
Loading

0 comments on commit 05681fc

Please sign in to comment.