Be explicit about using bytebuffer for base64 encoding

This commit is contained in:
Jonas Herzig 2018-09-27 00:27:34 +02:00
parent cfe6cd8b14
commit a050af546d
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import 'stream-browserify' // see https://github.com/ericgundrum/pouch-websocket-sync-example/commit/2a4437b013092cc7b2cd84cf1499172c84a963a3 import 'stream-browserify' // see https://github.com/ericgundrum/pouch-websocket-sync-example/commit/2a4437b013092cc7b2cd84cf1499172c84a963a3
import url from 'url' import url from 'url'
import ByteBuffer from 'bytebuffer'
import MumbleClient from 'mumble-client' import MumbleClient from 'mumble-client'
import mumbleConnect from 'mumble-client-websocket' import mumbleConnect from 'mumble-client-websocket'
import CodecsBrowser from 'mumble-client-codecs-browser' import CodecsBrowser from 'mumble-client-codecs-browser'
@ -430,7 +431,7 @@ class GlobalBindings {
ui.texture = ko.pureComputed(() => { ui.texture = ko.pureComputed(() => {
let raw = ui.rawTexture() let raw = ui.rawTexture()
if (!raw || raw.offset >= raw.limit) return null 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 = () => { ui.show_avatar = () => {
let setting = this.settings.showAvatars() let setting = this.settings.showAvatars()

View file

@ -23,6 +23,7 @@
"babel-preset-es2015": "^6.14.0", "babel-preset-es2015": "^6.14.0",
"babel-runtime": "^6.18.0", "babel-runtime": "^6.18.0",
"brfs": "^1.4.3", "brfs": "^1.4.3",
"bytebuffer": "^5.0.1",
"css-loader": "^0.26.0", "css-loader": "^0.26.0",
"dompurify": "^0.8.9", "dompurify": "^0.8.9",
"drop-stream": "^1.0.0", "drop-stream": "^1.0.0",