Skip to content

Commit

Permalink
fix: ArrayBuffer.isView may not be available everywhere (#1258)
Browse files Browse the repository at this point in the history
Fixes #1134
  • Loading branch information
gkatsev authored Apr 5, 2022
1 parent 073c2ca commit e492fe8
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 20 deletions.
72 changes: 57 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
],
"dependencies": {
"@babel/runtime": "^7.12.5",
"@videojs/vhs-utils": "3.0.4",
"aes-decrypter": "3.1.2",
"@videojs/vhs-utils": "3.0.5",
"aes-decrypter": "3.1.3",
"global": "^4.4.0",
"m3u8-parser": "4.7.0",
"mpd-parser": "0.21.0",
"m3u8-parser": "4.7.1",
"mpd-parser": "0.21.1",
"mux.js": "6.0.1",
"video.js": "^6 || ^7"
},
Expand Down
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 e492fe8

Please sign in to comment.