rx-player 4.5.0-dev.2026012302 → 4.5.0-dev.2026031700

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 (180) hide show
  1. package/CHANGELOG.md +21 -3
  2. package/VERSION +1 -1
  3. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  4. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  5. package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  6. package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
  7. package/dist/commonjs/compat/should_seek_at_zero.d.ts +12 -0
  8. package/dist/commonjs/compat/should_seek_at_zero.d.ts.map +1 -0
  9. package/dist/commonjs/compat/should_seek_at_zero.js +23 -0
  10. package/dist/commonjs/core/cmcd/cmcd_data_builder.js +2 -2
  11. package/dist/commonjs/core/entry/FreezeResolver.js +2 -2
  12. package/dist/commonjs/core/entry/content_preparer.d.ts +1 -6
  13. package/dist/commonjs/core/entry/content_preparer.d.ts.map +1 -1
  14. package/dist/commonjs/core/entry/content_preparer.js +2 -125
  15. package/dist/commonjs/core/entry/content_time_boundaries_observer.d.ts.map +1 -1
  16. package/dist/commonjs/core/entry/content_time_boundaries_observer.js +8 -0
  17. package/dist/commonjs/core/entry/core_entry.d.ts +1 -1
  18. package/dist/commonjs/core/entry/core_entry.d.ts.map +1 -1
  19. package/dist/commonjs/core/entry/core_entry.js +2 -7
  20. package/dist/commonjs/core/entry/core_text_displayer_interface.d.ts.map +1 -1
  21. package/dist/commonjs/core/entry/core_text_displayer_interface.js +3 -1
  22. package/dist/commonjs/core/entry/index.d.ts +1 -1
  23. package/dist/commonjs/core/entry/index.d.ts.map +1 -1
  24. package/dist/commonjs/core/entry/utils.d.ts +64 -0
  25. package/dist/commonjs/core/entry/utils.d.ts.map +1 -1
  26. package/dist/commonjs/core/entry/utils.js +165 -0
  27. package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts +5 -6
  28. package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts.map +1 -1
  29. package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -1
  30. package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.js +34 -30
  31. package/dist/commonjs/core/stream/representation/encryption_data_notifier.d.ts +70 -0
  32. package/dist/commonjs/core/stream/representation/encryption_data_notifier.d.ts.map +1 -0
  33. package/dist/commonjs/core/stream/representation/encryption_data_notifier.js +107 -0
  34. package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
  35. package/dist/commonjs/core/stream/representation/representation_stream.js +12 -60
  36. package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +1 -1
  37. package/dist/commonjs/default_config.d.ts +5 -0
  38. package/dist/commonjs/default_config.d.ts.map +1 -1
  39. package/dist/commonjs/default_config.js +5 -0
  40. package/dist/commonjs/experimental/features/worker/index.d.ts +2 -1
  41. package/dist/commonjs/experimental/features/worker/index.d.ts.map +1 -1
  42. package/dist/commonjs/experimental/features/worker/index.js +4 -3
  43. package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
  44. package/dist/commonjs/main_thread/api/public_api.js +28 -4
  45. package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
  46. package/dist/commonjs/main_thread/init/directfile_content_initializer.js +23 -1
  47. package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
  48. package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +3 -1
  49. package/dist/commonjs/manifest/classes/index.d.ts +2 -1
  50. package/dist/commonjs/manifest/classes/index.d.ts.map +1 -1
  51. package/dist/commonjs/manifest/classes/representation.d.ts +1 -1
  52. package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
  53. package/dist/commonjs/manifest/classes/representation.js +2 -2
  54. package/dist/commonjs/manifest/classes/representation_index/types.d.ts +2 -2
  55. package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.d.ts.map +1 -1
  56. package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.js +16 -1
  57. package/dist/commonjs/utils/base64.d.ts +15 -1
  58. package/dist/commonjs/utils/base64.d.ts.map +1 -1
  59. package/dist/commonjs/utils/base64.js +6 -0
  60. package/dist/commonjs/utils/ranges.d.ts +1 -1
  61. package/dist/commonjs/utils/ranges.js +1 -1
  62. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  63. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  64. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  65. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  66. package/dist/es2017/compat/should_seek_at_zero.d.ts +12 -0
  67. package/dist/es2017/compat/should_seek_at_zero.d.ts.map +1 -0
  68. package/dist/es2017/compat/should_seek_at_zero.js +20 -0
  69. package/dist/es2017/core/cmcd/cmcd_data_builder.js +2 -2
  70. package/dist/es2017/core/entry/FreezeResolver.js +1 -1
  71. package/dist/es2017/core/entry/content_preparer.d.ts +1 -6
  72. package/dist/es2017/core/entry/content_preparer.d.ts.map +1 -1
  73. package/dist/es2017/core/entry/content_preparer.js +1 -76
  74. package/dist/es2017/core/entry/content_time_boundaries_observer.d.ts.map +1 -1
  75. package/dist/es2017/core/entry/content_time_boundaries_observer.js +8 -0
  76. package/dist/es2017/core/entry/core_entry.d.ts +1 -1
  77. package/dist/es2017/core/entry/core_entry.d.ts.map +1 -1
  78. package/dist/es2017/core/entry/core_entry.js +2 -7
  79. package/dist/es2017/core/entry/core_text_displayer_interface.d.ts.map +1 -1
  80. package/dist/es2017/core/entry/core_text_displayer_interface.js +3 -1
  81. package/dist/es2017/core/entry/index.d.ts +1 -1
  82. package/dist/es2017/core/entry/index.d.ts.map +1 -1
  83. package/dist/es2017/core/entry/utils.d.ts +64 -0
  84. package/dist/es2017/core/entry/utils.d.ts.map +1 -1
  85. package/dist/es2017/core/entry/utils.js +98 -0
  86. package/dist/es2017/core/fetchers/segment/segment_queue.d.ts +5 -6
  87. package/dist/es2017/core/fetchers/segment/segment_queue.d.ts.map +1 -1
  88. package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -1
  89. package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.js +21 -16
  90. package/dist/es2017/core/stream/representation/encryption_data_notifier.d.ts +70 -0
  91. package/dist/es2017/core/stream/representation/encryption_data_notifier.d.ts.map +1 -0
  92. package/dist/es2017/core/stream/representation/encryption_data_notifier.js +80 -0
  93. package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
  94. package/dist/es2017/core/stream/representation/representation_stream.js +10 -38
  95. package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +1 -1
  96. package/dist/es2017/default_config.d.ts +5 -0
  97. package/dist/es2017/default_config.d.ts.map +1 -1
  98. package/dist/es2017/default_config.js +5 -0
  99. package/dist/es2017/experimental/features/worker/index.d.ts +2 -1
  100. package/dist/es2017/experimental/features/worker/index.d.ts.map +1 -1
  101. package/dist/es2017/experimental/features/worker/index.js +2 -3
  102. package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
  103. package/dist/es2017/main_thread/api/public_api.js +28 -4
  104. package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
  105. package/dist/es2017/main_thread/init/directfile_content_initializer.js +23 -1
  106. package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
  107. package/dist/es2017/main_thread/init/utils/initial_seek_and_play.js +3 -1
  108. package/dist/es2017/manifest/classes/index.d.ts +2 -1
  109. package/dist/es2017/manifest/classes/index.d.ts.map +1 -1
  110. package/dist/es2017/manifest/classes/representation.d.ts +1 -1
  111. package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
  112. package/dist/es2017/manifest/classes/representation.js +1 -1
  113. package/dist/es2017/manifest/classes/representation_index/types.d.ts +2 -2
  114. package/dist/es2017/parsers/texttracks/ttml/html/apply_line_height.d.ts.map +1 -1
  115. package/dist/es2017/parsers/texttracks/ttml/html/apply_line_height.js +16 -1
  116. package/dist/es2017/utils/base64.d.ts +15 -1
  117. package/dist/es2017/utils/base64.d.ts.map +1 -1
  118. package/dist/es2017/utils/base64.js +6 -0
  119. package/dist/es2017/utils/ranges.d.ts +1 -1
  120. package/dist/es2017/utils/ranges.js +1 -1
  121. package/dist/mpd-parser.wasm +0 -0
  122. package/dist/worker.js +8 -8
  123. package/package.json +26 -23
  124. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  125. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  126. package/src/compat/should_seek_at_zero.ts +23 -0
  127. package/src/core/adaptive/__tests__/adaptive_representation_selector.test.ts +734 -0
  128. package/src/core/adaptive/__tests__/guess_based_chooser.test.ts +793 -0
  129. package/src/core/adaptive/__tests__/network_analyzer.test.ts +514 -0
  130. package/src/core/adaptive/utils/__tests__/bandwidth_estimator.test.ts +117 -0
  131. package/src/core/adaptive/utils/__tests__/last_estimate_storage.test.ts +76 -0
  132. package/src/core/adaptive/utils/__tests__/pending_requests_store.test.ts +288 -0
  133. package/src/core/adaptive/utils/__tests__/representation_score_calculator.test.ts +249 -0
  134. package/src/core/cmcd/__tests__/cmcd_data_builder.test.ts +464 -0
  135. package/src/core/cmcd/cmcd_data_builder.ts +2 -2
  136. package/src/core/entry/FreezeResolver.ts +1 -1
  137. package/src/core/entry/__tests__/FreezeResolver.test.ts +542 -0
  138. package/src/core/entry/__tests__/content_time_boundaries_observer.test.ts +867 -0
  139. package/src/core/entry/__tests__/core_text_displayer_interface.test.ts +205 -0
  140. package/src/core/entry/__tests__/get_buffered_data_per_media_buffer.test.ts +95 -0
  141. package/src/core/entry/__tests__/track_choice_setter.test.ts +288 -0
  142. package/src/core/entry/__tests__/utils.test.ts +309 -0
  143. package/src/core/entry/content_preparer.ts +7 -118
  144. package/src/core/entry/content_time_boundaries_observer.ts +10 -0
  145. package/src/core/entry/core_entry.ts +7 -14
  146. package/src/core/entry/core_text_displayer_interface.ts +3 -1
  147. package/src/core/entry/index.ts +1 -1
  148. package/src/core/entry/utils.ts +151 -0
  149. package/src/core/fetchers/__tests__/cdn_prioritizer.test.ts +166 -0
  150. package/src/core/fetchers/manifest/__tests__/manifest_fetcher.test.ts +803 -0
  151. package/src/core/fetchers/segment/__tests__/segment_fetcher.test.ts +872 -0
  152. package/src/core/fetchers/segment/__tests__/segment_queue.test.ts +557 -0
  153. package/src/core/fetchers/segment/segment_queue.ts +5 -6
  154. package/src/core/fetchers/thumbnails/__tests__/thumbnail_fetcher.test.ts +435 -0
  155. package/src/core/fetchers/thumbnails/thumbnail_fetcher.ts +28 -20
  156. package/src/core/fetchers/utils/__tests__/schedule_request.test.ts +331 -0
  157. package/src/core/stream/adaptation/__tests__/get_representations_switch_strategy.test.ts +593 -0
  158. package/src/core/stream/period/utils/__tests__/get_adaptation_switch_strategy.test.ts +646 -0
  159. package/src/core/stream/representation/__tests__/encryption_data_notifier.test.ts +531 -0
  160. package/src/core/stream/representation/encryption_data_notifier.ts +122 -0
  161. package/src/core/stream/representation/representation_stream.ts +11 -49
  162. package/src/core/stream/representation/utils/__tests__/append_segment_to_buffer.test.ts +321 -0
  163. package/src/core/stream/representation/utils/__tests__/check_for_discontinuity.test.ts +513 -0
  164. package/src/core/stream/representation/utils/__tests__/get_segment_priority.test.ts +132 -0
  165. package/src/core/stream/representation/utils/__tests__/push_init_segment.test.ts +209 -0
  166. package/src/core/stream/representation/utils/__tests__/push_media_segment.test.ts +343 -0
  167. package/src/core/stream/representation/utils/get_needed_segments.ts +1 -1
  168. package/src/default_config.ts +6 -0
  169. package/src/experimental/features/worker/index.ts +2 -4
  170. package/src/main_thread/api/public_api.ts +33 -4
  171. package/src/main_thread/init/directfile_content_initializer.ts +26 -1
  172. package/src/main_thread/init/utils/initial_seek_and_play.ts +5 -1
  173. package/src/manifest/classes/index.ts +2 -0
  174. package/src/manifest/classes/representation.ts +2 -1
  175. package/src/manifest/classes/representation_index/types.ts +2 -2
  176. package/src/mse/__tests__/main_media_source_interface.test.ts +846 -0
  177. package/src/parsers/texttracks/ttml/html/apply_line_height.ts +16 -1
  178. package/src/utils/__tests__/base64.test.ts +159 -191
  179. package/src/utils/base64.ts +30 -1
  180. package/src/utils/ranges.ts +1 -1
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Determines whether the player should perform an explicit initial seek to 0.
3
+ *
4
+ * In most cases, a media element starts at position 0 and no initial seek is
5
+ * needed. The exception is Safari when playing HLS streams: the native player
6
+ * may start at the live position instead of 0, so performing an explicit seek
7
+ * ensures the player starts from the intended initial position.
8
+ *
9
+ * @returns {boolean} `true` if an explicit initial seek to 0 should be performed.
10
+ */
11
+ export default function shouldPerformInitialSeekToZero(): boolean;
12
+ //# sourceMappingURL=should_seek_at_zero.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"should_seek_at_zero.d.ts","sourceRoot":"","sources":["../../../src/compat/should_seek_at_zero.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,IAAI,OAAO,CAShE"}
@@ -0,0 +1,20 @@
1
+ import config from "../config";
2
+ import EnvDetector from "./env_detector";
3
+ /**
4
+ * Determines whether the player should perform an explicit initial seek to 0.
5
+ *
6
+ * In most cases, a media element starts at position 0 and no initial seek is
7
+ * needed. The exception is Safari when playing HLS streams: the native player
8
+ * may start at the live position instead of 0, so performing an explicit seek
9
+ * ensures the player starts from the intended initial position.
10
+ *
11
+ * @returns {boolean} `true` if an explicit initial seek to 0 should be performed.
12
+ */
13
+ export default function shouldPerformInitialSeekToZero() {
14
+ const { FORCE_INITIAL_SEEK_TO_ZERO } = config.getCurrent();
15
+ if (FORCE_INITIAL_SEEK_TO_ZERO) {
16
+ return FORCE_INITIAL_SEEK_TO_ZERO;
17
+ }
18
+ return (EnvDetector.browser === EnvDetector.BROWSERS.SafariDesktop ||
19
+ EnvDetector.browser === EnvDetector.BROWSERS.SafariMobile);
20
+ }
@@ -271,14 +271,14 @@ export default class CmcdDataBuilder {
271
271
  const val = props[prop];
272
272
  if (val !== undefined) {
273
273
  const formatted = `"${val.replace("\\", "\\\\").replace('"', '\\"')}"`;
274
- const toAdd = `prop=${formatted},`;
274
+ const toAdd = `${prop}=${formatted},`;
275
275
  addPayload(toAdd, headerName);
276
276
  }
277
277
  };
278
278
  const addTokenProperty = (prop, headerName) => {
279
279
  const val = props[prop];
280
280
  if (val !== undefined) {
281
- const toAdd = `prop=${val},`;
281
+ const toAdd = `${prop}=${val},`;
282
282
  addPayload(toAdd, headerName);
283
283
  }
284
284
  };
@@ -1,4 +1,4 @@
1
- import { config } from "../../experimental";
1
+ import config from "../../config";
2
2
  import log from "../../log";
3
3
  import getMonotonicTimeStamp from "../../utils/monotonic_timestamp";
4
4
  /**
@@ -1,7 +1,6 @@
1
1
  import type { IContentInitializationData } from "../../main_thread/types";
2
2
  import type { IManifest } from "../../manifest";
3
3
  import type { IMediaSourceInterface } from "../../mse";
4
- import type { IRepresentationFilter, ISegmentLoader, IManifestLoader } from "../../public_types";
5
4
  import type { IRepresentationEstimator } from "../adaptive";
6
5
  import type { IRepresentationEstimatorThrottlers } from "../adaptive/adaptive_representation_selector";
7
6
  import CmcdDataBuilder from "../cmcd";
@@ -13,6 +12,7 @@ import type { ICoreMessage } from "../types";
13
12
  import CoreTextDisplayerInterface from "./core_text_displayer_interface";
14
13
  import FreezeResolver from "./FreezeResolver";
15
14
  import TrackChoiceSetter from "./track_choice_setter";
15
+ import type { ICorePlugins } from "./utils";
16
16
  /**
17
17
  * Class facilitating the workflows behind loading a new content for the
18
18
  * RxPlayer Core:
@@ -186,9 +186,4 @@ export interface IPreparedContentData {
186
186
  */
187
187
  useMseInWorker: boolean;
188
188
  }
189
- export interface ICorePlugins {
190
- representationFilters: Map<string, IRepresentationFilter>;
191
- segmentLoaders: Map<string, ISegmentLoader>;
192
- manifestLoaders: Map<string, IManifestLoader>;
193
- }
194
189
  //# sourceMappingURL=content_preparer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content_preparer.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/content_preparer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,KAAK,EAEV,qBAAqB,EACrB,cAAc,EACd,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,8CAA8C,CAAC;AACvG,OAAO,eAAe,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,iBAAiB,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAwC,YAAY,EAAE,MAAM,UAAU,CAAC;AAEnF,OAAO,0BAA0B,MAAM,iCAAiC,CAAC;AACzE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,iBAAiB,MAAM,uBAAuB,CAAC;AAMtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAA8B;IACrD;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAgB;IACzC;;;;OAIG;IACH,OAAO,CAAC,4BAA4B,CAAgB;IAEpD,uBAAuB;IACvB,OAAO,CAAC,SAAS,CAAU;IAE3B;;;;;;;;OAQG;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,CAAC;IACnC,0DAA0D;IAC1D,eAAe,EAAE,eAAe,CAAC;IACjC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B;;;OAGG;IACH,uBAAuB,EAAE,wBAAwB,CAAC;IAClD;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,kEAAkE;IAClE,cAAc,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAClD;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,uCAAuC;IACvC,kBAAkB,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB"}
@@ -1,11 +1,8 @@
1
- import { MediaSource_ } from "../../compat/browser_compatibility_types";
2
1
  import features from "../../features";
3
2
  import log from "../../log";
4
- import { createRepresentationFilterFromFnString } from "../../manifest";
5
3
  import MainMediaSourceInterface from "../../mse/main_media_source_interface";
6
4
  import WorkerMediaSourceInterface from "../../mse/worker_media_source_interface";
7
5
  import idGenerator from "../../utils/id_generator";
8
- import isNullOrUndefined from "../../utils/is_null_or_undefined";
9
6
  import TaskCanceller from "../../utils/task_canceller";
10
7
  import createAdaptiveRepresentationSelector from "../adaptive";
11
8
  import CmcdDataBuilder from "../cmcd";
@@ -16,7 +13,7 @@ import SegmentSinksStore from "../segment_sinks";
16
13
  import CoreTextDisplayerInterface from "./core_text_displayer_interface";
17
14
  import FreezeResolver from "./FreezeResolver";
18
15
  import TrackChoiceSetter from "./track_choice_setter";
19
- import { formatErrorForSender } from "./utils";
16
+ import { extractExternalPlugins, formatErrorForSender, updateCodecSupportInWorkerMode, } from "./utils";
20
17
  /** Function allowing to associate a unique identifier to all created `MediaSource` */
21
18
  const generateMediaSourceId = idGenerator();
22
19
  /**
@@ -301,75 +298,3 @@ function createMediaSourceInterfaceAndSegmentSinksStore(sendMessage, contentId,
301
298
  });
302
299
  return [mediaSourceInterface, segmentSinksStore, textSender];
303
300
  }
304
- /**
305
- * Set Representation.isCodecSupportedInWebWorker to true or false
306
- * If the codec is supported in the current context.
307
- * If MSE in worker is not available, the attribute is not set.
308
- */
309
- function updateCodecSupportInWorkerMode(manifestToUpdate) {
310
- var _a, _b;
311
- if (isNullOrUndefined(MediaSource_)) {
312
- return;
313
- }
314
- const codecsMap = new Map();
315
- for (const period of manifestToUpdate.periods) {
316
- const checkedAdaptations = [
317
- ...((_a = period.adaptations.video) !== null && _a !== void 0 ? _a : []),
318
- ...((_b = period.adaptations.audio) !== null && _b !== void 0 ? _b : []),
319
- ];
320
- for (const adaptation of checkedAdaptations) {
321
- for (const representation of adaptation.representations) {
322
- const codec = `${representation.mimeType};codecs="${representation.codecs[0]}"`;
323
- if (codecsMap.has(codec)) {
324
- representation.isCodecSupportedInWebWorker = codecsMap.get(codec);
325
- }
326
- else {
327
- const supported = MediaSource_.isTypeSupported(codec);
328
- representation.isCodecSupportedInWebWorker = supported;
329
- codecsMap.set(codec, supported);
330
- }
331
- }
332
- }
333
- }
334
- }
335
- /**
336
- * Some functions may be defined by the API, we call those "plugins".
337
- * This function parses and extract the actual function from the different
338
- * ways an application can provide it to us.
339
- * @param {Object} input - The API input
340
- * @param {Object} corePlugins - Context on what identified functions are
341
- * defined right now.
342
- * @returns {Function}
343
- */
344
- function extractExternalPlugins(input, corePlugins) {
345
- var _a, _b, _c, _d, _e, _f, _g;
346
- let manifestLoader;
347
- let segmentLoader;
348
- let representationFilter;
349
- if (typeof ((_a = input.representationFilter) === null || _a === void 0 ? void 0 : _a.fn) === "function") {
350
- representationFilter = input.representationFilter.fn;
351
- }
352
- else if (typeof ((_b = input.representationFilter) === null || _b === void 0 ? void 0 : _b.eval) === "string") {
353
- representationFilter = createRepresentationFilterFromFnString(input.representationFilter.eval);
354
- }
355
- else if (typeof ((_c = input.representationFilter) === null || _c === void 0 ? void 0 : _c.workerId) === "string") {
356
- representationFilter = corePlugins.representationFilters.get(input.representationFilter.workerId);
357
- }
358
- if (typeof ((_d = input.manifestLoader) === null || _d === void 0 ? void 0 : _d.fn) === "function") {
359
- manifestLoader = input.manifestLoader.fn;
360
- }
361
- else if (typeof ((_e = input.manifestLoader) === null || _e === void 0 ? void 0 : _e.workerId) === "string") {
362
- manifestLoader = corePlugins.manifestLoaders.get(input.manifestLoader.workerId);
363
- }
364
- if (typeof ((_f = input.segmentLoader) === null || _f === void 0 ? void 0 : _f.fn) === "function") {
365
- segmentLoader = input.segmentLoader.fn;
366
- }
367
- else if (typeof ((_g = input.segmentLoader) === null || _g === void 0 ? void 0 : _g.workerId) === "string") {
368
- segmentLoader = corePlugins.segmentLoaders.get(input.segmentLoader.workerId);
369
- }
370
- return {
371
- manifestLoader,
372
- segmentLoader,
373
- representationFilter,
374
- };
375
- }
@@ -1 +1 @@
1
- {"version":3,"file":"content_time_boundaries_observer.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/content_time_boundaries_observer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,sCAAsC,EACtC,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAEX,OAAO,EACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAMrD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,YAAY,CAAC,mCAAmC,CAAC;IAC1G,mFAAmF;IACnF,OAAO,CAAC,UAAU,CAAgB;IAElC,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAAuC;IAE7D,2DAA2D;IAC3D,OAAO,CAAC,SAAS,CAAY;IAE7B,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DAA0D;IAC1D,YAAY,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,oBAAoB,EAAE,0BAA0B,CAAC;IACjD;;;;;;;;;OASG;IACH,WAAW,EAAE,IAAI,CAAC;IAClB;;;;;;;;;OASG;IACH,YAAY,EAAE,IAAI,CAAC;CACpB;AAgPD,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACxD,sCAAsC,EACtC,UAAU,CACX,CAAC"}
1
+ {"version":3,"file":"content_time_boundaries_observer.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/content_time_boundaries_observer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,sCAAsC,EACtC,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAEX,OAAO,EACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAMrD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,YAAY,CAAC,mCAAmC,CAAC;IAC1G,mFAAmF;IACnF,OAAO,CAAC,UAAU,CAAgB;IAElC,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAAuC;IAE7D,2DAA2D;IAC3D,OAAO,CAAC,SAAS,CAAY;IAE7B,uEAAuE;IACvE,OAAO,CAAC,0BAA0B,CAA4B;IAE9D,kEAAkE;IAClE,OAAO,CAAC,eAAe,CAAgB;IAEvC;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB,CAAgB;IAE5C;;;OAGG;gBAED,QAAQ,EAAE,SAAS,EACnB,gBAAgB,EAAE,yBAAyB,CAAC,sCAAsC,CAAC,EACnF,WAAW,EAAE,WAAW,EAAE;IAsE5B;;;;OAIG;IACI,oBAA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@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { MediaError } from "../../errors";
17
+ import arrayIncludes from "../../utils/array_includes";
17
18
  import EventEmitter from "../../utils/event_emitter";
18
19
  import isNullOrUndefined from "../../utils/is_null_or_undefined";
19
20
  import queueMicrotask from "../../utils/queue_microtask";
@@ -49,6 +50,13 @@ export default class ContentTimeBoundariesObserver extends EventEmitter {
49
50
  * whole content.
50
51
  */
51
52
  const maximumPositionCalculator = new MaximumPositionCalculator(manifest);
53
+ // Indicate directly that no Adaptation of a particular type will be set
54
+ if (!arrayIncludes(this._allBufferTypes, "video")) {
55
+ maximumPositionCalculator.updateLastVideoAdaptation(null);
56
+ }
57
+ if (!arrayIncludes(this._allBufferTypes, "audio")) {
58
+ maximumPositionCalculator.updateLastAudioAdaptation(null);
59
+ }
52
60
  this._maximumPositionCalculator = maximumPositionCalculator;
53
61
  const cancelSignal = this._canceller.signal;
54
62
  // As the following code may send events synchronously, which would not be
@@ -1,7 +1,7 @@
1
1
  import type { IMainThreadMessage } from "../../main_thread/types";
2
2
  import SharedReference from "../../utils/reference";
3
3
  import type { ICoreMessage, IResolutionInfo } from "../types";
4
- import type { ICorePlugins } from "./content_preparer";
4
+ import type { ICorePlugins } from "./utils";
5
5
  export type IMessageReceiverCallback = (evt: {
6
6
  data: IMainThreadMessage;
7
7
  }) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"core_entry.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/core_entry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,eAAe,MAAM,uBAAuB,CAAC;AAQpD,OAAO,KAAK,EACV,YAAY,EAEZ,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQvD,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,kBAAkB,CAA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EAC1D,WAAW,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,EACxE,WAAW,EAAE,YAAY,GACxB,IAAI,CA2ZN;AA8vBD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACvD,iFAAiF;IACjF,cAAc,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACxC,oFAAoF;IACpF,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,oEAAoE;IACpE,kBAAkB,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC5C,oBAAoB,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,+DAA+D;IAC/D,iBAAiB,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAC5C"}
@@ -17,8 +17,7 @@ import ContentPreparer from "./content_preparer";
17
17
  import createContentTimeBoundariesObserver from "./create_content_time_boundaries_observer";
18
18
  import getBufferedDataPerMediaBuffer from "./get_buffered_data_per_media_buffer";
19
19
  import getThumbnailData from "./get_thumbnail_data";
20
- import synchronizeSegmentSinksOnObservation from "./synchronize_sinks_on_observation";
21
- import { formatErrorForSender } from "./utils";
20
+ import { formatErrorForSender, synchronizeSegmentSinksOnObservation } from "./utils";
22
21
  /**
23
22
  * Initialize a `CoreEntry`, which is the part of the RxPlayer acting as an
24
23
  * entry point to all its "core" code.
@@ -561,11 +560,6 @@ function loadPreparedContent(sendMessage, val, contentPreparer, playbackObservat
561
560
  },
562
561
  adaptationChange(value) {
563
562
  var _a, _b;
564
- contentTimeBoundariesObserver.onAdaptationChange(value.type, value.period, value.adaptation);
565
- if (currentLoadCanceller === null ||
566
- currentLoadCanceller.signal.isCancelled()) {
567
- return;
568
- }
569
563
  sendMessage({
570
564
  type: "adaptation-changed" /* CoreMessageType.AdaptationChanged */,
571
565
  contentId,
@@ -575,6 +569,7 @@ function loadPreparedContent(sendMessage, val, contentPreparer, playbackObservat
575
569
  type: value.type,
576
570
  },
577
571
  });
572
+ contentTimeBoundariesObserver.onAdaptationChange(value.type, value.period, value.adaptation);
578
573
  },
579
574
  representationChange(value) {
580
575
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"core_text_displayer_interface.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/core_text_displayer_interface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAGlB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,0BAA2B,YAAW,uBAAuB;IAChF,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAoD;IACnE,OAAO,EAAE;QACd,YAAY,EAAE,KAAK,CAAC;YAClB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;YACpC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;SAChC,CAAC,CAAC;QACH,MAAM,EAAE,KAAK,CAAC;YACZ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;YACpC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;SAChC,CAAC,CAAC;KACJ,CAAC;IAEF;;;OAGG;gBAED,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,CAAC,GAAG,EAAE,kCAAkC,KAAK,IAAI;IAOlE;;OAEG;IACI,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWjE;;OAEG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAW5D;;OAEG;IACI,KAAK,IAAI,IAAI;IASpB;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAS7C,OAAO,CAAC,kBAAkB;IAa1B;;OAEG;IACI,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IASnD;;OAEG;IACI,kBAAkB,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI;IAS3C;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAS9C;;OAEG;IACI,aAAa,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI;CAQvC;AAED,KAAK,kCAAkC,GACnC,wBAAwB,GACxB,0BAA0B,GAC1B,6BAA6B,GAC7B,8BAA8B,CAAC"}
1
+ {"version":3,"file":"core_text_displayer_interface.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/core_text_displayer_interface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAGlB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,0BAA2B,YAAW,uBAAuB;IAChF,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAoD;IACnE,OAAO,EAAE;QACd,YAAY,EAAE,KAAK,CAAC;YAClB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;YACpC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;SAChC,CAAC,CAAC;QACH,MAAM,EAAE,KAAK,CAAC;YACZ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;YACpC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;SAChC,CAAC,CAAC;KACJ,CAAC;IAEF;;;OAGG;gBAED,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,CAAC,GAAG,EAAE,kCAAkC,KAAK,IAAI;IAOlE;;OAEG;IACI,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWjE;;OAEG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAW5D;;OAEG;IACI,KAAK,IAAI,IAAI;IASpB;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAS7C,OAAO,CAAC,kBAAkB;IAe1B;;OAEG;IACI,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IASnD;;OAEG;IACI,kBAAkB,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI;IAS3C;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAS9C;;OAEG;IACI,aAAa,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI;CAQvC;AAED,KAAK,kCAAkC,GACnC,wBAAwB,GACxB,0BAA0B,GAC1B,6BAA6B,GAC7B,8BAA8B,CAAC"}
@@ -69,9 +69,11 @@ export default class CoreTextDisplayerInterface {
69
69
  this._queues.pushTextData.forEach((elt) => {
70
70
  elt.reject(error);
71
71
  });
72
+ this._queues.pushTextData.length = 0;
72
73
  this._queues.remove.forEach((elt) => {
73
74
  elt.reject(error);
74
75
  });
76
+ this._queues.remove.length = 0;
75
77
  }
76
78
  /**
77
79
  * @param {Array.<Object>} ranges
@@ -110,7 +112,7 @@ export default class CoreTextDisplayerInterface {
110
112
  * @param {unknown} err
111
113
  */
112
114
  onRemoveError(err) {
113
- const element = this._queues.pushTextData.shift();
115
+ const element = this._queues.remove.shift();
114
116
  if (element === undefined) {
115
117
  log.error("text", "pushTextData error for inexistant operation");
116
118
  return;
@@ -2,5 +2,5 @@ import type { IMessageReceiverCallback } from "./core_entry";
2
2
  import initializeCoreEntry from "./core_entry";
3
3
  export default initializeCoreEntry;
4
4
  export type { IMessageReceiverCallback };
5
- export type { ICorePlugins } from "./content_preparer";
5
+ export type { ICorePlugins } from "./utils";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAC/C,eAAe,mBAAmB,CAAC;AACnC,YAAY,EAAE,wBAAwB,EAAE,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,mBAAmB,MAAM,cAAc,CAAC;AAC/C,eAAe,mBAAmB,CAAC;AACnC,YAAY,EAAE,wBAAwB,EAAE,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -1,3 +1,67 @@
1
+ import type { ICorePlaybackObservation } from "../../main_thread/init/utils/create_core_playback_observer";
2
+ import type Manifest from "../../manifest/classes";
3
+ import type { IManifestLoader, IRepresentationFilter, ISegmentLoader } from "../../public_types";
4
+ import type SegmentSinksStore from "../segment_sinks";
1
5
  import type { ISentError } from "../types";
6
+ /**
7
+ * "Plugins" are a specific kind of API where an application can define complex
8
+ * functions that the RxPlayer will call in some normally-core aspects of media
9
+ * playback: e.g. loading segments.
10
+ *
11
+ * This interface lists them.
12
+ */
13
+ export interface ICorePlugins {
14
+ representationFilters: Map<string, IRepresentationFilter>;
15
+ segmentLoaders: Map<string, ISegmentLoader>;
16
+ manifestLoaders: Map<string, IManifestLoader>;
17
+ }
18
+ /**
19
+ * Format an error, which may be of any form, into an Object than can easily be
20
+ * serialized - e.g. to be communicated through a postMessage-like API.
21
+ * @param {*} error - The error to serialized
22
+ * @returns {Object} - A serialization-safe error format
23
+ */
2
24
  export declare function formatErrorForSender(error: unknown): ISentError;
25
+ /**
26
+ * Synchronize SegmentSinks with what has been buffered.
27
+ * @param {Object} observation - The just-received playback observation,
28
+ * including what has been buffered on lower-level buffers
29
+ * @param {Object} segmentSinksStore - Interface allowing to interact
30
+ * with `SegmentSink`s, so their inventory can be updated accordingly.
31
+ */
32
+ export declare function synchronizeSegmentSinksOnObservation(observation: ICorePlaybackObservation, segmentSinksStore: SegmentSinksStore): void;
33
+ /**
34
+ * Set Representation.isCodecSupportedInWebWorker to true or false
35
+ * If the codec is supported in the current context.
36
+ * If MSE in worker is not available, the attribute is not set.
37
+ */
38
+ export declare function updateCodecSupportInWorkerMode(manifestToUpdate: Manifest): void;
39
+ /**
40
+ * Some functions may be defined by the API, we call those "plugins".
41
+ * This function parses and extract the actual function from the different
42
+ * ways an application can provide it to us.
43
+ * @param {Object} input - The API input
44
+ * @param {Object} corePlugins - Context on what identified functions are
45
+ * defined right now.
46
+ * @returns {Function}
47
+ */
48
+ export declare function extractExternalPlugins(input: {
49
+ manifestLoader: {
50
+ fn?: IManifestLoader | undefined;
51
+ workerId?: string | undefined;
52
+ } | undefined;
53
+ segmentLoader: {
54
+ fn?: ISegmentLoader | undefined;
55
+ workerId?: string | undefined;
56
+ } | undefined;
57
+ representationFilter: undefined | {
58
+ fn?: IRepresentationFilter | undefined;
59
+ eval?: string | undefined;
60
+ workerId?: string | undefined;
61
+ };
62
+ }, corePlugins: ICorePlugins): {
63
+ manifestLoader: IManifestLoader | undefined;
64
+ segmentLoader: ISegmentLoader | undefined;
65
+ representationFilter: IRepresentationFilter | undefined;
66
+ };
3
67
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAO/D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/core/entry/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAE3G,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,iBAAiB,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAC1D,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAO/D;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,wBAAwB,EACrC,iBAAiB,EAAE,iBAAiB,GACnC,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,gBAAgB,EAAE,QAAQ,QAwBxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE;IACL,cAAc,EACV;QACE,EAAE,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;QACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/B,GACD,SAAS,CAAC;IACd,aAAa,EACT;QACE,EAAE,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/B,GACD,SAAS,CAAC;IACd,oBAAoB,EAChB,SAAS,GACT;QACE,EAAE,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;QACvC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/B,CAAC;CACP,EACD,WAAW,EAAE,YAAY,GACxB;IACD,cAAc,EAAE,eAAe,GAAG,SAAS,CAAC;IAC5C,aAAa,EAAE,cAAc,GAAG,SAAS,CAAC;IAC1C,oBAAoB,EAAE,qBAAqB,GAAG,SAAS,CAAC;CACzD,CAgCA"}
@@ -1,4 +1,13 @@
1
+ import { MediaSource_ } from "../../compat/browser_compatibility_types";
1
2
  import { formatError } from "../../errors";
3
+ import { createRepresentationFilterFromFnString } from "../../manifest";
4
+ import isNullOrUndefined from "../../utils/is_null_or_undefined";
5
+ /**
6
+ * Format an error, which may be of any form, into an Object than can easily be
7
+ * serialized - e.g. to be communicated through a postMessage-like API.
8
+ * @param {*} error - The error to serialized
9
+ * @returns {Object} - A serialization-safe error format
10
+ */
2
11
  export function formatErrorForSender(error) {
3
12
  const formattedError = formatError(error, {
4
13
  defaultCode: "NONE",
@@ -6,3 +15,92 @@ export function formatErrorForSender(error) {
6
15
  });
7
16
  return formattedError.serialize();
8
17
  }
18
+ /**
19
+ * Synchronize SegmentSinks with what has been buffered.
20
+ * @param {Object} observation - The just-received playback observation,
21
+ * including what has been buffered on lower-level buffers
22
+ * @param {Object} segmentSinksStore - Interface allowing to interact
23
+ * with `SegmentSink`s, so their inventory can be updated accordingly.
24
+ */
25
+ export function synchronizeSegmentSinksOnObservation(observation, segmentSinksStore) {
26
+ // Synchronize SegmentSinks with what has been buffered.
27
+ ["video", "audio", "text"].forEach((tType) => {
28
+ var _a;
29
+ const segmentSinkStatus = segmentSinksStore.getStatus(tType);
30
+ if (segmentSinkStatus.type === "initialized") {
31
+ segmentSinkStatus.value.synchronizeInventory((_a = observation.buffered[tType]) !== null && _a !== void 0 ? _a : []);
32
+ }
33
+ });
34
+ }
35
+ /**
36
+ * Set Representation.isCodecSupportedInWebWorker to true or false
37
+ * If the codec is supported in the current context.
38
+ * If MSE in worker is not available, the attribute is not set.
39
+ */
40
+ export function updateCodecSupportInWorkerMode(manifestToUpdate) {
41
+ var _a, _b;
42
+ if (isNullOrUndefined(MediaSource_)) {
43
+ return;
44
+ }
45
+ const codecsMap = new Map();
46
+ for (const period of manifestToUpdate.periods) {
47
+ const checkedAdaptations = [
48
+ ...((_a = period.adaptations.video) !== null && _a !== void 0 ? _a : []),
49
+ ...((_b = period.adaptations.audio) !== null && _b !== void 0 ? _b : []),
50
+ ];
51
+ for (const adaptation of checkedAdaptations) {
52
+ for (const representation of adaptation.representations) {
53
+ const codec = `${representation.mimeType};codecs="${representation.codecs[0]}"`;
54
+ if (codecsMap.has(codec)) {
55
+ representation.isCodecSupportedInWebWorker = codecsMap.get(codec);
56
+ }
57
+ else {
58
+ const supported = MediaSource_.isTypeSupported(codec);
59
+ representation.isCodecSupportedInWebWorker = supported;
60
+ codecsMap.set(codec, supported);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ /**
67
+ * Some functions may be defined by the API, we call those "plugins".
68
+ * This function parses and extract the actual function from the different
69
+ * ways an application can provide it to us.
70
+ * @param {Object} input - The API input
71
+ * @param {Object} corePlugins - Context on what identified functions are
72
+ * defined right now.
73
+ * @returns {Function}
74
+ */
75
+ export function extractExternalPlugins(input, corePlugins) {
76
+ var _a, _b, _c, _d, _e, _f, _g;
77
+ let manifestLoader;
78
+ let segmentLoader;
79
+ let representationFilter;
80
+ if (typeof ((_a = input.representationFilter) === null || _a === void 0 ? void 0 : _a.fn) === "function") {
81
+ representationFilter = input.representationFilter.fn;
82
+ }
83
+ else if (typeof ((_b = input.representationFilter) === null || _b === void 0 ? void 0 : _b.eval) === "string") {
84
+ representationFilter = createRepresentationFilterFromFnString(input.representationFilter.eval);
85
+ }
86
+ else if (typeof ((_c = input.representationFilter) === null || _c === void 0 ? void 0 : _c.workerId) === "string") {
87
+ representationFilter = corePlugins.representationFilters.get(input.representationFilter.workerId);
88
+ }
89
+ if (typeof ((_d = input.manifestLoader) === null || _d === void 0 ? void 0 : _d.fn) === "function") {
90
+ manifestLoader = input.manifestLoader.fn;
91
+ }
92
+ else if (typeof ((_e = input.manifestLoader) === null || _e === void 0 ? void 0 : _e.workerId) === "string") {
93
+ manifestLoader = corePlugins.manifestLoaders.get(input.manifestLoader.workerId);
94
+ }
95
+ if (typeof ((_f = input.segmentLoader) === null || _f === void 0 ? void 0 : _f.fn) === "function") {
96
+ segmentLoader = input.segmentLoader.fn;
97
+ }
98
+ else if (typeof ((_g = input.segmentLoader) === null || _g === void 0 ? void 0 : _g.workerId) === "string") {
99
+ segmentLoader = corePlugins.segmentLoaders.get(input.segmentLoader.workerId);
100
+ }
101
+ return {
102
+ manifestLoader,
103
+ segmentLoader,
104
+ representationFilter,
105
+ };
106
+ }
@@ -141,8 +141,8 @@ export interface ISegmentQueueEvent<T> {
141
141
  * You can now push that segment to its corresponding buffer and use its parsed
142
142
  * metadata.
143
143
  *
144
- * Only sent if an initialization segment exists (when the `SegmentQueue`'s
145
- * `hasInitSegment` constructor option has been set to `true`).
144
+ * Only sent if an initialization segment exists (when the `hasInitSegment`
145
+ * option has been set to `true`).
146
146
  * In that case, an `IParsedInitSegmentEvent` will always be sent before any
147
147
  * `IParsedSegmentEvent` event is sent.
148
148
  */
@@ -151,10 +151,9 @@ export interface ISegmentQueueEvent<T> {
151
151
  * Notify that a media chunk (decodable sub-part of a media segment) has been
152
152
  * loaded and parsed.
153
153
  *
154
- * If an initialization segment exists (when the `SegmentQueue`'s
155
- * `hasInitSegment` constructor option has been set to `true`), an
156
- * `IParsedSegmentEvent` will always be sent AFTER the `IParsedInitSegmentEvent`
157
- * event.
154
+ * If an initialization segment exists (when the `hasInitSegment` option has
155
+ * been set to `true`), an `IParsedSegmentEvent` will always be sent AFTER
156
+ * the `IParsedInitSegmentEvent` event.
158
157
  *
159
158
  * It can now be pushed to its corresponding buffer. Note that there might be
160
159
  * multiple `IParsedSegmentEvent` for a single segment, if that segment is
@@ -1 +1 @@
1
- {"version":3,"file":"segment_queue.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/segment/segment_queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAGxD,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,CAAC,CAAE,SAAQ,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC9E,uCAAuC;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nB,CAAC;AACF,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,8BAA8B,CAAC,CAAC,CAAC,GAAG;IACzE,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AACF,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;OAUG;IACH,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;IAEnC;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAcD,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,UAAU,EAAE,WAAW,CAAC;IACxB,wDAAwD;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,sDAAsD;IACtD,MAAM,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,cAAc,EAAE,eAAe,CAAC;CACjC"}
1
+ {"version":3,"file":"segment_queue.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/segment/segment_queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,YAAY,MAAM,8BAA8B,CAAC;AAGxD,OAAO,eAAe,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;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AAC;IACjB;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,+CAA+C;AAC/C,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,6BAA6B,CAAC,CAAC,CAAC,GAAG;IAC5E,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AACF,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,8BAA8B,CAAC,CAAC,CAAC,GAAG;IACzE,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AACF,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;OAUG;IACH,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;IAEnC;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAcD,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,UAAU,EAAE,WAAW,CAAC;IACxB,wDAAwD;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,sDAAsD;IACtD,MAAM,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,cAAc,EAAE,eAAe,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"thumbnail_fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/thumbnails/thumbnail_fetcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAGV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAIrD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB;AAC5C,gEAAgE;AAChE,QAAQ,EAAE,kBAAkB;AAC5B;;;;;;;GAOG;AACH,cAAc,EAAE,cAAc,GAAG,IAAI,GAEpC,iBAAiB,CAsNnB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG;AAC9B,gDAAgD;AAChD,gBAAgB,EAAE;IAChB,2BAA2B;IAC3B,OAAO,EAAE,QAAQ,CAAC;IAClB,+CAA+C;IAC/C,KAAK,EAAE,eAAe,CAAC;IACvB,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,yDAAyD;AACzD,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,8EAA8E;AAC9E,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}
1
+ {"version":3,"file":"thumbnail_fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/thumbnails/thumbnail_fetcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAIV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAIrD;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB;AAC5C,gEAAgE;AAChE,QAAQ,EAAE,kBAAkB;AAC5B;;;;;;;GAOG;AACH,cAAc,EAAE,cAAc,GAAG,IAAI,GAEpC,iBAAiB,CA6NnB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG;AAC9B,gDAAgD;AAChD,gBAAgB,EAAE;IAChB,2BAA2B;IAC3B,OAAO,EAAE,QAAQ,CAAC;IAClB,+CAA+C;IAC/C,KAAK,EAAE,eAAe,CAAC;IACvB,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,yDAAyD;AACzD,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,8EAA8E;AAC9E,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}