From 8084f5b3687e7029f371dc240d2556000f65ded3 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 14 Mar 2022 19:04:25 -0400 Subject: [PATCH] fix: ArrayBuffer.isView may not be available everywhere Depends on videojs/vhs-utils#33 Fixes #1134 --- src/bin-utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin-utils.js b/src/bin-utils.js index ae675bc0c..6bea9097d 100644 --- a/src/bin-utils.js +++ b/src/bin-utils.js @@ -1,3 +1,5 @@ +import { isArrayBufferView } from '@videojs/vhs-utils/es/byte-helpers'; + /** * @file bin-utils.js */ @@ -48,7 +50,7 @@ export const createTransferableMessage = function(message) { Object.keys(message).forEach((key) => { const value = message[key]; - if (ArrayBuffer.isView(value)) { + if (isArrayBufferView(value)) { transferable[key] = { bytes: value.buffer, byteOffset: value.byteOffset,