From a050af546d4d5d0f03bc1a0edd8cf0a73c86b572 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Thu, 27 Sep 2018 00:27:34 +0200 Subject: [PATCH] Be explicit about using bytebuffer for base64 encoding --- app/index.js | 3 ++- package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/index.js b/app/index.js index f44301b..a04ce1b 100644 --- a/app/index.js +++ b/app/index.js @@ -1,5 +1,6 @@ import 'stream-browserify' // see https://github.com/ericgundrum/pouch-websocket-sync-example/commit/2a4437b013092cc7b2cd84cf1499172c84a963a3 import url from 'url' +import ByteBuffer from 'bytebuffer' import MumbleClient from 'mumble-client' import mumbleConnect from 'mumble-client-websocket' import CodecsBrowser from 'mumble-client-codecs-browser' @@ -430,7 +431,7 @@ class GlobalBindings { ui.texture = ko.pureComputed(() => { let raw = ui.rawTexture() if (!raw || raw.offset >= raw.limit) return null - return 'data:image/*;base64,' + raw.toBase64() + return 'data:image/*;base64,' + ByteBuffer.wrap(raw).toBase64() }) ui.show_avatar = () => { let setting = this.settings.showAvatars() diff --git a/package.json b/package.json index a34921e..11eb677 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "babel-preset-es2015": "^6.14.0", "babel-runtime": "^6.18.0", "brfs": "^1.4.3", + "bytebuffer": "^5.0.1", "css-loader": "^0.26.0", "dompurify": "^0.8.9", "drop-stream": "^1.0.0",