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
938a2f7f
authored
2014-09-25 15:00:14 -0700
by
Simeon Bateman
Committed by
David LaPalomento
2015-07-31 16:40:38 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added styp generator and default audio hdlr box
1 parent
c9f97355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
src/mp4-generator.js
src/mp4-generator.js
View file @
938a2f7
...
...
@@ -33,6 +33,7 @@ DataView = window.DataView;
stsd
:
[],
stsz
:
[],
stts
:
[],
styp
:
[],
tfhd
:
[],
traf
:
[],
trak
:
[],
...
...
@@ -71,6 +72,18 @@ DataView = window.DataView;
0x6f
,
0x48
,
0x61
,
0x6e
,
0x64
,
0x6c
,
0x65
,
0x72
,
0x00
// name: 'VideoHandler'
]);
SOUND_HDLR
=
new
Uint8Array
([
0x00
,
// version 0
0x00
,
0x00
,
0x00
,
// flags
0x00
,
0x00
,
0x00
,
0x00
,
// pre_defined
0x73
,
0x6f
,
0x75
,
0x6e
,
// handler_type: 'soun'
0x00
,
0x00
,
0x00
,
0x00
,
// reserved
0x00
,
0x00
,
0x00
,
0x00
,
// reserved
0x00
,
0x00
,
0x00
,
0x00
,
// reserved
0x56
,
0x69
,
0x64
,
0x65
,
0x6f
,
0x48
,
0x61
,
0x6e
,
0x73
,
0x6f
,
0x75
,
0x6e
,
0x00
// name: 'VideoHandler'
]);
DREF
=
new
Uint8Array
([
0x00
,
// version 0
0x00
,
0x00
,
0x00
,
// flags
...
...
@@ -296,6 +309,10 @@ stsd = function(width, height) {
));
};
styp
=
function
()
{
return
box
(
types
.
styp
,
MAJOR_BRAND
,
MINOR_VERSION
,
MAJOR_BRAND
);
};
tkhd
=
function
(
duration
,
width
,
height
)
{
return
box
(
types
.
tkhd
,
new
Uint8Array
([
0x00
,
// version 0
...
...
Please
register
or
sign in
to post a comment