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

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 (210) 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/compat/browser_detection.d.ts +3 -1
  5. package/dist/commonjs/compat/browser_detection.js +8 -2
  6. package/dist/commonjs/compat/has_worker_api.d.ts +9 -0
  7. package/dist/commonjs/compat/has_worker_api.js +17 -0
  8. package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.d.ts +1 -1
  9. package/dist/commonjs/core/main/common/create_content_time_boundaries_observer.js +1 -1
  10. package/dist/commonjs/core/main/worker/worker_main.js +8 -9
  11. package/dist/commonjs/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.d.ts +1 -1
  12. package/dist/commonjs/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.js +1 -1
  13. package/dist/commonjs/core/segment_sinks/segment_buffers_store.d.ts +1 -1
  14. package/dist/commonjs/core/segment_sinks/segment_buffers_store.js +1 -1
  15. package/dist/commonjs/features/features_object.js +1 -1
  16. package/dist/commonjs/features/list/dash.js +2 -2
  17. package/dist/commonjs/features/types.d.ts +8 -3
  18. package/dist/commonjs/main_thread/api/public_api.js +4 -8
  19. package/dist/commonjs/main_thread/init/utils/get_loaded_reference.js +5 -0
  20. package/dist/commonjs/multithread_types.d.ts +1 -1
  21. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +4 -3
  22. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +11 -4
  23. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +2 -1
  24. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +12 -3
  25. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +3 -2
  26. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +22 -11
  27. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +11 -2
  28. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +74 -3
  29. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +2 -1
  30. package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +3 -1
  31. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.d.ts +17 -0
  32. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/index.js +19 -0
  33. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +24 -0
  34. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +400 -0
  35. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +24 -0
  36. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +33 -0
  37. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +23 -0
  38. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +70 -0
  39. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +22 -0
  40. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +118 -0
  41. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +23 -0
  42. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +154 -0
  43. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +22 -0
  44. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +70 -0
  45. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +23 -0
  46. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +221 -0
  47. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +23 -0
  48. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +179 -0
  49. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +22 -0
  50. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +256 -0
  51. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +23 -0
  52. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +152 -0
  53. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +22 -0
  54. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +60 -0
  55. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +24 -0
  56. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +125 -0
  57. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +22 -0
  58. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +36 -0
  59. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +24 -0
  60. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +82 -0
  61. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +176 -0
  62. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +382 -0
  63. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +24 -0
  64. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +142 -0
  65. package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts +5 -3
  66. package/dist/commonjs/public_types.d.ts +1 -1
  67. package/dist/commonjs/transports/dash/manifest_parser.js +33 -4
  68. package/dist/commonjs/utils/xml-parser.d.ts +70 -0
  69. package/dist/commonjs/utils/xml-parser.js +357 -0
  70. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  71. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  72. package/dist/es2017/compat/browser_detection.d.ts +3 -1
  73. package/dist/es2017/compat/browser_detection.js +7 -2
  74. package/dist/es2017/compat/has_worker_api.d.ts +9 -0
  75. package/dist/es2017/compat/has_worker_api.js +14 -0
  76. package/dist/es2017/core/main/common/create_content_time_boundaries_observer.d.ts +1 -1
  77. package/dist/es2017/core/main/common/create_content_time_boundaries_observer.js +1 -1
  78. package/dist/es2017/core/main/worker/worker_main.js +8 -9
  79. package/dist/es2017/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.d.ts +1 -1
  80. package/dist/es2017/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.js +1 -1
  81. package/dist/es2017/core/segment_sinks/segment_buffers_store.d.ts +1 -1
  82. package/dist/es2017/core/segment_sinks/segment_buffers_store.js +1 -1
  83. package/dist/es2017/features/features_object.js +1 -1
  84. package/dist/es2017/features/list/dash.js +2 -2
  85. package/dist/es2017/features/types.d.ts +8 -3
  86. package/dist/es2017/main_thread/api/public_api.js +4 -8
  87. package/dist/es2017/main_thread/init/utils/get_loaded_reference.js +5 -0
  88. package/dist/es2017/multithread_types.d.ts +1 -1
  89. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.d.ts +4 -3
  90. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_elements.js +12 -5
  91. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.d.ts +2 -1
  92. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/construct_timeline_from_previous_timeline.js +13 -4
  93. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.d.ts +3 -2
  94. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/find_first_common_start_time.js +22 -11
  95. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.d.ts +11 -2
  96. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/parse_s_element.js +49 -2
  97. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +2 -1
  98. package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +3 -1
  99. package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.d.ts +17 -0
  100. package/dist/es2017/parsers/manifest/dash/fast-js-parser/index.js +17 -0
  101. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.d.ts +24 -0
  102. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/AdaptationSet.js +358 -0
  103. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.d.ts +24 -0
  104. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/BaseURL.js +30 -0
  105. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.d.ts +23 -0
  106. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentComponent.js +45 -0
  107. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.d.ts +22 -0
  108. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/ContentProtection.js +77 -0
  109. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.d.ts +23 -0
  110. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/EventStream.js +101 -0
  111. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.d.ts +22 -0
  112. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Initialization.js +45 -0
  113. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.d.ts +23 -0
  114. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/MPD.js +179 -0
  115. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.d.ts +23 -0
  116. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Period.js +137 -0
  117. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.d.ts +22 -0
  118. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/Representation.js +214 -0
  119. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.d.ts +23 -0
  120. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentBase.js +111 -0
  121. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.d.ts +22 -0
  122. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentList.js +41 -0
  123. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.d.ts +24 -0
  124. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTemplate.js +84 -0
  125. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.d.ts +22 -0
  126. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentTimeline.js +33 -0
  127. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.d.ts +24 -0
  128. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/SegmentURL.js +57 -0
  129. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +176 -0
  130. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +310 -0
  131. package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.d.ts +24 -0
  132. package/dist/es2017/parsers/manifest/dash/fast-js-parser/parse_from_xml_string.js +114 -0
  133. package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts +5 -3
  134. package/dist/es2017/public_types.d.ts +1 -1
  135. package/dist/es2017/transports/dash/manifest_parser.js +33 -4
  136. package/dist/es2017/utils/xml-parser.d.ts +70 -0
  137. package/dist/es2017/utils/xml-parser.js +322 -0
  138. package/dist/mpd-parser.wasm +0 -0
  139. package/dist/rx-player.js +166 -67
  140. package/dist/rx-player.min.js +1 -1
  141. package/dist/worker.js +8 -3
  142. package/package.json +1 -1
  143. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/index.d.ts +0 -0
  144. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/index.js +0 -0
  145. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/AdaptationSet.d.ts +0 -0
  146. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/AdaptationSet.js +0 -0
  147. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/BaseURL.d.ts +0 -0
  148. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/BaseURL.js +0 -0
  149. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.d.ts +0 -0
  150. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.js +0 -0
  151. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.d.ts +0 -0
  152. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.js +0 -0
  153. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/EventStream.d.ts +0 -0
  154. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/EventStream.js +0 -0
  155. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Initialization.d.ts +0 -0
  156. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Initialization.js +0 -0
  157. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/MPD.d.ts +0 -0
  158. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/MPD.js +0 -0
  159. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Period.d.ts +0 -0
  160. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Period.js +0 -0
  161. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Representation.d.ts +0 -0
  162. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Representation.js +0 -0
  163. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentBase.d.ts +0 -0
  164. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentBase.js +0 -0
  165. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.d.ts +0 -0
  166. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.js +0 -0
  167. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTemplate.d.ts +0 -0
  168. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTemplate.js +0 -0
  169. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.d.ts +0 -0
  170. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.js +0 -0
  171. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentURL.d.ts +0 -0
  172. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentURL.js +0 -0
  173. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/utils.d.ts +0 -0
  174. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/utils.js +0 -0
  175. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/parse_from_document.d.ts +0 -0
  176. /package/dist/commonjs/parsers/manifest/dash/{js-parser → native-parser}/parse_from_document.js +0 -0
  177. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/index.d.ts +0 -0
  178. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/index.js +0 -0
  179. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/AdaptationSet.d.ts +0 -0
  180. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/AdaptationSet.js +0 -0
  181. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/BaseURL.d.ts +0 -0
  182. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/BaseURL.js +0 -0
  183. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.d.ts +0 -0
  184. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentComponent.js +0 -0
  185. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.d.ts +0 -0
  186. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/ContentProtection.js +0 -0
  187. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/EventStream.d.ts +0 -0
  188. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/EventStream.js +0 -0
  189. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Initialization.d.ts +0 -0
  190. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Initialization.js +0 -0
  191. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/MPD.d.ts +0 -0
  192. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/MPD.js +0 -0
  193. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Period.d.ts +0 -0
  194. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Period.js +0 -0
  195. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Representation.d.ts +0 -0
  196. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/Representation.js +0 -0
  197. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentBase.d.ts +0 -0
  198. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentBase.js +0 -0
  199. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.d.ts +0 -0
  200. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentList.js +0 -0
  201. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTemplate.d.ts +0 -0
  202. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTemplate.js +0 -0
  203. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.d.ts +0 -0
  204. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentTimeline.js +0 -0
  205. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentURL.d.ts +0 -0
  206. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/SegmentURL.js +0 -0
  207. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/utils.d.ts +0 -0
  208. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/node_parsers/utils.js +0 -0
  209. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/parse_from_document.d.ts +0 -0
  210. /package/dist/es2017/parsers/manifest/dash/{js-parser → native-parser}/parse_from_document.js +0 -0
package/dist/rx-player.js CHANGED
@@ -7188,7 +7188,8 @@ function normalizeAudioTrack(_language) {
7188
7188
  var features = {
7189
7189
  dashParsers: {
7190
7190
  wasm: null,
7191
- js: null
7191
+ "native": null,
7192
+ fastJs: null
7192
7193
  },
7193
7194
  codecSupportProber: null,
7194
7195
  createDebugElement: null,
@@ -11796,7 +11797,7 @@ function getEndingPositionFromAdaptation(adaptation) {
11796
11797
  * Various methods from that class need then to be called at various events
11797
11798
  * (see `ContentTimeBoundariesObserver`).
11798
11799
  * @param {Object} manifest
11799
- * @param {MediaSource} mediaSource
11800
+ * @param {Object} mediaSource
11800
11801
  * @param {Object} streamObserver
11801
11802
  * @param {Object} segmentSinksStore
11802
11803
  * @param {Object} cancelSignal
@@ -13037,7 +13038,7 @@ var AudioVideoSegmentSink = /*#__PURE__*/function (_SegmentSink) {
13037
13038
  * @constructor
13038
13039
  * @param {string} bufferType
13039
13040
  * @param {string} codec
13040
- * @param {MediaSource} mediaSource
13041
+ * @param {Object} mediaSource
13041
13042
  */
13042
13043
  function AudioVideoSegmentSink(bufferType, codec, mediaSource) {
13043
13044
  var _this;
@@ -13647,7 +13648,7 @@ var SegmentSinksStore = /*#__PURE__*/function () {
13647
13648
  return shouldHaveNativeBuffer(bufferType);
13648
13649
  }
13649
13650
  /**
13650
- * @param {MediaSource} mediaSource
13651
+ * @param {Object} mediaSource
13651
13652
  * @constructor
13652
13653
  */;
13653
13654
  function SegmentSinksStore(mediaSource, hasVideo, textDisplayerInterface) {
@@ -19602,6 +19603,8 @@ var isWebOs2021 = false;
19602
19603
  var isWebOs2022 = false;
19603
19604
  /** `true` for Panasonic devices. */
19604
19605
  var isPanasonic = false;
19606
+ /** `true` for the PlayStation 4 game console. */
19607
+ var isPlayStation4 = false;
19605
19608
  /** `true` for the PlayStation 5 game console. */
19606
19609
  var isPlayStation5 = false;
19607
19610
  /** `true` for the Xbox game consoles. */
@@ -19642,7 +19645,9 @@ var isXbox = false;
19642
19645
  if (/SamsungBrowser/.test(navigator.userAgent)) {
19643
19646
  isSamsungBrowser = true;
19644
19647
  }
19645
- if (navigator.userAgent.indexOf("PlayStation 5") !== -1) {
19648
+ if (navigator.userAgent.indexOf("PlayStation 4") !== -1) {
19649
+ isPlayStation4 = true;
19650
+ } else if (navigator.userAgent.indexOf("PlayStation 5") !== -1) {
19646
19651
  isPlayStation5 = true;
19647
19652
  } else if (/Tizen/.test(navigator.userAgent)) {
19648
19653
  isTizen = true;
@@ -20701,6 +20706,11 @@ function getLoadedReference(playbackObserver, mediaElement, isDirectfile, cancel
20701
20706
  return;
20702
20707
  }
20703
20708
  if (!shouldWaitForDataBeforeLoaded(isDirectfile, mediaElement.hasAttribute("playsinline"))) {
20709
+ // The duration is NaN if no media data is available,
20710
+ // which means media is not loaded yet.
20711
+ if (isNaN(mediaElement.duration)) {
20712
+ return;
20713
+ }
20704
20714
  if (mediaElement.duration > 0) {
20705
20715
  isLoaded.setValue(true);
20706
20716
  listenCanceller.cancel();
@@ -30193,12 +30203,57 @@ function convertElementsToIndexSegment(item, previousItem, nextItem) {
30193
30203
  * limitations under the License.
30194
30204
  */
30195
30205
 
30206
+
30207
+ /**
30208
+ * Parse a given <S> element in the MPD under a parsed Node form into a JS
30209
+ * Object.
30210
+ * @param {Object} root
30211
+ * @returns {Object}
30212
+ */
30213
+ function parseSElementNode(root) {
30214
+ var parsedS = {};
30215
+ for (var _i = 0, _Object$keys = Object.keys(root.attributes); _i < _Object$keys.length; _i++) {
30216
+ var attributeName = _Object$keys[_i];
30217
+ var attributeVal = root.attributes[attributeName];
30218
+ if (is_null_or_undefined_isNullOrUndefined(attributeVal)) {
30219
+ continue;
30220
+ }
30221
+ switch (attributeName) {
30222
+ case "t":
30223
+ var start = parseInt(attributeVal, 10);
30224
+ if (isNaN(start)) {
30225
+ src_log.warn("DASH: invalid t (\"" + attributeVal + "\")");
30226
+ } else {
30227
+ parsedS.start = start;
30228
+ }
30229
+ break;
30230
+ case "d":
30231
+ var duration = parseInt(attributeVal, 10);
30232
+ if (isNaN(duration)) {
30233
+ src_log.warn("DASH: invalid d (\"" + attributeVal + "\")");
30234
+ } else {
30235
+ parsedS.duration = duration;
30236
+ }
30237
+ break;
30238
+ case "r":
30239
+ var repeatCount = parseInt(attributeVal, 10);
30240
+ if (isNaN(repeatCount)) {
30241
+ src_log.warn("DASH: invalid r (\"" + attributeVal + "\")");
30242
+ } else {
30243
+ parsedS.repeatCount = repeatCount;
30244
+ }
30245
+ break;
30246
+ }
30247
+ }
30248
+ return parsedS;
30249
+ }
30196
30250
  /**
30197
- * Parse a given <S> element in the MPD into a JS Object.
30251
+ * Parse a given <S> element in the MPD under an `Element` form into a JS
30252
+ * Object.
30198
30253
  * @param {Element} root
30199
30254
  * @returns {Object}
30200
30255
  */
30201
- function parseSElement(root) {
30256
+ function parseSHTMLElement(root) {
30202
30257
  var parsedS = {};
30203
30258
  for (var j = 0; j < root.attributes.length; j++) {
30204
30259
  var attribute = root.attributes[j];
@@ -30254,20 +30309,26 @@ function parseSElement(root) {
30254
30309
  * Call this function when the timeline is unknown.
30255
30310
  * This function was added to only perform that task lazily, i.e. only when
30256
30311
  * first needed.
30257
- * @param {HTMLCollection} elements - All S nodes constituting the corresponding
30258
- * SegmentTimeline node.
30312
+ * @param {Array.<Object>|HTMLCollection} elements - All S nodes constituting
30313
+ * the corresponding SegmentTimeline node.
30259
30314
  * @returns {Array.<Object>}
30260
30315
  */
30261
30316
  function constructTimelineFromElements(elements) {
30262
30317
  var initialTimeline = [];
30263
- for (var i = 0; i < elements.length; i++) {
30264
- initialTimeline.push(parseSElement(elements[i]));
30318
+ if (Array.isArray(elements)) {
30319
+ for (var i = 0; i < elements.length; i++) {
30320
+ initialTimeline.push(parseSElementNode(elements[i]));
30321
+ }
30322
+ } else {
30323
+ for (var _i = 0; _i < elements.length; _i++) {
30324
+ initialTimeline.push(parseSHTMLElement(elements[_i]));
30325
+ }
30265
30326
  }
30266
30327
  var timeline = [];
30267
- for (var _i = 0; _i < initialTimeline.length; _i++) {
30268
- var item = initialTimeline[_i];
30328
+ for (var _i2 = 0; _i2 < initialTimeline.length; _i2++) {
30329
+ var item = initialTimeline[_i2];
30269
30330
  var previousItem = timeline[timeline.length - 1] === undefined ? null : timeline[timeline.length - 1];
30270
- var nextItem = initialTimeline[_i + 1] === undefined ? null : initialTimeline[_i + 1];
30331
+ var nextItem = initialTimeline[_i2 + 1] === undefined ? null : initialTimeline[_i2 + 1];
30271
30332
  var timelineElement = convertElementsToIndexSegment(item, previousItem, nextItem);
30272
30333
  if (timelineElement !== null) {
30273
30334
  timeline.push(timelineElement);
@@ -30291,13 +30352,14 @@ function constructTimelineFromElements(elements) {
30291
30352
  * See the License for the specific language governing permissions and
30292
30353
  * limitations under the License.
30293
30354
  */
30355
+
30294
30356
  /**
30295
30357
  * By comparing two timelines for the same content at different points in time,
30296
30358
  * retrieve the index in both timelines of the first segment having the same
30297
30359
  * starting time.
30298
30360
  * Returns `null` if not found.
30299
30361
  * @param {Array.<Object>} prevTimeline
30300
- * @param {HTMLCollection} newElements
30362
+ * @param {Array.<Object>} newElements
30301
30363
  * @returns {Object|null}
30302
30364
  */
30303
30365
  function findFirstCommonStartTime(prevTimeline, newElements) {
@@ -30305,8 +30367,8 @@ function findFirstCommonStartTime(prevTimeline, newElements) {
30305
30367
  return null;
30306
30368
  }
30307
30369
  var prevInitialStart = prevTimeline[0].start;
30308
- var newFirstTAttr = newElements[0].getAttribute("t");
30309
- var newInitialStart = newFirstTAttr === null ? null : parseInt(newFirstTAttr, 10);
30370
+ var newFirstTAttr = Array.isArray(newElements) ? newElements[0].attributes.t : newElements[0].getAttribute("t");
30371
+ var newInitialStart = is_null_or_undefined_isNullOrUndefined(newFirstTAttr) ? null : parseInt(newFirstTAttr, 10);
30310
30372
  if (newInitialStart === null || Number.isNaN(newInitialStart)) {
30311
30373
  return null;
30312
30374
  }
@@ -30351,16 +30413,17 @@ function findFirstCommonStartTime(prevTimeline, newElements) {
30351
30413
  }
30352
30414
  } else {
30353
30415
  var newElementsIdx = 0;
30354
- var newElt = newElements[0];
30416
+ var newNodeElt = Array.isArray(newElements) ? newElements[0] : null;
30417
+ var newDomElt = Array.isArray(newElements) ? null : newElements[0];
30355
30418
  var currentTimeOffset = newInitialStart;
30356
30419
  while (true) {
30357
- var dAttr = newElt.getAttribute("d");
30358
- var duration = dAttr === null ? null : parseInt(dAttr, 10);
30420
+ var dAttr = newNodeElt !== null ? newNodeElt.attributes.d : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("d");
30421
+ var duration = is_null_or_undefined_isNullOrUndefined(dAttr) ? null : parseInt(dAttr, 10);
30359
30422
  if (duration === null || Number.isNaN(duration)) {
30360
30423
  return null;
30361
30424
  }
30362
- var rAttr = newElt.getAttribute("r");
30363
- var repeatCount = rAttr === null ? null : parseInt(rAttr, 10);
30425
+ var rAttr = newNodeElt !== null ? newNodeElt.attributes.r : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("r");
30426
+ var repeatCount = is_null_or_undefined_isNullOrUndefined(rAttr) ? null : parseInt(rAttr, 10);
30364
30427
  if (repeatCount !== null) {
30365
30428
  if (Number.isNaN(repeatCount) || repeatCount < 0) {
30366
30429
  return null;
@@ -30385,9 +30448,13 @@ function findFirstCommonStartTime(prevTimeline, newElements) {
30385
30448
  if (newElementsIdx >= newElements.length) {
30386
30449
  return null;
30387
30450
  }
30388
- newElt = newElements[newElementsIdx];
30389
- var tAttr = newElt.getAttribute("t");
30390
- var time = tAttr === null ? null : parseInt(tAttr, 10);
30451
+ if (Array.isArray(newElements)) {
30452
+ newNodeElt = newElements[newElementsIdx];
30453
+ } else {
30454
+ newDomElt = newElements[newElementsIdx];
30455
+ }
30456
+ var tAttr = newNodeElt !== null ? newNodeElt.attributes.t : newDomElt === null || newDomElt === void 0 ? void 0 : newDomElt.getAttribute("t");
30457
+ var time = is_null_or_undefined_isNullOrUndefined(tAttr) ? null : parseInt(tAttr, 10);
30391
30458
  if (time !== null) {
30392
30459
  if (Number.isNaN(time)) {
30393
30460
  return null;
@@ -30459,7 +30526,7 @@ function constructTimelineFromPreviousTimeline(newElements, prevTimeline) {
30459
30526
  return constructTimelineFromElements(newElements);
30460
30527
  }
30461
30528
  var prevLastElement = newTimeline[newTimeline.length - 1];
30462
- var newCommonElt = parseSElement(newElements[lastCommonEltNewEltsIdx]);
30529
+ var newCommonElt = Array.isArray(newElements) ? parseSElementNode(newElements[lastCommonEltNewEltsIdx]) : parseSHTMLElement(newElements[lastCommonEltNewEltsIdx]);
30463
30530
  var newRepeatCountOffseted = ((_a = newCommonElt.repeatCount) !== null && _a !== void 0 ? _a : 0) - repeatNumberInNewElements;
30464
30531
  if (newCommonElt.duration !== prevLastElement.duration || prevLastElement.repeatCount > newRepeatCountOffseted) {
30465
30532
  src_log.info('DASH: Cannot perform "based" update. ' + "The new timeline has a different form at the beginning.");
@@ -30470,13 +30537,19 @@ function constructTimelineFromPreviousTimeline(newElements, prevTimeline) {
30470
30537
  }
30471
30538
  var newEltsToPush = [];
30472
30539
  var items = [];
30473
- for (var i = lastCommonEltNewEltsIdx + 1; i < newElements.length; i++) {
30474
- items.push(parseSElement(newElements[i]));
30540
+ if (Array.isArray(newElements)) {
30541
+ for (var i = lastCommonEltNewEltsIdx + 1; i < newElements.length; i++) {
30542
+ items.push(parseSElementNode(newElements[i]));
30543
+ }
30544
+ } else {
30545
+ for (var _i = lastCommonEltNewEltsIdx + 1; _i < newElements.length; _i++) {
30546
+ items.push(parseSHTMLElement(newElements[_i]));
30547
+ }
30475
30548
  }
30476
- for (var _i = 0; _i < items.length; _i++) {
30477
- var item = items[_i];
30549
+ for (var _i2 = 0; _i2 < items.length; _i2++) {
30550
+ var item = items[_i2];
30478
30551
  var previousItem = newEltsToPush[newEltsToPush.length - 1] === undefined ? prevLastElement : newEltsToPush[newEltsToPush.length - 1];
30479
- var nextItem = items[_i + 1] === undefined ? null : items[_i + 1];
30552
+ var nextItem = items[_i2 + 1] === undefined ? null : items[_i2 + 1];
30480
30553
  var timelineElement = convertElementsToIndexSegment(item, previousItem, nextItem);
30481
30554
  if (timelineElement !== null) {
30482
30555
  newEltsToPush.push(timelineElement);
@@ -32651,7 +32724,7 @@ function generateStreamEvents(baseIr, periodStart, xmlNamespaces) {
32651
32724
  try {
32652
32725
  xmlData = {
32653
32726
  namespaces: allNamespaces,
32654
- data: utf8ToStr(new Uint8Array(eventIr.eventStreamData))
32727
+ data: typeof eventIr.eventStreamData === "string" ? eventIr.eventStreamData : utf8ToStr(new Uint8Array(eventIr.eventStreamData))
32655
32728
  };
32656
32729
  } catch (err) {
32657
32730
  src_log.error("DASH: Error while parsing event-stream:", err instanceof Error ? err.message : "Unknown error");
@@ -32981,7 +33054,7 @@ function parseCompleteIntermediateRepresentation(mpdIR, args, warnings, xlinkInf
32981
33054
 
32982
33055
  /* harmony default export */ var common = (parseMpdIr);
32983
33056
 
32984
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/BaseURL.ts
33057
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/BaseURL.ts
32985
33058
  /**
32986
33059
  * Copyright 2015 CANAL+ Group
32987
33060
  *
@@ -33013,7 +33086,7 @@ function parseBaseURL(root) {
33013
33086
  value: value
33014
33087
  }, warnings];
33015
33088
  }
33016
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/ContentComponent.ts
33089
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/ContentComponent.ts
33017
33090
  /**
33018
33091
  * Copyright 2015 CANAL+ Group
33019
33092
  *
@@ -33055,7 +33128,7 @@ function parseContentComponent(root) {
33055
33128
  }
33056
33129
  return ret;
33057
33130
  }
33058
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/utils.ts
33131
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/utils.ts
33059
33132
 
33060
33133
 
33061
33134
 
@@ -33361,7 +33434,7 @@ var MPDError = /*#__PURE__*/function (_Error) {
33361
33434
  return MPDError;
33362
33435
  }( /*#__PURE__*/_wrapNativeSuper(Error));
33363
33436
 
33364
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/ContentProtection.ts
33437
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/ContentProtection.ts
33365
33438
  /**
33366
33439
  * Copyright 2015 CANAL+ Group
33367
33440
  *
@@ -33446,7 +33519,7 @@ function parseContentProtection(contentProtectionElement) {
33446
33519
  attributes: attributes
33447
33520
  }, childrenWarnings];
33448
33521
  }
33449
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/Initialization.ts
33522
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/Initialization.ts
33450
33523
  /**
33451
33524
  * Copyright 2015 CANAL+ Group
33452
33525
  *
@@ -33488,7 +33561,7 @@ function parseInitialization(root) {
33488
33561
  }
33489
33562
  return [parsedInitialization, warnings];
33490
33563
  }
33491
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/SegmentBase.ts
33564
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/SegmentBase.ts
33492
33565
  /**
33493
33566
  * Copyright 2015 CANAL+ Group
33494
33567
  *
@@ -33598,7 +33671,7 @@ function parseSegmentBase(root) {
33598
33671
  }
33599
33672
  return [attributes, warnings];
33600
33673
  }
33601
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/SegmentURL.ts
33674
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/SegmentURL.ts
33602
33675
  /**
33603
33676
  * Copyright 2015 CANAL+ Group
33604
33677
  *
@@ -33652,7 +33725,7 @@ function parseSegmentURL(root) {
33652
33725
  }
33653
33726
  return [parsedSegmentURL, warnings];
33654
33727
  }
33655
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/SegmentList.ts
33728
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/SegmentList.ts
33656
33729
  /**
33657
33730
  * Copyright 2015 CANAL+ Group
33658
33731
  *
@@ -33699,7 +33772,7 @@ function parseSegmentList(root) {
33699
33772
  });
33700
33773
  return [ret, warnings];
33701
33774
  }
33702
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/SegmentTimeline.ts
33775
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/SegmentTimeline.ts
33703
33776
  /**
33704
33777
  * Copyright 2015 CANAL+ Group
33705
33778
  *
@@ -33730,7 +33803,7 @@ function createSegmentTimelineParser(root) {
33730
33803
  return result;
33731
33804
  };
33732
33805
  }
33733
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/SegmentTemplate.ts
33806
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/SegmentTemplate.ts
33734
33807
  /**
33735
33808
  * Copyright 2015 CANAL+ Group
33736
33809
  *
@@ -33818,7 +33891,7 @@ function parseSegmentTemplate(root) {
33818
33891
  }
33819
33892
  return [ret, warnings];
33820
33893
  }
33821
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/Representation.ts
33894
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/Representation.ts
33822
33895
  /**
33823
33896
  * Copyright 2015 CANAL+ Group
33824
33897
  *
@@ -34045,7 +34118,7 @@ function createRepresentationIntermediateRepresentation(representationElement) {
34045
34118
  attributes: attributes
34046
34119
  }, warnings];
34047
34120
  }
34048
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.ts
34121
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/AdaptationSet.ts
34049
34122
  /**
34050
34123
  * Copyright 2015 CANAL+ Group
34051
34124
  *
@@ -34415,7 +34488,7 @@ function createAdaptationSetIntermediateRepresentation(adaptationSetElement) {
34415
34488
  attributes: attributes
34416
34489
  }, warnings];
34417
34490
  }
34418
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/EventStream.ts
34491
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/EventStream.ts
34419
34492
  /**
34420
34493
  * Copyright 2015 CANAL+ Group
34421
34494
  *
@@ -34520,7 +34593,7 @@ function parseEvent(element) {
34520
34593
  }
34521
34594
  return [eventIR, warnings];
34522
34595
  }
34523
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/Period.ts
34596
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/Period.ts
34524
34597
  /**
34525
34598
  * Copyright 2015 CANAL+ Group
34526
34599
  *
@@ -34659,7 +34732,7 @@ function createPeriodIntermediateRepresentation(periodElement) {
34659
34732
  attributes: attributes
34660
34733
  }, warnings];
34661
34734
  }
34662
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/node_parsers/MPD.ts
34735
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/node_parsers/MPD.ts
34663
34736
  /**
34664
34737
  * Copyright 2015 CANAL+ Group
34665
34738
  *
@@ -34837,7 +34910,7 @@ function createMPDIntermediateRepresentation(root) {
34837
34910
  attributes: attributes
34838
34911
  }, warnings];
34839
34912
  }
34840
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/parse_from_document.ts
34913
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/parse_from_document.ts
34841
34914
  /**
34842
34915
  * Copyright 2015 CANAL+ Group
34843
34916
  *
@@ -34951,7 +35024,7 @@ function parseFromDocument(document, args) {
34951
35024
  }
34952
35025
  }
34953
35026
  }
34954
- ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/js-parser/index.ts
35027
+ ;// CONCATENATED MODULE: ./src/parsers/manifest/dash/native-parser/index.ts
34955
35028
  /**
34956
35029
  * Copyright 2015 CANAL+ Group
34957
35030
  *
@@ -34968,7 +35041,7 @@ function parseFromDocument(document, args) {
34968
35041
  * limitations under the License.
34969
35042
  */
34970
35043
 
34971
- /* harmony default export */ var js_parser = (parseFromDocument);
35044
+ /* harmony default export */ var native_parser = (parseFromDocument);
34972
35045
  ;// CONCATENATED MODULE: ./src/transports/dash/manifest_parser.ts
34973
35046
  /**
34974
35047
  * Copyright 2015 CANAL+ Group
@@ -35046,12 +35119,17 @@ function generateManifestParser(options) {
35046
35119
  * @returns {Object|Promise.<Object>}
35047
35120
  */
35048
35121
  function runDefaultJsParser() {
35049
- if (parsers.js === null) {
35122
+ if (parsers.fastJs !== null) {
35123
+ var manifestStr = getManifestAsString(responseData);
35124
+ var parsedManifest = parsers.fastJs(manifestStr, dashParserOpts);
35125
+ return processMpdParserResponse(parsedManifest);
35126
+ } else if (parsers["native"] !== null) {
35127
+ var manifestDocument = getManifestAsDocument(responseData);
35128
+ var _parsedManifest = parsers["native"](manifestDocument, dashParserOpts);
35129
+ return processMpdParserResponse(_parsedManifest);
35130
+ } else {
35050
35131
  throw new Error("No MPD parser is imported");
35051
35132
  }
35052
- var manifestDoc = getManifestAsDocument(responseData);
35053
- var parsedManifest = parsers.js(manifestDoc, dashParserOpts);
35054
- return processMpdParserResponse(parsedManifest);
35055
35133
  }
35056
35134
  /**
35057
35135
  * Process return of one of the MPD parser.
@@ -35186,6 +35264,25 @@ function assertLoadedResourcesFormatArrayBuffer(loadedResources) {
35186
35264
  throw new Error("Invalid data given to the LoadedRessource");
35187
35265
  });
35188
35266
  }
35267
+ /**
35268
+ * Try to convert a Manifest from an unknown format to an array of nodes as
35269
+ * parsed by our XML DOM parser.
35270
+ *
35271
+ * Throws if the format cannot be converted.
35272
+ * @param {*} manifestSrc
35273
+ * @returns {Array.<Object | string>}
35274
+ */
35275
+ function getManifestAsString(manifestSrc) {
35276
+ if (manifestSrc instanceof ArrayBuffer) {
35277
+ return utf8ToStr(new Uint8Array(manifestSrc));
35278
+ } else if (typeof manifestSrc === "string") {
35279
+ return manifestSrc;
35280
+ } else if (manifestSrc instanceof Document) {
35281
+ return manifestSrc.documentElement.outerHTML;
35282
+ } else {
35283
+ throw new Error("DASH Manifest Parser: Unrecognized Manifest format");
35284
+ }
35285
+ }
35189
35286
  /**
35190
35287
  * Try to convert a Manifest from an unknown format to a `Document` format.
35191
35288
  * Useful to exploit DOM-parsing APIs to quickly parse an XML Manifest.
@@ -37266,7 +37363,7 @@ function addDASHFeature(features) {
37266
37363
  if (features.transports.dash === undefined) {
37267
37364
  features.transports.dash = dash;
37268
37365
  }
37269
- features.dashParsers.js = js_parser;
37366
+ features.dashParsers["native"] = native_parser;
37270
37367
  features.mainThreadMediaSourceInit = MediaSourceContentInitializer;
37271
37368
  features.codecSupportProber = main_codec_support_prober;
37272
37369
  }
@@ -50081,13 +50178,19 @@ function getStartDate(mediaElement) {
50081
50178
  var hasMseInWorker = typeof MediaSource === "function" && /* eslint-disable-next-line */
50082
50179
  MediaSource.canConstructInDedicatedWorker === true;
50083
50180
  /* harmony default export */ var has_mse_in_worker = (hasMseInWorker);
50084
- ;// CONCATENATED MODULE: ./src/compat/has_webassembly.ts
50181
+ ;// CONCATENATED MODULE: ./src/compat/has_worker_api.ts
50182
+
50085
50183
  /**
50086
- * If `true` the current environment support known WebAssembly API to
50087
- * instantiate a WebAssembly module.
50184
+ * Return `true` if the current device is compatible with the Worker API.
50185
+ *
50186
+ * Some old webkit devices, such as the PlayStation 4, returns weird results
50187
+ * when doing the most straightforward check. We have to check if other Webkit
50188
+ * devices have the same issue.
50189
+ * @returns {boolean}
50088
50190
  */
50089
- var hasWebassembly = typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function";
50090
- /* harmony default export */ var has_webassembly = (hasWebassembly);
50191
+ function hasWorkerApi() {
50192
+ return isPlayStation4 ? typeof Worker === "object" || typeof Worker === "function" : typeof Worker === "function";
50193
+ }
50091
50194
  ;// CONCATENATED MODULE: ./src/errors/worker_initialization_error.ts
50092
50195
 
50093
50196
 
@@ -52892,7 +52995,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
52892
52995
  // Workaround to support Firefox autoplay on FF 42.
52893
52996
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
52894
52997
  videoElement.preload = "auto";
52895
- _this.version = /* PLAYER_VERSION */"4.0.0-dev.2024022600";
52998
+ _this.version = /* PLAYER_VERSION */"4.0.0-dev.2024030500";
52896
52999
  _this.log = src_log;
52897
53000
  _this.state = "STOPPED";
52898
53001
  _this.videoElement = videoElement;
@@ -52943,14 +53046,10 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
52943
53046
  var _this2 = this;
52944
53047
  return new Promise(function (res, rej) {
52945
53048
  var _a;
52946
- if (typeof Worker !== "function") {
53049
+ if (!hasWorkerApi()) {
52947
53050
  src_log.warn("API: Cannot rely on a WebWorker: Worker API unavailable");
52948
53051
  return rej(new WorkerInitializationError("INCOMPATIBLE_ERROR", "Worker unavailable"));
52949
53052
  }
52950
- if (!has_webassembly) {
52951
- src_log.warn("API: Cannot rely on a WebWorker: WebAssembly unavailable");
52952
- return rej(new WorkerInitializationError("INCOMPATIBLE_ERROR", "WebAssembly unavailable"));
52953
- }
52954
53053
  if (typeof workerSettings.workerUrl === "string") {
52955
53054
  _this2._priv_worker = new Worker(workerSettings.workerUrl);
52956
53055
  } else {
@@ -55320,7 +55419,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55320
55419
  }]);
55321
55420
  return Player;
55322
55421
  }(EventEmitter);
55323
- Player.version = /* PLAYER_VERSION */"4.0.0-dev.2024022600";
55422
+ Player.version = /* PLAYER_VERSION */"4.0.0-dev.2024030500";
55324
55423
  /* harmony default export */ var public_api = (Player);
55325
55424
  ;// CONCATENATED MODULE: ./src/main_thread/api/index.ts
55326
55425
  /**