rx-player 3.26.2 → 3.26.3-dev.2022021400

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.
Files changed (218) hide show
  1. package/.github/workflows/perfs.yml +22 -0
  2. package/CHANGELOG.md +19 -1
  3. package/VERSION +1 -1
  4. package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +6 -2
  5. package/dist/_esm5.processed/core/abr/buffer_based_chooser.d.ts +28 -6
  6. package/dist/_esm5.processed/core/abr/buffer_based_chooser.js +63 -12
  7. package/dist/_esm5.processed/core/abr/network_analyzer.d.ts +1 -1
  8. package/dist/_esm5.processed/core/abr/pending_requests_store.js +3 -5
  9. package/dist/_esm5.processed/core/abr/representation_estimator.d.ts +1 -1
  10. package/dist/_esm5.processed/core/abr/representation_estimator.js +2 -2
  11. package/dist/_esm5.processed/core/api/media_element_track_choice_manager.d.ts +6 -0
  12. package/dist/_esm5.processed/core/api/media_element_track_choice_manager.js +20 -3
  13. package/dist/_esm5.processed/core/api/public_api.d.ts +3 -3
  14. package/dist/_esm5.processed/core/api/public_api.js +2 -2
  15. package/dist/_esm5.processed/core/api/track_choice_manager.d.ts +6 -6
  16. package/dist/_esm5.processed/core/eme/__tests__/__global__/utils.d.ts +0 -2
  17. package/dist/_esm5.processed/core/eme/__tests__/__global__/utils.js +5 -10
  18. package/dist/_esm5.processed/core/eme/find_key_system.js +15 -5
  19. package/dist/_esm5.processed/core/eme/types.d.ts +2 -2
  20. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.d.ts +4 -4
  21. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +1 -1
  22. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.d.ts +2 -2
  23. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.js +5 -1
  24. package/dist/_esm5.processed/core/fetchers/utils/try_urls_with_backoff.js +1 -1
  25. package/dist/_esm5.processed/core/init/initialize_directfile.d.ts +2 -2
  26. package/dist/_esm5.processed/core/init/initialize_media_source.d.ts +1 -1
  27. package/dist/_esm5.processed/core/init/manifest_update_scheduler.d.ts +4 -4
  28. package/dist/_esm5.processed/core/init/stream_events_emitter/are_same_stream_events.d.ts +4 -4
  29. package/dist/_esm5.processed/core/init/stream_events_emitter/types.d.ts +2 -2
  30. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/html_text_segment_buffer.d.ts +3 -3
  31. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.js +32 -31
  32. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +4 -4
  33. package/dist/_esm5.processed/core/stream/representation/force_garbage_collection.js +3 -4
  34. package/dist/_esm5.processed/errors/request_error.js +3 -1
  35. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/thumbnail_loader.d.ts +2 -2
  36. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/thumbnail_loader.js +1 -3
  37. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +1 -1
  38. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +1 -1
  39. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/types.d.ts +3 -3
  40. package/dist/_esm5.processed/manifest/adaptation.d.ts +2 -2
  41. package/dist/_esm5.processed/manifest/adaptation.js +3 -1
  42. package/dist/_esm5.processed/manifest/manifest.d.ts +9 -9
  43. package/dist/_esm5.processed/manifest/period.d.ts +3 -3
  44. package/dist/_esm5.processed/manifest/representation.d.ts +2 -2
  45. package/dist/_esm5.processed/manifest/representation_index/types.d.ts +18 -18
  46. package/dist/_esm5.processed/manifest/types.d.ts +3 -3
  47. package/dist/_esm5.processed/parsers/manifest/dash/common/get_hdr_information.d.ts +1 -1
  48. package/dist/_esm5.processed/parsers/manifest/dash/common/get_periods_time_infos.d.ts +3 -3
  49. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.d.ts +6 -6
  50. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_init_segment.d.ts +3 -3
  51. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +2 -2
  52. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.d.ts +14 -14
  53. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.d.ts +17 -17
  54. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +1 -1
  55. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +28 -20
  56. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +19 -4
  57. package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.d.ts +2 -2
  58. package/dist/_esm5.processed/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +1 -1
  59. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.d.ts +17 -35
  60. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +24 -23
  61. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.d.ts +8 -8
  62. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.d.ts +18 -27
  63. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +25 -23
  64. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.d.ts +21 -15
  65. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +19 -19
  66. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.d.ts +15 -38
  67. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +8 -8
  68. package/dist/_esm5.processed/parsers/manifest/dash/node_parser_types.d.ts +30 -30
  69. package/dist/_esm5.processed/parsers/manifest/dash/parsers_types.d.ts +3 -3
  70. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +1 -1
  71. package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.d.ts +2 -2
  72. package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.d.ts +7 -7
  73. package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.d.ts +8 -8
  74. package/dist/_esm5.processed/parsers/manifest/types.d.ts +28 -28
  75. package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.d.ts +3 -2
  76. package/dist/_esm5.processed/parsers/manifest/utils/clear_timeline_from_position.js +15 -5
  77. package/dist/_esm5.processed/parsers/manifest/utils/index_helpers.d.ts +2 -2
  78. package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.d.ts +11 -1
  79. package/dist/_esm5.processed/parsers/manifest/utils/update_segment_timeline.js +31 -19
  80. package/dist/_esm5.processed/parsers/texttracks/webvtt/html/to_html.d.ts +2 -2
  81. package/dist/_esm5.processed/parsers/texttracks/webvtt/parse_cue_block.d.ts +1 -1
  82. package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +2 -1
  83. package/dist/_esm5.processed/transports/dash/image_pipelines.js +1 -1
  84. package/dist/_esm5.processed/transports/dash/init_segment_loader.js +1 -1
  85. package/dist/_esm5.processed/transports/dash/manifest_parser.js +1 -1
  86. package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +2 -2
  87. package/dist/_esm5.processed/transports/dash/segment_loader.js +2 -2
  88. package/dist/_esm5.processed/transports/dash/segment_parser.d.ts +1 -1
  89. package/dist/_esm5.processed/transports/dash/text_loader.d.ts +1 -1
  90. package/dist/_esm5.processed/transports/dash/text_loader.js +1 -1
  91. package/dist/_esm5.processed/transports/dash/text_parser.d.ts +1 -1
  92. package/dist/_esm5.processed/transports/local/segment_loader.d.ts +1 -2
  93. package/dist/_esm5.processed/transports/local/segment_loader.js +1 -1
  94. package/dist/_esm5.processed/transports/metaplaylist/manifest_loader.d.ts +1 -1
  95. package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +1 -1
  96. package/dist/_esm5.processed/transports/smooth/pipelines.js +1 -1
  97. package/dist/_esm5.processed/transports/smooth/segment_loader.d.ts +0 -1
  98. package/dist/_esm5.processed/transports/smooth/segment_loader.js +2 -2
  99. package/dist/_esm5.processed/transports/types.d.ts +36 -30
  100. package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +1 -1
  101. package/dist/_esm5.processed/transports/utils/generate_manifest_loader.d.ts +1 -1
  102. package/dist/_esm5.processed/utils/cancellable_sleep.js +1 -1
  103. package/dist/_esm5.processed/utils/cast_to_observable.d.ts +1 -2
  104. package/dist/_esm5.processed/utils/cast_to_observable.js +1 -1
  105. package/dist/_esm5.processed/utils/request/fetch.d.ts +4 -5
  106. package/dist/_esm5.processed/utils/request/fetch.js +7 -4
  107. package/dist/_esm5.processed/utils/request/xhr.d.ts +6 -6
  108. package/dist/_esm5.processed/utils/request/xhr.js +2 -1
  109. package/dist/_esm5.processed/utils/rx-from_cancellable_promise.d.ts +1 -2
  110. package/dist/rx-player.js +404 -321
  111. package/dist/rx-player.min.js +1 -1
  112. package/package.json +3 -4
  113. package/scripts/doc-generator/generate_header_html.js +6 -7
  114. package/scripts/doc-generator/generate_page_html.js +3 -4
  115. package/scripts/doc-generator/generate_page_list_html.js +4 -5
  116. package/scripts/doc-generator/generate_sidebar_html.js +4 -7
  117. package/scripts/doc-generator/utils.js +0 -11
  118. package/scripts/generate_demo_list.js +3 -3
  119. package/scripts/generate_documentation_list.js +3 -3
  120. package/scripts/launch_static_server.js +127 -67
  121. package/scripts/run_standalone_demo.js +1 -0
  122. package/scripts/start_demo_web_server.js +1 -0
  123. package/sonar-project.properties +1 -1
  124. package/src/compat/__tests__/fullscreen.test.ts +7 -7
  125. package/src/compat/__tests__/is_vtt_cue.test.ts +1 -1
  126. package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +1 -1
  127. package/src/compat/eme/custom_media_keys/index.ts +7 -3
  128. package/src/core/abr/__tests__/{get_estimate_from_buffer_levels.test.ts → buffer_based_chooser.test.ts} +94 -123
  129. package/src/core/abr/buffer_based_chooser.ts +85 -20
  130. package/src/core/abr/network_analyzer.ts +1 -1
  131. package/src/core/abr/pending_requests_store.ts +3 -5
  132. package/src/core/abr/representation_estimator.ts +6 -3
  133. package/src/core/api/media_element_track_choice_manager.ts +22 -3
  134. package/src/core/api/public_api.ts +6 -6
  135. package/src/core/api/track_choice_manager.ts +10 -9
  136. package/src/core/eme/__tests__/__global__/utils.ts +5 -10
  137. package/src/core/eme/find_key_system.ts +14 -12
  138. package/src/core/eme/types.ts +2 -2
  139. package/src/core/fetchers/manifest/manifest_fetcher.ts +5 -5
  140. package/src/core/fetchers/segment/segment_fetcher.ts +6 -3
  141. package/src/core/fetchers/utils/try_urls_with_backoff.ts +1 -1
  142. package/src/core/init/initialize_directfile.ts +2 -2
  143. package/src/core/init/initialize_media_source.ts +2 -2
  144. package/src/core/init/manifest_update_scheduler.ts +7 -7
  145. package/src/core/init/stream_events_emitter/are_same_stream_events.ts +4 -4
  146. package/src/core/init/stream_events_emitter/types.ts +2 -2
  147. package/src/core/segment_buffers/implementations/text/html/html_text_segment_buffer.ts +3 -3
  148. package/src/core/segment_buffers/implementations/text/html/text_track_cues_store.ts +32 -31
  149. package/src/core/segment_buffers/implementations/text/native/native_text_segment_buffer.ts +4 -4
  150. package/src/core/stream/representation/force_garbage_collection.ts +3 -5
  151. package/src/errors/request_error.ts +4 -1
  152. package/src/experimental/tools/VideoThumbnailLoader/thumbnail_loader.ts +3 -6
  153. package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +1 -1
  154. package/src/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.ts +3 -3
  155. package/src/experimental/tools/mediaCapabilitiesProber/types.ts +3 -3
  156. package/src/manifest/adaptation.ts +6 -4
  157. package/src/manifest/manifest.ts +10 -10
  158. package/src/manifest/period.ts +3 -3
  159. package/src/manifest/representation.ts +2 -2
  160. package/src/manifest/representation_index/types.ts +18 -18
  161. package/src/manifest/types.ts +3 -3
  162. package/src/parsers/manifest/dash/common/__tests__/manifest_bounds_calculator.test.ts +1 -0
  163. package/src/parsers/manifest/dash/common/get_hdr_information.ts +1 -1
  164. package/src/parsers/manifest/dash/common/get_periods_time_infos.ts +3 -3
  165. package/src/parsers/manifest/dash/common/indexes/base.ts +6 -6
  166. package/src/parsers/manifest/dash/common/indexes/get_init_segment.ts +4 -2
  167. package/src/parsers/manifest/dash/common/indexes/get_segments_from_timeline.ts +2 -2
  168. package/src/parsers/manifest/dash/common/indexes/list.ts +14 -14
  169. package/src/parsers/manifest/dash/common/indexes/template.ts +17 -16
  170. package/src/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.ts +1 -1
  171. package/src/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.ts +50 -22
  172. package/src/parsers/manifest/dash/common/infer_adaptation_type.ts +2 -2
  173. package/src/parsers/manifest/dash/common/manifest_bounds_calculator.ts +1 -1
  174. package/src/parsers/manifest/dash/common/parse_adaptation_sets.ts +58 -70
  175. package/src/parsers/manifest/dash/common/parse_mpd.ts +8 -8
  176. package/src/parsers/manifest/dash/common/parse_periods.ts +80 -79
  177. package/src/parsers/manifest/dash/common/parse_representation_index.ts +83 -75
  178. package/src/parsers/manifest/dash/common/parse_representations.ts +44 -63
  179. package/src/parsers/manifest/dash/node_parser_types.ts +30 -30
  180. package/src/parsers/manifest/dash/parsers_types.ts +3 -3
  181. package/src/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.ts +1 -1
  182. package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +4 -4
  183. package/src/parsers/manifest/smooth/create_parser.ts +23 -21
  184. package/src/parsers/manifest/smooth/representation_index.ts +14 -14
  185. package/src/parsers/manifest/types.ts +28 -28
  186. package/src/parsers/manifest/utils/__tests__/update_segment_timeline.test.ts +31 -33
  187. package/src/parsers/manifest/utils/clear_timeline_from_position.ts +15 -6
  188. package/src/parsers/manifest/utils/index_helpers.ts +2 -2
  189. package/src/parsers/manifest/utils/update_segment_timeline.ts +32 -21
  190. package/src/parsers/texttracks/webvtt/html/to_html.ts +2 -2
  191. package/src/parsers/texttracks/webvtt/parse_cue_block.ts +1 -1
  192. package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +2 -2
  193. package/src/transports/dash/image_pipelines.ts +1 -1
  194. package/src/transports/dash/init_segment_loader.ts +1 -1
  195. package/src/transports/dash/manifest_parser.ts +1 -1
  196. package/src/transports/dash/segment_loader.ts +7 -7
  197. package/src/transports/dash/segment_parser.ts +3 -1
  198. package/src/transports/dash/text_loader.ts +2 -2
  199. package/src/transports/dash/text_parser.ts +3 -1
  200. package/src/transports/local/segment_loader.ts +4 -4
  201. package/src/transports/metaplaylist/manifest_loader.ts +1 -1
  202. package/src/transports/metaplaylist/pipelines.ts +1 -1
  203. package/src/transports/smooth/pipelines.ts +7 -7
  204. package/src/transports/smooth/segment_loader.ts +8 -8
  205. package/src/transports/types.ts +37 -30
  206. package/src/transports/utils/call_custom_manifest_loader.ts +6 -6
  207. package/src/transports/utils/generate_manifest_loader.ts +1 -1
  208. package/src/utils/__tests__/flat_map.test.ts +12 -7
  209. package/src/utils/cancellable_sleep.ts +1 -1
  210. package/src/utils/cast_to_observable.ts +1 -2
  211. package/src/utils/request/fetch.ts +16 -13
  212. package/src/utils/request/xhr.ts +9 -7
  213. package/src/utils/rx-from_cancellable_promise.ts +1 -2
  214. package/tsconfig.json +1 -2
  215. package/tsconfig.modules.json +1 -2
  216. package/dist/_esm5.processed/core/abr/get_estimate_from_buffer_levels.d.ts +0 -29
  217. package/dist/_esm5.processed/core/abr/get_estimate_from_buffer_levels.js +0 -67
  218. package/src/core/abr/get_estimate_from_buffer_levels.ts +0 -85
@@ -22,14 +22,14 @@ export interface IStreamEventData {
22
22
  };
23
23
  }
24
24
  export interface IStreamEventPayload {
25
- id?: string;
25
+ id?: string | undefined;
26
26
  start: number;
27
27
  end: number;
28
28
  data: IStreamEventData;
29
29
  publicEvent: IPublicStreamEvent;
30
30
  }
31
31
  export interface INonFiniteStreamEventPayload {
32
- id?: string;
32
+ id?: string | undefined;
33
33
  start: number;
34
34
  data: IStreamEventData;
35
35
  publicEvent: IPublicNonFiniteStreamEvent;
@@ -124,9 +124,9 @@ export interface INativeTextTracksBufferSegmentData {
124
124
  * This is mostly needed for "sami" subtitles, to know which cues can / should
125
125
  * be parsed.
126
126
  */
127
- language?: string;
127
+ language?: string | undefined;
128
128
  /** start time from which the segment apply, in seconds. */
129
- start?: number;
129
+ start?: number | undefined;
130
130
  /** end time until which the segment apply, in seconds. */
131
- end?: number;
131
+ end?: number | undefined;
132
132
  }
@@ -48,8 +48,8 @@ var TextTrackCuesStore = /** @class */ (function () {
48
48
  var ret = [];
49
49
  // begins at the end as most of the time the player will ask for the last
50
50
  // CuesGroup
51
- for (var i = cuesBuffer.length - 1; i >= 0; i--) {
52
- var segment = cuesBuffer[i];
51
+ for (var cueIdx = cuesBuffer.length - 1; cueIdx >= 0; cueIdx--) {
52
+ var segment = cuesBuffer[cueIdx];
53
53
  if (time < segment.end && time >= segment.start) {
54
54
  var cues = segment.cues;
55
55
  for (var j = 0; j < cues.length; j++) {
@@ -75,10 +75,10 @@ var TextTrackCuesStore = /** @class */ (function () {
75
75
  }
76
76
  var to = Math.max(from, _to);
77
77
  var cuesBuffer = this._cuesBuffer;
78
- for (var i = 0; i < cuesBuffer.length; i++) {
79
- if (cuesBuffer[i].end > from) {
78
+ for (var cueIdx = 0; cueIdx < cuesBuffer.length; cueIdx++) {
79
+ if (cuesBuffer[cueIdx].end > from) {
80
80
  // this cuesInfos is concerned by the remove
81
- var startCuesInfos = cuesBuffer[i];
81
+ var startCuesInfos = cuesBuffer[cueIdx];
82
82
  if (startCuesInfos.start >= to) {
83
83
  // our cuesInfos is strictly after this interval, we have nothing to do
84
84
  return;
@@ -93,8 +93,8 @@ var TextTrackCuesStore = /** @class */ (function () {
93
93
  else {
94
94
  // from -> to is in the middle part of startCuesInfos
95
95
  var _a = removeCuesInfosBetween(startCuesInfos, from, to), cuesInfos1 = _a[0], cuesInfos2 = _a[1];
96
- this._cuesBuffer[i] = cuesInfos1;
97
- cuesBuffer.splice(i + 1, 0, cuesInfos2);
96
+ this._cuesBuffer[cueIdx] = cuesInfos1;
97
+ cuesBuffer.splice(cueIdx + 1, 0, cuesInfos2);
98
98
  }
99
99
  // No cuesInfos can be concerned after this one, we can quit
100
100
  return;
@@ -102,8 +102,8 @@ var TextTrackCuesStore = /** @class */ (function () {
102
102
  // Else remove all part after `from`
103
103
  if (startCuesInfos.start >= from) {
104
104
  // all the segment is concerned
105
- cuesBuffer.splice(i, 1);
106
- i--; // one less element, we have to decrement the loop
105
+ cuesBuffer.splice(cueIdx, 1);
106
+ cueIdx--; // one less element, we have to decrement the loop
107
107
  }
108
108
  else {
109
109
  // only the end is concerned
@@ -187,8 +187,8 @@ var TextTrackCuesStore = /** @class */ (function () {
187
187
  cuesBuffer.splice(indexOfNextCue, 0, cuesInfosToInsert);
188
188
  }
189
189
  }
190
- for (var i = 0; i < cuesBuffer.length; i++) {
191
- var cuesInfos = cuesBuffer[i];
190
+ for (var cueIdx = 0; cueIdx < cuesBuffer.length; cueIdx++) {
191
+ var cuesInfos = cuesBuffer[cueIdx];
192
192
  if (start < cuesInfos.end) {
193
193
  if (areNearlyEqual(start, cuesInfos.start)) {
194
194
  if (areNearlyEqual(end, cuesInfos.end)) {
@@ -198,7 +198,7 @@ var TextTrackCuesStore = /** @class */ (function () {
198
198
  // Result: |AAAAA|
199
199
  // Which means:
200
200
  // 1. replace the current cue with ours
201
- cuesBuffer[i] = cuesInfosToInsert;
201
+ cuesBuffer[cueIdx] = cuesInfosToInsert;
202
202
  return;
203
203
  }
204
204
  else if (end < cuesInfos.end) {
@@ -212,7 +212,7 @@ var TextTrackCuesStore = /** @class */ (function () {
212
212
  // 3. add ours before the current one
213
213
  cuesInfos.cues = getCuesAfter(cuesInfos.cues, end);
214
214
  cuesInfos.start = end;
215
- cuesBuffer.splice(i, 0, cuesInfosToInsert);
215
+ cuesBuffer.splice(cueIdx, 0, cuesInfosToInsert);
216
216
  return;
217
217
  }
218
218
  // our cue goes beyond the current one:
@@ -222,10 +222,10 @@ var TextTrackCuesStore = /** @class */ (function () {
222
222
  // Here we have to delete any cuesInfos which end before ours end,
223
223
  // and see about the following one.
224
224
  do {
225
- cuesBuffer.splice(i, 1);
226
- cuesInfos = cuesBuffer[i];
225
+ cuesBuffer.splice(cueIdx, 1);
226
+ cuesInfos = cuesBuffer[cueIdx];
227
227
  } while (cuesInfos !== undefined && end > cuesInfos.end);
228
- onIndexOfNextCueFound(i);
228
+ onIndexOfNextCueFound(cueIdx);
229
229
  return;
230
230
  }
231
231
  else if (start < cuesInfos.start) {
@@ -236,7 +236,7 @@ var TextTrackCuesStore = /** @class */ (function () {
236
236
  // Result: |AAAAAAA| |BBBB|
237
237
  // Which means:
238
238
  // - add ours before the current one
239
- cuesBuffer.splice(i, 0, cuesInfosToInsert);
239
+ cuesBuffer.splice(cueIdx, 0, cuesInfosToInsert);
240
240
  return;
241
241
  }
242
242
  else if (areNearlyEqual(end, cuesInfos.start)) {
@@ -248,7 +248,7 @@ var TextTrackCuesStore = /** @class */ (function () {
248
248
  // - update start time of the current one to be sure
249
249
  // - add ours before the current one
250
250
  cuesInfos.start = end;
251
- cuesBuffer.splice(i, 0, cuesInfosToInsert);
251
+ cuesBuffer.splice(cueIdx, 0, cuesInfosToInsert);
252
252
  return;
253
253
  }
254
254
  else if (areNearlyEqual(end, cuesInfos.end)) {
@@ -256,7 +256,7 @@ var TextTrackCuesStore = /** @class */ (function () {
256
256
  // the current one: |BBBB|
257
257
  // Result: |AAAAAAA|
258
258
  // Replace
259
- cuesBuffer.splice(i, 1, cuesInfosToInsert);
259
+ cuesBuffer.splice(cueIdx, 1, cuesInfosToInsert);
260
260
  return;
261
261
  }
262
262
  else if (end < cuesInfos.end) {
@@ -265,17 +265,17 @@ var TextTrackCuesStore = /** @class */ (function () {
265
265
  // Result: |AAAAAAABB|
266
266
  cuesInfos.cues = getCuesAfter(cuesInfos.cues, end);
267
267
  cuesInfos.start = end;
268
- cuesBuffer.splice(i, 0, cuesInfosToInsert);
268
+ cuesBuffer.splice(cueIdx, 0, cuesInfosToInsert);
269
269
  return;
270
270
  }
271
271
  // ours: |AAAAAAA|
272
272
  // the current one: |BBB|...
273
273
  // Result: |AAAAAAA|...
274
274
  do {
275
- cuesBuffer.splice(i, 1);
276
- cuesInfos = cuesBuffer[i];
275
+ cuesBuffer.splice(cueIdx, 1);
276
+ cuesInfos = cuesBuffer[cueIdx];
277
277
  } while (cuesInfos !== undefined && end > cuesInfos.end);
278
- onIndexOfNextCueFound(i);
278
+ onIndexOfNextCueFound(cueIdx);
279
279
  return;
280
280
  }
281
281
  // else -> start > cuesInfos.start
@@ -285,7 +285,7 @@ var TextTrackCuesStore = /** @class */ (function () {
285
285
  // Result: |BBAAAAAA|
286
286
  cuesInfos.cues = getCuesBefore(cuesInfos.cues, start);
287
287
  cuesInfos.end = start;
288
- cuesBuffer.splice(i + 1, 0, cuesInfosToInsert);
288
+ cuesBuffer.splice(cueIdx + 1, 0, cuesInfosToInsert);
289
289
  return;
290
290
  }
291
291
  else if (cuesInfos.end > end) {
@@ -293,9 +293,9 @@ var TextTrackCuesStore = /** @class */ (function () {
293
293
  // the current one: |BBBBBBBBBBB|
294
294
  // Result: |BBAAAAAABBB|
295
295
  var _a = removeCuesInfosBetween(cuesInfos, start, end), cuesInfos1 = _a[0], cuesInfos2 = _a[1];
296
- this._cuesBuffer[i] = cuesInfos1;
297
- cuesBuffer.splice(i + 1, 0, cuesInfosToInsert);
298
- cuesBuffer.splice(i + 2, 0, cuesInfos2);
296
+ this._cuesBuffer[cueIdx] = cuesInfos1;
297
+ cuesBuffer.splice(cueIdx + 1, 0, cuesInfosToInsert);
298
+ cuesBuffer.splice(cueIdx + 2, 0, cuesInfos2);
299
299
  return;
300
300
  }
301
301
  else {
@@ -304,12 +304,13 @@ var TextTrackCuesStore = /** @class */ (function () {
304
304
  // Result: |BBAAAAAA|...
305
305
  cuesInfos.cues = getCuesBefore(cuesInfos.cues, start);
306
306
  cuesInfos.end = start;
307
- cuesInfos = cuesBuffer[i + 1];
307
+ var nextCueIdx = cueIdx + 1;
308
+ cuesInfos = cuesBuffer[nextCueIdx];
308
309
  while (cuesInfos !== undefined && end > cuesInfos.end) {
309
- cuesBuffer.splice(i, 1);
310
- cuesInfos = cuesBuffer[i];
310
+ cuesBuffer.splice(nextCueIdx, 1);
311
+ cuesInfos = cuesBuffer[nextCueIdx];
311
312
  }
312
- onIndexOfNextCueFound(i);
313
+ onIndexOfNextCueFound(nextCueIdx);
313
314
  return;
314
315
  }
315
316
  }
@@ -26,7 +26,7 @@ export default class NativeTextSegmentBuffer extends SegmentBuffer {
26
26
  readonly bufferType: "text";
27
27
  private readonly _videoElement;
28
28
  private readonly _track;
29
- private readonly _trackElement?;
29
+ private readonly _trackElement;
30
30
  private _buffered;
31
31
  /**
32
32
  * @param {HTMLMediaElement} videoElement
@@ -74,9 +74,9 @@ export interface INativeTextTracksBufferSegmentData {
74
74
  * This is mostly needed for "sami" subtitles, to know which cues can / should
75
75
  * be parsed.
76
76
  */
77
- language?: string;
77
+ language?: string | undefined;
78
78
  /** start time from which the segment apply, in seconds. */
79
- start?: number;
79
+ start?: number | undefined;
80
80
  /** end time until which the segment apply, in seconds. */
81
- end?: number;
81
+ end?: number | undefined;
82
82
  }
@@ -63,18 +63,17 @@ function selectGCedRanges(position, buffered, gcGap) {
63
63
  var cleanedupRanges = [];
64
64
  // start by trying to remove all ranges that do not contain the
65
65
  // current time and respect the gcGap
66
- // respect the gcGap? FIXME?
67
66
  for (var i = 0; i < outerRanges.length; i++) {
68
67
  var outerRange = outerRanges[i];
69
- if (position - gcGap < outerRange.end) {
68
+ if (position - gcGap > outerRange.end) {
70
69
  cleanedupRanges.push(outerRange);
71
70
  }
72
- else if (position + gcGap > outerRange.start) {
71
+ else if (position + gcGap < outerRange.start) {
73
72
  cleanedupRanges.push(outerRange);
74
73
  }
75
74
  }
76
75
  // try to clean up some space in the current range
77
- if (innerRange != null) {
76
+ if (innerRange !== null) {
78
77
  log.debug("Stream: GC removing part of inner range", cleanedupRanges);
79
78
  if (position - gcGap > innerRange.start) {
80
79
  cleanedupRanges.push({ start: innerRange.start,
@@ -50,7 +50,9 @@ var RequestError = /** @class */ (function (_super) {
50
50
  Object.setPrototypeOf(_this, RequestError.prototype);
51
51
  _this.name = "RequestError";
52
52
  _this.url = url;
53
- _this.xhr = xhr;
53
+ if (xhr !== undefined) {
54
+ _this.xhr = xhr;
55
+ }
54
56
  _this.status = status;
55
57
  _this.type = type;
56
58
  _this.message = type;
@@ -25,8 +25,8 @@ import { ILoaders } from "./types";
25
25
  export default class VideoThumbnailLoader {
26
26
  private readonly _videoElement;
27
27
  private _player;
28
- private _currentTask?;
29
- private _nextTaskSegmentsCompleteIds?;
28
+ private _currentTask;
29
+ private _nextTaskSegmentsCompleteIds;
30
30
  constructor(videoElement: HTMLVideoElement, player: Player);
31
31
  /**
32
32
  * Add imported loader to thumbnail loader loader object.
@@ -13,11 +13,11 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import pinkie from "pinkie";
17
16
  import { catchError, combineLatest, finalize, ignoreElements, lastValueFrom, map, merge as observableMerge, mergeMap, race as observableRace, Subject, take, tap, } from "rxjs";
18
17
  import createSegmentFetcher from "../../../core/fetchers/segment/segment_fetcher";
19
18
  import log from "../../../log";
20
19
  import objectAssign from "../../../utils/object_assign";
20
+ import PPromise from "../../../utils/promise";
21
21
  import { freeRequest } from "./create_request";
22
22
  import getCompleteSegmentId from "./get_complete_segment_id";
23
23
  import getContentInfos from "./get_content_infos";
@@ -26,8 +26,6 @@ import loadSegments from "./load_segments";
26
26
  import pushData from "./push_data";
27
27
  import removeBufferAroundTime$ from "./remove_buffer_around_time";
28
28
  import VideoThumbnailLoaderError from "./video_thumbnail_loader_error";
29
- var PPromise = typeof Promise === "function" ? Promise :
30
- pinkie;
31
29
  var MIN_NEEDED_DATA_AFTER_TIME = 2;
32
30
  var loaders = {};
33
31
  /**
@@ -6,7 +6,7 @@ export interface IProbedMediaConfiguration {
6
6
  globalStatus: ProberStatus;
7
7
  resultsFromAPIS: Array<{
8
8
  APIName: ICapabilitiesTypes;
9
- result?: IResultsFromAPI;
9
+ result?: IResultsFromAPI | undefined;
10
10
  }>;
11
11
  }
12
12
  /**
@@ -80,7 +80,7 @@ function probeMediaConfiguration(config, browserAPIS) {
80
80
  _loop_1(browserAPI);
81
81
  }
82
82
  return PPromise.all(promises).then(function () {
83
- if (globalStatus == null) {
83
+ if (globalStatus === undefined) {
84
84
  globalStatus = ProberStatus.Unknown;
85
85
  }
86
86
  var probedCapabilities = getProbedConfiguration(config, resultsFromAPIS.map(function (a) { return a.APIName; }));
@@ -46,9 +46,9 @@ export interface IDisplayConfiguration {
46
46
  bitsPerComponent?: number;
47
47
  }
48
48
  export interface IMediaConfiguration {
49
- type?: "media-source" | "file";
50
- video?: IVideoConfiguration;
51
- audio?: IAudioConfiguration;
49
+ type?: "media-source" | "file" | undefined;
50
+ video?: IVideoConfiguration | undefined;
51
+ audio?: IAudioConfiguration | undefined;
52
52
  keySystem?: IKeySystem;
53
53
  hdcp?: string;
54
54
  display?: IDisplayConfiguration;
@@ -82,8 +82,8 @@ export default class Adaptation {
82
82
  * @param {Object|undefined} [options]
83
83
  */
84
84
  constructor(parsedAdaptation: IParsedAdaptation, options?: {
85
- representationFilter?: IRepresentationFilter;
86
- isManuallyAdded?: boolean;
85
+ representationFilter?: IRepresentationFilter | undefined;
86
+ isManuallyAdded?: boolean | undefined;
87
87
  });
88
88
  /**
89
89
  * Returns unique bitrate for every Representation in this Adaptation.
@@ -42,8 +42,10 @@ var Adaptation = /** @class */ (function () {
42
42
  var trickModeTracks = parsedAdaptation.trickModeTracks;
43
43
  var representationFilter = options.representationFilter, isManuallyAdded = options.isManuallyAdded;
44
44
  this.id = parsedAdaptation.id;
45
- this.isTrickModeTrack = parsedAdaptation.isTrickModeTrack;
46
45
  this.type = parsedAdaptation.type;
46
+ if (parsedAdaptation.isTrickModeTrack !== undefined) {
47
+ this.isTrickModeTrack = parsedAdaptation.isTrickModeTrack;
48
+ }
47
49
  if (parsedAdaptation.language !== undefined) {
48
50
  this.language = parsedAdaptation.language;
49
51
  this.normalizedLanguage = normalizeLanguage(parsedAdaptation.language);
@@ -56,17 +56,17 @@ interface ISupplementaryTextTrack {
56
56
  /** Options given to the `Manifest` constructor. */
57
57
  interface IManifestParsingOptions {
58
58
  /** Text tracks to add manually to the Manifest instance. */
59
- supplementaryTextTracks?: ISupplementaryTextTrack[];
59
+ supplementaryTextTracks?: ISupplementaryTextTrack[] | undefined;
60
60
  /** Image tracks to add manually to the Manifest instance. */
61
- supplementaryImageTracks?: ISupplementaryImageTrack[];
61
+ supplementaryImageTracks?: ISupplementaryImageTrack[] | undefined;
62
62
  /** External callback peforming an automatic filtering of wanted Representations. */
63
- representationFilter?: IRepresentationFilter;
63
+ representationFilter?: IRepresentationFilter | undefined;
64
64
  /** Optional URL that points to a shorter version of the Manifest used
65
65
  * for updates only. When using this URL for refresh, the manifest will be
66
66
  * updated with the partial update type. If this URL is undefined, then the
67
67
  * manifest will be updated fully when it needs to be refreshed, and it will
68
68
  * fetched through the original URL. */
69
- manifestUpdateUrl?: string;
69
+ manifestUpdateUrl?: string | undefined;
70
70
  }
71
71
  /** Representation affected by a `decipherabilityUpdate` event. */
72
72
  export interface IDecipherabilityUpdateElement {
@@ -154,34 +154,34 @@ export default class Manifest extends EventEmitter<IManifestEvents> {
154
154
  uris: string[];
155
155
  /** Optional URL that points to a shorter version of the Manifest used
156
156
  * for updates only. */
157
- updateUrl?: string;
157
+ updateUrl: string | undefined;
158
158
  /**
159
159
  * Suggested delay from the "live edge" (i.e. the position corresponding to
160
160
  * the current broadcast for a live content) the content is suggested to start
161
161
  * from.
162
162
  * This only applies to live contents.
163
163
  */
164
- suggestedPresentationDelay?: number;
164
+ suggestedPresentationDelay: number | undefined;
165
165
  /**
166
166
  * Amount of time, in seconds, this Manifest is valid from the time when it
167
167
  * has been fetched.
168
168
  * If no lifetime is set, this Manifest does not become invalid after an
169
169
  * amount of time.
170
170
  */
171
- lifetime?: number;
171
+ lifetime: number | undefined;
172
172
  /**
173
173
  * Minimum time, in seconds, at which a segment defined in the Manifest
174
174
  * can begin.
175
175
  * This is also used as an offset for live content to apply to a segment's
176
176
  * time.
177
177
  */
178
- availabilityStartTime?: number;
178
+ availabilityStartTime: number | undefined;
179
179
  /**
180
180
  * It specifies the wall-clock time when the manifest was generated and published
181
181
  * at the origin server. It is present in order to identify different versions
182
182
  * of manifest instances.
183
183
  */
184
- publishTime?: number;
184
+ publishTime: number | undefined;
185
185
  /**
186
186
  * Array containing every minor errors that happened when the Manifest has
187
187
  * been created, in the order they have happened.
@@ -35,12 +35,12 @@ export default class Period {
35
35
  * Duration of this Period, in seconds.
36
36
  * `undefined` for still-running Periods.
37
37
  */
38
- duration?: number;
38
+ duration: number | undefined;
39
39
  /**
40
40
  * Absolute end time of the Period, in seconds.
41
41
  * `undefined` for still-running Periods.
42
42
  */
43
- end?: number;
43
+ end: number | undefined;
44
44
  /**
45
45
  * Array containing every errors that happened when the Period has been
46
46
  * created, in the order they have happened.
@@ -53,7 +53,7 @@ export default class Period {
53
53
  * @param {Object} args
54
54
  * @param {function|undefined} [representationFilter]
55
55
  */
56
- constructor(args: IParsedPeriod, representationFilter?: IRepresentationFilter);
56
+ constructor(args: IParsedPeriod, representationFilter?: IRepresentationFilter | undefined);
57
57
  /**
58
58
  * Returns every `Adaptations` (or `tracks`) linked to that Period, in an
59
59
  * Array.
@@ -40,7 +40,7 @@ declare class Representation {
40
40
  * A string describing the codec used for this Representation.
41
41
  * undefined if we do not know.
42
42
  */
43
- codec?: string;
43
+ codec: string | undefined;
44
44
  /**
45
45
  * A string describing the mime-type for this Representation.
46
46
  * Examples: audio/mp4, video/webm, application/mp4, text/plain
@@ -72,7 +72,7 @@ declare class Representation {
72
72
  * Representation
73
73
  * - if `undefined` there is no certainty on this matter
74
74
  */
75
- decipherable?: boolean;
75
+ decipherable?: boolean | undefined;
76
76
  /** `true` if the Representation is in a supported codec, false otherwise. */
77
77
  isSupported: boolean;
78
78
  /**
@@ -28,14 +28,14 @@ export interface ISmoothInitSegmentPrivateInfos {
28
28
  * as found in the Manifest.
29
29
  */
30
30
  timescale: number;
31
- codecPrivateData?: string;
32
- bitsPerSample?: number;
33
- channels?: number;
34
- packetSize?: number;
35
- samplingRate?: number;
31
+ codecPrivateData?: string | undefined;
32
+ bitsPerSample?: number | undefined;
33
+ channels?: number | undefined;
34
+ packetSize?: number | undefined;
35
+ samplingRate?: number | undefined;
36
36
  protection?: {
37
37
  keyId: Uint8Array;
38
- };
38
+ } | undefined;
39
39
  }
40
40
  /**
41
41
  * Supplementary information specific to Smooth media segments (that is, every
@@ -69,7 +69,7 @@ export interface IMetaPlaylistPrivateInfos {
69
69
  /** The segment originally created by this transport's RepresentationIndex. */
70
70
  originalSegment: ISegment;
71
71
  contentStart: number;
72
- contentEnd?: number;
72
+ contentEnd?: number | undefined;
73
73
  }
74
74
  /**
75
75
  * Supplementary information needed for initialization segments of the "local"
@@ -99,12 +99,12 @@ export interface ILocalManifestSegmentPrivateInfos {
99
99
  * exploited by the corresponding transport logic.
100
100
  */
101
101
  export interface IPrivateInfos {
102
- smoothInitSegment?: ISmoothInitSegmentPrivateInfos;
103
- smoothMediaSegment?: ISmoothSegmentPrivateInfos;
104
- metaplaylistInfos?: IMetaPlaylistPrivateInfos;
105
- localManifestInitSegment?: ILocalManifestInitSegmentPrivateInfos;
106
- localManifestSegment?: ILocalManifestSegmentPrivateInfos;
107
- isEMSGWhitelisted?: (evt: IEMSG) => boolean;
102
+ smoothInitSegment?: ISmoothInitSegmentPrivateInfos | undefined;
103
+ smoothMediaSegment?: ISmoothSegmentPrivateInfos | undefined;
104
+ metaplaylistInfos?: IMetaPlaylistPrivateInfos | undefined;
105
+ localManifestInitSegment?: ILocalManifestInitSegmentPrivateInfos | undefined;
106
+ localManifestSegment?: ILocalManifestSegmentPrivateInfos | undefined;
107
+ isEMSGWhitelisted?: ((evt: IEMSG) => boolean) | undefined;
108
108
  }
109
109
  /** Represent a single Segment from a Representation. */
110
110
  export interface ISegment {
@@ -135,24 +135,24 @@ export interface ISegment {
135
135
  * contain an index describing other Segments
136
136
  * TODO put in privateInfos?
137
137
  */
138
- indexRange?: [number, number];
138
+ indexRange?: [number, number] | undefined;
139
139
  /**
140
140
  * Optional number of the Segment
141
141
  * TODO put in privateInfos?
142
142
  */
143
- number?: number;
143
+ number?: number | undefined;
144
144
  /**
145
145
  * Allows to store supplementary information on a segment that can be later
146
146
  * exploited by the transport logic.
147
147
  */
148
- privateInfos?: IPrivateInfos;
148
+ privateInfos?: IPrivateInfos | undefined;
149
149
  /** Optional byte range to retrieve the Segment from its URL(s) */
150
- range?: [number, number];
150
+ range?: [number, number] | undefined;
151
151
  /**
152
152
  * Estimated time, in seconds, at which the concerned segment should be
153
153
  * offseted when decoded.
154
154
  */
155
- timestampOffset?: number;
155
+ timestampOffset?: number | undefined;
156
156
  /**
157
157
  * Estimated start time for the segment, in seconds.
158
158
  * Note that some rounding errors and some differences between what the
@@ -36,7 +36,7 @@ export interface IHDRInformation {
36
36
  * It is used to ask to the user agent if the color depth is supported by the
37
37
  * output device.
38
38
  */
39
- colorDepth?: number;
39
+ colorDepth?: number | undefined;
40
40
  /**
41
41
  * It is the HDR eotf. It is the transfer function having the video signal as
42
42
  * input and converting it into the linear light output of the display. The
@@ -44,14 +44,14 @@ export interface IHDRInformation {
44
44
  *
45
45
  * It may be used here to ask the MediaSource if it supported.
46
46
  */
47
- eotf?: string;
47
+ eotf?: string | undefined;
48
48
  /**
49
49
  * It is the video color space used for encoding. An HDR content may not have
50
50
  * a wide color gamut.
51
51
  *
52
52
  * It may be used to ask about output device color space support.
53
53
  */
54
- colorSpace?: string;
54
+ colorSpace?: string | undefined;
55
55
  }
56
56
  /** Manifest, as documented in the API documentation. */
57
57
  export interface IExposedManifest {
@@ -38,7 +38,7 @@ export interface IParsedWEBMHDRInformation {
38
38
  *
39
39
  * It may be used to ask about output device color space support.
40
40
  */
41
- colorSpace?: "rec2020";
41
+ colorSpace: "rec2020" | undefined;
42
42
  }
43
43
  /**
44
44
  * Extract the webm HDR information out of the codec string.
@@ -19,16 +19,16 @@ interface IPeriodTimeInformation {
19
19
  /** Time in seconds at which the Period starts. */
20
20
  periodStart: number;
21
21
  /** Difference in seconds between the Period's end and its start. */
22
- periodDuration?: number;
22
+ periodDuration?: number | undefined;
23
23
  /** Time in seconds at which the Period ends. */
24
- periodEnd?: number;
24
+ periodEnd?: number | undefined;
25
25
  }
26
26
  /** Additionnal context needed to retrieve the period time information. */
27
27
  export interface IParsedPeriodsContext {
28
28
  /** Value of MPD@availabilityStartTime. */
29
29
  availabilityStartTime: number;
30
30
  /** Value of MPD@mediaPresentationDuration. */
31
- duration?: number;
31
+ duration?: number | undefined;
32
32
  /** `true` if MPD@type is equal to "dynamic". */
33
33
  isDynamic: boolean;
34
34
  }
@@ -24,7 +24,7 @@ import { IResolvedBaseUrl } from "../resolve_base_urls";
24
24
  */
25
25
  export interface IBaseIndex {
26
26
  /** Byte range for a possible index of segments in the server. */
27
- indexRange?: [number, number];
27
+ indexRange?: [number, number] | undefined;
28
28
  /**
29
29
  * Temporal offset, in the current timescale (see timescale), to add to the
30
30
  * presentation time (time a segment has at decoding time) to obtain the
@@ -43,15 +43,15 @@ export interface IBaseIndex {
43
43
  /** URLs to access the initialization segment. */
44
44
  mediaURLs: string[] | null;
45
45
  /** possible byte range to request it. */
46
- range?: [number, number];
47
- };
46
+ range?: [number, number] | undefined;
47
+ } | undefined;
48
48
  /**
49
49
  * Base URL(s) to access any segment. Can contain tokens to replace to convert
50
50
  * it to real URLs.
51
51
  */
52
52
  mediaURLs: string[] | null;
53
53
  /** Number from which the first segments in this index starts with. */
54
- startNumber?: number;
54
+ startNumber?: number | undefined;
55
55
  /** Every segments defined in this index. */
56
56
  timeline: IIndexSegment[];
57
57
  /**
@@ -100,9 +100,9 @@ export interface IBaseIndexContextArgument {
100
100
  /** Base URL for the Representation concerned. */
101
101
  representationBaseURLs: IResolvedBaseUrl[];
102
102
  /** ID of the Representation concerned. */
103
- representationId?: string;
103
+ representationId?: string | undefined;
104
104
  /** Bitrate of the Representation concerned. */
105
- representationBitrate?: number;
105
+ representationBitrate?: number | undefined;
106
106
  isEMSGWhitelisted: (inbandEvent: IEMSG) => boolean;
107
107
  }
108
108
  export default class BaseRepresentationIndex implements IRepresentationIndex {