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
78ec5def
authored
2015-05-27 13:49:44 -0400
by
jforbes
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Moved whitespace removal into push()
1 parent
d8c73316
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/m3u8/m3u8-parser.js
src/m3u8/m3u8-parser.js
View file @
78ec5de
...
...
@@ -70,7 +70,7 @@
nextNewline
=
buffer
.
indexOf
(
'\n'
);
for
(;
nextNewline
>
-
1
;
nextNewline
=
buffer
.
indexOf
(
'\n'
))
{
this
.
trigger
(
'data'
,
buffer
.
substring
(
0
,
nextNewline
)
.
replace
(
/^
\s
+|
\s
+$/g
,
''
)
);
this
.
trigger
(
'data'
,
buffer
.
substring
(
0
,
nextNewline
));
buffer
=
buffer
.
substring
(
nextNewline
+
1
);
}
};
...
...
@@ -108,6 +108,9 @@
*/
ParseStream
.
prototype
.
push
=
function
(
line
)
{
var
match
,
event
;
//strip whitespace
line
=
line
.
replace
(
/^
\s
+|
\s
+$/g
,
''
);
if
(
line
.
length
===
0
)
{
// ignore empty lines
return
;
...
...
Please
register
or
sign in
to post a comment