@svta/cml-cmaf-ham 0.19.0 → 0.21.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 +1265 -51
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1821 -19
  5. package/dist/index.js.map +1 -1
  6. package/package.json +5 -25
  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,1266 @@
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: Record<string, Record<string, {
420
+ language: string;
421
+ }>>;
422
+ SUBTITLES: Record<string, Record<string, {
423
+ language: string;
424
+ }>>;
425
+ };
426
+ //#endregion
427
+ //#region src/types/mapper/hls/Playlist.d.ts
428
+ /**
429
+ * HLS Playlist
430
+ *
431
+ * @alpha
432
+ */
433
+ type PlayList = {
434
+ uri: string;
435
+ attributes: {
436
+ FRAME_RATE: number;
437
+ CODECS: string;
438
+ BANDWIDTH: number;
439
+ RESOLUTION: {
440
+ width: number;
441
+ height: number;
442
+ };
443
+ };
444
+ };
445
+ //#endregion
446
+ //#region src/types/mapper/hls/SegmentHls.d.ts
447
+ /**
448
+ * HLS Segments
449
+ *
450
+ * @alpha
451
+ */
452
+ type SegmentHls = {
453
+ title?: string;
454
+ duration: number;
455
+ byterange?: Byterange;
456
+ uri?: string;
457
+ timeline?: number;
458
+ map?: {
459
+ uri: string;
460
+ byterange: Byterange;
461
+ };
462
+ };
463
+ //#endregion
464
+ //#region src/types/mapper/hls/HlsManifest.d.ts
465
+ /**
466
+ * HLS manifest
467
+ *
468
+ * @alpha
469
+ */
470
+ type HlsManifest = {
471
+ playlists: PlayList[];
472
+ mediaGroups: MediaGroups;
473
+ segments: SegmentHls[];
474
+ targetDuration?: number;
475
+ };
476
+ //#endregion
477
+ //#region src/types/Validation.d.ts
478
+ /**
479
+ * CMAF-HAM Validation type
480
+ *
481
+ * @alpha
482
+ */
483
+ type Validation = {
484
+ status: boolean;
485
+ errorMessages: string[];
486
+ };
487
+ //#endregion
488
+ //#region src/mapper/dash/mapDashToHam/mapSegmentBase.d.ts
489
+ /**
490
+ * @internal
491
+ *
492
+ * Maps SegmentBase from dash to Segment list from ham.
493
+ *
494
+ * @param representation - Representation to get the SegmentBase from
495
+ * @param duration - Duration of the segment
496
+ * @returns list of ham segments
497
+ */
498
+ declare function mapSegmentBase(representation: Representation, duration: number): Segment[];
499
+ //#endregion
500
+ //#region src/mapper/dash/mapDashToHam/mapSegmentList.d.ts
501
+ /**
502
+ * @internal
503
+ *
504
+ * Maps SegmentList from dash to Segment list from ham.
505
+ *
506
+ * @param segmentList - SegmentList list from dash
507
+ * @returns list of ham segments
508
+ */
509
+ declare function mapSegmentList(segmentList: SegmentList[]): Segment[];
510
+ //#endregion
511
+ //#region src/mapper/dash/mapDashToHam/mapSegments.d.ts
512
+ /**
513
+ * @internal
514
+ *
515
+ * Maps dash segments to ham segment.
516
+ *
517
+ * Checks the type of dash segments used to map them accordingly.
518
+ * @see mapSegmentBase
519
+ * @see mapSegmentList
520
+ * @see mapSegmentTemplate
521
+ *
522
+ * @param adaptationSet - AdaptationSet to get the segments from
523
+ * @param representation - Representation to get the segments from
524
+ * @param duration - Duration of the segments
525
+ * @returns list of ham segments
526
+ */
527
+ declare function mapSegments(adaptationSet: AdaptationSet, representation: Representation, duration: number): Segment[];
528
+ //#endregion
529
+ //#region src/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts
530
+ /**
531
+ * @internal
532
+ *
533
+ * Maps SegmentTemplate from dash to Segment list from ham.
534
+ *
535
+ * @param representation - Representation to generate the urls
536
+ * @param duration - Duration of the segments
537
+ * @param segmentTemplate - SegmentTemplate to get the properties from
538
+ * @returns list of ham segments
539
+ */
540
+ declare function mapSegmentTemplate(representation: Representation, duration: number, segmentTemplate: SegmentTemplate): Segment[];
541
+ //#endregion
542
+ //#region src/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts
543
+ /**
544
+ * @internal
545
+ *
546
+ * Calculates the duration of a segment.
547
+ *
548
+ * segmentDuration = duration / timescale
549
+ *
550
+ * @param duration - Duration of the segment
551
+ * @param timescale - Timescale of the segment
552
+ * @returns Segment duration
553
+ */
554
+ declare function calculateDuration(duration: string | undefined, timescale: string | undefined): number;
555
+ //#endregion
556
+ //#region src/mapper/dash/mapDashToHam/utils/getChannels.d.ts
557
+ /**
558
+ * @internal
559
+ *
560
+ * Get the channels value (audio). It can be present on adaptationSet or representation.
561
+ *
562
+ * @param adaptationSet - AdaptationSet to try to get the channels from
563
+ * @param representation - Representation to try to get the channels from
564
+ * @returns Channels value
565
+ */
566
+ declare function getChannels(adaptationSet: AdaptationSet, representation: Representation): number;
567
+ //#endregion
568
+ //#region src/mapper/dash/mapDashToHam/utils/getCodec.d.ts
569
+ /**
570
+ * @internal
571
+ *
572
+ * Get the codec value (video and audio). It can be present on adaptationSet or representation.
573
+ *
574
+ * @param adaptationSet - AdaptationSet to try to get the codec from
575
+ * @param representation - Representation to try to get the codec from
576
+ * @returns Content codec
577
+ */
578
+ declare function getCodec(adaptationSet: AdaptationSet, representation: Representation): string;
579
+ //#endregion
580
+ //#region src/mapper/dash/mapDashToHam/utils/getContentType.d.ts
581
+ /**
582
+ * @internal
583
+ *
584
+ * Get the type of the content. It can be obtained directly from AdaptationSet or Representation
585
+ * or can be inferred with the existing properties.
586
+ *
587
+ * @param adaptationSet - AdaptationSet to get the type from
588
+ * @param representation - Representation to get the type from
589
+ * @returns type of the content
590
+ */
591
+ declare function getContentType(adaptationSet: AdaptationSet, representation?: Representation): string;
592
+ //#endregion
593
+ //#region src/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts
594
+ /**
595
+ * @internal
596
+ *
597
+ * Get the frame rate from a dash manifest.
598
+ *
599
+ * This functions assumes the adaptationSet and representation set are type video
600
+ *
601
+ * @param adaptationSet - To try to get the frameRate from
602
+ * @param representation - To try to get the frameRate from
603
+ * @returns object containing numerator and denominator
604
+ */
605
+ declare function getFrameRate(adaptationSet: AdaptationSet, representation: Representation): FrameRate;
606
+ //#endregion
607
+ //#region src/mapper/dash/mapDashToHam/utils/getGroup.d.ts
608
+ /**
609
+ * @internal
610
+ */
611
+ declare function getGroup(adaptationSet: AdaptationSet): string;
612
+ //#endregion
613
+ //#region src/mapper/dash/mapDashToHam/utils/getLanguage.d.ts
614
+ /**
615
+ * @internal
616
+ *
617
+ * Get the language from an adaptation set.
618
+ *
619
+ * @param adaptationSet - AdaptationSet to get the language from
620
+ * @returns language of the content
621
+ */
622
+ declare function getLanguage(adaptationSet: AdaptationSet): string;
623
+ //#endregion
624
+ //#region src/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts
625
+ /**
626
+ * @internal
627
+ *
628
+ * Calculates the number of segments that a track has to use SegmentTemplate.
629
+ *
630
+ * Equation used:
631
+ * segments = total duration / (segment duration / timescale)
632
+ *
633
+ * **This equation might be wrong, please double-check it**
634
+ *
635
+ * @param segmentTemplate - SegmentTemplate object
636
+ * @param duration - Total duration of the content
637
+ * @returns Number of segments
638
+ */
639
+ declare function getNumberOfSegments(segmentTemplate: SegmentTemplate, duration: number): number;
640
+ //#endregion
641
+ //#region src/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts
642
+ /**
643
+ * @internal
644
+ *
645
+ * Generates a presentation id. It uses the period id as default or creates one
646
+ * if none is present.
647
+ *
648
+ * @param period - Period to try to get the id from
649
+ * @param duration - Duration of the content
650
+ * @returns Presentation id
651
+ */
652
+ declare function getPresentationId(period: Period, duration: number): string;
653
+ //#endregion
654
+ //#region src/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts
655
+ /**
656
+ * @internal
657
+ *
658
+ * Get sample rate (audio).
659
+ *
660
+ * @param adaptationSet - AdaptationSet to try to get the sampleRate from
661
+ * @param representation - Representation to try to get the sampleRate from
662
+ * @returns Sample rate. In case it is not presents, it returns 0.
663
+ */
664
+ declare function getSampleRate(adaptationSet: AdaptationSet, representation: Representation): number;
665
+ //#endregion
666
+ //#region src/mapper/dash/mapDashToHam/utils/getSar.d.ts
667
+ /**
668
+ * @internal
669
+ *
670
+ * Get the sar value. It can be present on adaptationSet or representation.
671
+ *
672
+ * @param adaptationSet - AdaptationSet to try to get the sar from
673
+ * @param representation - AdaptationSet to try to get the sar from
674
+ * @returns sar value. In case it is not present, returns empty string.
675
+ */
676
+ declare function getSar(adaptationSet: AdaptationSet, representation: Representation): string;
677
+ //#endregion
678
+ //#region src/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts
679
+ /**
680
+ * @internal
681
+ *
682
+ * Calculate the duration of a track.
683
+ *
684
+ * This is calculated using the sum of the duration of all the segments from the
685
+ * track.
686
+ *
687
+ * An alternative to this could be number of segments * duration of a segment.
688
+ *
689
+ * @param segments - Segments to calculate the sum of the durations
690
+ * @returns Duration of the track
691
+ */
692
+ declare function getTrackDuration(segments: Segment[]): number;
693
+ //#endregion
694
+ //#region src/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts
695
+ /**
696
+ * @internal
697
+ *
698
+ * Create the url from a segment template.
699
+ *
700
+ * Searches for substrings with the format `$value$` and replaces it with the correct value.
701
+ * - RepresentationID: id of the representation
702
+ * - Number: id of the segment. `%0Xd` defines the number `X` of digits it needs to have
703
+ *
704
+ * @param representation - Representation of the template
705
+ * @param segmentTemplate - Segment template
706
+ * @param segmentId - Segment id
707
+ * @returns url from the segment template
708
+ */
709
+ declare function getUrlFromTemplate(representation: Representation, segmentTemplate: SegmentTemplate, segmentId: number): string;
710
+ //#endregion
711
+ //#region src/mapper/dash/mapHamToDash/utils/getTimescale.d.ts
712
+ /**
713
+ * @internal
714
+ *
715
+ * This function tries to recreate the timescale value.
716
+ *
717
+ * This value is not stored on the ham object, so it is not possible (for now)
718
+ * to get the original one.
719
+ *
720
+ * Just the audio tracks have this value stored on the `sampleRate` key.
721
+ *
722
+ * @param track - Track to get the timescale from
723
+ * @returns Timescale in numbers
724
+ */
725
+ declare function getTimescale(track: Track): number;
726
+ //#endregion
727
+ //#region src/mapper/hls/mapHamToHls/utils/encodeByteRange.d.ts
728
+ /**
729
+ * @internal
730
+ *
731
+ * Get the byterange in hls format from ham track.
732
+ *
733
+ * @param track - Track to get the byterange from
734
+ * @returns string containing the byterange in the hls format
735
+ *
736
+ * @alpha
737
+ */
738
+ declare function encodeByteRange(track: VideoTrack | AudioTrack): string;
739
+ //#endregion
740
+ //#region src/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts
741
+ /**
742
+ * @internal
743
+ *
744
+ * Get the playlist data in hls format from ham track.
745
+ *
746
+ * @param track - Track to get the playlist data from
747
+ * @returns string containing the playlist data in the hls format
748
+ *
749
+ * @alpha
750
+ */
751
+ declare function getPlaylistData(track: AudioTrack | VideoTrack): string;
752
+ //#endregion
753
+ //#region src/mapper/hls/mapHamToHls/utils/getSegments.d.ts
754
+ /**
755
+ * @internal
756
+ *
757
+ * Format the ham segments to hls.
758
+ *
759
+ * @param segments - Segments to be formatted
760
+ * @returns string containing the segments in the hls format
761
+ *
762
+ * @alpha
763
+ */
764
+ declare function getSegments(segments: Segment[]): string;
765
+ //#endregion
766
+ //#region src/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts
767
+ /**
768
+ * @internal
769
+ *
770
+ * Get url initialization from ham track.
771
+ *
772
+ * @param track - Track to get the url initialization from
773
+ * @returns string containing the url initialization in the hls format
774
+ *
775
+ * @alpha
776
+ */
777
+ declare function getUrlInitialization(track: VideoTrack | AudioTrack): string;
778
+ //#endregion
779
+ //#region src/mapper/hls/mapHlsToHam/utils/decodeByteRange.d.ts
780
+ /**
781
+ * @internal
782
+ *
783
+ * Get byterange from HLS Manifest.
784
+ *
785
+ * @param byteRange - Byterange object containing length and offset
786
+ * @returns string containing the byterange. If byterange is undefined, it returns undefined
787
+ *
788
+ * @alpha
789
+ */
790
+ declare function decodeByteRange(byteRange: Byterange | undefined): string;
791
+ //#endregion
792
+ //#region src/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts
793
+ /**
794
+ * @internal
795
+ *
796
+ * Format the hls segments into the ham segments.
797
+ *
798
+ * @param segments - List of HLS segments
799
+ * @returns ham formatted list of segments
800
+ *
801
+ * @alpha
802
+ */
803
+ declare function formatSegments(segments: SegmentHls[]): Segment[];
804
+ //#endregion
805
+ //#region src/mapper/hls/mapHlsToHam/utils/getDuration.d.ts
806
+ /**
807
+ * @internal
808
+ *
809
+ * Calculate the duration of a track.
810
+ *
811
+ * `target duration * number of segments`
812
+ *
813
+ * @param manifest - Manifest of the track
814
+ * @param segments - Array of segments in a track
815
+ * @returns duration of a track
816
+ *
817
+ * @alpha
818
+ */
819
+ declare function getDuration(manifest: HlsManifest, segments: SegmentHls[]): number | null;
820
+ //#endregion
821
+ //#region src/mapper/hls/mapHlsToHam/utils/getHlsCodec.d.ts
822
+ /**
823
+ * @internal
824
+ *
825
+ * Get the codec for a type of content.
826
+ *
827
+ * @param type - Type of the content to get the codecs from
828
+ * @param codecs - String containing multiple codecs separated with commas
829
+ * @returns string containing codec
830
+ *
831
+ * @alpha
832
+ */
833
+ declare function getHlsCodec(type: string, codecs?: string): string;
834
+ //#endregion
835
+ //#region src/services/converters/dashToHam.d.ts
836
+ /**
837
+ * Convert dash manifest into a ham object.
838
+ *
839
+ * @example
840
+ * Example on how to import the cmaf module and convert the dash `manifest`
841
+ * into the ham manifest.
842
+ * ```ts
843
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
844
+ *
845
+ * const manifest = cmaf.dashToHam(dashManifest);
846
+ * ```
847
+ *
848
+ * @param manifest - String of the XML Dash manifest
849
+ * @returns List of presentations from ham
850
+ *
851
+ * @alpha
852
+ */
853
+ declare function dashToHam(manifest: string): Presentation[];
854
+ //#endregion
855
+ //#region src/services/converters/hamToDash.d.ts
856
+ /**
857
+ * Convert HAM object into Dash Manifest.
858
+ *
859
+ * @example
860
+ * Example on how to import the cmaf module and convert the ham `presentations`
861
+ * array into the dash manifest.
862
+ * ```ts
863
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
864
+ *
865
+ * const manifest = cmaf.hamToDash(presentations);
866
+ * ```
867
+ *
868
+ * @param presentation - List of presentations from ham
869
+ * @returns Manifest object containing the Dash manifest as string
870
+ *
871
+ * @alpha
872
+ */
873
+ declare function hamToDash(presentation: Presentation[]): Manifest;
874
+ //#endregion
875
+ //#region src/services/converters/hamToHls.d.ts
876
+ /**
877
+ * Convert ham object into a hls manifest.
878
+ *
879
+ * @example
880
+ * Example on how to import the cmaf module and convert the ham `presentations`
881
+ * array into the hls manifest.
882
+ * ```ts
883
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
884
+ *
885
+ * const manifest = cmaf.hamToHls(presentations);
886
+ * ```
887
+ *
888
+ * @param presentation - List of presentations from ham
889
+ * @returns Manifest object containing the Hls manifest as string and its playlists
890
+ *
891
+ * @alpha
892
+ */
893
+ declare function hamToHls(presentation: Presentation[]): Manifest;
894
+ //#endregion
895
+ //#region src/services/converters/hlsToHam.d.ts
896
+ /**
897
+ * Convert hls manifest into a ham object.
898
+ *
899
+ * @example
900
+ * Example on how to import the cmaf module and convert the hls `manifest` and
901
+ * `ancillaryManifests` array into the ham manifest.
902
+ * ```ts
903
+ * import cmaf from '@svta/common-media-library/cmaf-ham';
904
+ *
905
+ * const manifest = cmaf.hlsToHam(hlsManifest);
906
+ * ```
907
+ *
908
+ * @param manifest - String of the Main manifest
909
+ * @param ancillaryManifests - Ancillary Manifests . Must be in order, first audio, subtitle and video
910
+ * @returns List of presentations from ham
911
+ *
912
+ * @alpha
913
+ */
914
+ declare function hlsToHam(manifest: string, ancillaryManifests: string[]): Presentation[];
915
+ //#endregion
916
+ //#region src/services/getters/getTracksFromPresentation.d.ts
917
+ /**
918
+ * Get a list of Tracks contained on a Presentation
919
+ *
920
+ * @param presentation - Presentation object from HAM
921
+ * @param predicate - Filtering function
922
+ * @returns Track[]
923
+ *
924
+ * @alpha
925
+ */
926
+ declare function getTracksFromPresentation(presentation: Presentation, predicate?: (track: Track) => boolean): Track[];
927
+ //#endregion
928
+ //#region src/services/getters/getTracksFromSelectionSet.d.ts
929
+ /**
930
+ * Get a list of Tracks contained on a SelectionSet
931
+ *
932
+ * @param selectionSet - SelectionSet object from HAM
933
+ * @param predicate - Filtering function
934
+ * @returns Track[]
935
+ *
936
+ * @alpha
937
+ */
938
+ declare function getTracksFromSelectionSet(selectionSet: SelectionSet, predicate?: (track: Track) => boolean): Track[];
939
+ //#endregion
940
+ //#region src/services/getters/getTracksFromSwitchingSet.d.ts
941
+ /**
942
+ * Get a list of Tracks contained on a SwitchingSet
943
+ *
944
+ * @param switchingSet - SwitchingSet object from HAM
945
+ * @param predicate - Filtering function
946
+ * @returns Track[]
947
+ *
948
+ * @alpha
949
+ */
950
+ declare function getTracksFromSwitchingSet(switchingSet: SwitchingSet, predicate?: (track: Track) => boolean): Track[];
951
+ //#endregion
952
+ //#region src/services/validators/validatePresentation.d.ts
953
+ /**
954
+ * Validate a presentation.
955
+ * It validates in cascade, calling each child validation method.
956
+ *
957
+ * Validations:
958
+ * - Presentation has id
959
+ *
960
+ * @example
961
+ * ```ts
962
+ * import cmaf, { Presentation } from '@svta/common-media-library/cmaf-ham';
963
+ * ...
964
+ *
965
+ * // const presentation: Presentation = ...;
966
+ *
967
+ * const validation = cmaf.validatePresentation(presentation);
968
+ * ```
969
+ *
970
+ * Example output: `{ status: true|false, errorMessages: [...] }`
971
+ *
972
+ * @param presentation - Presentation from cmaf ham model
973
+ * @returns Validation
974
+ *
975
+ * @alpha
976
+ *
977
+ */
978
+ declare function validatePresentation(presentation: Presentation): Validation;
979
+ //#endregion
980
+ //#region src/services/validators/validateSegment.d.ts
981
+ /**
982
+ * Validate a segment.
983
+ *
984
+ * Validations:
985
+ * - segment has duration
986
+ * - segment has url
987
+ *
988
+ * @param segment - Segment from cmaf ham model
989
+ * @param trackId - Optional: parent track id
990
+ * @param prevValidation - Optional: validation object from parent previous validate method call
991
+ * @returns Validation
992
+ *
993
+ * @alpha
994
+ */
995
+ declare function validateSegment(segment: Segment, trackId?: string, prevValidation?: Validation): Validation;
996
+ //#endregion
997
+ //#region src/services/validators/validateSegments.d.ts
998
+ /**
999
+ * Validate a list of segments.
1000
+ *
1001
+ * @example
1002
+ * ```ts
1003
+ * import cmaf, { Segment } from '@svta/common-media-library/cmaf-ham';
1004
+ * ...
1005
+ *
1006
+ * // const segments: Segment[] = ...;
1007
+ *
1008
+ * const validation = cmaf.validateSegments(segments);
1009
+ * ```
1010
+ *
1011
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1012
+ *
1013
+ * @param segments - List of Segment from cmaf ham model
1014
+ * @param trackId - Optional: parent track id
1015
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1016
+ * @returns Validation
1017
+ *
1018
+ * @alpha
1019
+ *
1020
+ */
1021
+ declare function validateSegments(segments: Segment[], trackId?: string, prevValidation?: Validation): Validation;
1022
+ //#endregion
1023
+ //#region src/services/validators/validateSelectionSet.d.ts
1024
+ /**
1025
+ * Validate a selection set.
1026
+ * It validates in cascade, calling each child validation method.
1027
+ *
1028
+ * Validations:
1029
+ * - SelectionSet has id
1030
+ *
1031
+ * @example
1032
+ * ```ts
1033
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1034
+ * ...
1035
+ *
1036
+ * // const selectionSet: SelectionSet = ...;
1037
+ *
1038
+ * const validation = cmaf.validateSelectionSet(selectionSet);
1039
+ * ```
1040
+ *
1041
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1042
+ *
1043
+ * @param selectionSet - SelectionSet from cmaf ham model
1044
+ * @param presentationId - Optional: parent presentation id
1045
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1046
+ * @returns Validation
1047
+ *
1048
+ * @alpha
1049
+ *
1050
+ */
1051
+ declare function validateSelectionSet(selectionSet: SelectionSet, presentationId?: string, prevValidation?: Validation): Validation;
1052
+ //#endregion
1053
+ //#region src/services/validators/validateSelectionSets.d.ts
1054
+ /**
1055
+ * Validate a list of selection set.
1056
+ * It validates in cascade, calling each child validation method.
1057
+ *
1058
+ * @example
1059
+ * ```ts
1060
+ * import cmaf, { SelectionSet } from '@svta/common-media-library/cmaf-ham';
1061
+ * ...
1062
+ *
1063
+ * // const selectionSets: SelectionSet[] = ...;
1064
+ *
1065
+ * const validation = cmaf.validateSelectionSets(selectionSets);
1066
+ * ```
1067
+ *
1068
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1069
+ *
1070
+ * @param selectionSets - List of SelectionSet from cmaf ham model
1071
+ * @param presentationId - Optional: parent presentation id
1072
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1073
+ * @returns Validation
1074
+ *
1075
+ * @alpha
1076
+ *
1077
+ */
1078
+ declare function validateSelectionSets(selectionSets: SelectionSet[], presentationId?: string, prevValidation?: Validation): Validation;
1079
+ //#endregion
1080
+ //#region src/services/validators/validateSwitchingSet.d.ts
1081
+ /**
1082
+ * Validate a switching set.
1083
+ * It validates in cascade, calling each child validation method.
1084
+ *
1085
+ * Validations:
1086
+ * - SwitchingSet has id
1087
+ *
1088
+ * @example
1089
+ * ```ts
1090
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1091
+ * ...
1092
+ *
1093
+ * // const switchingSet: SwitchingSet = ...;
1094
+ *
1095
+ * const validation = cmaf.validateSwitchingSet(switchingSet);
1096
+ * ```
1097
+ *
1098
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1099
+ *
1100
+ * @param switchingSet - SwitchingSet from cmaf ham model
1101
+ * @param selectionSetId - Optional: parent selection set id
1102
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1103
+ * @returns Validation
1104
+ *
1105
+ * @alpha
1106
+ *
1107
+ */
1108
+ declare function validateSwitchingSet(switchingSet: SwitchingSet, selectionSetId?: string, prevValidation?: Validation): Validation;
1109
+ //#endregion
1110
+ //#region src/services/validators/validateSwitchingSets.d.ts
1111
+ /**
1112
+ * Validate a list of switching set.
1113
+ * It validates in cascade, calling each child validation method.
1114
+ *
1115
+ * @example
1116
+ * ```ts
1117
+ * import cmaf, { SwitchingSet } from '@svta/common-media-library/cmaf-ham';
1118
+ * ...
1119
+ *
1120
+ * // const switchingSets: SwitchingSet[] = ...;
1121
+ *
1122
+ * const validation = cmaf.validateSwitchingSets(switchingSets);
1123
+ * ```
1124
+ *
1125
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1126
+ *
1127
+ * @param switchingSets - List of SwitchingSets from cmaf ham model
1128
+ * @param selectionSetId - Optional: parent selection set id
1129
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1130
+ * @returns Validation
1131
+ *
1132
+ * @alpha
1133
+ *
1134
+ */
1135
+ declare function validateSwitchingSets(switchingSets: SwitchingSet[], selectionSetId?: string, prevValidation?: Validation): Validation;
1136
+ //#endregion
1137
+ //#region src/services/validators/validateTrack.d.ts
1138
+ /**
1139
+ * Validate a track.
1140
+ * It validates in cascade, calling each child validation method.
1141
+ *
1142
+ * Validations:
1143
+ * - track has id
1144
+ * - Invokes specific audio, video and text validations
1145
+ *
1146
+ * @example
1147
+ * ```ts
1148
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1149
+ * ...
1150
+ *
1151
+ * // const track: Track = ...;
1152
+ *
1153
+ * const validation = cmaf.validateTrack(track);
1154
+ * ```
1155
+ *
1156
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1157
+ *
1158
+ * @param track - Track from cmaf ham model
1159
+ * @param switchingSetId - Optional: parent switching set id
1160
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1161
+ * @returns Validation
1162
+ *
1163
+ * @alpha
1164
+ *
1165
+ */
1166
+ declare function validateTrack(track: Track, switchingSetId?: string, prevValidation?: Validation): Validation;
1167
+ //#endregion
1168
+ //#region src/services/validators/validateTracks.d.ts
1169
+ /**
1170
+ * Validate a list of tracks.
1171
+ * It validates in cascade, calling each child validation method.
1172
+ *
1173
+ * @example
1174
+ * ```ts
1175
+ * import cmaf, { Track } from '@svta/common-media-library/cmaf-ham';
1176
+ * ...
1177
+ *
1178
+ * // const tracks: Track[] = ...;
1179
+ *
1180
+ * const validation = cmaf.validateTracks(tracks);
1181
+ * ```
1182
+ *
1183
+ * Example output: `{ status: true|false, errorMessages: [...] }`
1184
+ *
1185
+ * @param tracks - List of Track from cmaf ham model
1186
+ * @param switchingSetId - Optional: parent switching set id
1187
+ * @param prevValidation - Optional: validation object from parent previous validate method call
1188
+ * @returns Validation
1189
+ *
1190
+ * @alpha
1191
+ *
1192
+ */
1193
+ declare function validateTracks(tracks: Track[], switchingSetId?: string, prevValidation?: Validation): Validation;
1194
+ //#endregion
1195
+ //#region src/utils/dash/iso8601DurationToNumber.d.ts
1196
+ /**
1197
+ * @internal
1198
+ */
1199
+ declare function iso8601DurationToNumber(isoDuration: string): number;
1200
+ //#endregion
1201
+ //#region src/utils/dash/numberToIso8601Duration.d.ts
1202
+ /**
1203
+ * @internal
1204
+ */
1205
+ declare function numberToIso8601Duration(duration: number): string;
1206
+ //#endregion
1207
+ //#region src/utils/dash/parseDashManifest.d.ts
1208
+ /**
1209
+ * @internal
1210
+ */
1211
+ type DashParser = (raw: string) => DashManifest;
1212
+ /**
1213
+ * @internal
1214
+ */
1215
+ declare function setDashParser(parser: DashParser): void;
1216
+ /**
1217
+ * @internal
1218
+ */
1219
+ declare function getDashParser(): DashParser;
1220
+ /**
1221
+ * @internal
1222
+ * Parse XML to Json
1223
+ *
1224
+ * @param raw - Raw string containing the xml from the Dash Manifest
1225
+ * @returns json with the Dash Manifest structure
1226
+ */
1227
+ declare function parseDashManifest(raw: string): DashManifest;
1228
+ //#endregion
1229
+ //#region src/utils/dash/serializeDashManifest.d.ts
1230
+ /**
1231
+ * @internal
1232
+ */
1233
+ type DashSerializer = (json: DashManifest) => string;
1234
+ /**
1235
+ * @internal
1236
+ */
1237
+ declare function setDashSerializer(serializer: DashSerializer): void;
1238
+ /**
1239
+ * @internal
1240
+ */
1241
+ declare function getDashSerializer(): DashSerializer;
1242
+ /**
1243
+ * @internal
1244
+ */
1245
+ declare function serializeDashManifest(json: DashManifest): string;
1246
+ //#endregion
1247
+ //#region src/utils/hls/parseHlsManifest.d.ts
1248
+ /**
1249
+ * @internal
1250
+ */
1251
+ type HlsParser = (text: string) => HlsManifest;
1252
+ /**
1253
+ * @internal
1254
+ */
1255
+ declare function setHlsParser(parser: HlsParser): void;
1256
+ /**
1257
+ * @internal
1258
+ */
1259
+ declare function getHlsParser(): HlsParser;
1260
+ /**
1261
+ * @internal
1262
+ */
1263
+ declare function parseHlsManifest(text?: string): HlsManifest;
1264
+ //#endregion
1265
+ 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
1266
  //# sourceMappingURL=index.d.ts.map