rx-player 4.0.0-dev.2023110700 → 4.0.0-dev.2023120600

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 (479) hide show
  1. package/CHANGELOG.md +18 -226
  2. package/FILES.md +1 -1
  3. package/VERSION +1 -1
  4. package/dist/_esm5.processed/compat/add_text_track.d.ts +1 -3
  5. package/dist/_esm5.processed/compat/add_text_track.js +4 -7
  6. package/dist/_esm5.processed/compat/browser_compatibility_types.d.ts +0 -7
  7. package/dist/_esm5.processed/compat/event_listeners.d.ts +2 -15
  8. package/dist/_esm5.processed/compat/event_listeners.js +2 -37
  9. package/dist/_esm5.processed/compat/index.d.ts +1 -3
  10. package/dist/_esm5.processed/compat/index.js +1 -3
  11. package/dist/_esm5.processed/config.d.ts +9 -21
  12. package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.d.ts +0 -58
  13. package/dist/_esm5.processed/core/adaptive/adaptive_representation_selector.js +14 -54
  14. package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.d.ts +2 -8
  15. package/dist/_esm5.processed/core/adaptive/utils/select_optimal_representation.js +2 -11
  16. package/dist/_esm5.processed/core/api/debug/buffer_graph.js +2 -6
  17. package/dist/_esm5.processed/core/api/debug/modules/general_info.js +13 -32
  18. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_content.js +3 -3
  19. package/dist/_esm5.processed/core/api/debug/modules/segment_buffer_size.js +1 -1
  20. package/dist/_esm5.processed/core/api/option_utils.d.ts +14 -35
  21. package/dist/_esm5.processed/core/api/option_utils.js +47 -230
  22. package/dist/_esm5.processed/core/api/public_api.d.ts +92 -266
  23. package/dist/_esm5.processed/core/api/public_api.js +451 -807
  24. package/dist/_esm5.processed/core/{segment_buffers/implementations/image → api/track_management}/index.d.ts +3 -2
  25. package/dist/_esm5.processed/core/{segment_buffers/implementations/image → api/track_management}/index.js +3 -2
  26. package/dist/_esm5.processed/core/api/{tracks_management/media_element_track_choice_manager.d.ts → track_management/media_element_tracks_store.d.ts} +15 -75
  27. package/dist/_esm5.processed/core/api/{tracks_management/media_element_track_choice_manager.js → track_management/media_element_tracks_store.js} +74 -193
  28. package/dist/_esm5.processed/core/api/track_management/track_dispatcher.d.ts +84 -0
  29. package/dist/_esm5.processed/core/api/track_management/track_dispatcher.js +158 -0
  30. package/dist/_esm5.processed/core/api/track_management/tracks_store.d.ts +406 -0
  31. package/dist/_esm5.processed/core/api/track_management/tracks_store.js +932 -0
  32. package/dist/_esm5.processed/core/api/utils.d.ts +1 -0
  33. package/dist/_esm5.processed/core/api/utils.js +28 -11
  34. package/dist/_esm5.processed/core/decrypt/content_decryptor.js +3 -3
  35. package/dist/_esm5.processed/core/decrypt/find_key_system.js +83 -71
  36. package/dist/_esm5.processed/core/decrypt/get_media_keys.js +6 -5
  37. package/dist/_esm5.processed/core/decrypt/session_events_listener.js +10 -72
  38. package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.d.ts +4 -4
  39. package/dist/_esm5.processed/core/decrypt/utils/persistent_sessions_store.js +6 -4
  40. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.d.ts +1 -3
  41. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +7 -26
  42. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.d.ts +3 -9
  43. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher.js +16 -9
  44. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.d.ts +1 -3
  45. package/dist/_esm5.processed/core/fetchers/segment/segment_fetcher_creator.js +1 -1
  46. package/dist/_esm5.processed/core/fetchers/utils/schedule_request.d.ts +1 -6
  47. package/dist/_esm5.processed/core/fetchers/utils/schedule_request.js +4 -41
  48. package/dist/_esm5.processed/core/init/directfile_content_initializer.js +1 -1
  49. package/dist/_esm5.processed/core/init/media_source_content_initializer.d.ts +1 -8
  50. package/dist/_esm5.processed/core/init/media_source_content_initializer.js +5 -19
  51. package/dist/_esm5.processed/core/init/types.d.ts +5 -15
  52. package/dist/_esm5.processed/core/init/utils/rebuffering_controller.d.ts +2 -36
  53. package/dist/_esm5.processed/core/init/utils/rebuffering_controller.js +2 -82
  54. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/text_track_cues_store.js +54 -6
  55. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.d.ts +2 -1
  56. package/dist/_esm5.processed/core/segment_buffers/implementations/text/html/utils.js +19 -2
  57. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.d.ts +1 -2
  58. package/dist/_esm5.processed/core/segment_buffers/implementations/text/native/native_text_segment_buffer.js +2 -3
  59. package/dist/_esm5.processed/core/segment_buffers/implementations/types.d.ts +2 -2
  60. package/dist/_esm5.processed/core/segment_buffers/index.d.ts +2 -2
  61. package/dist/_esm5.processed/core/segment_buffers/index.js +2 -1
  62. package/dist/_esm5.processed/core/segment_buffers/inventory/index.d.ts +1 -0
  63. package/dist/_esm5.processed/core/segment_buffers/inventory/index.js +1 -0
  64. package/dist/_esm5.processed/core/segment_buffers/inventory/utils.d.ts +33 -0
  65. package/dist/_esm5.processed/core/segment_buffers/inventory/utils.js +49 -0
  66. package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.d.ts +0 -1
  67. package/dist/_esm5.processed/core/segment_buffers/segment_buffers_store.js +2 -16
  68. package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.d.ts +0 -15
  69. package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.js +183 -93
  70. package/dist/_esm5.processed/core/stream/adaptation/get_representations_switch_strategy.d.ts +39 -0
  71. package/dist/_esm5.processed/core/stream/adaptation/get_representations_switch_strategy.js +133 -0
  72. package/dist/_esm5.processed/core/stream/adaptation/types.d.ts +27 -13
  73. package/dist/_esm5.processed/core/stream/index.d.ts +2 -3
  74. package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.d.ts +2 -0
  75. package/dist/_esm5.processed/core/stream/orchestrator/stream_orchestrator.js +5 -7
  76. package/dist/_esm5.processed/core/stream/period/period_stream.js +13 -12
  77. package/dist/_esm5.processed/core/stream/period/types.d.ts +5 -14
  78. package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.d.ts +2 -4
  79. package/dist/_esm5.processed/core/stream/period/utils/get_adaptation_switch_strategy.js +10 -46
  80. package/dist/_esm5.processed/core/stream/representation/representation_stream.js +29 -23
  81. package/dist/_esm5.processed/core/stream/representation/types.d.ts +11 -1
  82. package/dist/_esm5.processed/default_config.d.ts +35 -98
  83. package/dist/_esm5.processed/default_config.js +36 -113
  84. package/dist/_esm5.processed/errors/custom_loader_error.d.ts +1 -3
  85. package/dist/_esm5.processed/errors/custom_loader_error.js +1 -3
  86. package/dist/_esm5.processed/errors/media_error.js +2 -2
  87. package/dist/_esm5.processed/errors/network_error.d.ts +0 -1
  88. package/dist/_esm5.processed/errors/network_error.js +0 -1
  89. package/dist/_esm5.processed/errors/request_error.d.ts +2 -3
  90. package/dist/_esm5.processed/errors/request_error.js +2 -5
  91. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +3 -3
  92. package/dist/_esm5.processed/features/features_object.js +0 -2
  93. package/dist/_esm5.processed/features/list/directfile.js +2 -5
  94. package/dist/_esm5.processed/features/list/index.d.ts +0 -2
  95. package/dist/_esm5.processed/features/list/index.js +0 -2
  96. package/dist/_esm5.processed/features/types.d.ts +3 -27
  97. package/dist/_esm5.processed/manifest/adaptation.d.ts +9 -11
  98. package/dist/_esm5.processed/manifest/adaptation.js +41 -30
  99. package/dist/_esm5.processed/manifest/index.d.ts +3 -4
  100. package/dist/_esm5.processed/manifest/manifest.d.ts +5 -54
  101. package/dist/_esm5.processed/manifest/manifest.js +5 -110
  102. package/dist/_esm5.processed/manifest/period.d.ts +4 -5
  103. package/dist/_esm5.processed/manifest/representation.d.ts +10 -5
  104. package/dist/_esm5.processed/manifest/representation.js +33 -10
  105. package/dist/_esm5.processed/manifest/representation_index/index.d.ts +2 -2
  106. package/dist/_esm5.processed/manifest/representation_index/static.d.ts +2 -0
  107. package/dist/_esm5.processed/manifest/representation_index/static.js +6 -0
  108. package/dist/_esm5.processed/manifest/representation_index/types.d.ts +42 -21
  109. package/dist/_esm5.processed/manifest/types.d.ts +0 -2
  110. package/dist/_esm5.processed/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +17 -0
  111. package/dist/_esm5.processed/parsers/manifest/dash/common/convert_supplemental_codecs.js +26 -0
  112. package/dist/_esm5.processed/parsers/manifest/dash/common/flatten_overlapping_periods.js +5 -0
  113. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.d.ts +17 -31
  114. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/base.js +26 -19
  115. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.d.ts +2 -0
  116. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/list.js +7 -1
  117. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.d.ts +2 -6
  118. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/template.js +11 -8
  119. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +2 -0
  120. package/dist/_esm5.processed/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +6 -0
  121. package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.d.ts +2 -2
  122. package/dist/_esm5.processed/parsers/manifest/dash/common/infer_adaptation_type.js +1 -6
  123. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_adaptation_sets.js +3 -5
  124. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.d.ts +0 -2
  125. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_mpd.js +1 -1
  126. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_periods.js +2 -2
  127. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.d.ts +0 -2
  128. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representation_index.js +2 -2
  129. package/dist/_esm5.processed/parsers/manifest/dash/common/parse_representations.js +29 -17
  130. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +13 -6
  131. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/Representation.js +7 -2
  132. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.d.ts +10 -1
  133. package/dist/_esm5.processed/parsers/manifest/dash/js-parser/node_parsers/utils.js +18 -2
  134. package/dist/_esm5.processed/parsers/manifest/dash/node_parser_types.d.ts +6 -4
  135. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +7 -6
  136. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +5 -2
  137. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
  138. package/dist/_esm5.processed/parsers/manifest/local/representation_index.d.ts +2 -0
  139. package/dist/_esm5.processed/parsers/manifest/local/representation_index.js +6 -0
  140. package/dist/_esm5.processed/parsers/manifest/metaplaylist/metaplaylist_parser.js +6 -6
  141. package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.d.ts +12 -3
  142. package/dist/_esm5.processed/parsers/manifest/metaplaylist/representation_index.js +11 -2
  143. package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.d.ts +0 -1
  144. package/dist/_esm5.processed/parsers/manifest/smooth/create_parser.js +11 -17
  145. package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.d.ts +21 -83
  146. package/dist/_esm5.processed/parsers/manifest/smooth/representation_index.js +53 -125
  147. package/dist/_esm5.processed/parsers/manifest/smooth/shared_smooth_segment_timeline.d.ts +119 -0
  148. package/dist/_esm5.processed/parsers/manifest/smooth/shared_smooth_segment_timeline.js +159 -0
  149. package/dist/_esm5.processed/parsers/manifest/smooth/utils/add_segment_infos.d.ts +3 -6
  150. package/dist/_esm5.processed/parsers/manifest/smooth/utils/add_segment_infos.js +4 -4
  151. package/dist/_esm5.processed/parsers/manifest/types.d.ts +4 -3
  152. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_extent.js +1 -8
  153. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_origin.js +1 -9
  154. package/dist/_esm5.processed/public_types.d.ts +396 -308
  155. package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.d.ts +5 -4
  156. package/dist/_esm5.processed/tools/TextTrackRenderer/text_track_renderer.js +5 -4
  157. package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +4 -4
  158. package/dist/_esm5.processed/transports/dash/manifest_parser.js +2 -3
  159. package/dist/_esm5.processed/transports/dash/pipelines.js +1 -4
  160. package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +2 -2
  161. package/dist/_esm5.processed/transports/dash/segment_loader.js +26 -20
  162. package/dist/_esm5.processed/transports/dash/segment_parser.js +19 -24
  163. package/dist/_esm5.processed/transports/dash/text_loader.js +5 -5
  164. package/dist/_esm5.processed/transports/dash/text_parser.js +28 -33
  165. package/dist/_esm5.processed/transports/local/pipelines.js +1 -10
  166. package/dist/_esm5.processed/transports/local/segment_loader.js +2 -2
  167. package/dist/_esm5.processed/transports/local/segment_parser.d.ts +1 -1
  168. package/dist/_esm5.processed/transports/local/segment_parser.js +10 -10
  169. package/dist/_esm5.processed/transports/local/text_parser.d.ts +2 -2
  170. package/dist/_esm5.processed/transports/local/text_parser.js +23 -23
  171. package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +34 -52
  172. package/dist/_esm5.processed/{utils/list_to_map.d.ts → transports/smooth/is_mp4_embedded_track.d.ts} +5 -5
  173. package/dist/_esm5.processed/{features/list/image_buffer.d.ts → transports/smooth/is_mp4_embedded_track.js} +7 -6
  174. package/dist/_esm5.processed/transports/smooth/pipelines.js +33 -190
  175. package/dist/_esm5.processed/transports/smooth/segment_loader.d.ts +1 -1
  176. package/dist/_esm5.processed/transports/smooth/segment_loader.js +28 -22
  177. package/dist/_esm5.processed/transports/smooth/utils.d.ts +1 -26
  178. package/dist/_esm5.processed/transports/smooth/utils.js +1 -55
  179. package/dist/_esm5.processed/transports/types.d.ts +94 -89
  180. package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +3 -3
  181. package/dist/_esm5.processed/transports/utils/infer_segment_container.d.ts +3 -3
  182. package/dist/_esm5.processed/transports/utils/infer_segment_container.js +5 -7
  183. package/dist/_esm5.processed/transports/utils/parse_text_track.d.ts +8 -12
  184. package/dist/_esm5.processed/transports/utils/parse_text_track.js +19 -21
  185. package/dist/_esm5.processed/utils/array_includes.d.ts +2 -1
  186. package/dist/_esm5.processed/utils/array_includes.js +30 -28
  187. package/dist/_esm5.processed/utils/request/xhr.js +5 -5
  188. package/dist/commonjs/compat/is_codec_supported.js +22 -1
  189. package/dist/commonjs/compat/patch_webkit_source_buffer.js +2 -2
  190. package/dist/commonjs/config.d.ts +1 -0
  191. package/dist/commonjs/core/api/debug/buffer_graph.js +2 -6
  192. package/dist/commonjs/core/api/debug/modules/general_info.js +17 -10
  193. package/dist/commonjs/core/api/option_utils.d.ts +4 -0
  194. package/dist/commonjs/core/api/option_utils.js +8 -3
  195. package/dist/commonjs/core/api/public_api.d.ts +11 -1
  196. package/dist/commonjs/core/api/public_api.js +46 -11
  197. package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.d.ts +6 -0
  198. package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.js +11 -3
  199. package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts +8 -1
  200. package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +8 -4
  201. package/dist/commonjs/core/fetchers/segment/segment_fetcher_creator.d.ts +1 -0
  202. package/dist/commonjs/core/fetchers/utils/schedule_request.js +1 -1
  203. package/dist/commonjs/core/init/directfile_content_initializer.js +24 -7
  204. package/dist/commonjs/core/init/media_source_content_initializer.d.ts +6 -0
  205. package/dist/commonjs/core/init/media_source_content_initializer.js +4 -6
  206. package/dist/commonjs/core/init/utils/content_time_boundaries_observer.d.ts +13 -12
  207. package/dist/commonjs/core/init/utils/content_time_boundaries_observer.js +16 -17
  208. package/dist/commonjs/core/init/utils/get_initial_time.d.ts +17 -3
  209. package/dist/commonjs/core/init/utils/get_initial_time.js +9 -7
  210. package/dist/commonjs/core/segment_buffers/implementations/text/html/text_track_cues_store.js +54 -6
  211. package/dist/commonjs/core/segment_buffers/implementations/text/html/utils.d.ts +2 -1
  212. package/dist/commonjs/core/segment_buffers/implementations/text/html/utils.js +19 -2
  213. package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +2 -2
  214. package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +3 -3
  215. package/dist/commonjs/core/stream/period/period_stream.js +2 -2
  216. package/dist/commonjs/core/stream/representation/utils/get_buffer_status.js +3 -3
  217. package/dist/commonjs/core/stream/representation/utils/get_needed_segments.js +1 -1
  218. package/dist/commonjs/default_config.d.ts +5 -0
  219. package/dist/commonjs/default_config.js +5 -0
  220. package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +3 -1
  221. package/dist/commonjs/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +2 -0
  222. package/dist/commonjs/manifest/representation.js +18 -5
  223. package/dist/commonjs/manifest/representation_index/static.d.ts +1 -1
  224. package/dist/commonjs/manifest/representation_index/static.js +2 -2
  225. package/dist/commonjs/manifest/representation_index/types.d.ts +4 -4
  226. package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +17 -0
  227. package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +30 -0
  228. package/dist/commonjs/parsers/manifest/dash/common/flatten_overlapping_periods.js +5 -0
  229. package/dist/commonjs/parsers/manifest/dash/common/indexes/base.d.ts +6 -1
  230. package/dist/commonjs/parsers/manifest/dash/common/indexes/base.js +4 -3
  231. package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +5 -2
  232. package/dist/commonjs/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +15 -4
  233. package/dist/commonjs/parsers/manifest/dash/common/indexes/index.d.ts +5 -5
  234. package/dist/commonjs/parsers/manifest/dash/common/indexes/list.d.ts +1 -1
  235. package/dist/commonjs/parsers/manifest/dash/common/indexes/list.js +2 -2
  236. package/dist/commonjs/parsers/manifest/dash/common/indexes/template.d.ts +12 -5
  237. package/dist/commonjs/parsers/manifest/dash/common/indexes/template.js +42 -29
  238. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/index.d.ts +2 -1
  239. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +99 -6
  240. package/dist/commonjs/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +250 -51
  241. package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +40 -17
  242. package/dist/commonjs/parsers/manifest/dash/common/manifest_bounds_calculator.js +38 -18
  243. package/dist/commonjs/parsers/manifest/dash/common/parse_adaptation_sets.js +13 -10
  244. package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.js +27 -14
  245. package/dist/commonjs/parsers/manifest/dash/common/parse_periods.d.ts +1 -1
  246. package/dist/commonjs/parsers/manifest/dash/common/parse_periods.js +17 -18
  247. package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.d.ts +19 -6
  248. package/dist/commonjs/parsers/manifest/dash/common/parse_representation_index.js +21 -8
  249. package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +36 -20
  250. package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +3 -0
  251. package/dist/commonjs/parsers/manifest/dash/js-parser/node_parsers/Representation.js +3 -0
  252. package/dist/commonjs/parsers/manifest/dash/node_parser_types.d.ts +2 -0
  253. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +4 -0
  254. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +4 -0
  255. package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
  256. package/dist/commonjs/parsers/manifest/local/representation_index.d.ts +1 -1
  257. package/dist/commonjs/parsers/manifest/local/representation_index.js +3 -3
  258. package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.d.ts +1 -1
  259. package/dist/commonjs/parsers/manifest/metaplaylist/representation_index.js +2 -2
  260. package/dist/commonjs/parsers/manifest/smooth/representation_index.d.ts +5 -5
  261. package/dist/commonjs/parsers/manifest/smooth/representation_index.js +25 -9
  262. package/dist/commonjs/parsers/manifest/types.d.ts +1 -0
  263. package/dist/commonjs/parsers/manifest/utils/index_helpers.js +1 -1
  264. package/dist/commonjs/public_types.d.ts +78 -34
  265. package/dist/commonjs/transports/dash/init_segment_loader.js +10 -5
  266. package/dist/commonjs/transports/dash/manifest_parser.js +5 -2
  267. package/dist/commonjs/transports/dash/segment_loader.js +2 -1
  268. package/dist/commonjs/transports/dash/text_loader.js +2 -0
  269. package/dist/commonjs/transports/metaplaylist/manifest_loader.js +2 -1
  270. package/dist/commonjs/transports/metaplaylist/pipelines.js +4 -1
  271. package/dist/commonjs/transports/smooth/pipelines.js +4 -2
  272. package/dist/commonjs/transports/smooth/segment_loader.js +2 -1
  273. package/dist/commonjs/transports/types.d.ts +12 -0
  274. package/dist/commonjs/transports/utils/generate_manifest_loader.js +6 -3
  275. package/dist/commonjs/utils/queue_microtask.d.ts +2 -0
  276. package/dist/commonjs/utils/queue_microtask.js +7 -0
  277. package/dist/commonjs/utils/request/fetch.d.ts +6 -0
  278. package/dist/commonjs/utils/request/fetch.js +29 -8
  279. package/dist/commonjs/utils/request/xhr.d.ts +11 -5
  280. package/dist/commonjs/utils/request/xhr.js +29 -8
  281. package/dist/es2017/compat/is_codec_supported.js +22 -1
  282. package/dist/es2017/compat/patch_webkit_source_buffer.js +2 -2
  283. package/dist/es2017/config.d.ts +1 -0
  284. package/dist/es2017/core/api/debug/buffer_graph.js +2 -6
  285. package/dist/es2017/core/api/debug/modules/general_info.js +17 -10
  286. package/dist/es2017/core/api/option_utils.d.ts +4 -0
  287. package/dist/es2017/core/api/option_utils.js +8 -3
  288. package/dist/es2017/core/api/public_api.d.ts +11 -1
  289. package/dist/es2017/core/api/public_api.js +44 -9
  290. package/dist/es2017/core/fetchers/manifest/manifest_fetcher.d.ts +6 -0
  291. package/dist/es2017/core/fetchers/manifest/manifest_fetcher.js +11 -3
  292. package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts +8 -1
  293. package/dist/es2017/core/fetchers/segment/segment_fetcher.js +8 -4
  294. package/dist/es2017/core/fetchers/segment/segment_fetcher_creator.d.ts +1 -0
  295. package/dist/es2017/core/fetchers/utils/schedule_request.js +1 -1
  296. package/dist/es2017/core/init/directfile_content_initializer.js +24 -7
  297. package/dist/es2017/core/init/media_source_content_initializer.d.ts +6 -0
  298. package/dist/es2017/core/init/media_source_content_initializer.js +4 -6
  299. package/dist/es2017/core/init/utils/content_time_boundaries_observer.d.ts +13 -12
  300. package/dist/es2017/core/init/utils/content_time_boundaries_observer.js +16 -15
  301. package/dist/es2017/core/init/utils/get_initial_time.d.ts +17 -3
  302. package/dist/es2017/core/init/utils/get_initial_time.js +9 -7
  303. package/dist/es2017/core/segment_buffers/implementations/text/html/text_track_cues_store.js +54 -6
  304. package/dist/es2017/core/segment_buffers/implementations/text/html/utils.d.ts +2 -1
  305. package/dist/es2017/core/segment_buffers/implementations/text/html/utils.js +18 -2
  306. package/dist/es2017/core/stream/adaptation/adaptation_stream.js +2 -2
  307. package/dist/es2017/core/stream/orchestrator/stream_orchestrator.js +3 -3
  308. package/dist/es2017/core/stream/period/period_stream.js +2 -2
  309. package/dist/es2017/core/stream/representation/utils/get_buffer_status.js +3 -3
  310. package/dist/es2017/core/stream/representation/utils/get_needed_segments.js +1 -1
  311. package/dist/es2017/default_config.d.ts +5 -0
  312. package/dist/es2017/default_config.js +5 -0
  313. package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +3 -1
  314. package/dist/es2017/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +2 -0
  315. package/dist/es2017/manifest/representation.js +18 -5
  316. package/dist/es2017/manifest/representation_index/static.d.ts +1 -1
  317. package/dist/es2017/manifest/representation_index/static.js +2 -2
  318. package/dist/es2017/manifest/representation_index/types.d.ts +4 -4
  319. package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +17 -0
  320. package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.js +26 -0
  321. package/dist/es2017/parsers/manifest/dash/common/flatten_overlapping_periods.js +5 -0
  322. package/dist/es2017/parsers/manifest/dash/common/indexes/base.d.ts +6 -1
  323. package/dist/es2017/parsers/manifest/dash/common/indexes/base.js +4 -3
  324. package/dist/es2017/parsers/manifest/dash/common/indexes/get_segments_from_timeline.d.ts +5 -2
  325. package/dist/es2017/parsers/manifest/dash/common/indexes/get_segments_from_timeline.js +15 -4
  326. package/dist/es2017/parsers/manifest/dash/common/indexes/index.d.ts +5 -5
  327. package/dist/es2017/parsers/manifest/dash/common/indexes/list.d.ts +1 -1
  328. package/dist/es2017/parsers/manifest/dash/common/indexes/list.js +2 -2
  329. package/dist/es2017/parsers/manifest/dash/common/indexes/template.d.ts +12 -5
  330. package/dist/es2017/parsers/manifest/dash/common/indexes/template.js +40 -27
  331. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/index.d.ts +2 -1
  332. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.d.ts +99 -6
  333. package/dist/es2017/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.js +246 -51
  334. package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.d.ts +40 -17
  335. package/dist/es2017/parsers/manifest/dash/common/manifest_bounds_calculator.js +38 -18
  336. package/dist/es2017/parsers/manifest/dash/common/parse_adaptation_sets.js +11 -8
  337. package/dist/es2017/parsers/manifest/dash/common/parse_mpd.js +27 -13
  338. package/dist/es2017/parsers/manifest/dash/common/parse_periods.d.ts +1 -1
  339. package/dist/es2017/parsers/manifest/dash/common/parse_periods.js +13 -16
  340. package/dist/es2017/parsers/manifest/dash/common/parse_representation_index.d.ts +19 -6
  341. package/dist/es2017/parsers/manifest/dash/common/parse_representation_index.js +10 -8
  342. package/dist/es2017/parsers/manifest/dash/common/parse_representations.js +36 -20
  343. package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.js +3 -0
  344. package/dist/es2017/parsers/manifest/dash/js-parser/node_parsers/Representation.js +3 -0
  345. package/dist/es2017/parsers/manifest/dash/node_parser_types.d.ts +2 -0
  346. package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +4 -0
  347. package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Representation.js +4 -0
  348. package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
  349. package/dist/es2017/parsers/manifest/local/representation_index.d.ts +1 -1
  350. package/dist/es2017/parsers/manifest/local/representation_index.js +3 -3
  351. package/dist/es2017/parsers/manifest/metaplaylist/representation_index.d.ts +1 -1
  352. package/dist/es2017/parsers/manifest/metaplaylist/representation_index.js +2 -2
  353. package/dist/es2017/parsers/manifest/smooth/representation_index.d.ts +5 -5
  354. package/dist/es2017/parsers/manifest/smooth/representation_index.js +25 -9
  355. package/dist/es2017/parsers/manifest/types.d.ts +1 -0
  356. package/dist/es2017/parsers/manifest/utils/index_helpers.js +1 -1
  357. package/dist/es2017/public_types.d.ts +78 -34
  358. package/dist/es2017/transports/dash/init_segment_loader.js +5 -0
  359. package/dist/es2017/transports/dash/manifest_parser.js +3 -0
  360. package/dist/es2017/transports/dash/segment_loader.js +1 -0
  361. package/dist/es2017/transports/dash/text_loader.js +2 -0
  362. package/dist/es2017/transports/metaplaylist/manifest_loader.js +1 -0
  363. package/dist/es2017/transports/metaplaylist/pipelines.js +4 -1
  364. package/dist/es2017/transports/smooth/pipelines.js +2 -0
  365. package/dist/es2017/transports/smooth/segment_loader.js +1 -0
  366. package/dist/es2017/transports/types.d.ts +12 -0
  367. package/dist/es2017/transports/utils/generate_manifest_loader.js +3 -0
  368. package/dist/es2017/utils/queue_microtask.d.ts +2 -0
  369. package/dist/es2017/utils/queue_microtask.js +5 -0
  370. package/dist/es2017/utils/request/fetch.d.ts +6 -0
  371. package/dist/es2017/utils/request/fetch.js +29 -8
  372. package/dist/es2017/utils/request/xhr.d.ts +11 -5
  373. package/dist/es2017/utils/request/xhr.js +30 -9
  374. package/dist/mpd-parser.wasm +0 -0
  375. package/dist/rx-player.js +900 -492
  376. package/dist/rx-player.min.js +1 -1
  377. package/package.json +3 -7
  378. package/scripts/update-version +2 -0
  379. package/sonar-project.properties +1 -1
  380. package/src/compat/is_codec_supported.ts +23 -1
  381. package/src/compat/patch_webkit_source_buffer.ts +2 -2
  382. package/src/core/api/debug/buffer_graph.ts +2 -5
  383. package/src/core/api/debug/modules/general_info.ts +15 -10
  384. package/src/core/api/option_utils.ts +11 -3
  385. package/src/core/api/public_api.ts +48 -8
  386. package/src/core/fetchers/manifest/manifest_fetcher.ts +21 -3
  387. package/src/core/fetchers/segment/segment_fetcher.ts +19 -5
  388. package/src/core/fetchers/segment/segment_fetcher_creator.ts +1 -0
  389. package/src/core/fetchers/utils/schedule_request.ts +1 -1
  390. package/src/core/init/directfile_content_initializer.ts +23 -7
  391. package/src/core/init/media_source_content_initializer.ts +13 -7
  392. package/src/core/init/utils/content_time_boundaries_observer.ts +23 -22
  393. package/src/core/init/utils/get_initial_time.ts +25 -12
  394. package/src/core/segment_buffers/implementations/text/html/__tests__/utils.test.ts +15 -0
  395. package/src/core/segment_buffers/implementations/text/html/text_track_cues_store.ts +57 -6
  396. package/src/core/segment_buffers/implementations/text/html/utils.ts +19 -2
  397. package/src/core/stream/adaptation/adaptation_stream.ts +2 -2
  398. package/src/core/stream/orchestrator/stream_orchestrator.ts +3 -3
  399. package/src/core/stream/period/period_stream.ts +2 -2
  400. package/src/core/stream/representation/utils/get_buffer_status.ts +3 -3
  401. package/src/core/stream/representation/utils/get_needed_segments.ts +2 -2
  402. package/src/default_config.ts +5 -0
  403. package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +3 -1
  404. package/src/experimental/tools/createMetaplaylist/get_duration_from_manifest.ts +2 -0
  405. package/src/manifest/representation.ts +19 -6
  406. package/src/manifest/representation_index/static.ts +2 -2
  407. package/src/manifest/representation_index/types.ts +4 -4
  408. package/src/parsers/manifest/dash/common/__tests__/convert_supplemental_codecs.test.ts +37 -0
  409. package/src/parsers/manifest/dash/common/__tests__/flatten_overlapping_period.test.ts +20 -0
  410. package/src/parsers/manifest/dash/common/__tests__/manifest_bounds_calculator.test.ts +182 -36
  411. package/src/parsers/manifest/dash/common/convert_supplemental_codecs.ts +32 -0
  412. package/src/parsers/manifest/dash/common/flatten_overlapping_periods.ts +5 -0
  413. package/src/parsers/manifest/dash/common/indexes/base.ts +12 -4
  414. package/src/parsers/manifest/dash/common/indexes/get_segments_from_timeline.ts +19 -5
  415. package/src/parsers/manifest/dash/common/indexes/index.ts +16 -4
  416. package/src/parsers/manifest/dash/common/indexes/list.ts +2 -2
  417. package/src/parsers/manifest/dash/common/indexes/template.ts +52 -31
  418. package/src/parsers/manifest/dash/common/indexes/timeline/index.ts +4 -1
  419. package/src/parsers/manifest/dash/common/indexes/timeline/timeline_representation_index.ts +366 -60
  420. package/src/parsers/manifest/dash/common/manifest_bounds_calculator.ts +63 -25
  421. package/src/parsers/manifest/dash/common/parse_adaptation_sets.ts +10 -4
  422. package/src/parsers/manifest/dash/common/parse_mpd.ts +28 -15
  423. package/src/parsers/manifest/dash/common/parse_periods.ts +12 -17
  424. package/src/parsers/manifest/dash/common/parse_representation_index.ts +50 -26
  425. package/src/parsers/manifest/dash/common/parse_representations.ts +39 -20
  426. package/src/parsers/manifest/dash/js-parser/node_parsers/AdaptationSet.ts +4 -0
  427. package/src/parsers/manifest/dash/js-parser/node_parsers/Representation.ts +4 -0
  428. package/src/parsers/manifest/dash/node_parser_types.ts +2 -0
  429. package/src/parsers/manifest/dash/wasm-parser/rs/events.rs +2 -0
  430. package/src/parsers/manifest/dash/wasm-parser/rs/processor/attributes.rs +2 -0
  431. package/src/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.ts +4 -0
  432. package/src/parsers/manifest/dash/wasm-parser/ts/generators/Representation.ts +4 -0
  433. package/src/parsers/manifest/dash/wasm-parser/ts/types.ts +2 -0
  434. package/src/parsers/manifest/local/representation_index.ts +3 -3
  435. package/src/parsers/manifest/metaplaylist/representation_index.ts +2 -2
  436. package/src/parsers/manifest/smooth/representation_index.ts +23 -9
  437. package/src/parsers/manifest/types.ts +2 -0
  438. package/src/parsers/manifest/utils/__tests__/get_first_time_from_adaptations.test.ts +1 -1
  439. package/src/parsers/manifest/utils/__tests__/get_last_time_from_adaptation.test.ts +1 -1
  440. package/src/parsers/manifest/utils/index_helpers.ts +1 -1
  441. package/src/public_types.ts +79 -34
  442. package/src/transports/dash/init_segment_loader.ts +5 -0
  443. package/src/transports/dash/manifest_parser.ts +6 -0
  444. package/src/transports/dash/segment_loader.ts +1 -0
  445. package/src/transports/dash/text_loader.ts +2 -0
  446. package/src/transports/metaplaylist/manifest_loader.ts +1 -0
  447. package/src/transports/metaplaylist/pipelines.ts +4 -1
  448. package/src/transports/smooth/pipelines.ts +2 -0
  449. package/src/transports/smooth/segment_loader.ts +1 -0
  450. package/src/transports/types.ts +12 -0
  451. package/src/transports/utils/generate_manifest_loader.ts +3 -0
  452. package/src/utils/queue_microtask.ts +7 -0
  453. package/src/utils/request/fetch.ts +35 -8
  454. package/src/utils/request/xhr.ts +45 -14
  455. package/dist/_esm5.processed/compat/fullscreen.d.ts +0 -32
  456. package/dist/_esm5.processed/compat/fullscreen.js +0 -78
  457. package/dist/_esm5.processed/compat/is_offline.d.ts +0 -39
  458. package/dist/_esm5.processed/compat/is_offline.js +0 -43
  459. package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.d.ts +0 -258
  460. package/dist/_esm5.processed/core/api/tracks_management/track_choice_manager.js +0 -989
  461. package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.d.ts +0 -75
  462. package/dist/_esm5.processed/core/segment_buffers/implementations/image/image_segment_buffer.js +0 -133
  463. package/dist/_esm5.processed/features/list/bif_parser.d.ts +0 -23
  464. package/dist/_esm5.processed/features/list/bif_parser.js +0 -27
  465. package/dist/_esm5.processed/features/list/image_buffer.js +0 -25
  466. package/dist/_esm5.processed/transports/dash/image_pipelines.d.ts +0 -38
  467. package/dist/_esm5.processed/transports/dash/image_pipelines.js +0 -129
  468. package/dist/_esm5.processed/utils/list_to_map.js +0 -28
  469. package/dist/_esm5.processed/utils/simple_set.d.ts +0 -51
  470. package/dist/_esm5.processed/utils/simple_set.js +0 -57
  471. package/dist/_esm5.processed/utils/uniq.d.ts +0 -36
  472. package/dist/_esm5.processed/utils/uniq.js +0 -43
  473. package/dist/commonjs/parsers/manifest/utils/is_segment_still_available.d.ts +0 -29
  474. package/dist/commonjs/parsers/manifest/utils/is_segment_still_available.js +0 -54
  475. package/dist/es2017/parsers/manifest/utils/is_segment_still_available.d.ts +0 -29
  476. package/dist/es2017/parsers/manifest/utils/is_segment_still_available.js +0 -51
  477. package/src/parsers/manifest/utils/is_segment_still_available.ts +0 -58
  478. package/src/typings/next-tick.d.ts +0 -23
  479. package/src/typings/object-assign.d.ts +0 -48
@@ -20,16 +20,6 @@ import getMonotonicTimeStamp from "../../../../utils/monotonic_timestamp";
20
20
  * This class allows to easily calculate the first and last available positions
21
21
  * in a content at any time.
22
22
  *
23
- * That task can be an hard for dynamic DASH contents: it depends on a
24
- * `timeShiftBufferDepth` defined in the MPD and on the maximum possible
25
- * position.
26
- *
27
- * The latter can come from either a clock synchronization mechanism or the
28
- * indexing schemes (e.g. SegmentTemplate, SegmentTimeline etc.) of the last
29
- * Periods.
30
- * As such, it might only be known once a large chunk of the MPD has already
31
- * been parsed.
32
- *
33
23
  * By centralizing the manifest bounds calculation in this class and by giving
34
24
  * an instance of it to each parsed elements which might depend on it, we
35
25
  * ensure that we can provide it once it is known to every one of those
@@ -37,8 +27,18 @@ import getMonotonicTimeStamp from "../../../../utils/monotonic_timestamp";
37
27
  * @class ManifestBoundsCalculator
38
28
  */
39
29
  export default class ManifestBoundsCalculator {
40
- /** Value of MPD@timeShiftBufferDepth. */
30
+ /**
31
+ * Value of MPD@timeShiftBufferDepth.
32
+ * `null` if not defined.
33
+ */
41
34
  private _timeShiftBufferDepth : number | null;
35
+ /**
36
+ * Value of MPD@availabilityStartTime as an unix timestamp in seconds.
37
+ * `0` if it wasn't defined.
38
+ */
39
+ private _availabilityStartTime : number;
40
+ /** `true` if MPD@type is equal to "dynamic". */
41
+ private _isDynamic : boolean;
42
42
  /**
43
43
  * Monotonically-raising timestamp (the one used by the RxPlayer) when
44
44
  * `lastPosition` was calculated.
@@ -46,20 +46,30 @@ export default class ManifestBoundsCalculator {
46
46
  private _positionTime : number | undefined;
47
47
  /** Last position calculated at a given moment (itself indicated by `_positionTime`. */
48
48
  private _lastPosition : number | undefined;
49
- /** `true` if MPD@type is equal to "dynamic". */
50
- private _isDynamic : boolean;
49
+ /**
50
+ * Offset to add to `performance.now` to obtain a good estimation of the
51
+ * server-side unix timestamp.
52
+ *
53
+ * `undefined` if unknown.
54
+ */
55
+ private _serverTimestampOffset : number | undefined;
51
56
 
52
57
  /**
53
58
  * @param {Object} args
54
59
  */
55
- constructor(args : { timeShiftBufferDepth : number | undefined;
56
- isDynamic : boolean; }
57
- ) {
60
+ constructor(args : {
61
+ availabilityStartTime : number;
62
+ timeShiftBufferDepth : number | undefined;
63
+ isDynamic : boolean;
64
+ serverTimestampOffset: number | undefined;
65
+ }) {
58
66
  this._isDynamic = args.isDynamic;
59
67
  this._timeShiftBufferDepth = !args.isDynamic ||
60
68
  args.timeShiftBufferDepth === undefined ?
61
69
  null :
62
70
  args.timeShiftBufferDepth;
71
+ this._serverTimestampOffset = args.serverTimestampOffset;
72
+ this._availabilityStartTime = args.availabilityStartTime;
63
73
  }
64
74
 
65
75
  /**
@@ -102,11 +112,12 @@ export default class ManifestBoundsCalculator {
102
112
  * Consider that it is only an estimation, not the real value.
103
113
  * @return {number|undefined}
104
114
  */
105
- estimateMinimumBound(): number | undefined {
115
+ getEstimatedMinimumSegmentTime(): number | undefined {
106
116
  if (!this._isDynamic || this._timeShiftBufferDepth === null) {
107
117
  return 0;
108
118
  }
109
- const maximumBound = this.estimateMaximumBound();
119
+ const maximumBound = this.getEstimatedLiveEdge() ??
120
+ this.getEstimatedMaximumPosition(0);
110
121
  if (maximumBound === undefined) {
111
122
  return undefined;
112
123
  }
@@ -115,15 +126,42 @@ export default class ManifestBoundsCalculator {
115
126
  }
116
127
 
117
128
  /**
118
- * Estimate a maximum bound for the content from the last set segment time.
119
- * Consider that it is only an estimation, not the real value.
129
+ * Estimate the segment time in seconds that corresponds to what could be
130
+ * considered the live edge (or `undefined` for non-live contents).
131
+ *
132
+ * Note that for some contents which just anounce segments in advance, this
133
+ * value might be very different than the maximum position that is
134
+ * requestable.
120
135
  * @return {number|undefined}
121
136
  */
122
- estimateMaximumBound() : number | undefined {
123
- if (this._isDynamic &&
124
- this._positionTime != null &&
125
- this._lastPosition != null)
126
- {
137
+ getEstimatedLiveEdge() : number | undefined {
138
+ if (!this._isDynamic || this._serverTimestampOffset === undefined) {
139
+ return undefined;
140
+ }
141
+ return (getMonotonicTimeStamp() + this._serverTimestampOffset) / 1000 -
142
+ this._availabilityStartTime;
143
+ }
144
+
145
+ /**
146
+ * Produce a rough estimate of the ending time of the last requestable segment
147
+ * in that content.
148
+ *
149
+ * This value is only an estimate and may be far from reality.
150
+ *
151
+ * The `availabilityTimeOffset` in argument is the corresponding
152
+ * `availabilityTimeOffset` that applies to the current wanted segment, or `0`
153
+ * if none exist. It will be applied on live content to deduce the maximum
154
+ * segment time available.
155
+ */
156
+ getEstimatedMaximumPosition(availabilityTimeOffset: number) : number | undefined {
157
+ if (!this._isDynamic) {
158
+ return this._lastPosition;
159
+ }
160
+
161
+ const liveEdge = this.getEstimatedLiveEdge();
162
+ if (liveEdge !== undefined && availabilityTimeOffset !== Infinity) {
163
+ return liveEdge + availabilityTimeOffset;
164
+ } else if (this._positionTime !== undefined && this._lastPosition !== undefined) {
127
165
  return Math.max((this._lastPosition - this._positionTime) +
128
166
  (getMonotonicTimeStamp() / 1000),
129
167
  0);
@@ -281,12 +281,19 @@ export default function parseAdaptationSets(
281
281
  roles.some((role) => role.schemeIdUri === "urn:mpeg:dash:role:2011");
282
282
 
283
283
  const representationsIR = adaptation.children.representations;
284
+
284
285
  const availabilityTimeComplete =
285
286
  adaptation.attributes.availabilityTimeComplete ??
286
287
  context.availabilityTimeComplete;
287
- const availabilityTimeOffset =
288
- (adaptation.attributes.availabilityTimeOffset ?? 0) +
289
- context.availabilityTimeOffset;
288
+
289
+ let availabilityTimeOffset;
290
+ if (
291
+ adaptation.attributes.availabilityTimeOffset !== undefined ||
292
+ context.availabilityTimeOffset !== undefined
293
+ ) {
294
+ availabilityTimeOffset = (adaptation.attributes.availabilityTimeOffset ?? 0) +
295
+ (context.availabilityTimeOffset ?? 0);
296
+ }
290
297
 
291
298
  const adaptationMimeType = adaptation.attributes.mimeType;
292
299
  const adaptationCodecs = adaptation.attributes.codecs;
@@ -327,7 +334,6 @@ export default function parseAdaptationSets(
327
334
  parentSegmentTemplates,
328
335
  receivedTime: context.receivedTime,
329
336
  start: context.start,
330
- timeShiftBufferDepth: context.timeShiftBufferDepth,
331
337
  unsafelyBaseOnPreviousAdaptation: null,
332
338
  };
333
339
 
@@ -30,6 +30,7 @@ import { IResponseData } from "../parsers_types";
30
30
  import getClockOffset from "./get_clock_offset";
31
31
  import getHTTPUTCTimingURL from "./get_http_utc-timing_url";
32
32
  import getMinimumAndMaximumPositions from "./get_minimum_and_maximum_positions";
33
+ import ManifestBoundsCalculator from "./manifest_bounds_calculator";
33
34
  import parseAvailabilityStartTime from "./parse_availability_start_time";
34
35
  import parsePeriods, {
35
36
  IXLinkInfos,
@@ -252,11 +253,19 @@ function parseCompleteIntermediateRepresentation(
252
253
  const { externalClockOffset: clockOffset,
253
254
  unsafelyBaseOnPreviousManifest } = args;
254
255
 
256
+ const { externalClockOffset } = args;
257
+ const manifestBoundsCalculator = new ManifestBoundsCalculator({
258
+ availabilityStartTime,
259
+ isDynamic,
260
+ timeShiftBufferDepth,
261
+ serverTimestampOffset: externalClockOffset,
262
+ });
255
263
  const manifestInfos = { availabilityStartTime,
256
264
  baseURLs: mpdBaseUrls,
257
265
  clockOffset,
258
266
  duration: rootAttributes.duration,
259
267
  isDynamic,
268
+ manifestBoundsCalculator,
260
269
  manifestProfiles: mpdIR.attributes.profiles,
261
270
  receivedTime: args.manifestReceivedTime,
262
271
  timeShiftBufferDepth,
@@ -313,31 +322,33 @@ function parseCompleteIntermediateRepresentation(
313
322
  livePosition: undefined,
314
323
  time: now };
315
324
  } else {
316
- minimumTime = minimumSafePosition;
317
- timeshiftDepth = timeShiftBufferDepth ?? null;
325
+ // Determine the maximum seekable position
318
326
  let finalMaximumSafePosition : number;
319
- let livePosition;
320
-
321
- if (maximumUnsafePosition !== undefined) {
322
- livePosition = maximumUnsafePosition;
323
- }
324
-
325
327
  if (maximumSafePosition !== undefined) {
326
328
  finalMaximumSafePosition = maximumSafePosition;
327
329
  } else {
328
- const ast = availabilityStartTime ?? 0;
329
- const { externalClockOffset } = args;
330
330
  if (externalClockOffset === undefined) {
331
331
  log.warn("DASH Parser: use system clock to define maximum position");
332
- finalMaximumSafePosition = (Date.now() / 1000) - ast;
332
+ finalMaximumSafePosition = (Date.now() / 1000) - availabilityStartTime;
333
333
  } else {
334
334
  const serverTime = getMonotonicTimeStamp() + externalClockOffset;
335
- finalMaximumSafePosition = (serverTime / 1000) - ast;
335
+ finalMaximumSafePosition = (serverTime / 1000) - availabilityStartTime;
336
336
  }
337
337
  }
338
+
339
+ // Determine live edge (what position corresponds to live content, can be
340
+ // inferior or superior to the maximum anounced position in some specific
341
+ // scenarios). However, the `timeShiftBufferDepth` should be based on it.
342
+ let livePosition = manifestBoundsCalculator.getEstimatedLiveEdge();
338
343
  if (livePosition === undefined) {
339
- livePosition = finalMaximumSafePosition;
344
+ if (maximumUnsafePosition !== undefined) {
345
+ livePosition = maximumUnsafePosition;
346
+ } else {
347
+ livePosition = finalMaximumSafePosition;
348
+ }
349
+ // manifestBoundsCalculator.forceLiveEdge(livePosition);
340
350
  }
351
+
341
352
  maximumTimeData = { isLinear: true,
342
353
  maximumSafePosition: finalMaximumSafePosition,
343
354
  livePosition,
@@ -345,10 +356,12 @@ function parseCompleteIntermediateRepresentation(
345
356
 
346
357
  // if the minimum calculated time is even below the buffer depth, perhaps we
347
358
  // can go even lower in terms of depth
359
+ minimumTime = minimumSafePosition;
360
+ timeshiftDepth = timeShiftBufferDepth ?? null;
348
361
  if (timeshiftDepth !== null && minimumTime !== undefined &&
349
- finalMaximumSafePosition - minimumTime > timeshiftDepth)
362
+ livePosition - minimumTime > timeshiftDepth)
350
363
  {
351
- timeshiftDepth = finalMaximumSafePosition - minimumTime;
364
+ timeshiftDepth = livePosition - minimumTime;
352
365
  }
353
366
  }
354
367
 
@@ -18,6 +18,7 @@ import log from "../../../../log";
18
18
  import Manifest from "../../../../manifest";
19
19
  import flatMap from "../../../../utils/flat_map";
20
20
  import idGenerator from "../../../../utils/id_generator";
21
+ import isNullOrUndefined from "../../../../utils/is_null_or_undefined";
21
22
  import getMonotonicTimeStamp from "../../../../utils/monotonic_timestamp";
22
23
  import objectValues from "../../../../utils/object_values";
23
24
  import { utf8ToStr } from "../../../../utils/string_parsing";
@@ -34,7 +35,6 @@ import {
34
35
  // eslint-disable-next-line max-len
35
36
  import flattenOverlappingPeriods from "./flatten_overlapping_periods";
36
37
  import getPeriodsTimeInformation from "./get_periods_time_infos";
37
- import ManifestBoundsCalculator from "./manifest_bounds_calculator";
38
38
  import parseAdaptationSets, {
39
39
  IAdaptationSetContext,
40
40
  } from "./parse_adaptation_sets";
@@ -68,12 +68,9 @@ export default function parsePeriods(
68
68
  throw new Error("MPD parsing error: the time information are incoherent.");
69
69
  }
70
70
 
71
- const { isDynamic,
72
- timeShiftBufferDepth } = context;
73
- const manifestBoundsCalculator = new ManifestBoundsCalculator({ isDynamic,
74
- timeShiftBufferDepth });
71
+ const { isDynamic, manifestBoundsCalculator } = context;
75
72
 
76
- if (!isDynamic && context.duration != null) {
73
+ if (!isDynamic && !isNullOrUndefined(context.duration)) {
77
74
  manifestBoundsCalculator.setLastPosition(context.duration);
78
75
  }
79
76
 
@@ -91,7 +88,7 @@ export default function parsePeriods(
91
88
  periodEnd } = periodsTimeInformation[i];
92
89
 
93
90
  let periodID : string;
94
- if (periodIR.attributes.id == null) {
91
+ if (isNullOrUndefined(periodIR.attributes.id)) {
95
92
  log.warn("DASH: No usable id found in the Period. Generating one.");
96
93
  periodID = "gen-dash-period-" + generatePeriodID();
97
94
  } else {
@@ -109,8 +106,8 @@ export default function parsePeriods(
109
106
  const unsafelyBaseOnPreviousPeriod = context
110
107
  .unsafelyBaseOnPreviousManifest?.getPeriod(periodID) ?? null;
111
108
 
112
- const availabilityTimeComplete = periodIR.attributes.availabilityTimeComplete ?? true;
113
- const availabilityTimeOffset = periodIR.attributes.availabilityTimeOffset ?? 0;
109
+ const availabilityTimeComplete = periodIR.attributes.availabilityTimeComplete;
110
+ const availabilityTimeOffset = periodIR.attributes.availabilityTimeOffset;
114
111
  const { manifestProfiles } = context;
115
112
  const { segmentTemplate } = periodIR.children;
116
113
  const adapCtxt : IAdaptationSetContext = { availabilityTimeComplete,
@@ -124,7 +121,6 @@ export default function parsePeriods(
124
121
  receivedTime,
125
122
  segmentTemplate,
126
123
  start: periodStart,
127
- timeShiftBufferDepth,
128
124
  unsafelyBaseOnPreviousPeriod };
129
125
  const adaptations = parseAdaptationSets(periodIR.children.adaptations, adapCtxt);
130
126
 
@@ -208,7 +204,7 @@ function guessLastPositionFromClock(
208
204
  context : IPeriodContext,
209
205
  minimumTime : number
210
206
  ) : [number, number] | undefined {
211
- if (context.clockOffset != null) {
207
+ if (!isNullOrUndefined(context.clockOffset)) {
212
208
  const lastPosition = context.clockOffset / 1000 -
213
209
  context.availabilityStartTime;
214
210
  const positionTime = getMonotonicTimeStamp() / 1000;
@@ -245,7 +241,7 @@ function getMaximumLastPosition(
245
241
  let maxEncounteredPosition : number | null = null;
246
242
  let allIndexAreEmpty = true;
247
243
  const adaptationsVal = objectValues(adaptationsPerType)
248
- .filter((ada) : ada is IParsedAdaptation[] => ada != null);
244
+ .filter((ada) : ada is IParsedAdaptation[] => !isNullOrUndefined(ada));
249
245
  const allAdaptations = flatMap(adaptationsVal,
250
246
  (adaptationsForType) => adaptationsForType);
251
247
  for (const adaptation of allAdaptations) {
@@ -256,15 +252,15 @@ function getMaximumLastPosition(
256
252
  allIndexAreEmpty = false;
257
253
  if (typeof position === "number") {
258
254
  maxEncounteredPosition =
259
- maxEncounteredPosition == null ? position :
260
- Math.max(maxEncounteredPosition,
261
- position);
255
+ isNullOrUndefined(maxEncounteredPosition) ? position :
256
+ Math.max(maxEncounteredPosition,
257
+ position);
262
258
  }
263
259
  }
264
260
  }
265
261
  }
266
262
 
267
- if (maxEncounteredPosition != null) {
263
+ if (!isNullOrUndefined(maxEncounteredPosition)) {
268
264
  return maxEncounteredPosition;
269
265
  } else if (allIndexAreEmpty) {
270
266
  return null;
@@ -369,6 +365,5 @@ type IInheritedAdaptationContext = Omit<IAdaptationSetContext,
369
365
  "availabilityTimeOffset" |
370
366
  "duration" |
371
367
  "isLastPeriod" |
372
- "manifestBoundsCalculator" |
373
368
  "start" |
374
369
  "unsafelyBaseOnPreviousPeriod">;
@@ -31,6 +31,10 @@ import {
31
31
  ListRepresentationIndex,
32
32
  TemplateRepresentationIndex,
33
33
  TimelineRepresentationIndex,
34
+ IBaseIndexContextArgument,
35
+ IListIndexContextArgument,
36
+ ITemplateIndexContextArgument,
37
+ ITimelineIndexContextArgument,
34
38
  } from "./indexes";
35
39
  import ManifestBoundsCalculator from "./manifest_bounds_calculator";
36
40
  import { IResolvedBaseUrl } from "./resolve_base_urls";
@@ -52,7 +56,6 @@ export default function parseRepresentationIndex(
52
56
  end: periodEnd,
53
57
  start: periodStart,
54
58
  receivedTime,
55
- timeShiftBufferDepth,
56
59
  unsafelyBaseOnPreviousRepresentation,
57
60
  inbandEventStreams,
58
61
  isLastPeriod } = context;
@@ -64,19 +67,24 @@ export default function parseRepresentationIndex(
64
67
  return inbandEventStreams
65
68
  .some(({ schemeIdUri }) => schemeIdUri === inbandEvent.schemeIdUri);
66
69
  };
67
- const reprIndexCtxt = { availabilityTimeComplete: true,
68
- availabilityTimeOffset,
69
- unsafelyBaseOnPreviousRepresentation,
70
- isEMSGWhitelisted,
71
- isLastPeriod,
72
- manifestBoundsCalculator,
73
- isDynamic,
74
- periodEnd,
75
- periodStart,
76
- receivedTime,
77
- representationBitrate: representation.attributes.bitrate,
78
- representationId: representation.attributes.id,
79
- timeShiftBufferDepth };
70
+ const reprIndexCtxt: ITimelineIndexContextArgument |
71
+ ITemplateIndexContextArgument |
72
+ IListIndexContextArgument |
73
+ IBaseIndexContextArgument =
74
+ {
75
+ availabilityTimeComplete: undefined,
76
+ availabilityTimeOffset,
77
+ unsafelyBaseOnPreviousRepresentation,
78
+ isEMSGWhitelisted,
79
+ isLastPeriod,
80
+ manifestBoundsCalculator,
81
+ isDynamic,
82
+ periodEnd,
83
+ periodStart,
84
+ receivedTime,
85
+ representationBitrate: representation.attributes.bitrate,
86
+ representationId: representation.attributes.id,
87
+ };
80
88
  let representationIndex : IRepresentationIndex;
81
89
  if (representation.children.segmentBase !== undefined) {
82
90
  const { segmentBase } = representation.children;
@@ -97,12 +105,15 @@ export default function parseRepresentationIndex(
97
105
  ...segmentTemplates as [
98
106
  ISegmentTemplateIntermediateRepresentation
99
107
  ] /* Ugly TS Hack */);
100
- reprIndexCtxt.availabilityTimeComplete =
101
- segmentTemplate.availabilityTimeComplete ??
102
- context.availabilityTimeComplete;
103
- reprIndexCtxt.availabilityTimeOffset =
104
- (segmentTemplate.availabilityTimeOffset ?? 0) +
105
- context.availabilityTimeOffset;
108
+ if (
109
+ segmentTemplate.availabilityTimeOffset !== undefined ||
110
+ context.availabilityTimeOffset !== undefined
111
+ ) {
112
+ reprIndexCtxt.availabilityTimeOffset =
113
+ (segmentTemplate.availabilityTimeOffset ?? 0) +
114
+ (context.availabilityTimeOffset ?? 0);
115
+ }
116
+
106
117
  representationIndex = TimelineRepresentationIndex
107
118
  .isTimelineIndexArgument(segmentTemplate) ?
108
119
  new TimelineRepresentationIndex(segmentTemplate, reprIndexCtxt) :
@@ -131,10 +142,25 @@ export default function parseRepresentationIndex(
131
142
  export interface IRepresentationIndexContext {
132
143
  /** Parsed AdaptationSet which contains the Representation. */
133
144
  adaptation : IAdaptationSetIntermediateRepresentation;
134
- /** If false, declared segments in the MPD might still be not completely generated. */
135
- availabilityTimeComplete : boolean;
136
- /** availability time offset of the concerned Adaptation. */
137
- availabilityTimeOffset : number;
145
+ /**
146
+ * If `false`, declared segments in the MPD might still be not completely generated.
147
+ * If `true`, they are completely generated.
148
+ *
149
+ * If `undefined`, the corresponding property was not set in the MPD and it is
150
+ * thus assumed that they are all generated.
151
+ * It might however be semantically different than `true` in the RxPlayer as it
152
+ * means that the packager didn't include that information in the MPD.
153
+ */
154
+ availabilityTimeComplete : boolean | undefined;
155
+ /**
156
+ * availability time offset of the concerned Adaptation.
157
+ *
158
+ * If `undefined`, the corresponding property was not set in the MPD and it is
159
+ * thus assumed to be equal to `0`.
160
+ * It might however be semantically different than `0` in the RxPlayer as it
161
+ * means that the packager didn't include that information in the MPD.
162
+ */
163
+ availabilityTimeOffset : number | undefined;
138
164
  /** Eventual URLs from which every relative URL will be based on. */
139
165
  baseURLs : IResolvedBaseUrl[];
140
166
  /** End time of the current Period, in seconds. */
@@ -163,8 +189,6 @@ export interface IRepresentationIndexContext {
163
189
  receivedTime? : number | undefined;
164
190
  /** Start time of the current period, in seconds. */
165
191
  start : number;
166
- /** Depth of the buffer for the whole content, in seconds. */
167
- timeShiftBufferDepth? : number | undefined;
168
192
  /**
169
193
  * The parser should take this Representation - which is the same as this one
170
194
  * parsed at an earlier time - as a base to speed-up the parsing process.
@@ -29,6 +29,7 @@ import {
29
29
  IScheme,
30
30
  IContentProtectionIntermediateRepresentation,
31
31
  } from "../node_parser_types";
32
+ import { convertSupplementalCodecsToRFC6381 } from "./convert_supplemental_codecs";
32
33
  import { getWEBMHDRInformation } from "./get_hdr_information";
33
34
  import parseRepresentationIndex, {
34
35
  IRepresentationIndexContext,
@@ -120,19 +121,19 @@ export default function parseRepresentations(
120
121
  const parsedRepresentations : IParsedRepresentation[] = [];
121
122
  for (const representation of representationsIR) {
122
123
  // Compute Representation ID
123
- let representationID = representation.attributes.id != null ?
124
+ let representationID = representation.attributes.id !== undefined ?
124
125
  representation.attributes.id :
125
126
  (String(representation.attributes.bitrate) +
126
- (representation.attributes.height != null ?
127
+ (representation.attributes.height !== undefined ?
127
128
  (`-${representation.attributes.height}`) :
128
129
  "") +
129
- (representation.attributes.width != null ?
130
+ (representation.attributes.width !== undefined ?
130
131
  (`-${representation.attributes.width}`) :
131
132
  "") +
132
- (representation.attributes.mimeType != null ?
133
+ (representation.attributes.mimeType !== undefined ?
133
134
  (`-${representation.attributes.mimeType}`) :
134
135
  "") +
135
- (representation.attributes.codecs != null ?
136
+ (representation.attributes.codecs !== undefined ?
136
137
  (`-${representation.attributes.codecs}`) :
137
138
  ""));
138
139
 
@@ -152,9 +153,15 @@ export default function parseRepresentations(
152
153
  const availabilityTimeComplete =
153
154
  representation.attributes.availabilityTimeComplete ??
154
155
  context.availabilityTimeComplete;
155
- const availabilityTimeOffset =
156
- (representation.attributes.availabilityTimeOffset ?? 0) +
157
- context.availabilityTimeOffset;
156
+
157
+ let availabilityTimeOffset: number | undefined;
158
+ if (
159
+ representation.attributes.availabilityTimeOffset !== undefined ||
160
+ context.availabilityTimeOffset !== undefined
161
+ ) {
162
+ availabilityTimeOffset = (representation.attributes.availabilityTimeOffset ?? 0) +
163
+ (context.availabilityTimeOffset ?? 0);
164
+ }
158
165
  const reprIndexCtxt = objectAssign({},
159
166
  context,
160
167
  { availabilityTimeOffset,
@@ -167,7 +174,7 @@ export default function parseRepresentations(
167
174
 
168
175
  // Find bitrate
169
176
  let representationBitrate : number;
170
- if (representation.attributes.bitrate == null) {
177
+ if (representation.attributes.bitrate === undefined) {
171
178
  log.warn("DASH: No usable bitrate found in the Representation.");
172
179
  representationBitrate = 0;
173
180
  } else {
@@ -204,40 +211,52 @@ export default function parseRepresentations(
204
211
 
205
212
  // Add optional attributes
206
213
  let codecs : string|undefined;
207
- if (representation.attributes.codecs != null) {
214
+ if (representation.attributes.codecs !== undefined) {
208
215
  codecs = representation.attributes.codecs;
209
- } else if (adaptation.attributes.codecs != null) {
216
+ } else if (adaptation.attributes.codecs !== undefined) {
210
217
  codecs = adaptation.attributes.codecs;
211
218
  }
212
- if (codecs != null) {
219
+ if (codecs !== undefined) {
213
220
  codecs = codecs === "mp4a.40.02" ? "mp4a.40.2" : codecs;
214
221
  parsedRepresentation.codecs = codecs;
215
222
  }
216
- if (representation.attributes.frameRate != null) {
223
+
224
+ let supplementalCodecs: string | undefined;
225
+ if (representation.attributes.supplementalCodecs !== undefined) {
226
+ supplementalCodecs = representation.attributes.supplementalCodecs;
227
+ } else if (adaptation.attributes.supplementalCodecs !== undefined) {
228
+ supplementalCodecs = adaptation.attributes.supplementalCodecs;
229
+ }
230
+ if (supplementalCodecs !== undefined) {
231
+ parsedRepresentation.supplementalCodecs =
232
+ convertSupplementalCodecsToRFC6381(supplementalCodecs);
233
+ }
234
+
235
+ if (representation.attributes.frameRate !== undefined) {
217
236
  parsedRepresentation.frameRate =
218
237
  representation.attributes.frameRate;
219
- } else if (adaptation.attributes.frameRate != null) {
238
+ } else if (adaptation.attributes.frameRate !== undefined) {
220
239
  parsedRepresentation.frameRate =
221
240
  adaptation.attributes.frameRate;
222
241
  }
223
- if (representation.attributes.height != null) {
242
+ if (representation.attributes.height !== undefined) {
224
243
  parsedRepresentation.height =
225
244
  representation.attributes.height;
226
- } else if (adaptation.attributes.height != null) {
245
+ } else if (adaptation.attributes.height !== undefined) {
227
246
  parsedRepresentation.height =
228
247
  adaptation.attributes.height;
229
248
  }
230
- if (representation.attributes.mimeType != null) {
249
+ if (representation.attributes.mimeType !== undefined) {
231
250
  parsedRepresentation.mimeType =
232
251
  representation.attributes.mimeType;
233
- } else if (adaptation.attributes.mimeType != null) {
252
+ } else if (adaptation.attributes.mimeType !== undefined) {
234
253
  parsedRepresentation.mimeType =
235
254
  adaptation.attributes.mimeType;
236
255
  }
237
- if (representation.attributes.width != null) {
256
+ if (representation.attributes.width !== undefined) {
238
257
  parsedRepresentation.width =
239
258
  representation.attributes.width;
240
- } else if (adaptation.attributes.width != null) {
259
+ } else if (adaptation.attributes.width !== undefined) {
241
260
  parsedRepresentation.width =
242
261
  adaptation.attributes.width;
243
262
  }
@@ -300,6 +300,10 @@ function parseAdaptationSetAttributes(
300
300
  parsedAdaptation.codecs = attribute.value;
301
301
  break;
302
302
 
303
+ case "scte214:supplementalCodecs":
304
+ parsedAdaptation.supplementalCodecs = attribute.value;
305
+ break;
306
+
303
307
  case "codingDependency":
304
308
  parseValue(attribute.value, { asKey: "codingDependency",
305
309
  parser: parseBoolean,
@@ -187,6 +187,10 @@ function parseRepresentationAttributes(
187
187
  dashName: "qualityRanking" });
188
188
  break;
189
189
 
190
+ case "scte214:supplementalCodecs":
191
+ attributes.supplementalCodecs = attr.value;
192
+ break;
193
+
190
194
  case "segmentProfiles":
191
195
  attributes.segmentProfiles = attr.value;
192
196
  break;
@@ -232,6 +232,7 @@ export interface IAdaptationSetAttributes {
232
232
  segmentAlignment? : number|boolean;
233
233
  segmentProfiles? : string;
234
234
  subsegmentAlignment? : number|boolean;
235
+ supplementalCodecs?: string;
235
236
  width? : number;
236
237
  availabilityTimeComplete?: boolean;
237
238
  availabilityTimeOffset?: number;
@@ -271,6 +272,7 @@ export interface IRepresentationAttributes {
271
272
  profiles? : string;
272
273
  qualityRanking? : number;
273
274
  segmentProfiles? : string;
275
+ supplementalCodecs?: string;
274
276
  width? : number;
275
277
  availabilityTimeComplete?: boolean;
276
278
  availabilityTimeOffset?: number;
@@ -280,6 +280,8 @@ pub enum AttributeName {
280
280
 
281
281
  // SegmentTemplate
282
282
  EndNumber = 76, // f64
283
+
284
+ SupplementalCodecs = 77 // string
283
285
  }
284
286
 
285
287
  impl TagName {