@svta/cml-cmaf-ham 0.19.0 → 0.20.0

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 (419) hide show
  1. package/README.md +6 -0
  2. package/dist/index.d.ts +1273 -51
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1822 -19
  5. package/dist/index.js.map +1 -1
  6. package/package.json +6 -26
  7. package/dist/mapper/Mapper.d.ts +0 -8
  8. package/dist/mapper/Mapper.d.ts.map +0 -1
  9. package/dist/mapper/Mapper.js +0 -2
  10. package/dist/mapper/Mapper.js.map +0 -1
  11. package/dist/mapper/MapperContext.d.ts +0 -14
  12. package/dist/mapper/MapperContext.d.ts.map +0 -1
  13. package/dist/mapper/MapperContext.js +0 -22
  14. package/dist/mapper/MapperContext.js.map +0 -1
  15. package/dist/mapper/dash/DashMapper.d.ts +0 -10
  16. package/dist/mapper/dash/DashMapper.d.ts.map +0 -1
  17. package/dist/mapper/dash/DashMapper.js +0 -23
  18. package/dist/mapper/dash/DashMapper.js.map +0 -1
  19. package/dist/mapper/dash/mapDashToHam/mapDashToHam.d.ts +0 -12
  20. package/dist/mapper/dash/mapDashToHam/mapDashToHam.d.ts.map +0 -1
  21. package/dist/mapper/dash/mapDashToHam/mapDashToHam.js +0 -42
  22. package/dist/mapper/dash/mapDashToHam/mapDashToHam.js.map +0 -1
  23. package/dist/mapper/dash/mapDashToHam/mapSegmentBase.d.ts +0 -13
  24. package/dist/mapper/dash/mapDashToHam/mapSegmentBase.d.ts.map +0 -1
  25. package/dist/mapper/dash/mapDashToHam/mapSegmentBase.js +0 -20
  26. package/dist/mapper/dash/mapDashToHam/mapSegmentBase.js.map +0 -1
  27. package/dist/mapper/dash/mapDashToHam/mapSegmentList.d.ts +0 -12
  28. package/dist/mapper/dash/mapDashToHam/mapSegmentList.d.ts.map +0 -1
  29. package/dist/mapper/dash/mapDashToHam/mapSegmentList.js +0 -25
  30. package/dist/mapper/dash/mapDashToHam/mapSegmentList.js.map +0 -1
  31. package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts +0 -15
  32. package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts.map +0 -1
  33. package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.js +0 -27
  34. package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.js.map +0 -1
  35. package/dist/mapper/dash/mapDashToHam/mapSegments.d.ts +0 -20
  36. package/dist/mapper/dash/mapDashToHam/mapSegments.d.ts.map +0 -1
  37. package/dist/mapper/dash/mapDashToHam/mapSegments.js +0 -37
  38. package/dist/mapper/dash/mapDashToHam/mapSegments.js.map +0 -1
  39. package/dist/mapper/dash/mapDashToHam/mapTracks.d.ts +0 -19
  40. package/dist/mapper/dash/mapDashToHam/mapTracks.d.ts.map +0 -1
  41. package/dist/mapper/dash/mapDashToHam/mapTracks.js +0 -72
  42. package/dist/mapper/dash/mapDashToHam/mapTracks.js.map +0 -1
  43. package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts +0 -13
  44. package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts.map +0 -1
  45. package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.js +0 -18
  46. package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.js.map +0 -1
  47. package/dist/mapper/dash/mapDashToHam/utils/getChannels.d.ts +0 -13
  48. package/dist/mapper/dash/mapDashToHam/utils/getChannels.d.ts.map +0 -1
  49. package/dist/mapper/dash/mapDashToHam/utils/getChannels.js +0 -18
  50. package/dist/mapper/dash/mapDashToHam/utils/getChannels.js.map +0 -1
  51. package/dist/mapper/dash/mapDashToHam/utils/getCodec.d.ts +0 -13
  52. package/dist/mapper/dash/mapDashToHam/utils/getCodec.d.ts.map +0 -1
  53. package/dist/mapper/dash/mapDashToHam/utils/getCodec.js +0 -18
  54. package/dist/mapper/dash/mapDashToHam/utils/getCodec.js.map +0 -1
  55. package/dist/mapper/dash/mapDashToHam/utils/getContentType.d.ts +0 -14
  56. package/dist/mapper/dash/mapDashToHam/utils/getContentType.d.ts.map +0 -1
  57. package/dist/mapper/dash/mapDashToHam/utils/getContentType.js +0 -37
  58. package/dist/mapper/dash/mapDashToHam/utils/getContentType.js.map +0 -1
  59. package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts +0 -16
  60. package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts.map +0 -1
  61. package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.js +0 -31
  62. package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.js.map +0 -1
  63. package/dist/mapper/dash/mapDashToHam/utils/getGroup.d.ts +0 -3
  64. package/dist/mapper/dash/mapDashToHam/utils/getGroup.d.ts.map +0 -1
  65. package/dist/mapper/dash/mapDashToHam/utils/getGroup.js +0 -6
  66. package/dist/mapper/dash/mapDashToHam/utils/getGroup.js.map +0 -1
  67. package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.d.ts +0 -14
  68. package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.d.ts.map +0 -1
  69. package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.js +0 -32
  70. package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.js.map +0 -1
  71. package/dist/mapper/dash/mapDashToHam/utils/getLanguage.d.ts +0 -11
  72. package/dist/mapper/dash/mapDashToHam/utils/getLanguage.d.ts.map +0 -1
  73. package/dist/mapper/dash/mapDashToHam/utils/getLanguage.js +0 -17
  74. package/dist/mapper/dash/mapDashToHam/utils/getLanguage.js.map +0 -1
  75. package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts +0 -17
  76. package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts.map +0 -1
  77. package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.js +0 -21
  78. package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.js.map +0 -1
  79. package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts +0 -13
  80. package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts.map +0 -1
  81. package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.js +0 -15
  82. package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.js.map +0 -1
  83. package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts +0 -13
  84. package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts.map +0 -1
  85. package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.js +0 -18
  86. package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.js.map +0 -1
  87. package/dist/mapper/dash/mapDashToHam/utils/getSar.d.ts +0 -13
  88. package/dist/mapper/dash/mapDashToHam/utils/getSar.d.ts.map +0 -1
  89. package/dist/mapper/dash/mapDashToHam/utils/getSar.js +0 -18
  90. package/dist/mapper/dash/mapDashToHam/utils/getSar.js.map +0 -1
  91. package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts +0 -16
  92. package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts.map +0 -1
  93. package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.js +0 -19
  94. package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.js.map +0 -1
  95. package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts +0 -18
  96. package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts.map +0 -1
  97. package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.js +0 -34
  98. package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.js.map +0 -1
  99. package/dist/mapper/dash/mapHamToDash/mapHamToDash.d.ts +0 -3
  100. package/dist/mapper/dash/mapHamToDash/mapHamToDash.d.ts.map +0 -1
  101. package/dist/mapper/dash/mapHamToDash/mapHamToDash.js +0 -17
  102. package/dist/mapper/dash/mapHamToDash/mapHamToDash.js.map +0 -1
  103. package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.d.ts +0 -4
  104. package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.d.ts.map +0 -1
  105. package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.js +0 -16
  106. package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.js.map +0 -1
  107. package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.d.ts +0 -4
  108. package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.d.ts.map +0 -1
  109. package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.js +0 -22
  110. package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.js.map +0 -1
  111. package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.d.ts +0 -4
  112. package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.d.ts.map +0 -1
  113. package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.js +0 -61
  114. package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.js.map +0 -1
  115. package/dist/mapper/dash/mapHamToDash/trackToSegmentList.d.ts +0 -4
  116. package/dist/mapper/dash/mapHamToDash/trackToSegmentList.d.ts.map +0 -1
  117. package/dist/mapper/dash/mapHamToDash/trackToSegmentList.js +0 -27
  118. package/dist/mapper/dash/mapHamToDash/trackToSegmentList.js.map +0 -1
  119. package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.d.ts +0 -4
  120. package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.d.ts.map +0 -1
  121. package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.js +0 -52
  122. package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.js.map +0 -1
  123. package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.d.ts +0 -13
  124. package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.d.ts.map +0 -1
  125. package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.js +0 -25
  126. package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.js.map +0 -1
  127. package/dist/mapper/dash/mapHamToDash/utils/getTimescale.d.ts +0 -16
  128. package/dist/mapper/dash/mapHamToDash/utils/getTimescale.d.ts.map +0 -1
  129. package/dist/mapper/dash/mapHamToDash/utils/getTimescale.js +0 -30
  130. package/dist/mapper/dash/mapHamToDash/utils/getTimescale.js.map +0 -1
  131. package/dist/mapper/hls/HlsMapper.d.ts +0 -10
  132. package/dist/mapper/hls/HlsMapper.d.ts.map +0 -1
  133. package/dist/mapper/hls/HlsMapper.js +0 -17
  134. package/dist/mapper/hls/HlsMapper.js.map +0 -1
  135. package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.d.ts +0 -8
  136. package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.d.ts.map +0 -1
  137. package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.js +0 -26
  138. package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.js.map +0 -1
  139. package/dist/mapper/hls/mapHamToHls/mapHamToHls.d.ts +0 -4
  140. package/dist/mapper/hls/mapHamToHls/mapHamToHls.d.ts.map +0 -1
  141. package/dist/mapper/hls/mapHamToHls/mapHamToHls.js +0 -29
  142. package/dist/mapper/hls/mapHamToHls/mapHamToHls.js.map +0 -1
  143. package/dist/mapper/hls/mapHamToHls/utils/getByterange.d.ts +0 -14
  144. package/dist/mapper/hls/mapHamToHls/utils/getByterange.d.ts.map +0 -1
  145. package/dist/mapper/hls/mapHamToHls/utils/getByterange.js +0 -22
  146. package/dist/mapper/hls/mapHamToHls/utils/getByterange.js.map +0 -1
  147. package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts +0 -14
  148. package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts.map +0 -1
  149. package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.js +0 -16
  150. package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.js.map +0 -1
  151. package/dist/mapper/hls/mapHamToHls/utils/getSegments.d.ts +0 -13
  152. package/dist/mapper/hls/mapHamToHls/utils/getSegments.d.ts.map +0 -1
  153. package/dist/mapper/hls/mapHamToHls/utils/getSegments.js +0 -23
  154. package/dist/mapper/hls/mapHamToHls/utils/getSegments.js.map +0 -1
  155. package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts +0 -14
  156. package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts.map +0 -1
  157. package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.js +0 -16
  158. package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.js.map +0 -1
  159. package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.d.ts +0 -16
  160. package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.d.ts.map +0 -1
  161. package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.js +0 -55
  162. package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.js.map +0 -1
  163. package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.d.ts +0 -4
  164. package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.d.ts.map +0 -1
  165. package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.js +0 -41
  166. package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.js.map +0 -1
  167. package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.d.ts +0 -4
  168. package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.d.ts.map +0 -1
  169. package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.js +0 -35
  170. package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.js.map +0 -1
  171. package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts +0 -14
  172. package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts.map +0 -1
  173. package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.js +0 -23
  174. package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.js.map +0 -1
  175. package/dist/mapper/hls/mapHlsToHam/utils/getByterange.d.ts +0 -13
  176. package/dist/mapper/hls/mapHlsToHam/utils/getByterange.d.ts.map +0 -1
  177. package/dist/mapper/hls/mapHlsToHam/utils/getByterange.js +0 -17
  178. package/dist/mapper/hls/mapHlsToHam/utils/getByterange.js.map +0 -1
  179. package/dist/mapper/hls/mapHlsToHam/utils/getCodec.d.ts +0 -13
  180. package/dist/mapper/hls/mapHlsToHam/utils/getCodec.d.ts.map +0 -1
  181. package/dist/mapper/hls/mapHlsToHam/utils/getCodec.js +0 -31
  182. package/dist/mapper/hls/mapHlsToHam/utils/getCodec.js.map +0 -1
  183. package/dist/mapper/hls/mapHlsToHam/utils/getDuration.d.ts +0 -17
  184. package/dist/mapper/hls/mapHlsToHam/utils/getDuration.d.ts.map +0 -1
  185. package/dist/mapper/hls/mapHlsToHam/utils/getDuration.js +0 -21
  186. package/dist/mapper/hls/mapHlsToHam/utils/getDuration.js.map +0 -1
  187. package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.d.ts +0 -5
  188. package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.d.ts.map +0 -1
  189. package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.js +0 -46
  190. package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.js.map +0 -1
  191. package/dist/services/converters/dashToHam.d.ts +0 -20
  192. package/dist/services/converters/dashToHam.d.ts.map +0 -1
  193. package/dist/services/converters/dashToHam.js +0 -25
  194. package/dist/services/converters/dashToHam.js.map +0 -1
  195. package/dist/services/converters/hamToDash.d.ts +0 -21
  196. package/dist/services/converters/hamToDash.d.ts.map +0 -1
  197. package/dist/services/converters/hamToDash.js +0 -25
  198. package/dist/services/converters/hamToDash.js.map +0 -1
  199. package/dist/services/converters/hamToHls.d.ts +0 -21
  200. package/dist/services/converters/hamToHls.d.ts.map +0 -1
  201. package/dist/services/converters/hamToHls.js +0 -25
  202. package/dist/services/converters/hamToHls.js.map +0 -1
  203. package/dist/services/converters/hlsToHam.d.ts +0 -21
  204. package/dist/services/converters/hlsToHam.d.ts.map +0 -1
  205. package/dist/services/converters/hlsToHam.js +0 -33
  206. package/dist/services/converters/hlsToHam.js.map +0 -1
  207. package/dist/services/getters/getTracksFromPresentation.d.ts +0 -13
  208. package/dist/services/getters/getTracksFromPresentation.d.ts.map +0 -1
  209. package/dist/services/getters/getTracksFromPresentation.js +0 -15
  210. package/dist/services/getters/getTracksFromPresentation.js.map +0 -1
  211. package/dist/services/getters/getTracksFromSelectionSet.d.ts +0 -13
  212. package/dist/services/getters/getTracksFromSelectionSet.d.ts.map +0 -1
  213. package/dist/services/getters/getTracksFromSelectionSet.js +0 -15
  214. package/dist/services/getters/getTracksFromSelectionSet.js.map +0 -1
  215. package/dist/services/getters/getTracksFromSwitchingSet.d.ts +0 -13
  216. package/dist/services/getters/getTracksFromSwitchingSet.d.ts.map +0 -1
  217. package/dist/services/getters/getTracksFromSwitchingSet.js +0 -14
  218. package/dist/services/getters/getTracksFromSwitchingSet.js.map +0 -1
  219. package/dist/services/validators/validatePresentation.d.ts +0 -29
  220. package/dist/services/validators/validatePresentation.d.ts.map +0 -1
  221. package/dist/services/validators/validatePresentation.js +0 -36
  222. package/dist/services/validators/validatePresentation.js.map +0 -1
  223. package/dist/services/validators/validateSegment.d.ts +0 -18
  224. package/dist/services/validators/validateSegment.d.ts.map +0 -1
  225. package/dist/services/validators/validateSegment.js +0 -33
  226. package/dist/services/validators/validateSegment.js.map +0 -1
  227. package/dist/services/validators/validateSegments.d.ts +0 -27
  228. package/dist/services/validators/validateSegments.d.ts.map +0 -1
  229. package/dist/services/validators/validateSegments.js +0 -35
  230. package/dist/services/validators/validateSegments.js.map +0 -1
  231. package/dist/services/validators/validateSelectionSet.d.ts +0 -31
  232. package/dist/services/validators/validateSelectionSet.d.ts.map +0 -1
  233. package/dist/services/validators/validateSelectionSet.js +0 -44
  234. package/dist/services/validators/validateSelectionSet.js.map +0 -1
  235. package/dist/services/validators/validateSelectionSets.d.ts +0 -28
  236. package/dist/services/validators/validateSelectionSets.d.ts.map +0 -1
  237. package/dist/services/validators/validateSelectionSets.js +0 -36
  238. package/dist/services/validators/validateSelectionSets.js.map +0 -1
  239. package/dist/services/validators/validateSwitchingSet.d.ts +0 -31
  240. package/dist/services/validators/validateSwitchingSet.d.ts.map +0 -1
  241. package/dist/services/validators/validateSwitchingSet.js +0 -44
  242. package/dist/services/validators/validateSwitchingSet.js.map +0 -1
  243. package/dist/services/validators/validateSwitchingSets.d.ts +0 -28
  244. package/dist/services/validators/validateSwitchingSets.d.ts.map +0 -1
  245. package/dist/services/validators/validateSwitchingSets.js +0 -36
  246. package/dist/services/validators/validateSwitchingSets.js.map +0 -1
  247. package/dist/services/validators/validateTrack.d.ts +0 -32
  248. package/dist/services/validators/validateTrack.d.ts.map +0 -1
  249. package/dist/services/validators/validateTrack.js +0 -140
  250. package/dist/services/validators/validateTrack.js.map +0 -1
  251. package/dist/services/validators/validateTracks.d.ts +0 -28
  252. package/dist/services/validators/validateTracks.d.ts.map +0 -1
  253. package/dist/services/validators/validateTracks.js +0 -47
  254. package/dist/services/validators/validateTracks.js.map +0 -1
  255. package/dist/tsconfig.tsbuildinfo +0 -1
  256. package/dist/types/Validation.d.ts +0 -10
  257. package/dist/types/Validation.d.ts.map +0 -1
  258. package/dist/types/Validation.js +0 -2
  259. package/dist/types/Validation.js.map +0 -1
  260. package/dist/types/manifest/Manifest.d.ts +0 -14
  261. package/dist/types/manifest/Manifest.d.ts.map +0 -1
  262. package/dist/types/manifest/Manifest.js +0 -2
  263. package/dist/types/manifest/Manifest.js.map +0 -1
  264. package/dist/types/manifest/ManifestFormat.d.ts +0 -7
  265. package/dist/types/manifest/ManifestFormat.d.ts.map +0 -1
  266. package/dist/types/manifest/ManifestFormat.js +0 -2
  267. package/dist/types/manifest/ManifestFormat.js.map +0 -1
  268. package/dist/types/mapper/dash/AdaptationSet.d.ts +0 -41
  269. package/dist/types/mapper/dash/AdaptationSet.d.ts.map +0 -1
  270. package/dist/types/mapper/dash/AdaptationSet.js +0 -2
  271. package/dist/types/mapper/dash/AdaptationSet.js.map +0 -1
  272. package/dist/types/mapper/dash/AudioChannelConfiguration.d.ts +0 -12
  273. package/dist/types/mapper/dash/AudioChannelConfiguration.d.ts.map +0 -1
  274. package/dist/types/mapper/dash/AudioChannelConfiguration.js +0 -2
  275. package/dist/types/mapper/dash/AudioChannelConfiguration.js.map +0 -1
  276. package/dist/types/mapper/dash/ContentComponent.d.ts +0 -11
  277. package/dist/types/mapper/dash/ContentComponent.d.ts.map +0 -1
  278. package/dist/types/mapper/dash/ContentComponent.js +0 -2
  279. package/dist/types/mapper/dash/ContentComponent.js.map +0 -1
  280. package/dist/types/mapper/dash/DashManifest.d.ts +0 -20
  281. package/dist/types/mapper/dash/DashManifest.d.ts.map +0 -1
  282. package/dist/types/mapper/dash/DashManifest.js +0 -2
  283. package/dist/types/mapper/dash/DashManifest.js.map +0 -1
  284. package/dist/types/mapper/dash/Initialization.d.ts +0 -12
  285. package/dist/types/mapper/dash/Initialization.d.ts.map +0 -1
  286. package/dist/types/mapper/dash/Initialization.js +0 -2
  287. package/dist/types/mapper/dash/Initialization.js.map +0 -1
  288. package/dist/types/mapper/dash/Period.d.ts +0 -15
  289. package/dist/types/mapper/dash/Period.d.ts.map +0 -1
  290. package/dist/types/mapper/dash/Period.js +0 -2
  291. package/dist/types/mapper/dash/Period.js.map +0 -1
  292. package/dist/types/mapper/dash/Representation.d.ts +0 -30
  293. package/dist/types/mapper/dash/Representation.d.ts.map +0 -1
  294. package/dist/types/mapper/dash/Representation.js +0 -2
  295. package/dist/types/mapper/dash/Representation.js.map +0 -1
  296. package/dist/types/mapper/dash/Role.d.ts +0 -12
  297. package/dist/types/mapper/dash/Role.d.ts.map +0 -1
  298. package/dist/types/mapper/dash/Role.js +0 -2
  299. package/dist/types/mapper/dash/Role.js.map +0 -1
  300. package/dist/types/mapper/dash/SegmentBase.d.ts +0 -15
  301. package/dist/types/mapper/dash/SegmentBase.d.ts.map +0 -1
  302. package/dist/types/mapper/dash/SegmentBase.js +0 -2
  303. package/dist/types/mapper/dash/SegmentBase.js.map +0 -1
  304. package/dist/types/mapper/dash/SegmentList.d.ts +0 -16
  305. package/dist/types/mapper/dash/SegmentList.d.ts.map +0 -1
  306. package/dist/types/mapper/dash/SegmentList.js +0 -2
  307. package/dist/types/mapper/dash/SegmentList.js.map +0 -1
  308. package/dist/types/mapper/dash/SegmentTemplate.d.ts +0 -17
  309. package/dist/types/mapper/dash/SegmentTemplate.d.ts.map +0 -1
  310. package/dist/types/mapper/dash/SegmentTemplate.js +0 -2
  311. package/dist/types/mapper/dash/SegmentTemplate.js.map +0 -1
  312. package/dist/types/mapper/dash/SegmentUrl.d.ts +0 -11
  313. package/dist/types/mapper/dash/SegmentUrl.d.ts.map +0 -1
  314. package/dist/types/mapper/dash/SegmentUrl.js +0 -2
  315. package/dist/types/mapper/dash/SegmentUrl.js.map +0 -1
  316. package/dist/types/mapper/hls/Byterange.d.ts +0 -11
  317. package/dist/types/mapper/hls/Byterange.d.ts.map +0 -1
  318. package/dist/types/mapper/hls/Byterange.js +0 -2
  319. package/dist/types/mapper/hls/Byterange.js.map +0 -1
  320. package/dist/types/mapper/hls/HlsManifest.d.ts +0 -15
  321. package/dist/types/mapper/hls/HlsManifest.d.ts.map +0 -1
  322. package/dist/types/mapper/hls/HlsManifest.js +0 -2
  323. package/dist/types/mapper/hls/HlsManifest.js.map +0 -1
  324. package/dist/types/mapper/hls/MediaGroups.d.ts +0 -22
  325. package/dist/types/mapper/hls/MediaGroups.d.ts.map +0 -1
  326. package/dist/types/mapper/hls/MediaGroups.js +0 -2
  327. package/dist/types/mapper/hls/MediaGroups.js.map +0 -1
  328. package/dist/types/mapper/hls/Playlist.d.ts +0 -18
  329. package/dist/types/mapper/hls/Playlist.d.ts.map +0 -1
  330. package/dist/types/mapper/hls/Playlist.js +0 -2
  331. package/dist/types/mapper/hls/Playlist.js.map +0 -1
  332. package/dist/types/mapper/hls/SegmentHls.d.ts +0 -18
  333. package/dist/types/mapper/hls/SegmentHls.d.ts.map +0 -1
  334. package/dist/types/mapper/hls/SegmentHls.js +0 -2
  335. package/dist/types/mapper/hls/SegmentHls.js.map +0 -1
  336. package/dist/types/model/AlignedSwitchingSet.d.ts +0 -10
  337. package/dist/types/model/AlignedSwitchingSet.d.ts.map +0 -1
  338. package/dist/types/model/AlignedSwitchingSet.js +0 -2
  339. package/dist/types/model/AlignedSwitchingSet.js.map +0 -1
  340. package/dist/types/model/AudioTrack.d.ts +0 -17
  341. package/dist/types/model/AudioTrack.d.ts.map +0 -1
  342. package/dist/types/model/AudioTrack.js +0 -2
  343. package/dist/types/model/AudioTrack.js.map +0 -1
  344. package/dist/types/model/FrameRate.d.ts +0 -14
  345. package/dist/types/model/FrameRate.d.ts.map +0 -1
  346. package/dist/types/model/FrameRate.js +0 -11
  347. package/dist/types/model/FrameRate.js.map +0 -1
  348. package/dist/types/model/Ham.d.ts +0 -11
  349. package/dist/types/model/Ham.d.ts.map +0 -1
  350. package/dist/types/model/Ham.js +0 -2
  351. package/dist/types/model/Ham.js.map +0 -1
  352. package/dist/types/model/Presentation.d.ts +0 -13
  353. package/dist/types/model/Presentation.d.ts.map +0 -1
  354. package/dist/types/model/Presentation.js +0 -2
  355. package/dist/types/model/Presentation.js.map +0 -1
  356. package/dist/types/model/Segment.d.ts +0 -11
  357. package/dist/types/model/Segment.d.ts.map +0 -1
  358. package/dist/types/model/Segment.js +0 -2
  359. package/dist/types/model/Segment.js.map +0 -1
  360. package/dist/types/model/SelectionSet.d.ts +0 -13
  361. package/dist/types/model/SelectionSet.d.ts.map +0 -1
  362. package/dist/types/model/SelectionSet.js +0 -2
  363. package/dist/types/model/SelectionSet.js.map +0 -1
  364. package/dist/types/model/SwitchingSet.d.ts +0 -11
  365. package/dist/types/model/SwitchingSet.d.ts.map +0 -1
  366. package/dist/types/model/SwitchingSet.js +0 -2
  367. package/dist/types/model/SwitchingSet.js.map +0 -1
  368. package/dist/types/model/TextTrack.d.ts +0 -8
  369. package/dist/types/model/TextTrack.d.ts.map +0 -1
  370. package/dist/types/model/TextTrack.js +0 -2
  371. package/dist/types/model/TextTrack.js.map +0 -1
  372. package/dist/types/model/Track.d.ts +0 -32
  373. package/dist/types/model/Track.d.ts.map +0 -1
  374. package/dist/types/model/Track.js +0 -2
  375. package/dist/types/model/Track.js.map +0 -1
  376. package/dist/types/model/TrackType.d.ts +0 -8
  377. package/dist/types/model/TrackType.d.ts.map +0 -1
  378. package/dist/types/model/TrackType.js +0 -2
  379. package/dist/types/model/TrackType.js.map +0 -1
  380. package/dist/types/model/VideoTrack.d.ts +0 -23
  381. package/dist/types/model/VideoTrack.d.ts.map +0 -1
  382. package/dist/types/model/VideoTrack.js +0 -2
  383. package/dist/types/model/VideoTrack.js.map +0 -1
  384. package/dist/utils/constants.d.ts +0 -16
  385. package/dist/utils/constants.d.ts.map +0 -1
  386. package/dist/utils/constants.js +0 -21
  387. package/dist/utils/constants.js.map +0 -1
  388. package/dist/utils/dash/iso8601DurationToNumber.d.ts +0 -2
  389. package/dist/utils/dash/iso8601DurationToNumber.d.ts.map +0 -1
  390. package/dist/utils/dash/iso8601DurationToNumber.js +0 -17
  391. package/dist/utils/dash/iso8601DurationToNumber.js.map +0 -1
  392. package/dist/utils/dash/numberToIso8601Duration.d.ts +0 -2
  393. package/dist/utils/dash/numberToIso8601Duration.d.ts.map +0 -1
  394. package/dist/utils/dash/numberToIso8601Duration.js +0 -13
  395. package/dist/utils/dash/numberToIso8601Duration.js.map +0 -1
  396. package/dist/utils/dash/parseDashManifest.d.ts +0 -22
  397. package/dist/utils/dash/parseDashManifest.d.ts.map +0 -1
  398. package/dist/utils/dash/parseDashManifest.js +0 -24
  399. package/dist/utils/dash/parseDashManifest.js.map +0 -1
  400. package/dist/utils/dash/serializeDashManifest.d.ts +0 -18
  401. package/dist/utils/dash/serializeDashManifest.d.ts.map +0 -1
  402. package/dist/utils/dash/serializeDashManifest.js +0 -20
  403. package/dist/utils/dash/serializeDashManifest.js.map +0 -1
  404. package/dist/utils/hls/parseHlsManifest.d.ts +0 -18
  405. package/dist/utils/hls/parseHlsManifest.d.ts.map +0 -1
  406. package/dist/utils/hls/parseHlsManifest.js +0 -24
  407. package/dist/utils/hls/parseHlsManifest.js.map +0 -1
  408. package/dist/utils/manifest/addMetadataToDash.d.ts +0 -4
  409. package/dist/utils/manifest/addMetadataToDash.d.ts.map +0 -1
  410. package/dist/utils/manifest/addMetadataToDash.js +0 -15
  411. package/dist/utils/manifest/addMetadataToDash.js.map +0 -1
  412. package/dist/utils/manifest/addMetadataToHls.d.ts +0 -3
  413. package/dist/utils/manifest/addMetadataToHls.d.ts.map +0 -1
  414. package/dist/utils/manifest/addMetadataToHls.js +0 -15
  415. package/dist/utils/manifest/addMetadataToHls.js.map +0 -1
  416. package/dist/utils/manifest/getMetadata.d.ts +0 -3
  417. package/dist/utils/manifest/getMetadata.d.ts.map +0 -1
  418. package/dist/utils/manifest/getMetadata.js +0 -5
  419. package/dist/utils/manifest/getMetadata.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,52 +1,1274 @@
1
- export type * from './types/model/AlignedSwitchingSet.js';
2
- export type * from './types/model/AudioTrack.js';
3
- export type * from './types/model/FrameRate.js';
4
- export type * from './types/model/Ham.js';
5
- export type * from './types/model/Presentation.js';
6
- export type * from './types/model/Segment.js';
7
- export type * from './types/model/SelectionSet.js';
8
- export type * from './types/model/SwitchingSet.js';
9
- export type * from './types/model/TextTrack.js';
10
- export type * from './types/model/Track.js';
11
- export type * from './types/model/TrackType.js';
12
- export type * from './types/model/VideoTrack.js';
13
- export type * from './types/manifest/Manifest.js';
14
- export type * from './types/manifest/ManifestFormat.js';
15
- export type * from './types/mapper/dash/AdaptationSet.js';
16
- export type * from './types/mapper/dash/AudioChannelConfiguration.js';
17
- export type * from './types/mapper/dash/ContentComponent.js';
18
- export type * from './types/mapper/dash/DashManifest.js';
19
- export type * from './types/mapper/dash/Initialization.js';
20
- export type * from './types/mapper/dash/Period.js';
21
- export type * from './types/mapper/dash/Representation.js';
22
- export type * from './types/mapper/dash/Role.js';
23
- export type * from './types/mapper/dash/SegmentBase.js';
24
- export type * from './types/mapper/dash/SegmentList.js';
25
- export type * from './types/mapper/dash/SegmentTemplate.js';
26
- export type * from './types/mapper/dash/SegmentUrl.js';
27
- export type * from './types/mapper/hls/Byterange.js';
28
- export type * from './types/mapper/hls/HlsManifest.js';
29
- export type * from './types/mapper/hls/MediaGroups.js';
30
- export type * from './types/mapper/hls/Playlist.js';
31
- export type * from './types/mapper/hls/SegmentHls.js';
32
- export type * from './types/Validation.js';
33
- export * from './services/converters/dashToHam.js';
34
- export * from './services/converters/hamToDash.js';
35
- export * from './services/converters/hamToHls.js';
36
- export * from './services/converters/hlsToHam.js';
37
- export * from './services/getters/getTracksFromPresentation.js';
38
- export * from './services/getters/getTracksFromSelectionSet.js';
39
- export * from './services/getters/getTracksFromSwitchingSet.js';
40
- export * from './services/validators/validatePresentation.js';
41
- export * from './services/validators/validateSegment.js';
42
- export * from './services/validators/validateSegments.js';
43
- export * from './services/validators/validateSelectionSet.js';
44
- export * from './services/validators/validateSelectionSets.js';
45
- export * from './services/validators/validateSwitchingSet.js';
46
- export * from './services/validators/validateSwitchingSets.js';
47
- export * from './services/validators/validateTrack.js';
48
- export * from './services/validators/validateTracks.js';
49
- export * from './utils/dash/parseDashManifest.js';
50
- export * from './utils/dash/serializeDashManifest.js';
51
- export * from './utils/hls/parseHlsManifest.js';
1
+ //#region src/types/model/Ham.d.ts
2
+ /**
3
+ * CMAF-HAM base HAM type
4
+ *
5
+ * id - Identifier of the object
6
+ *
7
+ * @alpha
8
+ */
9
+ type Ham = {
10
+ id: string;
11
+ };
12
+ //#endregion
13
+ //#region src/types/model/Segment.d.ts
14
+ /**
15
+ * CMAF-HAM Segment type
16
+ *
17
+ * @alpha
18
+ */
19
+ type Segment = {
20
+ duration: number;
21
+ url: string;
22
+ byteRange?: string;
23
+ };
24
+ //#endregion
25
+ //#region src/types/model/TrackType.d.ts
26
+ /**
27
+ * CMAF-HAM TrackType type
28
+ * This can be 'audio' or 'video' or 'text'
29
+ *
30
+ * @alpha
31
+ */
32
+ type TrackType = "audio" | "video" | "text";
33
+ //#endregion
34
+ //#region src/types/model/Track.d.ts
35
+ /**
36
+ * CMAF-HAM Track type
37
+ * Used as a base for the audio, video and text tracks
38
+ *
39
+ * type - The TrackType
40
+ * fileName - File name of the track.
41
+ * codec - Codec of the track.
42
+ * duration - Duration of the track in seconds
43
+ * language - Language of the track.
44
+ * bandwidth - Bandwidth of the track.
45
+ * byteRange - Byte range of the track.
46
+ * segments - List of segments of the track.
47
+ *
48
+ * @alpha
49
+ */
50
+ type Track = Ham & {
51
+ /** Track type */
52
+ type: TrackType;
53
+ fileName?: string;
54
+ codec: string;
55
+ duration: number;
56
+ language: string;
57
+ bandwidth: number;
58
+ byteRange?: string;
59
+ /** URL of the initialization segment */
60
+ urlInitialization?: string;
61
+ segments: Segment[];
62
+ };
63
+ //#endregion
64
+ //#region src/types/model/SwitchingSet.d.ts
65
+ /**
66
+ * CMAF-HAM SwitchingSet type
67
+ *
68
+ * @alpha
69
+ */
70
+ type SwitchingSet = Ham & {
71
+ tracks: Track[];
72
+ };
73
+ //#endregion
74
+ //#region src/types/model/AlignedSwitchingSet.d.ts
75
+ /**
76
+ * CMAF-HAM Aligned Switching Set type
77
+ *
78
+ * @alpha
79
+ */
80
+ type AlignedSwitchingSet = {
81
+ switchingSets: SwitchingSet[];
82
+ };
83
+ //#endregion
84
+ //#region src/types/model/AudioTrack.d.ts
85
+ /**
86
+ * CMAF-HAM Audio Track type
87
+ *
88
+ * sampleRate - The sample rate of the audio track. It defines the number of samples per second in the audio.
89
+ * For example, if the sample rate is 44100, it means there are 44100 samples in each second of the audio.
90
+ *
91
+ * channels - The number of channels in the audio track. It defines the number of separate audio signals that are encoded in the audio.
92
+ * For example, if the channels is 2, it means the audio is stereo with a separate signal for left and right.
93
+ *
94
+ * @alpha
95
+ */
96
+ type AudioTrack = Track & {
97
+ sampleRate: number;
98
+ channels: number;
99
+ };
100
+ //#endregion
101
+ //#region src/types/model/FrameRate.d.ts
102
+ /**
103
+ * Video Frame Rate
104
+ * Used to express the framerate as numerator and denominator.
105
+ *
106
+ * frameRateNumerator - Numerator.
107
+ * frameRateDenominator - Denominator.
108
+ *
109
+ * @alpha
110
+ */
111
+ type FrameRate = {
112
+ frameRateNumerator: number;
113
+ frameRateDenominator?: number;
114
+ };
115
+ //#endregion
116
+ //#region src/types/model/SelectionSet.d.ts
117
+ /**
118
+ * CMAF-HAM SelectionSet type
119
+ *
120
+ * @alpha
121
+ */
122
+ type SelectionSet = Ham & {
123
+ switchingSets: SwitchingSet[];
124
+ alignedSwitchingSets?: AlignedSwitchingSet[];
125
+ };
126
+ //#endregion
127
+ //#region src/types/model/Presentation.d.ts
128
+ /**
129
+ * CMAF-HAM Presentation type
130
+ *
131
+ * selectionSets - List of SelectionSets
132
+ *
133
+ * @alpha
134
+ */
135
+ type Presentation = Ham & {
136
+ selectionSets: SelectionSet[];
137
+ };
138
+ //#endregion
139
+ //#region src/types/model/TextTrack.d.ts
140
+ /**
141
+ * CMAF-HAM Text Track type
142
+ *
143
+ * @alpha
144
+ */
145
+ type TextTrack = Track;
146
+ //#endregion
147
+ //#region src/types/model/VideoTrack.d.ts
148
+ /**
149
+ * CMAF-HAM Track type
150
+ *
151
+ * width - Video width in pixels.
152
+ * height - Video height in pixels.
153
+ * frameRate - Video framerate in FrameRate type;
154
+ * par - Pixel Aspect Ratio of the video track as string.
155
+ * sar - Sample Aspect Ratio of the video track in string.
156
+ * scanType - The method used to display the video track.
157
+ *
158
+ * @alpha
159
+ */
160
+ type VideoTrack = Track & {
161
+ width: number;
162
+ height: number;
163
+ frameRate: FrameRate;
164
+ par: string;
165
+ sar: string;
166
+ scanType: string;
167
+ };
168
+ //#endregion
169
+ //#region src/types/manifest/ManifestFormat.d.ts
170
+ /**
171
+ * The format of the manifest.
172
+ *
173
+ * @alpha
174
+ */
175
+ type ManifestFormat = "hls" | "dash";
176
+ //#endregion
177
+ //#region src/types/manifest/Manifest.d.ts
178
+ /**
179
+ * Manifest object received as an input by the conversion to HAM object
180
+ *
181
+ * @alpha
182
+ */
183
+ type Manifest = {
184
+ manifest: string;
185
+ fileName?: string;
186
+ ancillaryManifests?: Manifest[];
187
+ type: ManifestFormat;
188
+ metadata?: Map<string, string>;
189
+ };
190
+ //#endregion
191
+ //#region src/types/mapper/dash/AudioChannelConfiguration.d.ts
192
+ /**
193
+ * DASH Audio Channel Configuration
194
+ *
195
+ * @alpha
196
+ */
197
+ type AudioChannelConfiguration = {
198
+ $: {
199
+ schemeIdUri: string;
200
+ value: string;
201
+ };
202
+ };
203
+ //#endregion
204
+ //#region src/types/mapper/dash/ContentComponent.d.ts
205
+ /**
206
+ *
207
+ * @alpha
208
+ */
209
+ type ContentComponent = {
210
+ $: {
211
+ contentType: string;
212
+ id: string;
213
+ };
214
+ };
215
+ //#endregion
216
+ //#region src/types/mapper/dash/Initialization.d.ts
217
+ /**
218
+ * DASH Initialization
219
+ *
220
+ * @alpha
221
+ */
222
+ type Initialization = {
223
+ $: {
224
+ range?: string;
225
+ sourceURL?: string;
226
+ };
227
+ };
228
+ //#endregion
229
+ //#region src/types/mapper/dash/SegmentBase.d.ts
230
+ /**
231
+ * DASH Segment Base
232
+ *
233
+ * @alpha
234
+ */
235
+ type SegmentBase = {
236
+ $: {
237
+ indexRange: string;
238
+ indexRangeExact: string;
239
+ timescale: string;
240
+ };
241
+ Initialization: Initialization[];
242
+ };
243
+ //#endregion
244
+ //#region src/types/mapper/dash/SegmentUrl.d.ts
245
+ /**
246
+ * DASH Segment URL
247
+ *
248
+ * @alpha
249
+ */
250
+ type SegmentURL = {
251
+ $: {
252
+ media?: string;
253
+ };
254
+ };
255
+ //#endregion
256
+ //#region src/types/mapper/dash/SegmentList.d.ts
257
+ /**
258
+ * DASH Segment List
259
+ *
260
+ * @alpha
261
+ */
262
+ type SegmentList = {
263
+ $: {
264
+ duration: string;
265
+ timescale: string;
266
+ };
267
+ Initialization: Initialization[];
268
+ SegmentURL?: SegmentURL[];
269
+ };
270
+ //#endregion
271
+ //#region src/types/mapper/dash/SegmentTemplate.d.ts
272
+ /**
273
+ * DASH Segment template
274
+ *
275
+ * It is used as a template to create the actual templates
276
+ *
277
+ * @alpha
278
+ */
279
+ type SegmentTemplate = {
280
+ $: {
281
+ duration: string;
282
+ initialization: string;
283
+ media: string;
284
+ startNumber: string;
285
+ timescale: string;
286
+ };
287
+ };
288
+ //#endregion
289
+ //#region src/types/mapper/dash/Representation.d.ts
290
+ /**
291
+ * DASH Representation
292
+ *
293
+ * @alpha
294
+ */
295
+ type Representation = {
296
+ $: {
297
+ audioSamplingRate?: string;
298
+ bandwidth: string;
299
+ codecs?: string;
300
+ frameRate?: string;
301
+ height?: string;
302
+ id: string;
303
+ mimeType?: string;
304
+ sar?: string;
305
+ scanType?: string;
306
+ startWithSAP?: string;
307
+ width?: string;
308
+ };
309
+ AudioChannelConfiguration?: AudioChannelConfiguration[];
310
+ BaseURL?: string[];
311
+ SegmentBase?: SegmentBase[];
312
+ SegmentList?: SegmentList[];
313
+ SegmentTemplate?: SegmentTemplate[];
314
+ };
315
+ //#endregion
316
+ //#region src/types/mapper/dash/Role.d.ts
317
+ /**
318
+ * Role
319
+ *
320
+ * @alpha
321
+ */
322
+ type Role = {
323
+ $: {
324
+ schemeIdUri: string;
325
+ value: string;
326
+ };
327
+ };
328
+ //#endregion
329
+ //#region src/types/mapper/dash/AdaptationSet.d.ts
330
+ /**
331
+ * DASH Adaptation Set
332
+ *
333
+ * @alpha
334
+ */
335
+ type AdaptationSet = {
336
+ $: {
337
+ audioSamplingRate?: string;
338
+ codecs?: string;
339
+ contentType?: string;
340
+ frameRate?: string;
341
+ group?: string;
342
+ id?: string;
343
+ lang?: string;
344
+ maxBandwidth?: string;
345
+ maxFrameRate?: string;
346
+ maxHeight?: string;
347
+ maxWidth?: string;
348
+ mimeType?: string;
349
+ minBandwidth?: string;
350
+ par?: string;
351
+ sar?: string;
352
+ segmentAlignment: string;
353
+ startWithSAP?: string;
354
+ subsegmentAlignment?: string;
355
+ subsegmentStartsWithSAP?: string;
356
+ };
357
+ AudioChannelConfiguration?: AudioChannelConfiguration[];
358
+ ContentComponent?: ContentComponent[];
359
+ Role?: Role[];
360
+ Representation: Representation[];
361
+ SegmentTemplate?: SegmentTemplate[];
362
+ SegmentList?: SegmentList[];
363
+ };
364
+ //#endregion
365
+ //#region src/types/mapper/dash/Period.d.ts
366
+ /**
367
+ * DASH Period
368
+ *
369
+ * @alpha
370
+ */
371
+ type Period = {
372
+ $: {
373
+ duration: string;
374
+ id?: string;
375
+ start?: string;
376
+ };
377
+ AdaptationSet: AdaptationSet[];
378
+ };
379
+ //#endregion
380
+ //#region src/types/mapper/dash/DashManifest.d.ts
381
+ /**
382
+ * Json representation of the DASH Manifest
383
+ *
384
+ * @alpha
385
+ */
386
+ type DashManifest = {
387
+ MPD: {
388
+ $?: {
389
+ maxSegmentDuration?: string;
390
+ mediaPresentationDuration?: string;
391
+ minBufferTime?: string;
392
+ profiles?: string;
393
+ type?: string;
394
+ xmlns?: string;
395
+ };
396
+ Period: Period[];
397
+ };
398
+ };
399
+ //#endregion
400
+ //#region src/types/mapper/hls/Byterange.d.ts
401
+ /**
402
+ * Byterange
403
+ *
404
+ *
405
+ * @alpha
406
+ */
407
+ type Byterange = {
408
+ length: number;
409
+ offset: number;
410
+ };
411
+ //#endregion
412
+ //#region src/types/mapper/hls/MediaGroups.d.ts
413
+ /**
414
+ * HLS Media Groups
415
+ *
416
+ * @alpha
417
+ */
418
+ type MediaGroups = {
419
+ AUDIO: {
420
+ [key: string]: {
421
+ [key: string]: {
422
+ language: string;
423
+ };
424
+ };
425
+ };
426
+ SUBTITLES: {
427
+ [key: string]: {
428
+ [key: string]: {
429
+ language: string;
430
+ };
431
+ };
432
+ };
433
+ };
434
+ //#endregion
435
+ //#region src/types/mapper/hls/Playlist.d.ts
436
+ /**
437
+ * HLS Playlist
438
+ *
439
+ * @alpha
440
+ */
441
+ type PlayList = {
442
+ uri: string;
443
+ attributes: {
444
+ FRAME_RATE: number;
445
+ CODECS: string;
446
+ BANDWIDTH: number;
447
+ RESOLUTION: {
448
+ width: number;
449
+ height: number;
450
+ };
451
+ };
452
+ };
453
+ //#endregion
454
+ //#region src/types/mapper/hls/SegmentHls.d.ts
455
+ /**
456
+ * HLS Segments
457
+ *
458
+ * @alpha
459
+ */
460
+ type SegmentHls = {
461
+ title?: string;
462
+ duration: number;
463
+ byterange?: Byterange;
464
+ uri?: string;
465
+ timeline?: number;
466
+ map?: {
467
+ uri: string;
468
+ byterange: Byterange;
469
+ };
470
+ };
471
+ //#endregion
472
+ //#region src/types/mapper/hls/HlsManifest.d.ts
473
+ /**
474
+ * HLS manifest
475
+ *
476
+ * @alpha
477
+ */
478
+ type HlsManifest = {
479
+ playlists: PlayList[];
480
+ mediaGroups: MediaGroups;
481
+ segments: SegmentHls[];
482
+ targetDuration?: number;
483
+ };
484
+ //#endregion
485
+ //#region src/types/Validation.d.ts
486
+ /**
487
+ * CMAF-HAM Validation type
488
+ *
489
+ * @alpha
490
+ */
491
+ type Validation = {
492
+ status: boolean;
493
+ errorMessages: string[];
494
+ };
495
+ //#endregion
496
+ //#region src/mapper/dash/mapDashToHam/mapSegmentBase.d.ts
497
+ /**
498
+ * @internal
499
+ *
500
+ * Maps SegmentBase from dash to Segment list from ham.
501
+ *
502
+ * @param representation - Representation to get the SegmentBase from
503
+ * @param duration - Duration of the segment
504
+ * @returns list of ham segments
505
+ */
506
+ declare function mapSegmentBase(representation: Representation, duration: number): Segment[];
507
+ //#endregion
508
+ //#region src/mapper/dash/mapDashToHam/mapSegmentList.d.ts
509
+ /**
510
+ * @internal
511
+ *
512
+ * Maps SegmentList from dash to Segment list from ham.
513
+ *
514
+ * @param segmentList - SegmentList list from dash
515
+ * @returns list of ham segments
516
+ */
517
+ declare function mapSegmentList(segmentList: SegmentList[]): Segment[];
518
+ //#endregion
519
+ //#region src/mapper/dash/mapDashToHam/mapSegments.d.ts
520
+ /**
521
+ * @internal
522
+ *
523
+ * Maps dash segments to ham segment.
524
+ *
525
+ * Checks the type of dash segments used to map them accordingly.
526
+ * @see mapSegmentBase
527
+ * @see mapSegmentList
528
+ * @see mapSegmentTemplate
529
+ *
530
+ * @param adaptationSet - AdaptationSet to get the segments from
531
+ * @param representation - Representation to get the segments from
532
+ * @param duration - Duration of the segments
533
+ * @returns list of ham segments
534
+ */
535
+ declare function mapSegments(adaptationSet: AdaptationSet, representation: Representation, duration: number): Segment[];
536
+ //#endregion
537
+ //#region src/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts
538
+ /**
539
+ * @internal
540
+ *
541
+ * Maps SegmentTemplate from dash to Segment list from ham.
542
+ *
543
+ * @param representation - Representation to generate the urls
544
+ * @param duration - Duration of the segments
545
+ * @param segmentTemplate - SegmentTemplate to get the properties from
546
+ * @returns list of ham segments
547
+ */
548
+ declare function mapSegmentTemplate(representation: Representation, duration: number, segmentTemplate: SegmentTemplate): Segment[];
549
+ //#endregion
550
+ //#region src/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts
551
+ /**
552
+ * @internal
553
+ *
554
+ * Calculates the duration of a segment.
555
+ *
556
+ * segmentDuration = duration / timescale
557
+ *
558
+ * @param duration - Duration of the segment
559
+ * @param timescale - Timescale of the segment
560
+ * @returns Segment duration
561
+ */
562
+ declare function calculateDuration(duration: string | undefined, timescale: string | undefined): number;
563
+ //#endregion
564
+ //#region src/mapper/dash/mapDashToHam/utils/getChannels.d.ts
565
+ /**
566
+ * @internal
567
+ *
568
+ * Get the channels value (audio). It can be present on adaptationSet or representation.
569
+ *
570
+ * @param adaptationSet - AdaptationSet to try to get the channels from
571
+ * @param representation - Representation to try to get the channels from
572
+ * @returns Channels value
573
+ */
574
+ declare function getChannels(adaptationSet: AdaptationSet, representation: Representation): number;
575
+ //#endregion
576
+ //#region src/mapper/dash/mapDashToHam/utils/getCodec.d.ts
577
+ /**
578
+ * @internal
579
+ *
580
+ * Get the codec value (video and audio). It can be present on adaptationSet or representation.
581
+ *
582
+ * @param adaptationSet - AdaptationSet to try to get the codec from
583
+ * @param representation - Representation to try to get the codec from
584
+ * @returns Content codec
585
+ */
586
+ declare function getCodec(adaptationSet: AdaptationSet, representation: Representation): string;
587
+ //#endregion
588
+ //#region src/mapper/dash/mapDashToHam/utils/getContentType.d.ts
589
+ /**
590
+ * @internal
591
+ *
592
+ * Get the type of the content. It can be obtained directly from AdaptationSet or Representation
593
+ * or can be inferred with the existing properties.
594
+ *
595
+ * @param adaptationSet - AdaptationSet to get the type from
596
+ * @param representation - Representation to get the type from
597
+ * @returns type of the content
598
+ */
599
+ declare function getContentType(adaptationSet: AdaptationSet, representation?: Representation): string;
600
+ //#endregion
601
+ //#region src/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts
602
+ /**
603
+ * @internal
604
+ *
605
+ * Get the frame rate from a dash manifest.
606
+ *
607
+ * This functions assumes the adaptationSet and representation set are type video
608
+ *
609
+ * @param adaptationSet - To try to get the frameRate from
610
+ * @param representation - To try to get the frameRate from
611
+ * @returns object containing numerator and denominator
612
+ */
613
+ declare function getFrameRate(adaptationSet: AdaptationSet, representation: Representation): FrameRate;
614
+ //#endregion
615
+ //#region src/mapper/dash/mapDashToHam/utils/getGroup.d.ts
616
+ /**
617
+ * @internal
618
+ */
619
+ declare function getGroup(adaptationSet: AdaptationSet): string;
620
+ //#endregion
621
+ //#region src/mapper/dash/mapDashToHam/utils/getLanguage.d.ts
622
+ /**
623
+ * @internal
624
+ *
625
+ * Get the language from an adaptation set.
626
+ *
627
+ * @param adaptationSet - AdaptationSet to get the language from
628
+ * @returns language of the content
629
+ */
630
+ declare function getLanguage(adaptationSet: AdaptationSet): string;
631
+ //#endregion
632
+ //#region src/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts
633
+ /**
634
+ * @internal
635
+ *
636
+ * Calculates the number of segments that a track has to use SegmentTemplate.
637
+ *
638
+ * Equation used:
639
+ * segments = total duration / (segment duration / timescale)
640
+ *
641
+ * **This equation might be wrong, please double-check it**
642
+ *
643
+ * @param segmentTemplate - SegmentTemplate object
644
+ * @param duration - Total duration of the content
645
+ * @returns Number of segments
646
+ */
647
+ declare function getNumberOfSegments(segmentTemplate: SegmentTemplate, duration: number): number;
648
+ //#endregion
649
+ //#region src/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts
650
+ /**
651
+ * @internal
652
+ *
653
+ * Generates a presentation id. It uses the period id as default or creates one
654
+ * if none is present.
655
+ *
656
+ * @param period - Period to try to get the id from
657
+ * @param duration - Duration of the content
658
+ * @returns Presentation id
659
+ */
660
+ declare function getPresentationId(period: Period, duration: number): string;
661
+ //#endregion
662
+ //#region src/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts
663
+ /**
664
+ * @internal
665
+ *
666
+ * Get sample rate (audio).
667
+ *
668
+ * @param adaptationSet - AdaptationSet to try to get the sampleRate from
669
+ * @param representation - Representation to try to get the sampleRate from
670
+ * @returns Sample rate. In case it is not presents, it returns 0.
671
+ */
672
+ declare function getSampleRate(adaptationSet: AdaptationSet, representation: Representation): number;
673
+ //#endregion
674
+ //#region src/mapper/dash/mapDashToHam/utils/getSar.d.ts
675
+ /**
676
+ * @internal
677
+ *
678
+ * Get the sar value. It can be present on adaptationSet or representation.
679
+ *
680
+ * @param adaptationSet - AdaptationSet to try to get the sar from
681
+ * @param representation - AdaptationSet to try to get the sar from
682
+ * @returns sar value. In case it is not present, returns empty string.
683
+ */
684
+ declare function getSar(adaptationSet: AdaptationSet, representation: Representation): string;
685
+ //#endregion
686
+ //#region src/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts
687
+ /**
688
+ * @internal
689
+ *
690
+ * Calculate the duration of a track.
691
+ *
692
+ * This is calculated using the sum of the duration of all the segments from the
693
+ * track.
694
+ *
695
+ * An alternative to this could be number of segments * duration of a segment.
696
+ *
697
+ * @param segments - Segments to calculate the sum of the durations
698
+ * @returns Duration of the track
699
+ */
700
+ declare function getTrackDuration(segments: Segment[]): number;
701
+ //#endregion
702
+ //#region src/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts
703
+ /**
704
+ * @internal
705
+ *
706
+ * Create the url from a segment template.
707
+ *
708
+ * Searches for substrings with the format `$value$` and replaces it with the correct value.
709
+ * - RepresentationID: id of the representation
710
+ * - Number: id of the segment. `%0Xd` defines the number `X` of digits it needs to have
711
+ *
712
+ * @param representation - Representation of the template
713
+ * @param segmentTemplate - Segment template
714
+ * @param segmentId - Segment id
715
+ * @returns url from the segment template
716
+ */
717
+ declare function getUrlFromTemplate(representation: Representation, segmentTemplate: SegmentTemplate, segmentId: number): string;
718
+ //#endregion
719
+ //#region src/mapper/dash/mapHamToDash/utils/getTimescale.d.ts
720
+ /**
721
+ * @internal
722
+ *
723
+ * This function tries to recreate the timescale value.
724
+ *
725
+ * This value is not stored on the ham object, so it is not possible (for now)
726
+ * to get the original one.
727
+ *
728
+ * Just the audio tracks have this value stored on the `sampleRate` key.
729
+ *
730
+ * @param track - Track to get the timescale from
731
+ * @returns Timescale in numbers
732
+ */
733
+ declare function getTimescale(track: Track): number;
734
+ //#endregion
735
+ //#region src/mapper/hls/mapHamToHls/utils/encodeByteRange.d.ts
736
+ /**
737
+ * @internal
738
+ *
739
+ * Get the byterange in hls format from ham track.
740
+ *
741
+ * @param track - Track to get the byterange from
742
+ * @returns string containing the byterange in the hls format
743
+ *
744
+ * @alpha
745
+ */
746
+ declare function encodeByteRange(track: VideoTrack | AudioTrack): string;
747
+ //#endregion
748
+ //#region src/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts
749
+ /**
750
+ * @internal
751
+ *
752
+ * Get the playlist data in hls format from ham track.
753
+ *
754
+ * @param track - Track to get the playlist data from
755
+ * @returns string containing the playlist data in the hls format
756
+ *
757
+ * @alpha
758
+ */
759
+ declare function getPlaylistData(track: AudioTrack | VideoTrack): string;
760
+ //#endregion
761
+ //#region src/mapper/hls/mapHamToHls/utils/getSegments.d.ts
762
+ /**
763
+ * @internal
764
+ *
765
+ * Format the ham segments to hls.
766
+ *
767
+ * @param segments - Segments to be formatted
768
+ * @returns string containing the segments in the hls format
769
+ *
770
+ * @alpha
771
+ */
772
+ declare function getSegments(segments: Segment[]): string;
773
+ //#endregion
774
+ //#region src/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts
775
+ /**
776
+ * @internal
777
+ *
778
+ * Get url initialization from ham track.
779
+ *
780
+ * @param track - Track to get the url initialization from
781
+ * @returns string containing the url initialization in the hls format
782
+ *
783
+ * @alpha
784
+ */
785
+ declare function getUrlInitialization(track: VideoTrack | AudioTrack): string;
786
+ //#endregion
787
+ //#region src/mapper/hls/mapHlsToHam/utils/decodeByteRange.d.ts
788
+ /**
789
+ * @internal
790
+ *
791
+ * Get byterange from HLS Manifest.
792
+ *
793
+ * @param byteRange - Byterange object containing length and offset
794
+ * @returns string containing the byterange. If byterange is undefined, it returns undefined
795
+ *
796
+ * @alpha
797
+ */
798
+ declare function decodeByteRange(byteRange: Byterange | undefined): string;
799
+ //#endregion
800
+ //#region src/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts
801
+ /**
802
+ * @internal
803
+ *
804
+ * Format the hls segments into the ham segments.
805
+ *
806
+ * @param segments - List of HLS segments
807
+ * @returns ham formatted list of segments
808
+ *
809
+ * @alpha
810
+ */
811
+ declare function formatSegments(segments: SegmentHls[]): Segment[];
812
+ //#endregion
813
+ //#region src/mapper/hls/mapHlsToHam/utils/getDuration.d.ts
814
+ /**
815
+ * @internal
816
+ *
817
+ * Calculate the duration of a track.
818
+ *
819
+ * `target duration * number of segments`
820
+ *
821
+ * @param manifest - Manifest of the track
822
+ * @param segments - Array of segments in a track
823
+ * @returns duration of a track
824
+ *
825
+ * @alpha
826
+ */
827
+ declare function getDuration(manifest: HlsManifest, segments: SegmentHls[]): number | null;
828
+ //#endregion
829
+ //#region src/mapper/hls/mapHlsToHam/utils/getHlsCodec.d.ts
830
+ /**
831
+ * @internal
832
+ *
833
+ * Get the codec for a type of content.
834
+ *
835
+ * @param type - Type of the content to get the codecs from
836
+ * @param codecs - String containing multiple codecs separated with commas
837
+ * @returns string containing codec
838
+ *
839
+ * @alpha
840
+ */
841
+ declare function getHlsCodec(type: string, codecs?: string): string;
842
+ //#endregion
843
+ //#region src/services/converters/dashToHam.d.ts
844
+ /**
845
+ * Convert dash manifest into a ham object.
846
+ *
847
+ * @example
848
+ * Example on how to import the cmaf module and convert the dash `manifest`
849
+ * into the ham manifest.
850
+ * ```ts
851
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
852
+ *
853
+ * const manifest = cmaf.dashToHam(dashManifest);
854
+ * ```
855
+ *
856
+ * @param manifest - String of the XML Dash manifest
857
+ * @returns List of presentations from ham
858
+ *
859
+ * @alpha
860
+ */
861
+ declare function dashToHam(manifest: string): Presentation[];
862
+ //#endregion
863
+ //#region src/services/converters/hamToDash.d.ts
864
+ /**
865
+ * Convert HAM object into Dash Manifest.
866
+ *
867
+ * @example
868
+ * Example on how to import the cmaf module and convert the ham `presentations`
869
+ * array into the dash manifest.
870
+ * ```ts
871
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
872
+ *
873
+ * const manifest = cmaf.hamToDash(presentations);
874
+ * ```
875
+ *
876
+ * @param presentation - List of presentations from ham
877
+ * @returns Manifest object containing the Dash manifest as string
878
+ *
879
+ * @alpha
880
+ */
881
+ declare function hamToDash(presentation: Presentation[]): Manifest;
882
+ //#endregion
883
+ //#region src/services/converters/hamToHls.d.ts
884
+ /**
885
+ * Convert ham object into a hls manifest.
886
+ *
887
+ * @example
888
+ * Example on how to import the cmaf module and convert the ham `presentations`
889
+ * array into the hls manifest.
890
+ * ```ts
891
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
892
+ *
893
+ * const manifest = cmaf.hamToHls(presentations);
894
+ * ```
895
+ *
896
+ * @param presentation - List of presentations from ham
897
+ * @returns Manifest object containing the Hls manifest as string and its playlists
898
+ *
899
+ * @alpha
900
+ */
901
+ declare function hamToHls(presentation: Presentation[]): Manifest;
902
+ //#endregion
903
+ //#region src/services/converters/hlsToHam.d.ts
904
+ /**
905
+ * Convert hls manifest into a ham object.
906
+ *
907
+ * @example
908
+ * Example on how to import the cmaf module and convert the hls `manifest` and
909
+ * `ancillaryManifests` array into the ham manifest.
910
+ * ```ts
911
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
912
+ *
913
+ * const manifest = cmaf.hlsToHam(hlsManifest);
914
+ * ```
915
+ *
916
+ * @param manifest - String of the Main manifest
917
+ * @param ancillaryManifests - Ancillary Manifests . Must be in order, first audio, subtitle and video
918
+ * @returns List of presentations from ham
919
+ *
920
+ * @alpha
921
+ */
922
+ declare function hlsToHam(manifest: string, ancillaryManifests: string[]): Presentation[];
923
+ //#endregion
924
+ //#region src/services/getters/getTracksFromPresentation.d.ts
925
+ /**
926
+ * Get a list of Tracks contained on a Presentation
927
+ *
928
+ * @param presentation - Presentation object from HAM
929
+ * @param predicate - Filtering function
930
+ * @returns Track[]
931
+ *
932
+ * @alpha
933
+ */
934
+ declare function getTracksFromPresentation(presentation: Presentation, predicate?: (track: Track) => boolean): Track[];
935
+ //#endregion
936
+ //#region src/services/getters/getTracksFromSelectionSet.d.ts
937
+ /**
938
+ * Get a list of Tracks contained on a SelectionSet
939
+ *
940
+ * @param selectionSet - SelectionSet object from HAM
941
+ * @param predicate - Filtering function
942
+ * @returns Track[]
943
+ *
944
+ * @alpha
945
+ */
946
+ declare function getTracksFromSelectionSet(selectionSet: SelectionSet, predicate?: (track: Track) => boolean): Track[];
947
+ //#endregion
948
+ //#region src/services/getters/getTracksFromSwitchingSet.d.ts
949
+ /**
950
+ * Get a list of Tracks contained on a SwitchingSet
951
+ *
952
+ * @param switchingSet - SwitchingSet object from HAM
953
+ * @param predicate - Filtering function
954
+ * @returns Track[]
955
+ *
956
+ * @alpha
957
+ */
958
+ declare function getTracksFromSwitchingSet(switchingSet: SwitchingSet, predicate?: (track: Track) => boolean): Track[];
959
+ //#endregion
960
+ //#region src/services/validators/validatePresentation.d.ts
961
+ /**
962
+ * Validate a presentation.
963
+ * It validates in cascade, calling each child validation method.
964
+ *
965
+ * Validations:
966
+ * - Presentation has id
967
+ *
968
+ * @example
969
+ * ```ts
970
+ * import cmaf, { Presentation } from '@svta/common-media-library/cmaf-ham';
971
+ * ...
972
+ *
973
+ * // const presentation: Presentation = ...;
974
+ *
975
+ * const validation = cmaf.validatePresentation(presentation);
976
+ * ```
977
+ *
978
+ * Example output: `{ status: true|false, errorMessages: [...] }`
979
+ *
980
+ * @param presentation - Presentation from cmaf ham model
981
+ * @returns Validation
982
+ *
983
+ * @alpha
984
+ *
985
+ */
986
+ declare function validatePresentation(presentation: Presentation): Validation;
987
+ //#endregion
988
+ //#region src/services/validators/validateSegment.d.ts
989
+ /**
990
+ * Validate a segment.
991
+ *
992
+ * Validations:
993
+ * - segment has duration
994
+ * - segment has url
995
+ *
996
+ * @param segment - Segment from cmaf ham model
997
+ * @param trackId - Optional: parent track id
998
+ * @param prevValidation - Optional: validation object from parent previous validate method call
999
+ * @returns Validation
1000
+ *
1001
+ * @alpha
1002
+ */
1003
+ declare function validateSegment(segment: Segment, trackId?: string, prevValidation?: Validation): Validation;
1004
+ //#endregion
1005
+ //#region src/services/validators/validateSegments.d.ts
1006
+ /**
1007
+ * Validate a list of segments.
1008
+ *
1009
+ * @example
1010
+ * ```ts
1011
+ * import cmaf, { Segment } from '@svta/common-media-library/cmaf-ham';
1012
+ * ...
1013
+ *
1014
+ * // const segments: Segment[] = ...;
1015
+ *
1016
+ * const validation = cmaf.validateSegments(segments);
1017
+ * ```
1018
+ *
1019
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1020
+ *
1021
+ * @param segments - List of Segment from cmaf ham model
1022
+ * @param trackId - Optional: parent track id
1023
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1024
+ * @returns Validation
1025
+ *
1026
+ * @alpha
1027
+ *
1028
+ */
1029
+ declare function validateSegments(segments: Segment[], trackId?: string, prevValidation?: Validation): Validation;
1030
+ //#endregion
1031
+ //#region src/services/validators/validateSelectionSet.d.ts
1032
+ /**
1033
+ * Validate a selection set.
1034
+ * It validates in cascade, calling each child validation method.
1035
+ *
1036
+ * Validations:
1037
+ * - SelectionSet has id
1038
+ *
1039
+ * @example
1040
+ * ```ts
1041
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1042
+ * ...
1043
+ *
1044
+ * // const selectionSet: SelectionSet = ...;
1045
+ *
1046
+ * const validation = cmaf.validateSelectionSet(selectionSet);
1047
+ * ```
1048
+ *
1049
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1050
+ *
1051
+ * @param selectionSet - SelectionSet from cmaf ham model
1052
+ * @param presentationId - Optional: parent presentation id
1053
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1054
+ * @returns Validation
1055
+ *
1056
+ * @alpha
1057
+ *
1058
+ */
1059
+ declare function validateSelectionSet(selectionSet: SelectionSet, presentationId?: string, prevValidation?: Validation): Validation;
1060
+ //#endregion
1061
+ //#region src/services/validators/validateSelectionSets.d.ts
1062
+ /**
1063
+ * Validate a list of selection set.
1064
+ * It validates in cascade, calling each child validation method.
1065
+ *
1066
+ * @example
1067
+ * ```ts
1068
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1069
+ * ...
1070
+ *
1071
+ * // const selectionSets: SelectionSet[] = ...;
1072
+ *
1073
+ * const validation = cmaf.validateSelectionSets(selectionSets);
1074
+ * ```
1075
+ *
1076
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1077
+ *
1078
+ * @param selectionSets - List of SelectionSet from cmaf ham model
1079
+ * @param presentationId - Optional: parent presentation id
1080
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1081
+ * @returns Validation
1082
+ *
1083
+ * @alpha
1084
+ *
1085
+ */
1086
+ declare function validateSelectionSets(selectionSets: SelectionSet[], presentationId?: string, prevValidation?: Validation): Validation;
1087
+ //#endregion
1088
+ //#region src/services/validators/validateSwitchingSet.d.ts
1089
+ /**
1090
+ * Validate a switching set.
1091
+ * It validates in cascade, calling each child validation method.
1092
+ *
1093
+ * Validations:
1094
+ * - SwitchingSet has id
1095
+ *
1096
+ * @example
1097
+ * ```ts
1098
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1099
+ * ...
1100
+ *
1101
+ * // const switchingSet: SwitchingSet = ...;
1102
+ *
1103
+ * const validation = cmaf.validateSwitchingSet(switchingSet);
1104
+ * ```
1105
+ *
1106
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1107
+ *
1108
+ * @param switchingSet - SwitchingSet from cmaf ham model
1109
+ * @param selectionSetId - Optional: parent selection set id
1110
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1111
+ * @returns Validation
1112
+ *
1113
+ * @alpha
1114
+ *
1115
+ */
1116
+ declare function validateSwitchingSet(switchingSet: SwitchingSet, selectionSetId?: string, prevValidation?: Validation): Validation;
1117
+ //#endregion
1118
+ //#region src/services/validators/validateSwitchingSets.d.ts
1119
+ /**
1120
+ * Validate a list of switching set.
1121
+ * It validates in cascade, calling each child validation method.
1122
+ *
1123
+ * @example
1124
+ * ```ts
1125
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1126
+ * ...
1127
+ *
1128
+ * // const switchingSets: SwitchingSet[] = ...;
1129
+ *
1130
+ * const validation = cmaf.validateSwitchingSets(switchingSets);
1131
+ * ```
1132
+ *
1133
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1134
+ *
1135
+ * @param switchingSets - List of SwitchingSets from cmaf ham model
1136
+ * @param selectionSetId - Optional: parent selection set id
1137
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1138
+ * @returns Validation
1139
+ *
1140
+ * @alpha
1141
+ *
1142
+ */
1143
+ declare function validateSwitchingSets(switchingSets: SwitchingSet[], selectionSetId?: string, prevValidation?: Validation): Validation;
1144
+ //#endregion
1145
+ //#region src/services/validators/validateTrack.d.ts
1146
+ /**
1147
+ * Validate a track.
1148
+ * It validates in cascade, calling each child validation method.
1149
+ *
1150
+ * Validations:
1151
+ * - track has id
1152
+ * - Invokes specific audio, video and text validations
1153
+ *
1154
+ * @example
1155
+ * ```ts
1156
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1157
+ * ...
1158
+ *
1159
+ * // const track: Track = ...;
1160
+ *
1161
+ * const validation = cmaf.validateTrack(track);
1162
+ * ```
1163
+ *
1164
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1165
+ *
1166
+ * @param track - Track from cmaf ham model
1167
+ * @param switchingSetId - Optional: parent switching set id
1168
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1169
+ * @returns Validation
1170
+ *
1171
+ * @alpha
1172
+ *
1173
+ */
1174
+ declare function validateTrack(track: Track, switchingSetId?: string, prevValidation?: Validation): Validation;
1175
+ //#endregion
1176
+ //#region src/services/validators/validateTracks.d.ts
1177
+ /**
1178
+ * Validate a list of tracks.
1179
+ * It validates in cascade, calling each child validation method.
1180
+ *
1181
+ * @example
1182
+ * ```ts
1183
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1184
+ * ...
1185
+ *
1186
+ * // const tracks: Track[] = ...;
1187
+ *
1188
+ * const validation = cmaf.validateTracks(tracks);
1189
+ * ```
1190
+ *
1191
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1192
+ *
1193
+ * @param tracks - List of Track from cmaf ham model
1194
+ * @param switchingSetId - Optional: parent switching set id
1195
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1196
+ * @returns Validation
1197
+ *
1198
+ * @alpha
1199
+ *
1200
+ */
1201
+ declare function validateTracks(tracks: Track[], switchingSetId?: string, prevValidation?: Validation): Validation;
1202
+ //#endregion
1203
+ //#region src/utils/dash/iso8601DurationToNumber.d.ts
1204
+ /**
1205
+ * @internal
1206
+ */
1207
+ declare function iso8601DurationToNumber(isoDuration: string): number;
1208
+ //#endregion
1209
+ //#region src/utils/dash/numberToIso8601Duration.d.ts
1210
+ /**
1211
+ * @internal
1212
+ */
1213
+ declare function numberToIso8601Duration(duration: number): string;
1214
+ //#endregion
1215
+ //#region src/utils/dash/parseDashManifest.d.ts
1216
+ /**
1217
+ * @internal
1218
+ */
1219
+ type DashParser = (raw: string) => DashManifest;
1220
+ /**
1221
+ * @internal
1222
+ */
1223
+ declare function setDashParser(parser: DashParser): void;
1224
+ /**
1225
+ * @internal
1226
+ */
1227
+ declare function getDashParser(): DashParser;
1228
+ /**
1229
+ * @internal
1230
+ * Parse XML to Json
1231
+ *
1232
+ * @param raw - Raw string containing the xml from the Dash Manifest
1233
+ * @returns json with the Dash Manifest structure
1234
+ */
1235
+ declare function parseDashManifest(raw: string): DashManifest;
1236
+ //#endregion
1237
+ //#region src/utils/dash/serializeDashManifest.d.ts
1238
+ /**
1239
+ * @internal
1240
+ */
1241
+ type DashSerializer = (json: DashManifest) => string;
1242
+ /**
1243
+ * @internal
1244
+ */
1245
+ declare function setDashSerializer(serializer: DashSerializer): void;
1246
+ /**
1247
+ * @internal
1248
+ */
1249
+ declare function getDashSerializer(): DashSerializer;
1250
+ /**
1251
+ * @internal
1252
+ */
1253
+ declare function serializeDashManifest(json: DashManifest): string;
1254
+ //#endregion
1255
+ //#region src/utils/hls/parseHlsManifest.d.ts
1256
+ /**
1257
+ * @internal
1258
+ */
1259
+ type HlsParser = (text: string) => HlsManifest;
1260
+ /**
1261
+ * @internal
1262
+ */
1263
+ declare function setHlsParser(parser: HlsParser): void;
1264
+ /**
1265
+ * @internal
1266
+ */
1267
+ declare function getHlsParser(): HlsParser;
1268
+ /**
1269
+ * @internal
1270
+ */
1271
+ declare function parseHlsManifest(text?: string): HlsManifest;
1272
+ //#endregion
1273
+ export { AdaptationSet, AlignedSwitchingSet, AudioChannelConfiguration, AudioTrack, Byterange, ContentComponent, DashManifest, DashParser, DashSerializer, FrameRate, Ham, HlsManifest, HlsParser, Initialization, Manifest, ManifestFormat, MediaGroups, Period, PlayList, Presentation, Representation, Role, Segment, SegmentBase, SegmentHls, SegmentList, SegmentTemplate, SegmentURL, SelectionSet, SwitchingSet, TextTrack, Track, TrackType, Validation, VideoTrack, calculateDuration, dashToHam, decodeByteRange, encodeByteRange, formatSegments, getChannels, getCodec, getContentType, getDashParser, getDashSerializer, getDuration, getFrameRate, getGroup, getHlsCodec, getHlsParser, getLanguage, getNumberOfSegments, getPlaylistData, getPresentationId, getSampleRate, getSar, getSegments, getTimescale, getTrackDuration, getTracksFromPresentation, getTracksFromSelectionSet, getTracksFromSwitchingSet, getUrlFromTemplate, getUrlInitialization, hamToDash, hamToHls, hlsToHam, iso8601DurationToNumber, mapSegmentBase, mapSegmentList, mapSegmentTemplate, mapSegments, numberToIso8601Duration, parseDashManifest, parseHlsManifest, serializeDashManifest, setDashParser, setDashSerializer, setHlsParser, validatePresentation, validateSegment, validateSegments, validateSelectionSet, validateSelectionSets, validateSwitchingSet, validateSwitchingSets, validateTrack, validateTracks };
52
1274
  //# sourceMappingURL=index.d.ts.map