Skip to content

Commit

Permalink
feat: samples + mono repo + track changes (#18)
Browse files Browse the repository at this point in the history
* chore: adding sample app base on React for the media core

* fix: remove react logo

* chore: convert repo into mono one

* chore:  created custom track for audio and video

* chore: add custom track creation and name changes

* chore: convert repo into mono one

* fix: correct yarn clean command

* chore: rebundle if code changes

* feat: change createDisplayTrack to withAudio

* fix: fixed review comments

* fix: correct video element boolean value

* chore:  created custom track for audio and video

* chore: add custom track creation and name changes

* feat: change createDisplayTrack to withAudio

* fix: fixed review comments

* fix: review comments

* fix: remove play method on track

* fix: review comments

* fix: update the yarn mono repo config

* fix: fix mono repo and run samples

* fix: samples app changes for camera and microphone

* fix: re order the sample app

* fix: add LocalCompureAudioTrack class

* fix: review comments for muted

* fix: sample app to render the video share and audio

* fix: export local computer audio track

* fix: script change to do release

* fix: add the webex connect token

* fix: disable the jest for this branch

Co-authored-by: arungane <arungane@cisco.com>
  • Loading branch information
haohancom and arun3528 authored Jan 26, 2023
1 parent 1c0e973 commit 4e9891a
Show file tree
Hide file tree
Showing 85 changed files with 45,257 additions and 12,027 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ name: Node.js Package

on:
push:
paths:
- "packages/**"
branches:
- main
- beta
- alpha

jobs:
semantic-release:
name: semantic-latest
runs-on: ubuntu-latest
env:
CONNECT_TOKEN: ${{ secrets.CONNECT_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install

- run: yarn build
- run: npx semantic-release
- run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ on: [pull_request]
jobs:
setup:
runs-on: ubuntu-latest
env:
CONNECT_TOKEN: ${{ secrets.CONNECT_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "16"
- run: yarn install
- run: yarn test:lint
- run: yarn test:coverage
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
dist
.idea/
coverage/
.scannerwork/

# testing
/coverage

# production
build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
install-state.gz
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

826 changes: 826 additions & 0 deletions .yarn/releases/yarn-4.0.0-rc.36.cjs

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nodeLinker: node-modules

npmRegistryServer: https://registry.npmjs.org

yarnPath: .yarn/releases/yarn-4.0.0-rc.36.cjs

npmScopes:
webex-connect:
npmAlwaysAuth: true
npmAuthToken: ${CONNECT_TOKEN}
npmRegistryServer: https://registry.npmjs.org
129 changes: 13 additions & 116 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,121 +1,18 @@
{
"name": "@webex/webrtc-core",
"version": "1.3.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"browser": "dist/umd/index.js",
"types": "dist/types/index.d.ts",
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
},
"files": [
"dist/**/*"
"name": "webrtc-core-mono",
"version": "1.1.0",
"private": true,
"workspaces": [
"packages/*",
"samples"
],
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
},
"repository": "https://github.com/webex/webrtc-core.git",
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@microsoft/api-documenter": "^7.13.33",
"@microsoft/api-extractor": "^7.18.4",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@types/chai": "^4.2.21",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.1",
"@types/lodash": "^4.14.171",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.1",
"@types/sdp-transform": "^2.4.5",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"chai": "^4.3.4",
"cspell": "^5.6.6",
"eslint": "^7.29.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.5.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^7.0.0",
"jest": "^27.0.6",
"karma": "6.3.15",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-firefox-launcher": "^2.1.1",
"karma-junit-reporter": "^2.0.1",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^4.3.6",
"karma-typescript": "^5.5.2",
"karma-typescript-es6-transform": "^5.5.2",
"lint-staged": "^11.1.1",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"puppeteer": "^10.4.0",
"rollup": "^2.53.2",
"rollup-plugin-polyfill-node": "^0.7.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"semantic-release": "^19.0.2",
"ts-jest": "^27.0.5",
"ts-loader": "^9.2.3",
"typescript": "^4.4.3",
"yarn": "^1.22.18"
},
"scripts": {
"build": "run-s clean compile",
"clean": "npm run transpile:clean && npm run docs:clean",
"compile": "rollup -c ./rollup.config.js",
"docs": "npm run docs:clean && npm run docs:extract && npm run docs:generate",
"docs:clean": "rimraf ./docs",
"docs:extract": "api-extractor run -c ./api-extractor.json",
"docs:generate": "api-documenter markdown -i ./docs/temp -o ./docs",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" --write",
"fix:lint": "eslint src --ext .ts --fix",
"prepare": "husky install",
"release": "semantic-release",
"test": "run-s build test:*",
"test:lint": "eslint src --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
"test:unit": "jest",
"test:coverage": "jest --coverage",
"test:integration:safari": "karma start --integration --safari",
"test:integration:chrome": "karma start --integration --chrome",
"test:integration:firefox": "karma start --integration --firefox",
"test:integration:edge": "karma start --integration --edge",
"transpile": "tsc",
"transpile:clean": "rimraf ./dist",
"transpile:validate": "tsc --noemit",
"transpile:watch": "tsc --watch",
"version": "echo $npm_package_version",
"watch": "rollup -c ./rollup.config.js -w"
},
"dependencies": {
"events": "^3.3.0",
"js-logger": "^1.6.1",
"typed-emitter": "^2.1.0",
"webrtc-adapter": "^8.1.2"
"clean": "rm -rf packages/*/coverage && rm -rf packages/*/dist && rm samples/src/bundle.js",
"build": "yarn workspaces foreach run build",
"test": "yarn workspaces foreach run test",
"release": "yarn workspaces foreach run release",
"dev": "yarn workspace @webex/webrtc-core dev",
"start": "cd samples && yarn start"
},
"lint-staged": {
"*.ts": [
"prettier --write",
"eslint --max-warnings=0",
"cspell"
]
}
"packageManager": "yarn@4.0.0-rc.36"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 13 additions & 1 deletion .releaserc → packages/webrtc-core/.releaserc
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"branches": [
"main"
"main",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
},
{
"name": "mono",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
122 changes: 122 additions & 0 deletions packages/webrtc-core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"name": "@webex/webrtc-core",
"version": "1.1.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"browser": "dist/umd/index.js",
"types": "dist/types/index.d.ts",
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
},
"files": [
"dist/**/*"
],
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
},
"repository": "https://github.com/webex/webrtc-core.git",
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@microsoft/api-documenter": "^7.13.33",
"@microsoft/api-extractor": "^7.18.4",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@types/chai": "^4.2.21",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.1",
"@types/lodash": "^4.14.171",
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.1",
"@types/sdp-transform": "^2.4.5",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"chai": "^4.3.4",
"cspell": "^5.6.6",
"eslint": "^7.29.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-jsdoc": "^35.5.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^7.0.0",
"jest": "^27.0.6",
"karma": "6.3.15",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.3",
"karma-firefox-launcher": "^2.1.1",
"karma-junit-reporter": "^2.0.1",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^4.3.6",
"karma-typescript": "^5.5.2",
"karma-typescript-es6-transform": "^5.5.2",
"lint-staged": "^11.1.1",
"mocha": "^9.1.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"puppeteer": "^10.4.0",
"rollup": "^2.53.2",
"rollup-plugin-polyfill-node": "^0.7.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"semantic-release": "^19.0.2",
"ts-jest": "^27.0.5",
"ts-loader": "^9.2.3",
"typescript": "^4.4.3",
"yarn": "^1.22.18"
},
"scripts": {
"build": "run-s clean compile",
"dev": "run-s clean watch",
"clean": "npm run transpile:clean && npm run docs:clean",
"compile": "rollup -c ./rollup.config.js",
"docs": "npm run docs:clean && npm run docs:extract && npm run docs:generate",
"docs:clean": "rimraf ./docs",
"docs:extract": "api-extractor run -c ./api-extractor.json",
"docs:generate": "api-documenter markdown -i ./docs/temp -o ./docs",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" --write",
"fix:lint": "eslint src --ext .ts --fix",
"prepare": "husky install",
"release": "semantic-release",
"test": "run-s build test:*",
"test:lint": "eslint src --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
"test:unit": "jest",
"test:coverage": "jest --coverage",
"test:integration:safari": "karma start --integration --safari",
"test:integration:chrome": "karma start --integration --chrome",
"test:integration:firefox": "karma start --integration --firefox",
"test:integration:edge": "karma start --integration --edge",
"transpile": "tsc",
"transpile:clean": "rimraf ./dist",
"transpile:validate": "tsc --noemit",
"transpile:watch": "tsc --watch",
"version": "echo $npm_package_version",
"watch": "rollup -c ./rollup.config.js -w"
},
"dependencies": {
"events": "^3.3.0",
"js-logger": "^1.6.1",
"typed-emitter": "^2.1.0",
"webrtc-adapter": "^8.1.2"
},
"lint-staged": {
"*.ts": [
"prettier --write",
"eslint --max-warnings=0",
"cspell"
]
}
}
7 changes: 6 additions & 1 deletion rollup.config.js → packages/webrtc-core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ export default [
sourcemap: !production,
plugins: [terser()],
},
{
format: 'umd',
name: 'webrtcCore',
file: '../../samples/src/bundle.js',
},
],
plugins,
watch: false,
watch: true,
},
];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4e9891a

Please sign in to comment.