diff --git a/packages/xgplayer-hls/src/hls/manifest-loader/parser/media.js b/packages/xgplayer-hls/src/hls/manifest-loader/parser/media.js index b8df1c98..2664e619 100644 --- a/packages/xgplayer-hls/src/hls/manifest-loader/parser/media.js +++ b/packages/xgplayer-hls/src/hls/manifest-loader/parser/media.js @@ -166,13 +166,14 @@ export function parseMediaPlaylist (lines, parentUrl, useLowLatency) { if (lastSegment) { if (endOfList) { lastSegment.isLast = true - media.live = false + } media.endSN = lastSegment.sn media.endPartIndex = lastSegment.partIndex } - - + if (endOfList) { + media.live = false + } media.totalDuration = totalDuration media.endCC = curCC