Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"@wireapp/antiscroll-2": "1.0.2",
"@wireapp/avs": "6.2.8",
"@wireapp/commons": "3.6.1",
"@wireapp/core": "16.10.19",
"@wireapp/core": "16.10.22",
"@wireapp/protocol-messaging": "1.25.4",
"@wireapp/react-ui-kit": "7.36.0",
"@wireapp/store-engine-dexie": "1.3.11",
"@wireapp/store-engine-sqleet": "1.3.14",
"@wireapp/webapp-events": "0.4.1",
"@wireapp/webapp-events": "0.5.0",
"amplify": "git+https://[email protected]/wireapp/amplify",
"core-js": "2.6.10",
"countly-sdk-web": "20.4.0",
Expand Down
6 changes: 3 additions & 3 deletions src/page/template/content/preferences-av.htm
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@
<section class="preferences-section">
<header class="preferences-header" data-bind="text: t('preferencesOptionsEnableBetaProgramConferenceCalls')"></header>
<div class="preferences-option">
<div class="preferences-option-icon checkbox accent-text" data-bind="attr: {'data-uie-value': true}" data-uie-name="status-preference-beta-program">
<input type="checkbox" id="beta-program-checkbox" data-bind="checked: false" disabled>
<label class="preferences-options-checkbox-label disabled" for="beta-program-checkbox" data-bind="text: t('preferencesOptionsEnableBetaProgramCheckbox')"></label>
<div class="preferences-option-icon checkbox accent-text" data-bind="attr: {'data-uie-value': optionSftCalling}" data-uie-name="status-preference-beta-program">
<input type="checkbox" id="beta-program-checkbox" data-bind="checked: optionSftCalling">
<label class="preferences-options-checkbox-label" for="beta-program-checkbox" data-bind="text: t('preferencesOptionsEnableBetaProgramCheckbox')"></label>
</div>
</div>
<div class="preferences-detail">
Expand Down
11 changes: 10 additions & 1 deletion src/script/calling/CallingRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class CallingRepository {
private readonly logger: Logger;
private readonly callLog: string[];
private readonly cbrEncoding: ko.Observable<number>;
private readonly useSftCalling: ko.Observable<boolean>;
private readonly acceptedVersionWarnings: ko.ObservableArray<string>;
private readonly acceptVersionWarning: (conversationId: string) => void;

Expand Down Expand Up @@ -144,6 +145,7 @@ export class CallingRepository {
this.logger = getLogger('CallingRepository');
this.callLog = [];
this.cbrEncoding = ko.observable(0);
this.useSftCalling = ko.observable(false);

this.subscribeToEvents();
}
Expand All @@ -152,6 +154,10 @@ export class CallingRepository {
this.cbrEncoding(vbrEnabled ? 0 : 1);
}

toggleSftCalling(enableSftCalling: boolean) {
this.useSftCalling(Boolean(this.supportsConferenceCalling && enableSftCalling));
}

getStats(conversationId: ConversationId): Promise<{stats: RTCStatsReport; userid: UserId}[]> {
return this.wCall.getStats(conversationId);
}
Expand Down Expand Up @@ -377,8 +383,10 @@ export class CallingRepository {
amplify.subscribe(WebAppEvents.CALL.EVENT_FROM_BACKEND, this.onCallEvent.bind(this));
amplify.subscribe(WebAppEvents.CALL.STATE.TOGGLE, this.toggleState.bind(this)); // This event needs to be kept, it is sent by the wrapper
amplify.subscribe(WebAppEvents.PROPERTIES.UPDATE.CALL.ENABLE_VBR_ENCODING, this.toggleCbrEncoding.bind(this));
amplify.subscribe(WebAppEvents.PROPERTIES.UPDATE.CALL.ENABLE_SFT_CALLING, this.toggleSftCalling.bind(this));
amplify.subscribe(WebAppEvents.PROPERTIES.UPDATED, ({settings}: WebappProperties) => {
this.toggleCbrEncoding(settings.call.enable_vbr_encoding);
this.toggleSftCalling(settings.call.enable_sft_calling);
});
}

Expand Down Expand Up @@ -508,7 +516,8 @@ export class CallingRepository {
: Promise.resolve(true);
const success = await loadPreviewPromise;
if (success) {
const conferenceCall = conversationType === CONV_TYPE.GROUP ? CONV_TYPE.CONFERENCE : conversationType;
const conferenceCall =
conversationType === CONV_TYPE.GROUP && this.useSftCalling() ? CONV_TYPE.CONFERENCE : conversationType;
this.wCall.start(this.wUser, conversationId, callType, conferenceCall, this.cbrEncoding());
} else {
this.showNoCameraModal();
Expand Down
4 changes: 4 additions & 0 deletions src/script/properties/PropertiesRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class PropertiesRepository {
enable_debugging: false,
settings: {
call: {
enable_sft_calling: false,
enable_vbr_encoding: true,
},
emoji: {
Expand Down Expand Up @@ -315,6 +316,9 @@ export class PropertiesRepository {
case PROPERTIES_TYPE.CALL.ENABLE_VBR_ENCODING:
amplify.publish(WebAppEvents.PROPERTIES.UPDATE.CALL.ENABLE_VBR_ENCODING, updatedPreference);
break;
case PROPERTIES_TYPE.CALL.ENABLE_SFT_CALLING:
amplify.publish(WebAppEvents.PROPERTIES.UPDATE.CALL.ENABLE_SFT_CALLING, updatedPreference);
break;
default:
throw new Error(`Failed to update preference of unhandled type '${propertiesType}'`);
}
Expand Down
1 change: 1 addition & 0 deletions src/script/properties/PropertiesType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum EMOJI {
}

enum CALL {
ENABLE_SFT_CALLING = 'settings.call.enable_sft_calling',
ENABLE_VBR_ENCODING = 'settings.call.enable_vbr_encoding',
}

Expand Down
7 changes: 7 additions & 0 deletions src/script/view_model/content/PreferencesAVViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class PreferencesAVViewModel {
videoMediaStream: ko.PureComputed<MediaStream>;
willChangeMediaSource: WillChangeMediaSource;
optionVbrEncoding: ko.Observable<boolean>;
optionSftCalling: ko.Observable<boolean>;

static get CONFIG() {
return {
Expand Down Expand Up @@ -136,6 +137,11 @@ export class PreferencesAVViewModel {
this.propertiesRepository.savePreference(PROPERTIES_TYPE.CALL.ENABLE_VBR_ENCODING, vbrEncoding);
});

this.optionSftCalling = ko.observable(false);
this.optionSftCalling.subscribe(enableSftCalling => {
this.propertiesRepository.savePreference(PROPERTIES_TYPE.CALL.ENABLE_SFT_CALLING, enableSftCalling);
});

amplify.subscribe(WebAppEvents.PROPERTIES.UPDATED, this.updateProperties.bind(this));
this.updateProperties(this.propertiesRepository.properties);
this.isRequestingAudio = ko.observable(false);
Expand Down Expand Up @@ -335,6 +341,7 @@ export class PreferencesAVViewModel {
*/
updateProperties = ({settings}: WebappProperties): void => {
this.optionVbrEncoding(settings.call.enable_vbr_encoding);
this.optionSftCalling(settings.call.enable_sft_calling);
};

saveCallLogs(): number | void {
Expand Down
115 changes: 67 additions & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1997,32 +1997,32 @@
resolved "https://registry.yarnpkg.com/@wireapp/antiscroll-2/-/antiscroll-2-1.0.2.tgz#71a78d294ee0c88f42d50477ab61fa39272f5bca"
integrity sha512-9KeB3yh9k01PjpuuRQsve4yY3+OVS2/hp9j+N13Is5wYCZRkUzZVCs8w9CyA/C6J5o9ukH0EzT7uurysWuhn/A==

"@wireapp/api-client@11.20.17":
version "11.20.17"
resolved "https://registry.yarnpkg.com/@wireapp/api-client/-/api-client-11.20.17.tgz#a9f046431ad2a4758758b55f4bf1188ec307292b"
integrity sha512-wSJyWc7Ip9Hej28eSKI5eLDQWu1Ni/bqNxuuNhnwzsW6C7QdXgnl8vXyXFnYNE6sMgathjWvxlpD5NHMSEeslQ==
"@wireapp/api-client@11.21.2":
version "11.21.2"
resolved "https://registry.yarnpkg.com/@wireapp/api-client/-/api-client-11.21.2.tgz#73be13b00ad1bf14be8372d02aee867bb4f89a07"
integrity sha512-6OpB+5c+pPujXmMZf1eLKicS12z79N1xGT4yjy5JEb3r1cdZEShQWfE9is9IBPEQl+83mchLusfRgCRkCxoLpw==
dependencies:
"@types/node" "~12"
"@types/spark-md5" "3.0.2"
"@types/tough-cookie" "4.0.0"
"@wireapp/commons" "3.6.1"
"@wireapp/priority-queue" "1.6.5"
"@wireapp/commons" "3.6.2"
"@wireapp/priority-queue" "1.6.6"
axios "0.19.2"
logdown "3.3.1"
reconnecting-websocket "4.4.0"
spark-md5 "3.0.1"
tough-cookie "4.0.0"
ws "7.2.5"
ws "7.3.1"

"@wireapp/[email protected]":
version "6.2.8"
resolved "https://registry.yarnpkg.com/@wireapp/avs/-/avs-6.2.8.tgz#0fd7a9125534e64c8cb4e685ed4eb3d467ce4218"
integrity sha512-t0MxP9HRavXznovACGb/Kw5OH9o89h3Te96sIVeIOttXUAI/lRp7ZmkUZA29h0BU3v+Yzu9aSJa1u04EwWG9qw==

"@wireapp/[email protected].9":
version "4.6.9"
resolved "https://registry.yarnpkg.com/@wireapp/cbor/-/cbor-4.6.9.tgz#be8a0e33e3a1aa4285db647f571bc0b5f0bc68f9"
integrity sha512-wtOx2I7huRSobtSEXzspN13z8LU/EFADJK+zAp/FSo3EU03nq67s1PG1zhYsdwzynnyEFVOtK0KjraqEMroGxg==
"@wireapp/[email protected].10":
version "4.6.10"
resolved "https://registry.yarnpkg.com/@wireapp/cbor/-/cbor-4.6.10.tgz#e95e9a0a3cd9b77fb8552267e46d79ee5aa0d8cd"
integrity sha512-vc4XI+HSsmxl0VtPDOwkL83kQXxpy7lRnIypLgP/Fx9XX4e8/BKcKtIPhClkQYCWwFHVBFBvfnY7htgZr11HzQ==

"@wireapp/[email protected]":
version "3.6.1"
Expand All @@ -2038,6 +2038,20 @@
platform "1.3.5"
url-search-params-polyfill "8.1.0"

"@wireapp/[email protected]":
version "3.6.2"
resolved "https://registry.yarnpkg.com/@wireapp/commons/-/commons-3.6.2.tgz#951ca9e61041e3027f5c36dbf028d95ba435d8e6"
integrity sha512-C1X0Z/ekLO0H4O+x6fS48PyCjEx5B7ye1gT+LS08g01Thpbs1vucfPRHPUernGwoabnM5kGPSLu9X/BH84c1sg==
dependencies:
"@types/fs-extra" "8.1.0"
"@types/node" "~12"
"@types/platform" "1.3.2"
ansi-regex "5.0.0"
fs-extra "9.0.0"
logdown "3.3.1"
platform "1.3.5"
url-search-params-polyfill "8.1.0"

"@wireapp/[email protected]":
version "1.0.13"
resolved "https://registry.yarnpkg.com/@wireapp/copy-config/-/copy-config-1.0.13.tgz#cea4a6e953bd23264e28312e57377e947ea7fab6"
Expand All @@ -2051,34 +2065,34 @@
logdown "3.3.1"
rimraf "3.0.2"

"@wireapp/[email protected].19":
version "16.10.19"
resolved "https://registry.yarnpkg.com/@wireapp/core/-/core-16.10.19.tgz#71b16b84ce65f43a07ff5e00dc5d4bdb4e1ef16d"
integrity sha512-s1IvUi041goFM2s59HI8f2+7NeoWvoL48l+FcVna8J4RtlUaVSyVFiGs3hDqqcIOR1BwSbdxa4M1gtIy6QXqjg==
"@wireapp/[email protected].22":
version "16.10.22"
resolved "https://registry.yarnpkg.com/@wireapp/core/-/core-16.10.22.tgz#a5047fd0d7bc30026176759250cc67f8fc77fc59"
integrity sha512-2YVAh8iW++XLztbayqHFrWXz3/m9ZcV7BmgglvtdRuz0A1gq7A4HiiMgxVTCVfnZMmGEeaOlRGpcu0By28jA3Q==
dependencies:
"@types/long" "4.0.1"
"@types/node" "~12"
"@wireapp/api-client" "11.20.17"
"@wireapp/cryptobox" "12.2.18"
"@wireapp/api-client" "11.21.2"
"@wireapp/cryptobox" "12.2.19"
"@wireapp/protocol-messaging" "1.25.4"
"@wireapp/store-engine" "4.5.7"
bazinga64 "5.7.7"
"@wireapp/store-engine" "4.5.8"
bazinga64 "5.7.8"
hash.js "1.1.7"
logdown "3.3.1"
protobufjs "6.9.0"
uuidjs "4.2.5"

"@wireapp/[email protected].18":
version "12.2.18"
resolved "https://registry.yarnpkg.com/@wireapp/cryptobox/-/cryptobox-12.2.18.tgz#4f5da2e2474fb443ce0274a6bf96b16646a2ef15"
integrity sha512-D2gG1xBKWNCh4VazuPDUQuIZUTEG/tSKducJNaJEgc6QzN8QJHu9Pns1uce2MOtvkKBA6x0N42gNznLwYzNXzQ==
"@wireapp/[email protected].19":
version "12.2.19"
resolved "https://registry.yarnpkg.com/@wireapp/cryptobox/-/cryptobox-12.2.19.tgz#a9410b326338db40311dd76cbe2eaa5cd8bf5587"
integrity sha512-/BAGjnLEsOqH7kXP8NasNJmZjFbfeloXIsRP+DY2C7FQvLwgJWz1DQbEYJUntithyHZj2zi9qpPzS+VzeO5Ghw==
dependencies:
"@types/node" "~12"
"@wireapp/lru-cache" "3.6.9"
"@wireapp/priority-queue" "1.6.5"
"@wireapp/proteus" "9.8.12"
"@wireapp/store-engine" "4.5.7"
bazinga64 "5.7.7"
"@wireapp/priority-queue" "1.6.6"
"@wireapp/proteus" "9.8.13"
"@wireapp/store-engine" "4.5.8"
bazinga64 "5.7.8"
logdown "3.3.1"

"@wireapp/[email protected]":
Expand All @@ -2096,25 +2110,25 @@
resolved "https://registry.yarnpkg.com/@wireapp/prettier-config/-/prettier-config-0.3.0.tgz#e8129b31021c81d90d564d9c4ff0f7f7b514e943"
integrity sha512-BFokvX4NZlkhWq5/OoJUCS8Iels+MeRgzpd5V9QR3hj5swwCFGxJOAL7soPXkSNWo91gI1qwiTp8szB1O9aCfQ==

"@wireapp/[email protected].5":
version "1.6.5"
resolved "https://registry.yarnpkg.com/@wireapp/priority-queue/-/priority-queue-1.6.5.tgz#fd852941373b46c70b2af0daced8ac24e057ed9b"
integrity sha512-rY67w3wC/Si7Dpg9x7q9bsbBZ8X09TjmK02hCB3he8AB8m7AZPOg1H/FxZ5Pz0+VGQvCe095M4sd+pLDuCPzdQ==
"@wireapp/[email protected].6":
version "1.6.6"
resolved "https://registry.yarnpkg.com/@wireapp/priority-queue/-/priority-queue-1.6.6.tgz#c0503a3db12b27017229d2aa8f4a352c598b3b4f"
integrity sha512-K1qaZqrwKKEvkXnQU0e+9rqgBBawnOFbBJhwNnC4Yabxbu9+XstOVR1iZ3hPfMwX1Vgps9u+GxzEjQCQp2y2pA==
dependencies:
"@types/node" "~12"
logdown "3.3.1"
uuidjs "4.2.5"

"@wireapp/[email protected].12":
version "9.8.12"
resolved "https://registry.yarnpkg.com/@wireapp/proteus/-/proteus-9.8.12.tgz#8ecca75ccd946fd76b14c6a6f82304f6e9a02160"
integrity sha512-La5iMD9F+OdN3UeNQ18DgipDRg8vd3EfkV+65ONcWUqs6/h7HfGpnb4LFKU+/0VwIxJCbmMLiDBS2ATE7JeUmQ==
"@wireapp/[email protected].13":
version "9.8.13"
resolved "https://registry.yarnpkg.com/@wireapp/proteus/-/proteus-9.8.13.tgz#606e80eeeb51d783c819f2949ad2a766f4f2a330"
integrity sha512-wkkE5Qd0J1NmQMqNlgQC8v6sUBpQs3HBXDyzOUAyQyn8OVsfRUrJR15PLqnmsiaPTJ/qsrWHflO2ov+lDGIYIA==
dependencies:
"@types/chai" "4.2.11"
"@types/ed2curve" "0.2.2"
"@types/libsodium-wrappers-sumo" "0.7.3"
"@types/node" "~12"
"@wireapp/cbor" "4.6.9"
"@wireapp/cbor" "4.6.10"
ed2curve "0.3.0"
libsodium-wrappers-sumo "0.7.6"

Expand Down Expand Up @@ -2158,17 +2172,17 @@
"@wireapp/websql" "0.0.17"
uint32 "0.2.1"

"@wireapp/[email protected].7":
version "4.5.7"
resolved "https://registry.yarnpkg.com/@wireapp/store-engine/-/store-engine-4.5.7.tgz#cb5fdbd3a0cdfec37252675e1a0e6ec4f399d435"
integrity sha512-km/oeKLZO0V3H2mzX2nAyXYbsETy3qES5f6g+5eXwHLox4q7W7ZOedxUgnX80KeycQ07EvQYnxXYFkI5uKIdGA==
"@wireapp/[email protected].8":
version "4.5.8"
resolved "https://registry.yarnpkg.com/@wireapp/store-engine/-/store-engine-4.5.8.tgz#c2f4e430c1e7b119feaa61f64a5a452323b2de69"
integrity sha512-Iq7GkfNJ6wH59ZTC6jSDG1i/fcaK9eVf97eut2o2xXQ366WfHfGCJDgfV40po8qIPdZ9wChyKDuNiGJnwfsAvw==
dependencies:
"@types/node" "~12"

"@wireapp/webapp-events@0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@wireapp/webapp-events/-/webapp-events-0.4.1.tgz#6e56fc6e9b6559ec42d18e4316a6fe71f0ccd6ed"
integrity sha512-aC9IxlKwNNoEt5dK4sfzTHRU6s+IGZT4dHaNcUfV03ysFpTIeD8BEUN3YBUxnpuLc0C4MlmryRDfZjse7w9G0A==
"@wireapp/webapp-events@0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@wireapp/webapp-events/-/webapp-events-0.5.0.tgz#cc583c9817b171e657d03144f988e0d8c31deada"
integrity sha512-xG1Ib4oct2aXgGPXejV/Z2tUF8XZSxrsYFPDl7vAqAh4n7Gzjrcwoyp2YNFjhQtpmBlfJZ/zESGYnKBFnx0bIQ==

"@wireapp/[email protected]":
version "0.0.17"
Expand Down Expand Up @@ -3003,6 +3017,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/bazinga64/-/bazinga64-5.7.7.tgz#33718ecd3e48ca6d81112c30b7f8d87a45a639cd"
integrity sha512-GysbX1iiYLRomOl9CqBtCsuRGmqBwtKZeUjft5stsD/m0K/15doTswm3JLQc4ldAZMLTS3rl97ppQ8KHs07vkA==

[email protected]:
version "5.7.8"
resolved "https://registry.yarnpkg.com/bazinga64/-/bazinga64-5.7.8.tgz#9fba6a68ff5d4427d02e02d484c749ee155bd636"
integrity sha512-q3VoENycRGnTRlrF8pzQ+UCEawOB+iRTFZ/ZgZO8yDH7pYasaOlZtG21SONzBkf3tmKDwot5dpzvkR/hDjc9fQ==

bcrypt-pbkdf@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
Expand Down Expand Up @@ -14068,10 +14087,10 @@ [email protected]:
dependencies:
mkdirp "^0.5.1"

ws@7.2.5:
version "7.2.5"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.5.tgz#abb1370d4626a5a9cd79d8de404aa18b3465d10d"
integrity sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA==
ws@7.3.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8"
integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==

ws@^7.1.2:
version "7.3.0"
Expand Down