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
8fbb05f0
authored
2014-03-13 17:57:57 -0400
by
David LaPalomento
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #28 from videojs/smallerrors
Small errors
2 parents
b2716ec2
917f9ac5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
24 deletions
src/async-queue.js
src/flv-tag.js
src/videojs-hls.js
src/async-queue.js
View file @
8fbb05f
...
...
@@ -20,7 +20,7 @@
window
.
setTimeout
(
process
,
0
);
q
.
running
=
true
;
}
}
,
}
},
process
=
function
()
{
var
task
;
...
...
src/flv-tag.js
View file @
8fbb05f
...
...
@@ -3,28 +3,7 @@
window
.
videojs
=
window
.
videojs
||
{};
window
.
videojs
.
hls
=
window
.
videojs
.
hls
||
{};
var
hls
=
window
.
videojs
.
hls
,
// commonly used metadata properties
widthBytes
=
new
Uint8Array
(
'width'
.
length
),
heightBytes
=
new
Uint8Array
(
'height'
.
length
),
videocodecidBytes
=
new
Uint8Array
(
'videocodecid'
.
length
),
i
;
// calculating the bytes of common metadata names ahead of time makes the
// corresponding writes faster because we don't have to loop over the
// characters
// re-test with test/perf.html if you're planning on changing this
for
(
i
in
'width'
)
{
widthBytes
[
i
]
=
'width'
.
charCodeAt
(
i
);
}
for
(
i
in
'height'
)
{
heightBytes
[
i
]
=
'height'
.
charCodeAt
(
i
);
}
for
(
i
in
'videocodecid'
)
{
videocodecidBytes
[
i
]
=
'videocodecid'
.
charCodeAt
(
i
);
}
var
hls
=
window
.
videojs
.
hls
;
// (type:uint, extraData:Boolean = false) extends ByteArray
hls
.
FlvTag
=
function
(
type
,
extraData
)
{
...
...
@@ -49,7 +28,33 @@ hls.FlvTag = function(type, extraData) {
bytes
.
set
(
flv
.
bytes
.
subarray
(
0
,
flv
.
position
),
0
);
flv
.
bytes
=
bytes
;
flv
.
view
=
new
DataView
(
flv
.
bytes
.
buffer
);
};
},
// commonly used metadata properties
widthBytes
=
hls
.
FlvTag
.
widthBytes
||
new
Uint8Array
(
'width'
.
length
),
heightBytes
=
hls
.
FlvTag
.
heightBytes
||
new
Uint8Array
(
'height'
.
length
),
videocodecidBytes
=
hls
.
FlvTag
.
videocodecidBytes
||
new
Uint8Array
(
'videocodecid'
.
length
),
i
;
if
(
!
hls
.
FlvTag
.
widthBytes
)
{
// calculating the bytes of common metadata names ahead of time makes the
// corresponding writes faster because we don't have to loop over the
// characters
// re-test with test/perf.html if you're planning on changing this
for
(
i
in
'width'
)
{
widthBytes
[
i
]
=
'width'
.
charCodeAt
(
i
);
}
for
(
i
in
'height'
)
{
heightBytes
[
i
]
=
'height'
.
charCodeAt
(
i
);
}
for
(
i
in
'videocodecid'
)
{
videocodecidBytes
[
i
]
=
'videocodecid'
.
charCodeAt
(
i
);
}
hls
.
FlvTag
.
widthBytes
=
widthBytes
;
hls
.
FlvTag
.
heightBytes
=
heightBytes
;
hls
.
FlvTag
.
videocodecidBytes
=
videocodecidBytes
;
}
this
.
keyFrame
=
false
;
// :Boolean
...
...
src/videojs-hls.js
View file @
8fbb05f
...
...
@@ -591,6 +591,10 @@ var
};
videojs
.
plugin
(
'hls'
,
function
()
{
if
(
typeof
Uint8Array
===
'undefined'
)
{
return
;
}
var
initialize
=
function
()
{
return
function
()
{
this
.
hls
=
initialize
();
...
...
Please
register
or
sign in
to post a comment