File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1285,6 +1285,7 @@ shaka.media.StreamingEngine = class {
1285
1285
async onUpdate_ ( mediaState ) {
1286
1286
this . destroyer_ . ensureNotDestroyed ( ) ;
1287
1287
1288
+ const ContentType = shaka . util . ManifestParserUtils . ContentType ;
1288
1289
const logPrefix = shaka . media . StreamingEngine . logPrefix_ ( mediaState ) ;
1289
1290
1290
1291
// Sanity check.
@@ -1361,7 +1362,17 @@ shaka.media.StreamingEngine = class {
1361
1362
return ;
1362
1363
}
1363
1364
1364
- const mediaStates = Array . from ( this . mediaStates_ . values ( ) ) ;
1365
+ if ( mediaState . type === ContentType . TEXT ) {
1366
+ // MSE endOfStream() closes MediaSource, not TextEngine, so skip here.
1367
+ return ;
1368
+ }
1369
+ const mediaStates = [ mediaState ] ;
1370
+ const otherType = mediaState . type === ContentType . AUDIO ?
1371
+ ContentType . VIDEO : ContentType . AUDIO ;
1372
+ const otherMediaState = this . mediaStates_ . get ( otherType ) ;
1373
+ if ( otherMediaState ) {
1374
+ mediaStates . push ( otherMediaState ) ;
1375
+ }
1365
1376
1366
1377
// Check if we've buffered to the end of the presentation. We delay adding
1367
1378
// the audio and video media states, so it is possible for the text stream
You can’t perform that action at this time.
0 commit comments