hls.js 1.6.0-beta.2.0.canary.10837 → 1.6.0-beta.2.0.canary.10842
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hls.d.mts +1 -0
- package/dist/hls.d.ts +1 -0
- package/dist/hls.js +38 -36
- package/dist/hls.js.d.ts +1 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +4 -8
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +4 -8
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +14 -12
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +2 -2
- package/src/controller/buffer-controller.ts +1 -13
- package/src/controller/interstitials-controller.ts +28 -4
- package/src/controller/stream-controller.ts +1 -4
@@ -962,7 +962,6 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`,
|
|
962
962
|
}
|
963
963
|
this.log(`setSchedulePosition ${index}, ${assetListIndex}`);
|
964
964
|
const scheduledItem = index >= 0 ? scheduleItems[index] : null;
|
965
|
-
const media = this.primaryMedia;
|
966
965
|
// Cleanup current item / asset
|
967
966
|
const currentItem = this.playingItem;
|
968
967
|
const playingLastItem = this.playingLastItem;
|
@@ -1011,15 +1010,40 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`,
|
|
1011
1010
|
// Exiting an Interstitial
|
1012
1011
|
this.clearInterstitial(interstitial, scheduledItem);
|
1013
1012
|
if (interstitial.cue.once) {
|
1013
|
+
// Remove interstitial with CUE attribute value of ONCE after it has played
|
1014
1014
|
this.updateSchedule();
|
1015
|
-
|
1015
|
+
const items = this.schedule.items;
|
1016
|
+
if (scheduledItem && items) {
|
1016
1017
|
const updatedIndex = this.schedule.findItemIndex(scheduledItem);
|
1017
|
-
this.
|
1018
|
+
this.advanceSchedule(
|
1019
|
+
updatedIndex,
|
1020
|
+
items,
|
1021
|
+
assetListIndex,
|
1022
|
+
currentItem,
|
1023
|
+
playingLastItem,
|
1024
|
+
);
|
1018
1025
|
}
|
1019
1026
|
return;
|
1020
1027
|
}
|
1021
1028
|
}
|
1022
1029
|
}
|
1030
|
+
this.advanceSchedule(
|
1031
|
+
index,
|
1032
|
+
scheduleItems,
|
1033
|
+
assetListIndex,
|
1034
|
+
currentItem,
|
1035
|
+
playingLastItem,
|
1036
|
+
);
|
1037
|
+
}
|
1038
|
+
private advanceSchedule(
|
1039
|
+
index: number,
|
1040
|
+
scheduleItems: InterstitialScheduleItem[],
|
1041
|
+
assetListIndex: number | undefined,
|
1042
|
+
currentItem: InterstitialScheduleItem | null,
|
1043
|
+
playedLastItem: boolean,
|
1044
|
+
) {
|
1045
|
+
const scheduledItem = index >= 0 ? scheduleItems[index] : null;
|
1046
|
+
const media = this.primaryMedia;
|
1023
1047
|
// Cleanup out of range Interstitials
|
1024
1048
|
const playerQueue = this.playerQueue;
|
1025
1049
|
if (playerQueue.length) {
|
@@ -1139,7 +1163,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`,
|
|
1139
1163
|
if (this.shouldPlay) {
|
1140
1164
|
playWithCatch(this.hls.media);
|
1141
1165
|
}
|
1142
|
-
} else if (
|
1166
|
+
} else if (playedLastItem && this.isInterstitial(currentItem)) {
|
1143
1167
|
// Maintain playingItem state at end of schedule (setSchedulePosition(-1) called to end program)
|
1144
1168
|
// this allows onSeeking handler to update schedule position
|
1145
1169
|
this.playingItem = currentItem;
|
@@ -1076,10 +1076,7 @@ export default class StreamController
|
|
1076
1076
|
event: Events.BUFFER_FLUSHED,
|
1077
1077
|
{ type }: BufferFlushedData,
|
1078
1078
|
) {
|
1079
|
-
if (
|
1080
|
-
type !== ElementaryStreamTypes.AUDIO ||
|
1081
|
-
(this.audioOnly && !this.altAudio)
|
1082
|
-
) {
|
1079
|
+
if (type !== ElementaryStreamTypes.AUDIO || !this.altAudio) {
|
1083
1080
|
const mediaBuffer =
|
1084
1081
|
(type === ElementaryStreamTypes.VIDEO
|
1085
1082
|
? this.videoBuffer
|