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
9d311e27
authored
2014-01-22 21:09:28 -0800
by
Tom Johnson
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Non-sexy fix for socrates issue 113
1 parent
b74084e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
src/m3u8/m3u8-parser.js
src/m3u8/m3u8-parser.js
View file @
9d311e2
...
...
@@ -14,11 +14,22 @@
i
=
attrs
.
length
,
result
=
{},
attr
;
while
(
i
--
)
{
attr
=
attrs
[
i
].
split
(
'='
);
attr
[
0
]
=
attr
[
0
].
replace
(
/^
\s
+|
\s
+$/g
,
''
);
// This is not sexy, but gives us the resulting object we want.
if
(
attr
[
1
])
{
attr
[
1
]
=
attr
[
1
].
replace
(
/^
\s
+|
\s
+$/g
,
''
);
if
(
attr
[
1
].
indexOf
(
'"'
)
!=
-
1
)
{
attr
[
1
]
=
attr
[
1
].
split
(
'"'
)[
1
];
}
result
[
attr
[
0
]]
=
attr
[
1
];
}
else
{
attrs
[
i
-
1
]
=
attrs
[
i
-
1
]
+
','
+
attr
[
0
];
}
}
return
result
;
},
...
...
Please
register
or
sign in
to post a comment