rx-player 4.0.0-dev.2024022300 → 4.0.0-dev.2024022600

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 (188) hide show
  1. package/VERSION +1 -1
  2. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  3. package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
  4. package/dist/commonjs/core/main/worker/worker_main.js +9 -8
  5. package/dist/commonjs/features/features_object.js +1 -1
  6. package/dist/commonjs/features/list/dash.js +2 -2
  7. package/dist/commonjs/features/types.d.ts +3 -8
  8. package/dist/commonjs/main_thread/api/public_api.js +7 -2
  9. package/dist/commonjs/multithread_types.d.ts +1 -1
  10. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +3 -4
  11. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +4 -11
  12. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +1 -2
  13. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +3 -12
  14. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +2 -3
  15. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +11 -22
  16. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +2 -11
  17. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +3 -74
  18. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +1 -2
  19. package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +1 -3
  20. package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts +3 -5
  21. package/dist/commonjs/public_types.d.ts +1 -1
  22. package/dist/commonjs/transports/dash/manifest_parser.js +4 -33
  23. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  24. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  25. package/dist/es2017/core/main/worker/worker_main.js +9 -8
  26. package/dist/es2017/features/features_object.js +1 -1
  27. package/dist/es2017/features/list/dash.js +2 -2
  28. package/dist/es2017/features/types.d.ts +3 -8
  29. package/dist/es2017/main_thread/api/public_api.js +7 -2
  30. package/dist/es2017/multithread_types.d.ts +1 -1
  31. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +3 -4
  32. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +5 -12
  33. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +1 -2
  34. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +4 -13
  35. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +2 -3
  36. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +11 -22
  37. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +2 -11
  38. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +2 -49
  39. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +1 -2
  40. package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +1 -3
  41. package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts +3 -5
  42. package/dist/es2017/public_types.d.ts +1 -1
  43. package/dist/es2017/transports/dash/manifest_parser.js +4 -33
  44. package/dist/mpd-parser.wasm +0 -0
  45. package/dist/rx-player.js +65 -141
  46. package/dist/rx-player.min.js +1 -1
  47. package/dist/worker.js +3 -8
  48. package/package.json +1 -1
  49. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.d.ts +0 -17
  50. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.js +0 -19
  51. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +0 -24
  52. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +0 -400
  53. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +0 -24
  54. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +0 -33
  55. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +0 -23
  56. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +0 -70
  57. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +0 -22
  58. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +0 -118
  59. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +0 -23
  60. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +0 -154
  61. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +0 -22
  62. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +0 -70
  63. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +0 -23
  64. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +0 -221
  65. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +0 -23
  66. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +0 -179
  67. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +0 -22
  68. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +0 -256
  69. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +0 -23
  70. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +0 -152
  71. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +0 -22
  72. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +0 -60
  73. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +0 -24
  74. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +0 -125
  75. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +0 -22
  76. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +0 -36
  77. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +0 -24
  78. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +0 -82
  79. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +0 -176
  80. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +0 -382
  81. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +0 -24
  82. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +0 -142
  83. package/dist/commonjs/utils/xml-parser.d.ts +0 -70
  84. package/dist/commonjs/utils/xml-parser.js +0 -357
  85. package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.d.ts +0 -17
  86. package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.js +0 -17
  87. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +0 -24
  88. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +0 -358
  89. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +0 -24
  90. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +0 -30
  91. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +0 -23
  92. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +0 -45
  93. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +0 -22
  94. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +0 -77
  95. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +0 -23
  96. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +0 -101
  97. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +0 -22
  98. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +0 -45
  99. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +0 -23
  100. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +0 -179
  101. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +0 -23
  102. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +0 -137
  103. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +0 -22
  104. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +0 -214
  105. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +0 -23
  106. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +0 -111
  107. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +0 -22
  108. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +0 -41
  109. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +0 -24
  110. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +0 -84
  111. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +0 -22
  112. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +0 -33
  113. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +0 -24
  114. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +0 -57
  115. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +0 -176
  116. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +0 -310
  117. package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +0 -24
  118. package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +0 -114
  119. package/dist/es2017/utils/xml-parser.d.ts +0 -70
  120. package/dist/es2017/utils/xml-parser.js +0 -322
  121. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/index.d.ts +0 -0
  122. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/index.js +0 -0
  123. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/AdaptationSet.d.ts +0 -0
  124. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/AdaptationSet.js +0 -0
  125. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/BaseURL.d.ts +0 -0
  126. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/BaseURL.js +0 -0
  127. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentComponent.d.ts +0 -0
  128. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentComponent.js +0 -0
  129. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentProtection.d.ts +0 -0
  130. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentProtection.js +0 -0
  131. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/EventStream.d.ts +0 -0
  132. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/EventStream.js +0 -0
  133. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Initialization.d.ts +0 -0
  134. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Initialization.js +0 -0
  135. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/MPD.d.ts +0 -0
  136. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/MPD.js +0 -0
  137. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Period.d.ts +0 -0
  138. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Period.js +0 -0
  139. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Representation.d.ts +0 -0
  140. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Representation.js +0 -0
  141. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentBase.d.ts +0 -0
  142. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentBase.js +0 -0
  143. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentList.d.ts +0 -0
  144. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentList.js +0 -0
  145. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTemplate.d.ts +0 -0
  146. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTemplate.js +0 -0
  147. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTimeline.d.ts +0 -0
  148. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTimeline.js +0 -0
  149. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentURL.d.ts +0 -0
  150. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentURL.js +0 -0
  151. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/utils.d.ts +0 -0
  152. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/utils.js +0 -0
  153. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/parse_from_document.d.ts +0 -0
  154. /package/dist/commonjs/parsers/manifest/dash/{native-parser → js-parser}/parse_from_document.js +0 -0
  155. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/index.d.ts +0 -0
  156. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/index.js +0 -0
  157. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/AdaptationSet.d.ts +0 -0
  158. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/AdaptationSet.js +0 -0
  159. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/BaseURL.d.ts +0 -0
  160. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/BaseURL.js +0 -0
  161. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentComponent.d.ts +0 -0
  162. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentComponent.js +0 -0
  163. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentProtection.d.ts +0 -0
  164. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/ContentProtection.js +0 -0
  165. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/EventStream.d.ts +0 -0
  166. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/EventStream.js +0 -0
  167. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Initialization.d.ts +0 -0
  168. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Initialization.js +0 -0
  169. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/MPD.d.ts +0 -0
  170. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/MPD.js +0 -0
  171. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Period.d.ts +0 -0
  172. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Period.js +0 -0
  173. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Representation.d.ts +0 -0
  174. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/Representation.js +0 -0
  175. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentBase.d.ts +0 -0
  176. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentBase.js +0 -0
  177. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentList.d.ts +0 -0
  178. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentList.js +0 -0
  179. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTemplate.d.ts +0 -0
  180. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTemplate.js +0 -0
  181. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTimeline.d.ts +0 -0
  182. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentTimeline.js +0 -0
  183. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentURL.d.ts +0 -0
  184. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/SegmentURL.js +0 -0
  185. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/utils.d.ts +0 -0
  186. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/node_parsers/utils.js +0 -0
  187. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/parse_from_document.d.ts +0 -0
  188. /package/dist/es2017/parsers/manifest/dash/{native-parser → js-parser}/parse_from_document.js +0 -0
@@ -5,7 +5,6 @@ import log from "../../../log";
5
5
  import Manifest, { Adaptation, Period, Representation } from "../../../manifest/classes";
6
6
  import MainCodecSupportProber from "../../../mse/main_codec_support_prober";
7
7
  import WorkerCodecSupportProber from "../../../mse/worker_codec_support_prober";
8
- import DashFastJsParser from "../../../parsers/manifest/dash/fast-js-parser";
9
8
  import DashWasmParser from "../../../parsers/manifest/dash/wasm-parser";
10
9
  import { ObservationPosition } from "../../../playback_observer";
11
10
  import WorkerPlaybackObserver from "../../../playback_observer/worker_playback_observer";
@@ -47,7 +46,6 @@ export default function initializeWorkerMain() {
47
46
  // TODO allow worker-side feature-switching? Not sure how
48
47
  const dashWasmParser = new DashWasmParser();
49
48
  features.dashParsers.wasm = dashWasmParser;
50
- features.dashParsers.fastJs = DashFastJsParser;
51
49
  features.transports.dash = createDashPipelines;
52
50
  /**
53
51
  * When set, emit playback observation made on the main thread.
@@ -66,12 +64,16 @@ export default function initializeWorkerMain() {
66
64
  const diffWorker = Date.now() - performance.now();
67
65
  mainThreadTimestampDiff.setValueIfChanged(diffWorker - diffMain);
68
66
  updateLoggerLevel(msg.value.logLevel, msg.value.sendBackLogs);
69
- if (msg.value.dashWasmUrl !== undefined && dashWasmParser.isCompatible()) {
70
- dashWasmParser.initialize({ wasmUrl: msg.value.dashWasmUrl }).catch((err) => {
71
- const error = err instanceof Error ? err.toString() : "Unknown Error";
72
- log.error("Worker: Could not initialize DASH_WASM parser", error);
67
+ dashWasmParser.initialize({ wasmUrl: msg.value.dashWasmUrl }).then(() => {
68
+ sendMessage({ type: "init-success" /* WorkerMessageType.InitSuccess */, value: null });
69
+ }, (err) => {
70
+ const error = err instanceof Error ? err.toString() : "Unknown Error";
71
+ log.error("Worker: Could not initialize DASH_WASM parser", error);
72
+ sendMessage({
73
+ type: "init-error" /* WorkerMessageType.InitError */,
74
+ value: { errorMessage: error, kind: "dashWasmInitialization" },
73
75
  });
74
- }
76
+ });
75
77
  if (!msg.value.hasVideo || msg.value.hasMseInWorker) {
76
78
  contentPreparer.disposeCurrentContent();
77
79
  contentPreparer = new ContentPreparer({
@@ -82,7 +84,6 @@ export default function initializeWorkerMain() {
82
84
  features.codecSupportProber = msg.value.hasMseInWorker
83
85
  ? MainCodecSupportProber
84
86
  : WorkerCodecSupportProber;
85
- sendMessage({ type: "init-success" /* WorkerMessageType.InitSuccess */, value: null });
86
87
  break;
87
88
  case "log-level-update" /* MainThreadMessageType.LogLevelUpdate */:
88
89
  updateLoggerLevel(msg.value.logLevel, msg.value.sendBackLogs);
@@ -18,7 +18,7 @@
18
18
  * @type {Object}
19
19
  */
20
20
  const features = {
21
- dashParsers: { wasm: null, native: null, fastJs: null },
21
+ dashParsers: { wasm: null, js: null },
22
22
  codecSupportProber: null,
23
23
  createDebugElement: null,
24
24
  directfile: null,
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import MediaSourceContentInitializer from "../../main_thread/init/media_source_content_initializer";
17
17
  import mainCodecSupportProber from "../../mse/main_codec_support_prober";
18
- import dashJsParser from "../../parsers/manifest/dash/native-parser";
18
+ import dashJsParser from "../../parsers/manifest/dash/js-parser";
19
19
  import dash from "../../transports/dash";
20
20
  /**
21
21
  * Add ability to play DASH contents.
@@ -25,7 +25,7 @@ function addDASHFeature(features) {
25
25
  if (features.transports.dash === undefined) {
26
26
  features.transports.dash = dash;
27
27
  }
28
- features.dashParsers.native = dashJsParser;
28
+ features.dashParsers.js = dashJsParser;
29
29
  features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
30
30
  features.codecSupportProber = mainCodecSupportProber;
31
31
  }
@@ -48,8 +48,7 @@ export type IHTMLTextTracksBuffer = new (mediaElement: HTMLMediaElement, textTra
48
48
  * @returns {Object} - `SegmentSink` implementation.
49
49
  */
50
50
  export type INativeTextTracksBuffer = new (mediaElement: HTMLMediaElement) => SegmentSink;
51
- export type IDashNativeParser = (dom: Document, args: IMPDParserArguments) => IDashParserResponse<string>;
52
- export type IDashFastJsParser = (xml: string, args: IMPDParserArguments) => IDashParserResponse<string>;
51
+ export type IDashJsParser = (document: Document, args: IMPDParserArguments) => IDashParserResponse<string>;
53
52
  /**
54
53
  * Function implementing the optional RxPlayer debug UI element.
55
54
  * @param {HTMLElement} parentElt - `HTMLElement` in which the debug UI
@@ -122,13 +121,9 @@ export interface IFeaturesObject {
122
121
  */
123
122
  wasm: DashWasmParser | null;
124
123
  /**
125
- * Entirely JavaScript-based Manifest DASH parser.
124
+ * JavaScript-based Manifest DASH parser.
126
125
  */
127
- fastJs: IDashFastJsParser | null;
128
- /**
129
- * JavaScript+Browser's DOMParser-based Manifest DASH parser.
130
- */
131
- native: IDashNativeParser | null;
126
+ js: IDashJsParser | null;
132
127
  };
133
128
  /** Implement text track rendering through `<track>` HTML elements. */
134
129
  nativeTextDisplayer: typeof NativeTextDisplayer | null;
@@ -21,6 +21,7 @@ import canRelyOnVideoVisibilityAndSize from "../../compat/can_rely_on_video_visi
21
21
  import { getPictureOnPictureStateRef, getVideoVisibilityRef, getElementResolutionRef, getScreenResolutionRef, } from "../../compat/event_listeners";
22
22
  import getStartDate from "../../compat/get_start_date";
23
23
  import hasMseInWorker from "../../compat/has_mse_in_worker";
24
+ import hasWebassembly from "../../compat/has_webassembly";
24
25
  import isDebugModeEnabled from "../../compat/is_debug_mode_enabled";
25
26
  import { ErrorCodes, ErrorTypes, formatError, MediaError } from "../../errors";
26
27
  import WorkerInitializationError from "../../errors/worker_initialization_error";
@@ -102,7 +103,7 @@ class Player extends EventEmitter {
102
103
  // Workaround to support Firefox autoplay on FF 42.
103
104
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
104
105
  videoElement.preload = "auto";
105
- this.version = /* PLAYER_VERSION */ "4.0.0-dev.2024022300";
106
+ this.version = /* PLAYER_VERSION */ "4.0.0-dev.2024022600";
106
107
  this.log = log;
107
108
  this.state = "STOPPED";
108
109
  this.videoElement = videoElement;
@@ -151,6 +152,10 @@ class Player extends EventEmitter {
151
152
  log.warn("API: Cannot rely on a WebWorker: Worker API unavailable");
152
153
  return rej(new WorkerInitializationError("INCOMPATIBLE_ERROR", "Worker unavailable"));
153
154
  }
155
+ if (!hasWebassembly) {
156
+ log.warn("API: Cannot rely on a WebWorker: WebAssembly unavailable");
157
+ return rej(new WorkerInitializationError("INCOMPATIBLE_ERROR", "WebAssembly unavailable"));
158
+ }
154
159
  if (typeof workerSettings.workerUrl === "string") {
155
160
  this._priv_worker = new Worker(workerSettings.workerUrl);
156
161
  }
@@ -2343,5 +2348,5 @@ class Player extends EventEmitter {
2343
2348
  }
2344
2349
  }
2345
2350
  }
2346
- Player.version = /* PLAYER_VERSION */ "4.0.0-dev.2024022300";
2351
+ Player.version = /* PLAYER_VERSION */ "4.0.0-dev.2024022600";
2347
2352
  export default Player;
@@ -25,7 +25,7 @@ export interface IInitMessage {
25
25
  type: MainThreadMessageType.Init;
26
26
  value: {
27
27
  /** Link to the DASH_WASM's feature WebAssembly file to parse DASH MPDs. */
28
- dashWasmUrl: string | undefined;
28
+ dashWasmUrl: string;
29
29
  /**
30
30
  * If `true` the final element on the current page displaying the content
31
31
  * can display video content.
@@ -13,15 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ITNode } from "../../../../../../utils/xml-parser";
17
16
  import type { IIndexSegment } from "../../../../utils/index_helpers";
18
17
  /**
19
18
  * Allows to generate the "timeline" for the "Timeline" RepresentationIndex.
20
19
  * Call this function when the timeline is unknown.
21
20
  * This function was added to only perform that task lazily, i.e. only when
22
21
  * first needed.
23
- * @param {Array.<Object>|HTMLCollection} elements - All S nodes constituting
24
- * the corresponding SegmentTimeline node.
22
+ * @param {HTMLCollection} elements - All S nodes constituting the corresponding
23
+ * SegmentTimeline node.
25
24
  * @returns {Array.<Object>}
26
25
  */
27
- export default function constructTimelineFromElements(elements: ITNode[] | HTMLCollection): IIndexSegment[];
26
+ export default function constructTimelineFromElements(elements: HTMLCollection): IIndexSegment[];
@@ -14,27 +14,20 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import convertElementsToIndexSegment from "./convert_element_to_index_segment";
17
- import { parseSElementNode, parseSHTMLElement } from "./parse_s_element";
17
+ import parseSElement from "./parse_s_element";
18
18
  /**
19
19
  * Allows to generate the "timeline" for the "Timeline" RepresentationIndex.
20
20
  * Call this function when the timeline is unknown.
21
21
  * This function was added to only perform that task lazily, i.e. only when
22
22
  * first needed.
23
- * @param {Array.<Object>|HTMLCollection} elements - All S nodes constituting
24
- * the corresponding SegmentTimeline node.
23
+ * @param {HTMLCollection} elements - All S nodes constituting the corresponding
24
+ * SegmentTimeline node.
25
25
  * @returns {Array.<Object>}
26
26
  */
27
27
  export default function constructTimelineFromElements(elements) {
28
28
  const initialTimeline = [];
29
- if (Array.isArray(elements)) {
30
- for (let i = 0; i < elements.length; i++) {
31
- initialTimeline.push(parseSElementNode(elements[i]));
32
- }
33
- }
34
- else {
35
- for (let i = 0; i < elements.length; i++) {
36
- initialTimeline.push(parseSHTMLElement(elements[i]));
37
- }
29
+ for (let i = 0; i < elements.length; i++) {
30
+ initialTimeline.push(parseSElement(elements[i]));
38
31
  }
39
32
  const timeline = [];
40
33
  for (let i = 0; i < initialTimeline.length; i++) {
@@ -13,6 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ITNode } from "../../../../../../utils/xml-parser";
17
16
  import type { IIndexSegment } from "../../../../utils/index_helpers";
18
- export default function constructTimelineFromPreviousTimeline(newElements: ITNode[] | HTMLCollection, prevTimeline: IIndexSegment[]): IIndexSegment[];
17
+ export default function constructTimelineFromPreviousTimeline(newElements: HTMLCollection, prevTimeline: IIndexSegment[]): IIndexSegment[];
@@ -17,7 +17,7 @@ import log from "../../../../../../log";
17
17
  import constructTimelineFromElements from "./construct_timeline_from_elements";
18
18
  import convertElementToIndexSegment from "./convert_element_to_index_segment";
19
19
  import findFirstCommonStartTime from "./find_first_common_start_time";
20
- import { parseSElementNode, parseSHTMLElement } from "./parse_s_element";
20
+ import parseSElement from "./parse_s_element";
21
21
  export default function constructTimelineFromPreviousTimeline(newElements, prevTimeline) {
22
22
  var _a;
23
23
  // Find first index in both timeline where a common segment is found.
@@ -47,9 +47,7 @@ export default function constructTimelineFromPreviousTimeline(newElements, prevT
47
47
  return constructTimelineFromElements(newElements);
48
48
  }
49
49
  const prevLastElement = newTimeline[newTimeline.length - 1];
50
- const newCommonElt = Array.isArray(newElements)
51
- ? parseSElementNode(newElements[lastCommonEltNewEltsIdx])
52
- : parseSHTMLElement(newElements[lastCommonEltNewEltsIdx]);
50
+ const newCommonElt = parseSElement(newElements[lastCommonEltNewEltsIdx]);
53
51
  const newRepeatCountOffseted = ((_a = newCommonElt.repeatCount) !== null && _a !== void 0 ? _a : 0) - repeatNumberInNewElements;
54
52
  if (newCommonElt.duration !== prevLastElement.duration ||
55
53
  prevLastElement.repeatCount > newRepeatCountOffseted) {
@@ -63,15 +61,8 @@ export default function constructTimelineFromPreviousTimeline(newElements, prevT
63
61
  }
64
62
  const newEltsToPush = [];
65
63
  const items = [];
66
- if (Array.isArray(newElements)) {
67
- for (let i = lastCommonEltNewEltsIdx + 1; i < newElements.length; i++) {
68
- items.push(parseSElementNode(newElements[i]));
69
- }
70
- }
71
- else {
72
- for (let i = lastCommonEltNewEltsIdx + 1; i < newElements.length; i++) {
73
- items.push(parseSHTMLElement(newElements[i]));
74
- }
64
+ for (let i = lastCommonEltNewEltsIdx + 1; i < newElements.length; i++) {
65
+ items.push(parseSElement(newElements[i]));
75
66
  }
76
67
  for (let i = 0; i < items.length; i++) {
77
68
  const item = items[i];
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ITNode } from "../../../../../../utils/xml-parser";
17
16
  import type { IIndexSegment } from "../../../../utils/index_helpers";
18
17
  /**
19
18
  * By comparing two timelines for the same content at different points in time,
@@ -21,10 +20,10 @@ import type { IIndexSegment } from "../../../../utils/index_helpers";
21
20
  * starting time.
22
21
  * Returns `null` if not found.
23
22
  * @param {Array.<Object>} prevTimeline
24
- * @param {Array.<Object>} newElements
23
+ * @param {HTMLCollection} newElements
25
24
  * @returns {Object|null}
26
25
  */
27
- export default function findFirstCommonStartTime(prevTimeline: IIndexSegment[], newElements: ITNode[] | HTMLCollection): {
26
+ export default function findFirstCommonStartTime(prevTimeline: IIndexSegment[], newElements: HTMLCollection): {
28
27
  /** Index in `prevSegments` where the first common segment start is found. */
29
28
  prevSegmentsIdx: number;
30
29
  /** Index in `newElements` where the first common segment start is found. */
@@ -13,14 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import isNullOrUndefined from "../../../../../../utils/is_null_or_undefined";
17
16
  /**
18
17
  * By comparing two timelines for the same content at different points in time,
19
18
  * retrieve the index in both timelines of the first segment having the same
20
19
  * starting time.
21
20
  * Returns `null` if not found.
22
21
  * @param {Array.<Object>} prevTimeline
23
- * @param {Array.<Object>} newElements
22
+ * @param {HTMLCollection} newElements
24
23
  * @returns {Object|null}
25
24
  */
26
25
  export default function findFirstCommonStartTime(prevTimeline, newElements) {
@@ -28,12 +27,8 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
28
27
  return null;
29
28
  }
30
29
  const prevInitialStart = prevTimeline[0].start;
31
- const newFirstTAttr = Array.isArray(newElements)
32
- ? newElements[0].attributes.t
33
- : newElements[0].getAttribute("t");
34
- const newInitialStart = isNullOrUndefined(newFirstTAttr)
35
- ? null
36
- : parseInt(newFirstTAttr, 10);
30
+ const newFirstTAttr = newElements[0].getAttribute("t");
31
+ const newInitialStart = newFirstTAttr === null ? null : parseInt(newFirstTAttr, 10);
37
32
  if (newInitialStart === null || Number.isNaN(newInitialStart)) {
38
33
  return null;
39
34
  }
@@ -82,17 +77,16 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
82
77
  }
83
78
  else {
84
79
  let newElementsIdx = 0;
85
- let newNodeElt = Array.isArray(newElements) ? newElements[0] : null;
86
- let newDomElt = Array.isArray(newElements) ? null : newElements[0];
80
+ let newElt = newElements[0];
87
81
  let currentTimeOffset = newInitialStart;
88
82
  while (true) {
89
- const dAttr = newNodeElt !== null ? newNodeElt.attributes.d : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("d");
90
- const duration = isNullOrUndefined(dAttr) ? null : parseInt(dAttr, 10);
83
+ const dAttr = newElt.getAttribute("d");
84
+ const duration = dAttr === null ? null : parseInt(dAttr, 10);
91
85
  if (duration === null || Number.isNaN(duration)) {
92
86
  return null;
93
87
  }
94
- const rAttr = newNodeElt !== null ? newNodeElt.attributes.r : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("r");
95
- const repeatCount = isNullOrUndefined(rAttr) ? null : parseInt(rAttr, 10);
88
+ const rAttr = newElt.getAttribute("r");
89
+ const repeatCount = rAttr === null ? null : parseInt(rAttr, 10);
96
90
  if (repeatCount !== null) {
97
91
  if (Number.isNaN(repeatCount) || repeatCount < 0) {
98
92
  return null;
@@ -118,14 +112,9 @@ export default function findFirstCommonStartTime(prevTimeline, newElements) {
118
112
  if (newElementsIdx >= newElements.length) {
119
113
  return null;
120
114
  }
121
- if (Array.isArray(newElements)) {
122
- newNodeElt = newElements[newElementsIdx];
123
- }
124
- else {
125
- newDomElt = newElements[newElementsIdx];
126
- }
127
- const tAttr = newNodeElt !== null ? newNodeElt.attributes.t : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("t");
128
- const time = isNullOrUndefined(tAttr) ? null : parseInt(tAttr, 10);
115
+ newElt = newElements[newElementsIdx];
116
+ const tAttr = newElt.getAttribute("t");
117
+ const time = tAttr === null ? null : parseInt(tAttr, 10);
129
118
  if (time !== null) {
130
119
  if (Number.isNaN(time)) {
131
120
  return null;
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ITNode } from "../../../../../../utils/xml-parser";
17
16
  /** SegmentTimeline `S` element once parsed. */
18
17
  export interface IParsedS {
19
18
  /** Start time in a previously-given timescaled unit. */
@@ -28,16 +27,8 @@ export interface IParsedS {
28
27
  duration?: number;
29
28
  }
30
29
  /**
31
- * Parse a given <S> element in the MPD under a parsed Node form into a JS
32
- * Object.
33
- * @param {Object} root
34
- * @returns {Object}
35
- */
36
- export declare function parseSElementNode(root: ITNode): IParsedS;
37
- /**
38
- * Parse a given <S> element in the MPD under an `Element` form into a JS
39
- * Object.
30
+ * Parse a given <S> element in the MPD into a JS Object.
40
31
  * @param {Element} root
41
32
  * @returns {Object}
42
33
  */
43
- export declare function parseSHTMLElement(root: Element): IParsedS;
34
+ export default function parseSElement(root: Element): IParsedS;
@@ -14,59 +14,12 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import log from "../../../../../../log";
17
- import isNullOrUndefined from "../../../../../../utils/is_null_or_undefined";
18
17
  /**
19
- * Parse a given <S> element in the MPD under a parsed Node form into a JS
20
- * Object.
21
- * @param {Object} root
22
- * @returns {Object}
23
- */
24
- export function parseSElementNode(root) {
25
- const parsedS = {};
26
- for (const attributeName of Object.keys(root.attributes)) {
27
- const attributeVal = root.attributes[attributeName];
28
- if (isNullOrUndefined(attributeVal)) {
29
- continue;
30
- }
31
- switch (attributeName) {
32
- case "t":
33
- const start = parseInt(attributeVal, 10);
34
- if (isNaN(start)) {
35
- log.warn(`DASH: invalid t ("${attributeVal}")`);
36
- }
37
- else {
38
- parsedS.start = start;
39
- }
40
- break;
41
- case "d":
42
- const duration = parseInt(attributeVal, 10);
43
- if (isNaN(duration)) {
44
- log.warn(`DASH: invalid d ("${attributeVal}")`);
45
- }
46
- else {
47
- parsedS.duration = duration;
48
- }
49
- break;
50
- case "r":
51
- const repeatCount = parseInt(attributeVal, 10);
52
- if (isNaN(repeatCount)) {
53
- log.warn(`DASH: invalid r ("${attributeVal}")`);
54
- }
55
- else {
56
- parsedS.repeatCount = repeatCount;
57
- }
58
- break;
59
- }
60
- }
61
- return parsedS;
62
- }
63
- /**
64
- * Parse a given <S> element in the MPD under an `Element` form into a JS
65
- * Object.
18
+ * Parse a given <S> element in the MPD into a JS Object.
66
19
  * @param {Element} root
67
20
  * @returns {Object}
68
21
  */
69
- export function parseSHTMLElement(root) {
22
+ export default function parseSElement(root) {
70
23
  const parsedS = {};
71
24
  for (let j = 0; j < root.attributes.length; j++) {
72
25
  const attribute = root.attributes[j];
@@ -15,7 +15,6 @@
15
15
  */
16
16
  import type { IRepresentationIndex, ISegment, IRepresentation } from "../../../../../../manifest";
17
17
  import type { IPlayerError } from "../../../../../../public_types";
18
- import type { ITNode } from "../../../../../../utils/xml-parser";
19
18
  import type { IEMSG } from "../../../../../containers/isobmff";
20
19
  import type { IIndexSegment } from "../../../../utils/index_helpers";
21
20
  import type { ISegmentTimelineElement } from "../../../node_parser_types";
@@ -121,7 +120,7 @@ export interface ITimelineIndexIndexArgument {
121
120
  * timescale (see timescale)
122
121
  */
123
122
  presentationTimeOffset?: number | undefined;
124
- timelineParser?: (() => ITNode[] | HTMLCollection) | undefined;
123
+ timelineParser?: (() => HTMLCollection) | undefined;
125
124
  timeline?: ISegmentTimelineElement[] | undefined;
126
125
  }
127
126
  /** Aditional context needed by a SegmentTimeline RepresentationIndex. */
@@ -243,9 +243,7 @@ function generateStreamEvents(baseIr, periodStart, xmlNamespaces) {
243
243
  try {
244
244
  xmlData = {
245
245
  namespaces: allNamespaces,
246
- data: typeof eventIr.eventStreamData === "string"
247
- ? eventIr.eventStreamData
248
- : utf8ToStr(new Uint8Array(eventIr.eventStreamData)),
246
+ data: utf8ToStr(new Uint8Array(eventIr.eventStreamData)),
249
247
  };
250
248
  }
251
249
  catch (err) {
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { ITNode } from "../../../utils/xml-parser";
17
16
  /**
18
17
  * Those are types used when generating the MPD "Intermediate Representation"
19
18
  * which is an intermediate step between parsing the MPD (in XML) and generating
@@ -387,11 +386,10 @@ export interface IEventStreamEventIntermediateRepresentation {
387
386
  duration?: number;
388
387
  /**
389
388
  * The `<Event>` element itself.
390
- * Can be under any of those forms:
389
+ * Can be in two forms:
391
390
  * - Either as an Element instance directly
392
391
  * - Either as the Element's UTF-8 textual representation.
393
- * - Either as the Element's string representation.
394
392
  */
395
- eventStreamData?: Element | ArrayBuffer | string;
393
+ eventStreamData?: Element | ArrayBuffer;
396
394
  }
397
- export type ITimelineParser = () => ITNode[] | HTMLCollection;
395
+ export type ITimelineParser = () => HTMLCollection;
@@ -15,7 +15,7 @@ export type IRxPlayerMode = "auto" | "main" | "multithread";
15
15
  /** Argument of the `attachWorker` method. */
16
16
  export interface IWorkerSettings {
17
17
  workerUrl: string | Blob;
18
- dashWasmUrl?: string | ArrayBuffer | undefined;
18
+ dashWasmUrl: string | ArrayBuffer;
19
19
  }
20
20
  /** Every options that can be given to the RxPlayer's constructor. */
21
21
  export interface IConstructorOptions {
@@ -84,19 +84,12 @@ export default function generateManifestParser(options) {
84
84
  * @returns {Object|Promise.<Object>}
85
85
  */
86
86
  function runDefaultJsParser() {
87
- if (parsers.fastJs !== null) {
88
- const manifestStr = getManifestAsString(responseData);
89
- const parsedManifest = parsers.fastJs(manifestStr, dashParserOpts);
90
- return processMpdParserResponse(parsedManifest);
91
- }
92
- else if (parsers.native !== null) {
93
- const manifestDocument = getManifestAsDocument(responseData);
94
- const parsedManifest = parsers.native(manifestDocument, dashParserOpts);
95
- return processMpdParserResponse(parsedManifest);
96
- }
97
- else {
87
+ if (parsers.js === null) {
98
88
  throw new Error("No MPD parser is imported");
99
89
  }
90
+ const manifestDoc = getManifestAsDocument(responseData);
91
+ const parsedManifest = parsers.js(manifestDoc, dashParserOpts);
92
+ return processMpdParserResponse(parsedManifest);
100
93
  }
101
94
  /**
102
95
  * Process return of one of the MPD parser.
@@ -233,28 +226,6 @@ function assertLoadedResourcesFormatArrayBuffer(loadedResources) {
233
226
  throw new Error("Invalid data given to the LoadedRessource");
234
227
  });
235
228
  }
236
- /**
237
- * Try to convert a Manifest from an unknown format to an array of nodes as
238
- * parsed by our XML DOM parser.
239
- *
240
- * Throws if the format cannot be converted.
241
- * @param {*} manifestSrc
242
- * @returns {Array.<Object | string>}
243
- */
244
- function getManifestAsString(manifestSrc) {
245
- if (manifestSrc instanceof ArrayBuffer) {
246
- return utf8ToStr(new Uint8Array(manifestSrc));
247
- }
248
- else if (typeof manifestSrc === "string") {
249
- return manifestSrc;
250
- }
251
- else if (manifestSrc instanceof Document) {
252
- return manifestSrc.documentElement.outerHTML;
253
- }
254
- else {
255
- throw new Error("DASH Manifest Parser: Unrecognized Manifest format");
256
- }
257
- }
258
229
  /**
259
230
  * Try to convert a Manifest from an unknown format to a `Document` format.
260
231
  * Useful to exploit DOM-parsing APIs to quickly parse an XML Manifest.
Binary file