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
56043011
authored
2014-07-07 10:23:08 -0400
by
David LaPalomento
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #97 from gutworth/rm-for-in
use regular for loops instead of for-in
2 parents
a60455fa
da41f45f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/flv-tag.js
src/flv-tag.js
View file @
5604301
...
...
@@ -41,13 +41,13 @@ hls.FlvTag = function(type, extraData) {
// 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'
)
{
for
(
i
=
0
;
i
<
'width'
.
length
;
i
++
)
{
widthBytes
[
i
]
=
'width'
.
charCodeAt
(
i
);
}
for
(
i
in
'height'
)
{
for
(
i
=
0
;
i
<
'height'
.
length
;
i
++
)
{
heightBytes
[
i
]
=
'height'
.
charCodeAt
(
i
);
}
for
(
i
in
'videocodecid'
)
{
for
(
i
=
0
;
i
<
'videocodecid'
.
length
;
i
++
)
{
videocodecidBytes
[
i
]
=
'videocodecid'
.
charCodeAt
(
i
);
}
...
...
@@ -199,7 +199,7 @@ hls.FlvTag = function(type, extraData) {
this
.
bytes
.
set
(
videocodecidBytes
,
this
.
position
);
this
.
position
+=
12
;
}
else
{
for
(
i
in
key
)
{
for
(
i
=
0
;
i
<
key
.
length
;
i
++
)
{
this
.
bytes
[
this
.
position
]
=
key
.
charCodeAt
(
i
);
this
.
position
++
;
}
...
...
@@ -223,7 +223,7 @@ hls.FlvTag = function(type, extraData) {
prepareWrite
(
this
,
2
);
this
.
view
.
setUint16
(
this
.
position
,
key
.
length
);
this
.
position
+=
2
;
for
(
i
in
key
)
{
for
(
i
=
0
;
i
<
key
.
length
;
i
++
)
{
console
.
assert
(
key
.
charCodeAt
(
i
)
<
255
);
prepareWrite
(
this
,
1
);
this
.
bytes
[
this
.
position
]
=
key
.
charCodeAt
(
i
);
...
...
Please
register
or
sign in
to post a comment