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
81700409
authored
2015-05-18 12:08:10 -0400
by
David LaPalomento
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #107 from bparadie/fixes-101
Improper FLV header generation
2 parents
56520081
79249955
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
src/segment-parser.js
src/segment-parser.js
View file @
8170040
...
...
@@ -45,7 +45,8 @@
headBytes
=
new
Uint8Array
(
3
+
1
+
1
+
4
),
head
=
new
DataView
(
headBytes
.
buffer
),
metadata
,
result
;
result
,
metadataLength
;
// default arguments
duration
=
duration
||
0
;
...
...
@@ -80,9 +81,10 @@
metadata
=
new
FlvTag
(
FlvTag
.
METADATA_TAG
);
metadata
.
pts
=
metadata
.
dts
=
0
;
metadata
.
writeMetaDataDouble
(
"duration"
,
duration
);
result
=
new
Uint8Array
(
headBytes
.
byteLength
+
metadata
.
byteLength
);
result
.
set
(
head
);
result
.
set
(
head
.
bytesLength
,
metadata
.
finalize
());
metadataLength
=
metadata
.
finalize
().
length
;
result
=
new
Uint8Array
(
headBytes
.
byteLength
+
metadataLength
);
result
.
set
(
headBytes
);
result
.
set
(
head
.
byteLength
,
metadataLength
);
return
result
;
};
...
...
Please
register
or
sign in
to post a comment