Skip to content

Commit

Permalink
fix: ArrayBuffer.isView may not be available everywhere
Browse files Browse the repository at this point in the history
Depends on videojs/vhs-utils#33

Fixes #1134
  • Loading branch information
gkatsev committed Mar 14, 2022
1 parent 073c2ca commit 8084f5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin-utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { isArrayBufferView } from '@videojs/vhs-utils/es/byte-helpers';

/**
* @file bin-utils.js
*/
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8084f5b

Please sign in to comment.