From 3702079beecbb26a74e5a790d4fa4d278b0fa40c Mon Sep 17 00:00:00 2001 From: Tianxiao Wang Date: Wed, 17 Apr 2019 13:36:36 +0800 Subject: [PATCH] fix: cannot read property handlerType of undefined (#70) --- packages/griffith-mp4/src/mp4/mp4Box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/griffith-mp4/src/mp4/mp4Box.js b/packages/griffith-mp4/src/mp4/mp4Box.js index f2f2482f..97871d88 100644 --- a/packages/griffith-mp4/src/mp4/mp4Box.js +++ b/packages/griffith-mp4/src/mp4/mp4Box.js @@ -59,7 +59,7 @@ export default class MP4Box { Box.readType(stream) Box.readBody(stream) - if (Box.type === 'trak' && Box.box.mdia) { + if (Box.type === 'trak' && Box.box.mdia && Box.box.mdia.hdlr) { const handlerType = Box.box.mdia.hdlr.handlerType if (handlerType === 'vide') { this.box.videoTrak = Box.box