@cloudgaming/rpc
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -22,3 +22,3 @@ "use strict"; | ||
} | ||
const data = wrap_1.parseData(new Uint8Array(await msg.data.arrayBuffer())); | ||
const data = wrap_1.parseData(new Uint8Array(await readBlobAsArrayBuffer(msg.data))); | ||
const { request, response } = data; | ||
@@ -235,2 +235,17 @@ if (request) { | ||
exports.Client = Client; | ||
async function readBlobAsArrayBuffer(blob) { | ||
if (blob.arrayBuffer) { | ||
return blob.arrayBuffer(); | ||
} | ||
const reader = new FileReader(); | ||
return new Promise((resolve, reject) => { | ||
reader.addEventListener('error', e => { | ||
reject(e); | ||
}); | ||
reader.addEventListener('loadend', () => { | ||
resolve(reader.result); | ||
}); | ||
reader.readAsArrayBuffer(blob); | ||
}); | ||
} | ||
//# sourceMappingURL=Client.js.map |
{ | ||
"name": "@cloudgaming/rpc", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"main": "dist/index.js", | ||
@@ -18,3 +18,4 @@ "type": "commonjs", | ||
"clean": "rimraf dist", | ||
"publicpublish": "yarn publish --registry=https://registry.npmjs.org --access=public" | ||
"publicpublish": "yarn publish --registry=https://registry.npmjs.org --access=public", | ||
"prepublish": "yarn build" | ||
}, | ||
@@ -21,0 +22,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45059
724