Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicolas Dufresne
multistream-server
Commits
54b02600
Commit
54b02600
authored
Aug 13, 2019
by
Jakub Adam
Browse files
Recover HLS player after network failure
parent
4141b310
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/resources/index.html
View file @
54b02600
...
...
@@ -31,8 +31,19 @@
var
hls
=
new
Hls
({
liveDurationInfinity
:
true
});
hls
.
loadSource
(
'
hls/playlist.m3u8
'
);
hls
.
on
(
Hls
.
Events
.
ERROR
,
(
e
,
data
)
=>
{
if
(
data
.
type
==
"
networkError
"
)
{
setTimeout
(()
=>
{
hls
.
recoverMediaError
()
hls
.
loadSource
(
'
hls/playlist.m3u8
'
)
},
1000
)
}
console
.
log
(
data
)
})
hls
.
attachMedia
(
hls_video
);
hls
.
loadSource
(
'
hls/playlist.m3u8
'
);
}
var
client
=
new
mss
.
Client
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment