Skip to content

Commit

Permalink
fix(xgplayer-mp4): read width and height info from tkhd box
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxin92 committed Sep 17, 2018
1 parent ea96f46 commit e58060a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/xgplayer-mp4/browser/index.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/xgplayer-mp4/dist/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/xgplayer-mp4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xgplayer-mp4",
"version": "1.1.1",
"version": "1.1.2-a",
"description": "xgplayer plugin for mp4 transform to fmp4",
"main": "./dist/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/xgplayer-mp4/src/mp4.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MP4 {
let codecBox = stsd.subBox[0]
if (hdlr.handleType === 'vide') {
let avcC = util.findBox(trak, 'avcC')
let avc1 = util.findBox(trak, 'avc1')
let tkhd = util.findBox(trak, 'tkhd')
videoTrak = trak
videoTimeScale = mdhd.timescale
if (avcC) {
Expand All @@ -88,9 +88,9 @@ class MP4 {
} else {
videoCodec = `${codecBox.type}`
}
if (avc1) {
width = avc1.width
height = avc1.height
if (tkhd) {
width = tkhd.width
height = tkhd.height
}
}
if (hdlr.handleType === 'soun') {
Expand Down

0 comments on commit e58060a

Please sign in to comment.