Skip to content

Commit 43b80a3

Browse files
committed
fix types
1 parent 801d223 commit 43b80a3

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

modules/e2ee/E2EEContext.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default class E2EEcontext {
7070
*
7171
* @param {string} participantId - The participant that just left.
7272
*/
73-
cleanup(participantId: string): void {
73+
public cleanup(participantId: string): void {
7474
this._worker.postMessage({
7575
operation: 'cleanup',
7676
participantId
@@ -81,7 +81,7 @@ export default class E2EEcontext {
8181
* Cleans up all state associated with all participants in the conference. This is needed when disabling e2ee.
8282
*
8383
*/
84-
cleanupAll(): void {
84+
public cleanupAll(): void {
8585
this._worker.postMessage({
8686
operation: 'cleanupAll'
8787
});
@@ -95,7 +95,7 @@ export default class E2EEcontext {
9595
* @param {string} kind - The kind of track this receiver belongs to.
9696
* @param {string} participantId - The participant id that this receiver belongs to.
9797
*/
98-
handleReceiver(receiver: RTCRtpReceiver, kind: string, participantId: string): void {
98+
public handleReceiver(receiver: RTCRtpReceiver, kind: string, participantId: string): void {
9999
if (receiver[kJitsiE2EE]) {
100100
return;
101101
}
@@ -128,7 +128,7 @@ export default class E2EEcontext {
128128
* @param {string} kind - The kind of track this sender belongs to.
129129
* @param {string} participantId - The participant id that this sender belongs to.
130130
*/
131-
handleSender(sender: RTCRtpSender, kind: string, participantId: string): void {
131+
public handleSender(sender: RTCRtpSender, kind: string, participantId: string): void {
132132
if (sender[kJitsiE2EE]) {
133133
return;
134134
}
@@ -158,7 +158,7 @@ export default class E2EEcontext {
158158
*
159159
* @param {boolean} enabled - whether E2EE is enabled or not.
160160
*/
161-
setEnabled(enabled: boolean): void {
161+
public setEnabled(enabled: boolean): void {
162162
this._worker.postMessage({
163163
enabled,
164164
operation: 'setEnabled'
@@ -172,7 +172,7 @@ export default class E2EEcontext {
172172
* @param {Uint8Array | boolean} key - they key for the given participant.
173173
* @param {Number} keyIndex - the key index.
174174
*/
175-
setKey(participantId: string, key: Uint8Array | boolean, keyIndex: number): void {
175+
public setKey(participantId: string, key: Uint8Array | boolean, keyIndex: number): void {
176176
this._worker.postMessage({
177177
key,
178178
keyIndex,

modules/e2ee/ExternallyManagedKeyHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class ExternallyManagedKeyHandler extends KeyHandler {
2121
* @param {Number} [keyInfo.index] - the index of the encryption key.
2222
* @returns {void}
2323
*/
24-
async setKey(keyInfo: { encryptionKey: CryptoKey; index: number; }) {
24+
public async setKey(keyInfo: { encryptionKey: CryptoKey; index: number; }) {
2525
const keyData = await crypto.subtle.exportKey('raw', keyInfo.encryptionKey);
2626

2727
this.e2eeCtx.setKey(undefined, new Uint8Array(keyData), keyInfo.index);

modules/e2ee/KeyHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export class KeyHandler extends Listenable {
151151
*
152152
* @returns {boolean}
153153
*/
154-
isEnabled(): boolean {
154+
public isEnabled(): boolean {
155155
return this.enabled;
156156
}
157157

@@ -161,7 +161,7 @@ export class KeyHandler extends Listenable {
161161
* @param {boolean} enabled - whether E2EE should be enabled or not.
162162
* @returns {void}
163163
*/
164-
async setEnabled(enabled: boolean): Promise<void> {
164+
public async setEnabled(enabled: boolean): Promise<void> {
165165
this._enabling && await this._enabling;
166166

167167
if (enabled === this.enabled) {

modules/e2ee/ManagedKeyHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class ManagedKeyHandler extends KeyHandler {
139139
private async _ratchetKeyImpl(): Promise<void> {
140140
logger.debug('Ratchetting key');
141141

142-
const material = await importKey(this._key as Uint8Array);
142+
const material = await importKey(this._key as unknown as ArrayBuffer);
143143
const newKey = await ratchet(material);
144144

145145
this._key = new Uint8Array(newKey);

0 commit comments

Comments
 (0)