Commit 2f43728 1 parent 75c8eff commit 2f43728 Copy full SHA for 2f43728
File tree 3 files changed +14
-7
lines changed
3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ import type {
37
37
KeyLoadedData ,
38
38
MediaAttachingData ,
39
39
BufferFlushingData ,
40
- LevelSwitchingData ,
41
40
ManifestLoadedData ,
42
41
} from '../types/events' ;
43
42
import type { FragmentTracker } from './fragment-tracker' ;
@@ -356,7 +355,6 @@ export default class BaseStreamController
356
355
// if we're here we probably needed to backtrack or are waiting for more parts
357
356
return ;
358
357
}
359
- level . fragmentError = 0 ;
360
358
const state = this . state ;
361
359
if ( this . fragContextChanged ( frag ) ) {
362
360
if (
@@ -1521,10 +1519,21 @@ export default class BaseStreamController
1521
1519
} ,
1522
1520
false
1523
1521
) ;
1524
- if ( ! parsed ) {
1525
- this . warn (
1522
+ if ( parsed ) {
1523
+ level . fragmentError = 0 ;
1524
+ } else {
1525
+ const error = new Error (
1526
1526
`Found no media in fragment ${ frag . sn } of level ${ level . id } resetting transmuxer to fallback to playlist timing`
1527
1527
) ;
1528
+ this . warn ( error . message ) ;
1529
+ this . hls . trigger ( Events . ERROR , {
1530
+ type : ErrorTypes . MEDIA_ERROR ,
1531
+ details : ErrorDetails . FRAG_PARSING_ERROR ,
1532
+ fatal : false ,
1533
+ error,
1534
+ frag,
1535
+ reason : `Found no media in msn ${ frag . sn } of level "${ level . url } "` ,
1536
+ } ) ;
1528
1537
this . resetTransmuxer ( ) ;
1529
1538
}
1530
1539
this . state = State . PARSED ;
Original file line number Diff line number Diff line change @@ -94,8 +94,7 @@ export default class ErrorController {
94
94
case ErrorDetails . FRAG_PARSING_ERROR :
95
95
case ErrorDetails . FRAG_DECRYPT_ERROR : {
96
96
const levelIndex = this . getVariantLevelIndex ( data . frag ) ;
97
- // Do not retry level. Escalate to fatal if switching levels fails.
98
- data . levelRetry = false ;
97
+ // Switch level if possible, otherwise allow retry count to reach max error retries
99
98
this . levelSwitch ( data , levelIndex ) ;
100
99
return ;
101
100
}
Original file line number Diff line number Diff line change @@ -445,7 +445,6 @@ export default class LevelController extends BasePlaylistController {
445
445
if ( frag !== undefined && frag . type === PlaylistLevelType . MAIN ) {
446
446
const level = this . _levels [ frag . level ] ;
447
447
if ( level !== undefined ) {
448
- level . fragmentError = 0 ;
449
448
level . loadError = 0 ;
450
449
}
451
450
}
You can’t perform that action at this time.
0 commit comments