mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 20:41:59 -08:00
hls: fix infinite loop in web client when reading incompatible codecs (#2956)
when a player received a stream with incompatible codecs, it started polling the server for index.m3u8 in an infinite loop. This was caused by #2631
This commit is contained in:
parent
0f733bab26
commit
7d0e702f14
1 changed files with 1 additions and 3 deletions
|
|
@ -33,9 +33,7 @@ const create = (video) => {
|
|||
});
|
||||
|
||||
hls.on(Hls.Events.ERROR, (evt, data) => {
|
||||
if (data.type === Hls.ErrorTypes.MEDIA_ERROR)
|
||||
hls.recoverMediaError();
|
||||
else if (data.fatal) {
|
||||
if (data.fatal) {
|
||||
hls.destroy();
|
||||
setTimeout(() => create(video), 2000);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue