Fix key format on the wire to be base64

This commit is contained in:
David Baker
2023-10-20 17:31:15 +01:00
parent 5ab706e26b
commit 9126fb3f3e
4 changed files with 8 additions and 24 deletions

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { BaseKeyProvider, createKeyMaterialFromString } from "livekit-client";
import { BaseKeyProvider, createKeyMaterialFromBuffer } from "livekit-client";
import { logger } from "matrix-js-sdk/src/logger";
import {
MatrixRTCSession,
@@ -56,12 +56,12 @@ export class MatrixKeyProvider extends BaseKeyProvider {
}
private onEncryptionKeyChanged = async (
encryptionKey: string,
encryptionKey: Uint8Array,
encryptionKeyIndex: number,
participantId: string,
): Promise<void> => {
this.onSetEncryptionKey(
await createKeyMaterialFromString(encryptionKey),
await createKeyMaterialFromBuffer(encryptionKey),
participantId,
encryptionKeyIndex,
);