Skip to content

Commit

Permalink
Fix an audio volume issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jun 10, 2024
1 parent 6339428 commit 45f986e
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 81 deletions.
6 changes: 3 additions & 3 deletions docs/index.eaffbaa8.js → docs/index.4e18dd33.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.eaffbaa8.js.map → docs/index.4e18dd33.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html><head><script type="module" src="index.ff75d985.js"></script><link rel="stylesheet" href="index.f01e0bc4.css"><script type="module" src="index.runtime.0ec7a71f.js"></script><link rel="icon shortcut" href="favicon.4a73512e.png"><title>RingCentral WebPhone Demo</title></head><body> <div class="container"> <h1>RingCentral WebPhone Demo</h1> <div id="app"></div> </div> <video id="remoteVideo" hidden></video> <video id="localVideo" hidden muted></video> <script type="text/html" id="template-incoming">
<!doctype html><html><head><script type="module" src="index.ff75d985.js"></script><link rel="stylesheet" href="index.f01e0bc4.css"><script type="module" src="index.runtime.66609dc4.js"></script><link rel="icon shortcut" href="favicon.4a73512e.png"><title>RingCentral WebPhone Demo</title></head><body> <div class="container"> <h1>RingCentral WebPhone Demo</h1> <div id="app"></div> </div> <video id="remoteVideo" hidden></video> <video id="localVideo" hidden muted></video> <script type="text/html" id="template-incoming">
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
Expand Down Expand Up @@ -179,4 +179,4 @@ <h4 class="modal-title">
</div>
</div>
</div>
</script> <script type="module" src="index.eaffbaa8.js"></script> </body></html>
</script> <script type="module" src="index.4e18dd33.js"></script> </body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ringcentral-web-phone",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/ringcentral/ringcentral-web-phone",
"bugs": {
"url": "https://github.com/ringcentral/ringcentral-web-phone/issues"
Expand Down Expand Up @@ -41,21 +41,21 @@
"lint": "eslint --fix '**/*.{ts,tsx,js,jsx}' && prettier --write . && sort-package-json",
"serve": "rm -rf .parcel-cache && parcel demo/index.html demo/callback.html --dist-dir docs",
"test": "jest src/mediaStreams.spec.ts",
"test:coverage": "cat .coverage/lcov.info | coveralls -v",
"test2": "NODE_OPTIONS=--require=dotenv-override-true/config playwright test test/index.spec.ts --workers=1"
"test2": "NODE_OPTIONS=--require=dotenv-override-true/config playwright test test/index.spec.ts --workers=1",
"test:coverage": "cat .coverage/lcov.info | coveralls -v"
},
"dependencies": {
"sip.js": "^0.21.2"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@playwright/test": "^1.44.0",
"@playwright/test": "^1.44.1",
"@rc-ex/core": "^1.3.15",
"@ringcentral/sdk": "^5.0.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.11",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@types/node": "^20.14.2",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"bootstrap": "3.4.1",
"buffer": "^6.0.3",
"coveralls": "^3.1.1",
Expand All @@ -64,21 +64,21 @@
"eslint": "8.57.0",
"eslint-config-alloy": "^5.1.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.1.3",
"events": "^3.3.0",
"http-server": "^14.1.1",
"jest": "^29.7.0",
"jquery": "^3.7.1",
"parcel": "^2.12.0",
"prettier": "^3.2.5",
"prettier": "^3.3.1",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"sort-package-json": "^2.10.0",
"stream-browserify": "^3.0.0",
"ts-jest": "^29.1.2",
"ts-jest": "^29.1.4",
"ts-node": "^10.9.2",
"ttpt": "^0.8.9",
"ttpt": "^0.9.6",
"typescript": "^5.4.5",
"wait-for-async": "^0.6.1",
"yarn-upgrade-all": "^0.7.2"
Expand Down
4 changes: 2 additions & 2 deletions src/audioHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class AudioHelper {
* @returns
*/
public playIncoming(value: boolean): AudioHelper {
return this._playSound(this._incoming!, value, this.volume || 0.5);
return this._playSound(this._incoming!, value, this.volume ?? 0.5);
}

/**
Expand All @@ -64,7 +64,7 @@ export class AudioHelper {
* @returns
*/
public playOutgoing(value: boolean): AudioHelper {
return this._playSound(this._outgoing!, value, this.volume || 1);
return this._playSound(this._outgoing!, value, this.volume ?? 1);
}

private _playSound(url: string, val: boolean, volume: number): AudioHelper {
Expand Down
Loading

0 comments on commit 45f986e

Please sign in to comment.