diff --git a/src/controller/audio-stream-controller.js b/src/controller/audio-stream-controller.js index c50963e3b2a..78498177b76 100644 --- a/src/controller/audio-stream-controller.js +++ b/src/controller/audio-stream-controller.js @@ -417,13 +417,13 @@ class AudioStreamController extends BaseStreamController { let newDetails = data.details, trackId = data.id, track = this.tracks[trackId], + curDetails = track.details, duration = newDetails.totalduration, sliding = 0; logger.log(`track ${trackId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`); - if (newDetails.live) { - let curDetails = track.details; + if (newDetails.live || (curDetails && curDetails.live)) { if (curDetails && newDetails.fragments.length > 0) { // we already have details for that level, merge them LevelHelper.mergeDetails(curDetails, newDetails); diff --git a/src/controller/stream-controller.js b/src/controller/stream-controller.js index 09a5f745cc2..8d4522c3048 100644 --- a/src/controller/stream-controller.js +++ b/src/controller/stream-controller.js @@ -783,7 +783,7 @@ class StreamController extends BaseStreamController { logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`); - if (newDetails.live) { + if (newDetails.live || (curLevel.details && curLevel.details.live)) { let curDetails = curLevel.details; if (curDetails && newDetails.fragments.length > 0) { // we already have details for that level, merge them