hls.js 1.6.6-0.canary.11331 → 1.6.6-0.canary.11334

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.
@@ -202,8 +202,18 @@ export class TimelineController implements ComponentAPI {
202
202
  // Parse any unparsed fragments upon receiving the initial PTS.
203
203
  if (unparsedVttFrags.length) {
204
204
  this.unparsedVttFrags = [];
205
- unparsedVttFrags.forEach((frag) => {
206
- this.onFragLoaded(Events.FRAG_LOADED, frag as FragLoadedData);
205
+ unparsedVttFrags.forEach((data) => {
206
+ if (this.initPTS[data.frag.cc]) {
207
+ this.onFragLoaded(Events.FRAG_LOADED, data as FragLoadedData);
208
+ } else {
209
+ this.hls.trigger(Events.SUBTITLE_FRAG_PROCESSED, {
210
+ success: false,
211
+ frag: data.frag,
212
+ error: new Error(
213
+ 'Subtitle discontinuity domain does not match main',
214
+ ),
215
+ });
216
+ }
207
217
  });
208
218
  }
209
219
  }