Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
11243fc1
authored
2014-09-19 11:08:07 -0700
by
Simeon Bateman
Committed by
David LaPalomento
2015-07-31 16:40:37 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added parser and test for styp mp4 box
1 parent
9f369160
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
test/mp4-inspector_test.js
test/muxer/js/mp4-inspector.js
test/mp4-inspector_test.js
View file @
11243fc
...
...
@@ -582,6 +582,21 @@ test('can parse a video stsd', function() {
}]);
});
test
(
'can parse an styp'
,
function
()
{
deepEqual
(
videojs
.
inspectMp4
(
new
Uint8Array
(
box
(
'styp'
,
0x61
,
0x76
,
0x63
,
0x31
,
// major brand
0x00
,
0x00
,
0x00
,
0x02
,
// minor version
0x00
,
0x00
,
0x00
,
0x03
,
// compatible brands
0x00
,
0x00
,
0x00
,
0x04
// compatible brands
))),
[{
type
:
'styp'
,
size
:
4
*
6
,
majorBrand
:
'avc1'
,
minorVersion
:
2
,
compatibleBrands
:
[
3
,
4
]
}],
'parsed an ftyp'
);
});
test
(
'can parse a vmhd'
,
function
()
{
var
data
=
box
(
'vmhd'
,
0x00
,
// version
...
...
test/muxer/js/mp4-inspector.js
View file @
11243fc
...
...
@@ -373,6 +373,9 @@ var
}
return
result
;
},
styp
:
function
(
data
)
{
return
parse
.
ftyp
(
data
);
},
tfhd
:
function
(
data
)
{
var
view
=
new
DataView
(
data
.
buffer
,
data
.
byteOffset
,
data
.
byteLength
),
...
...
Please
register
or
sign in
to post a comment