@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.
- package/README.md +6 -0
- package/dist/index.d.ts +1265 -51
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1821 -19
- package/dist/index.js.map +1 -1
- package/package.json +5 -25
- package/dist/mapper/Mapper.d.ts +0 -8
- package/dist/mapper/Mapper.d.ts.map +0 -1
- package/dist/mapper/Mapper.js +0 -2
- package/dist/mapper/Mapper.js.map +0 -1
- package/dist/mapper/MapperContext.d.ts +0 -14
- package/dist/mapper/MapperContext.d.ts.map +0 -1
- package/dist/mapper/MapperContext.js +0 -22
- package/dist/mapper/MapperContext.js.map +0 -1
- package/dist/mapper/dash/DashMapper.d.ts +0 -10
- package/dist/mapper/dash/DashMapper.d.ts.map +0 -1
- package/dist/mapper/dash/DashMapper.js +0 -23
- package/dist/mapper/dash/DashMapper.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapDashToHam.d.ts +0 -12
- package/dist/mapper/dash/mapDashToHam/mapDashToHam.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapDashToHam.js +0 -42
- package/dist/mapper/dash/mapDashToHam/mapDashToHam.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentBase.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/mapSegmentBase.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentBase.js +0 -20
- package/dist/mapper/dash/mapDashToHam/mapSegmentBase.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentList.d.ts +0 -12
- package/dist/mapper/dash/mapDashToHam/mapSegmentList.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentList.js +0 -25
- package/dist/mapper/dash/mapDashToHam/mapSegmentList.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts +0 -15
- package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.js +0 -27
- package/dist/mapper/dash/mapDashToHam/mapSegmentTemplate.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegments.d.ts +0 -20
- package/dist/mapper/dash/mapDashToHam/mapSegments.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapSegments.js +0 -37
- package/dist/mapper/dash/mapDashToHam/mapSegments.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapTracks.d.ts +0 -19
- package/dist/mapper/dash/mapDashToHam/mapTracks.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/mapTracks.js +0 -72
- package/dist/mapper/dash/mapDashToHam/mapTracks.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.js +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/calculateDuration.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getChannels.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/getChannels.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getChannels.js +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/getChannels.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getCodec.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/getCodec.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getCodec.js +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/getCodec.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getContentType.d.ts +0 -14
- package/dist/mapper/dash/mapDashToHam/utils/getContentType.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getContentType.js +0 -37
- package/dist/mapper/dash/mapDashToHam/utils/getContentType.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts +0 -16
- package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.js +0 -31
- package/dist/mapper/dash/mapDashToHam/utils/getFrameRate.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getGroup.d.ts +0 -3
- package/dist/mapper/dash/mapDashToHam/utils/getGroup.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getGroup.js +0 -6
- package/dist/mapper/dash/mapDashToHam/utils/getGroup.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.d.ts +0 -14
- package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.js +0 -32
- package/dist/mapper/dash/mapDashToHam/utils/getInitializationUrl.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getLanguage.d.ts +0 -11
- package/dist/mapper/dash/mapDashToHam/utils/getLanguage.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getLanguage.js +0 -17
- package/dist/mapper/dash/mapDashToHam/utils/getLanguage.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts +0 -17
- package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.js +0 -21
- package/dist/mapper/dash/mapDashToHam/utils/getNumberOfSegments.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.js +0 -15
- package/dist/mapper/dash/mapDashToHam/utils/getPresentationId.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.js +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/getSampleRate.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getSar.d.ts +0 -13
- package/dist/mapper/dash/mapDashToHam/utils/getSar.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getSar.js +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/getSar.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts +0 -16
- package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.js +0 -19
- package/dist/mapper/dash/mapDashToHam/utils/getTrackDuration.js.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts +0 -18
- package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.d.ts.map +0 -1
- package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.js +0 -34
- package/dist/mapper/dash/mapDashToHam/utils/getUrlFromTemplate.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/mapHamToDash.d.ts +0 -3
- package/dist/mapper/dash/mapHamToDash/mapHamToDash.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/mapHamToDash.js +0 -17
- package/dist/mapper/dash/mapHamToDash/mapHamToDash.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.d.ts +0 -4
- package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.js +0 -16
- package/dist/mapper/dash/mapHamToDash/presentationsToPeriods.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.d.ts +0 -4
- package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.js +0 -22
- package/dist/mapper/dash/mapHamToDash/selectionSetsToAdaptationSet.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.d.ts +0 -4
- package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.js +0 -61
- package/dist/mapper/dash/mapHamToDash/trackToSegmentBase.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/trackToSegmentList.d.ts +0 -4
- package/dist/mapper/dash/mapHamToDash/trackToSegmentList.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/trackToSegmentList.js +0 -27
- package/dist/mapper/dash/mapHamToDash/trackToSegmentList.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.d.ts +0 -4
- package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.js +0 -52
- package/dist/mapper/dash/mapHamToDash/tracksToRepresentation.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.d.ts +0 -13
- package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.js +0 -25
- package/dist/mapper/dash/mapHamToDash/utils/getFrameRate.js.map +0 -1
- package/dist/mapper/dash/mapHamToDash/utils/getTimescale.d.ts +0 -16
- package/dist/mapper/dash/mapHamToDash/utils/getTimescale.d.ts.map +0 -1
- package/dist/mapper/dash/mapHamToDash/utils/getTimescale.js +0 -30
- package/dist/mapper/dash/mapHamToDash/utils/getTimescale.js.map +0 -1
- package/dist/mapper/hls/HlsMapper.d.ts +0 -10
- package/dist/mapper/hls/HlsMapper.d.ts.map +0 -1
- package/dist/mapper/hls/HlsMapper.js +0 -17
- package/dist/mapper/hls/HlsMapper.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.d.ts +0 -8
- package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.js +0 -26
- package/dist/mapper/hls/mapHamToHls/generateManifestPlaylistPiece.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/mapHamToHls.d.ts +0 -4
- package/dist/mapper/hls/mapHamToHls/mapHamToHls.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/mapHamToHls.js +0 -29
- package/dist/mapper/hls/mapHamToHls/mapHamToHls.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getByterange.d.ts +0 -14
- package/dist/mapper/hls/mapHamToHls/utils/getByterange.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getByterange.js +0 -22
- package/dist/mapper/hls/mapHamToHls/utils/getByterange.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts +0 -14
- package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.js +0 -16
- package/dist/mapper/hls/mapHamToHls/utils/getPlaylistData.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getSegments.d.ts +0 -13
- package/dist/mapper/hls/mapHamToHls/utils/getSegments.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getSegments.js +0 -23
- package/dist/mapper/hls/mapHamToHls/utils/getSegments.js.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts +0 -14
- package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.d.ts.map +0 -1
- package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.js +0 -16
- package/dist/mapper/hls/mapHamToHls/utils/getUrlInitialization.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.d.ts +0 -16
- package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.js +0 -55
- package/dist/mapper/hls/mapHlsToHam/audioGroupsToSwitchingSets.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.d.ts +0 -4
- package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.js +0 -41
- package/dist/mapper/hls/mapHlsToHam/mapHlsToHam.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.d.ts +0 -4
- package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.js +0 -35
- package/dist/mapper/hls/mapHlsToHam/subtitleGroupsToSwitchingSets.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts +0 -14
- package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.js +0 -23
- package/dist/mapper/hls/mapHlsToHam/utils/formatSegments.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getByterange.d.ts +0 -13
- package/dist/mapper/hls/mapHlsToHam/utils/getByterange.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getByterange.js +0 -17
- package/dist/mapper/hls/mapHlsToHam/utils/getByterange.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getCodec.d.ts +0 -13
- package/dist/mapper/hls/mapHlsToHam/utils/getCodec.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getCodec.js +0 -31
- package/dist/mapper/hls/mapHlsToHam/utils/getCodec.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getDuration.d.ts +0 -17
- package/dist/mapper/hls/mapHlsToHam/utils/getDuration.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/utils/getDuration.js +0 -21
- package/dist/mapper/hls/mapHlsToHam/utils/getDuration.js.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.d.ts +0 -5
- package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.d.ts.map +0 -1
- package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.js +0 -46
- package/dist/mapper/hls/mapHlsToHam/videoPlaylistsToSwitchingSets.js.map +0 -1
- package/dist/services/converters/dashToHam.d.ts +0 -20
- package/dist/services/converters/dashToHam.d.ts.map +0 -1
- package/dist/services/converters/dashToHam.js +0 -25
- package/dist/services/converters/dashToHam.js.map +0 -1
- package/dist/services/converters/hamToDash.d.ts +0 -21
- package/dist/services/converters/hamToDash.d.ts.map +0 -1
- package/dist/services/converters/hamToDash.js +0 -25
- package/dist/services/converters/hamToDash.js.map +0 -1
- package/dist/services/converters/hamToHls.d.ts +0 -21
- package/dist/services/converters/hamToHls.d.ts.map +0 -1
- package/dist/services/converters/hamToHls.js +0 -25
- package/dist/services/converters/hamToHls.js.map +0 -1
- package/dist/services/converters/hlsToHam.d.ts +0 -21
- package/dist/services/converters/hlsToHam.d.ts.map +0 -1
- package/dist/services/converters/hlsToHam.js +0 -33
- package/dist/services/converters/hlsToHam.js.map +0 -1
- package/dist/services/getters/getTracksFromPresentation.d.ts +0 -13
- package/dist/services/getters/getTracksFromPresentation.d.ts.map +0 -1
- package/dist/services/getters/getTracksFromPresentation.js +0 -15
- package/dist/services/getters/getTracksFromPresentation.js.map +0 -1
- package/dist/services/getters/getTracksFromSelectionSet.d.ts +0 -13
- package/dist/services/getters/getTracksFromSelectionSet.d.ts.map +0 -1
- package/dist/services/getters/getTracksFromSelectionSet.js +0 -15
- package/dist/services/getters/getTracksFromSelectionSet.js.map +0 -1
- package/dist/services/getters/getTracksFromSwitchingSet.d.ts +0 -13
- package/dist/services/getters/getTracksFromSwitchingSet.d.ts.map +0 -1
- package/dist/services/getters/getTracksFromSwitchingSet.js +0 -14
- package/dist/services/getters/getTracksFromSwitchingSet.js.map +0 -1
- package/dist/services/validators/validatePresentation.d.ts +0 -29
- package/dist/services/validators/validatePresentation.d.ts.map +0 -1
- package/dist/services/validators/validatePresentation.js +0 -36
- package/dist/services/validators/validatePresentation.js.map +0 -1
- package/dist/services/validators/validateSegment.d.ts +0 -18
- package/dist/services/validators/validateSegment.d.ts.map +0 -1
- package/dist/services/validators/validateSegment.js +0 -33
- package/dist/services/validators/validateSegment.js.map +0 -1
- package/dist/services/validators/validateSegments.d.ts +0 -27
- package/dist/services/validators/validateSegments.d.ts.map +0 -1
- package/dist/services/validators/validateSegments.js +0 -35
- package/dist/services/validators/validateSegments.js.map +0 -1
- package/dist/services/validators/validateSelectionSet.d.ts +0 -31
- package/dist/services/validators/validateSelectionSet.d.ts.map +0 -1
- package/dist/services/validators/validateSelectionSet.js +0 -44
- package/dist/services/validators/validateSelectionSet.js.map +0 -1
- package/dist/services/validators/validateSelectionSets.d.ts +0 -28
- package/dist/services/validators/validateSelectionSets.d.ts.map +0 -1
- package/dist/services/validators/validateSelectionSets.js +0 -36
- package/dist/services/validators/validateSelectionSets.js.map +0 -1
- package/dist/services/validators/validateSwitchingSet.d.ts +0 -31
- package/dist/services/validators/validateSwitchingSet.d.ts.map +0 -1
- package/dist/services/validators/validateSwitchingSet.js +0 -44
- package/dist/services/validators/validateSwitchingSet.js.map +0 -1
- package/dist/services/validators/validateSwitchingSets.d.ts +0 -28
- package/dist/services/validators/validateSwitchingSets.d.ts.map +0 -1
- package/dist/services/validators/validateSwitchingSets.js +0 -36
- package/dist/services/validators/validateSwitchingSets.js.map +0 -1
- package/dist/services/validators/validateTrack.d.ts +0 -32
- package/dist/services/validators/validateTrack.d.ts.map +0 -1
- package/dist/services/validators/validateTrack.js +0 -140
- package/dist/services/validators/validateTrack.js.map +0 -1
- package/dist/services/validators/validateTracks.d.ts +0 -28
- package/dist/services/validators/validateTracks.d.ts.map +0 -1
- package/dist/services/validators/validateTracks.js +0 -47
- package/dist/services/validators/validateTracks.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/Validation.d.ts +0 -10
- package/dist/types/Validation.d.ts.map +0 -1
- package/dist/types/Validation.js +0 -2
- package/dist/types/Validation.js.map +0 -1
- package/dist/types/manifest/Manifest.d.ts +0 -14
- package/dist/types/manifest/Manifest.d.ts.map +0 -1
- package/dist/types/manifest/Manifest.js +0 -2
- package/dist/types/manifest/Manifest.js.map +0 -1
- package/dist/types/manifest/ManifestFormat.d.ts +0 -7
- package/dist/types/manifest/ManifestFormat.d.ts.map +0 -1
- package/dist/types/manifest/ManifestFormat.js +0 -2
- package/dist/types/manifest/ManifestFormat.js.map +0 -1
- package/dist/types/mapper/dash/AdaptationSet.d.ts +0 -41
- package/dist/types/mapper/dash/AdaptationSet.d.ts.map +0 -1
- package/dist/types/mapper/dash/AdaptationSet.js +0 -2
- package/dist/types/mapper/dash/AdaptationSet.js.map +0 -1
- package/dist/types/mapper/dash/AudioChannelConfiguration.d.ts +0 -12
- package/dist/types/mapper/dash/AudioChannelConfiguration.d.ts.map +0 -1
- package/dist/types/mapper/dash/AudioChannelConfiguration.js +0 -2
- package/dist/types/mapper/dash/AudioChannelConfiguration.js.map +0 -1
- package/dist/types/mapper/dash/ContentComponent.d.ts +0 -11
- package/dist/types/mapper/dash/ContentComponent.d.ts.map +0 -1
- package/dist/types/mapper/dash/ContentComponent.js +0 -2
- package/dist/types/mapper/dash/ContentComponent.js.map +0 -1
- package/dist/types/mapper/dash/DashManifest.d.ts +0 -20
- package/dist/types/mapper/dash/DashManifest.d.ts.map +0 -1
- package/dist/types/mapper/dash/DashManifest.js +0 -2
- package/dist/types/mapper/dash/DashManifest.js.map +0 -1
- package/dist/types/mapper/dash/Initialization.d.ts +0 -12
- package/dist/types/mapper/dash/Initialization.d.ts.map +0 -1
- package/dist/types/mapper/dash/Initialization.js +0 -2
- package/dist/types/mapper/dash/Initialization.js.map +0 -1
- package/dist/types/mapper/dash/Period.d.ts +0 -15
- package/dist/types/mapper/dash/Period.d.ts.map +0 -1
- package/dist/types/mapper/dash/Period.js +0 -2
- package/dist/types/mapper/dash/Period.js.map +0 -1
- package/dist/types/mapper/dash/Representation.d.ts +0 -30
- package/dist/types/mapper/dash/Representation.d.ts.map +0 -1
- package/dist/types/mapper/dash/Representation.js +0 -2
- package/dist/types/mapper/dash/Representation.js.map +0 -1
- package/dist/types/mapper/dash/Role.d.ts +0 -12
- package/dist/types/mapper/dash/Role.d.ts.map +0 -1
- package/dist/types/mapper/dash/Role.js +0 -2
- package/dist/types/mapper/dash/Role.js.map +0 -1
- package/dist/types/mapper/dash/SegmentBase.d.ts +0 -15
- package/dist/types/mapper/dash/SegmentBase.d.ts.map +0 -1
- package/dist/types/mapper/dash/SegmentBase.js +0 -2
- package/dist/types/mapper/dash/SegmentBase.js.map +0 -1
- package/dist/types/mapper/dash/SegmentList.d.ts +0 -16
- package/dist/types/mapper/dash/SegmentList.d.ts.map +0 -1
- package/dist/types/mapper/dash/SegmentList.js +0 -2
- package/dist/types/mapper/dash/SegmentList.js.map +0 -1
- package/dist/types/mapper/dash/SegmentTemplate.d.ts +0 -17
- package/dist/types/mapper/dash/SegmentTemplate.d.ts.map +0 -1
- package/dist/types/mapper/dash/SegmentTemplate.js +0 -2
- package/dist/types/mapper/dash/SegmentTemplate.js.map +0 -1
- package/dist/types/mapper/dash/SegmentUrl.d.ts +0 -11
- package/dist/types/mapper/dash/SegmentUrl.d.ts.map +0 -1
- package/dist/types/mapper/dash/SegmentUrl.js +0 -2
- package/dist/types/mapper/dash/SegmentUrl.js.map +0 -1
- package/dist/types/mapper/hls/Byterange.d.ts +0 -11
- package/dist/types/mapper/hls/Byterange.d.ts.map +0 -1
- package/dist/types/mapper/hls/Byterange.js +0 -2
- package/dist/types/mapper/hls/Byterange.js.map +0 -1
- package/dist/types/mapper/hls/HlsManifest.d.ts +0 -15
- package/dist/types/mapper/hls/HlsManifest.d.ts.map +0 -1
- package/dist/types/mapper/hls/HlsManifest.js +0 -2
- package/dist/types/mapper/hls/HlsManifest.js.map +0 -1
- package/dist/types/mapper/hls/MediaGroups.d.ts +0 -22
- package/dist/types/mapper/hls/MediaGroups.d.ts.map +0 -1
- package/dist/types/mapper/hls/MediaGroups.js +0 -2
- package/dist/types/mapper/hls/MediaGroups.js.map +0 -1
- package/dist/types/mapper/hls/Playlist.d.ts +0 -18
- package/dist/types/mapper/hls/Playlist.d.ts.map +0 -1
- package/dist/types/mapper/hls/Playlist.js +0 -2
- package/dist/types/mapper/hls/Playlist.js.map +0 -1
- package/dist/types/mapper/hls/SegmentHls.d.ts +0 -18
- package/dist/types/mapper/hls/SegmentHls.d.ts.map +0 -1
- package/dist/types/mapper/hls/SegmentHls.js +0 -2
- package/dist/types/mapper/hls/SegmentHls.js.map +0 -1
- package/dist/types/model/AlignedSwitchingSet.d.ts +0 -10
- package/dist/types/model/AlignedSwitchingSet.d.ts.map +0 -1
- package/dist/types/model/AlignedSwitchingSet.js +0 -2
- package/dist/types/model/AlignedSwitchingSet.js.map +0 -1
- package/dist/types/model/AudioTrack.d.ts +0 -17
- package/dist/types/model/AudioTrack.d.ts.map +0 -1
- package/dist/types/model/AudioTrack.js +0 -2
- package/dist/types/model/AudioTrack.js.map +0 -1
- package/dist/types/model/FrameRate.d.ts +0 -14
- package/dist/types/model/FrameRate.d.ts.map +0 -1
- package/dist/types/model/FrameRate.js +0 -11
- package/dist/types/model/FrameRate.js.map +0 -1
- package/dist/types/model/Ham.d.ts +0 -11
- package/dist/types/model/Ham.d.ts.map +0 -1
- package/dist/types/model/Ham.js +0 -2
- package/dist/types/model/Ham.js.map +0 -1
- package/dist/types/model/Presentation.d.ts +0 -13
- package/dist/types/model/Presentation.d.ts.map +0 -1
- package/dist/types/model/Presentation.js +0 -2
- package/dist/types/model/Presentation.js.map +0 -1
- package/dist/types/model/Segment.d.ts +0 -11
- package/dist/types/model/Segment.d.ts.map +0 -1
- package/dist/types/model/Segment.js +0 -2
- package/dist/types/model/Segment.js.map +0 -1
- package/dist/types/model/SelectionSet.d.ts +0 -13
- package/dist/types/model/SelectionSet.d.ts.map +0 -1
- package/dist/types/model/SelectionSet.js +0 -2
- package/dist/types/model/SelectionSet.js.map +0 -1
- package/dist/types/model/SwitchingSet.d.ts +0 -11
- package/dist/types/model/SwitchingSet.d.ts.map +0 -1
- package/dist/types/model/SwitchingSet.js +0 -2
- package/dist/types/model/SwitchingSet.js.map +0 -1
- package/dist/types/model/TextTrack.d.ts +0 -8
- package/dist/types/model/TextTrack.d.ts.map +0 -1
- package/dist/types/model/TextTrack.js +0 -2
- package/dist/types/model/TextTrack.js.map +0 -1
- package/dist/types/model/Track.d.ts +0 -32
- package/dist/types/model/Track.d.ts.map +0 -1
- package/dist/types/model/Track.js +0 -2
- package/dist/types/model/Track.js.map +0 -1
- package/dist/types/model/TrackType.d.ts +0 -8
- package/dist/types/model/TrackType.d.ts.map +0 -1
- package/dist/types/model/TrackType.js +0 -2
- package/dist/types/model/TrackType.js.map +0 -1
- package/dist/types/model/VideoTrack.d.ts +0 -23
- package/dist/types/model/VideoTrack.d.ts.map +0 -1
- package/dist/types/model/VideoTrack.js +0 -2
- package/dist/types/model/VideoTrack.js.map +0 -1
- package/dist/utils/constants.d.ts +0 -16
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js +0 -21
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/dash/iso8601DurationToNumber.d.ts +0 -2
- package/dist/utils/dash/iso8601DurationToNumber.d.ts.map +0 -1
- package/dist/utils/dash/iso8601DurationToNumber.js +0 -17
- package/dist/utils/dash/iso8601DurationToNumber.js.map +0 -1
- package/dist/utils/dash/numberToIso8601Duration.d.ts +0 -2
- package/dist/utils/dash/numberToIso8601Duration.d.ts.map +0 -1
- package/dist/utils/dash/numberToIso8601Duration.js +0 -13
- package/dist/utils/dash/numberToIso8601Duration.js.map +0 -1
- package/dist/utils/dash/parseDashManifest.d.ts +0 -22
- package/dist/utils/dash/parseDashManifest.d.ts.map +0 -1
- package/dist/utils/dash/parseDashManifest.js +0 -24
- package/dist/utils/dash/parseDashManifest.js.map +0 -1
- package/dist/utils/dash/serializeDashManifest.d.ts +0 -18
- package/dist/utils/dash/serializeDashManifest.d.ts.map +0 -1
- package/dist/utils/dash/serializeDashManifest.js +0 -20
- package/dist/utils/dash/serializeDashManifest.js.map +0 -1
- package/dist/utils/hls/parseHlsManifest.d.ts +0 -18
- package/dist/utils/hls/parseHlsManifest.d.ts.map +0 -1
- package/dist/utils/hls/parseHlsManifest.js +0 -24
- package/dist/utils/hls/parseHlsManifest.js.map +0 -1
- package/dist/utils/manifest/addMetadataToDash.d.ts +0 -4
- package/dist/utils/manifest/addMetadataToDash.d.ts.map +0 -1
- package/dist/utils/manifest/addMetadataToDash.js +0 -15
- package/dist/utils/manifest/addMetadataToDash.js.map +0 -1
- package/dist/utils/manifest/addMetadataToHls.d.ts +0 -3
- package/dist/utils/manifest/addMetadataToHls.d.ts.map +0 -1
- package/dist/utils/manifest/addMetadataToHls.js +0 -15
- package/dist/utils/manifest/addMetadataToHls.js.map +0 -1
- package/dist/utils/manifest/getMetadata.d.ts +0 -3
- package/dist/utils/manifest/getMetadata.d.ts.map +0 -1
- package/dist/utils/manifest/getMetadata.js +0 -5
- package/dist/utils/manifest/getMetadata.js.map +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { calculateDuration } from './utils/calculateDuration.js';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
|
-
* Maps SegmentList from dash to Segment list from ham.
|
|
6
|
-
*
|
|
7
|
-
* @param segmentList - SegmentList list from dash
|
|
8
|
-
* @returns list of ham segments
|
|
9
|
-
*/
|
|
10
|
-
export function mapSegmentList(segmentList) {
|
|
11
|
-
const segments = [];
|
|
12
|
-
segmentList.map((segment) => {
|
|
13
|
-
if (segment.SegmentURL) {
|
|
14
|
-
return segment.SegmentURL.forEach((segmentURL) => {
|
|
15
|
-
var _a;
|
|
16
|
-
segments.push({
|
|
17
|
-
duration: calculateDuration(segment.$.duration, segment.$.timescale),
|
|
18
|
-
url: (_a = segmentURL.$.media) !== null && _a !== void 0 ? _a : '',
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return segments;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=mapSegmentList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapSegmentList.js","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapSegmentList.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,WAA0B;IACxD,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,WAAW,CAAC,GAAG,CAAC,CAAC,OAAoB,EAAE,EAAE;QACxC,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,OAAO,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,UAAsB,EAAE,EAAE;;gBAC5D,QAAQ,CAAC,IAAI,CAAC;oBACb,QAAQ,EAAE,iBAAiB,CAC1B,OAAO,CAAC,CAAC,CAAC,QAAQ,EAClB,OAAO,CAAC,CAAC,CAAC,SAAS,CACnB;oBACD,GAAG,EAAE,MAAA,UAAU,CAAC,CAAC,CAAC,KAAK,mCAAI,EAAE;iBAClB,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import type { SegmentList } from '../../../types/mapper/dash/SegmentList.js';\nimport type { SegmentURL } from '../../../types/mapper/dash/SegmentUrl.js';\n\nimport type { Segment } from '../../../types/model/Segment.js';\n\nimport { calculateDuration } from './utils/calculateDuration.js';\n\n/**\n * @internal\n *\n * Maps SegmentList from dash to Segment list from ham.\n *\n * @param segmentList - SegmentList list from dash\n * @returns list of ham segments\n */\nexport function mapSegmentList(segmentList: SegmentList[]): Segment[] {\n\tconst segments: Segment[] = [];\n\tsegmentList.map((segment: SegmentList) => {\n\t\tif (segment.SegmentURL) {\n\t\t\treturn segment.SegmentURL.forEach((segmentURL: SegmentURL) => {\n\t\t\t\tsegments.push({\n\t\t\t\t\tduration: calculateDuration(\n\t\t\t\t\t\tsegment.$.duration,\n\t\t\t\t\t\tsegment.$.timescale,\n\t\t\t\t\t),\n\t\t\t\t\turl: segmentURL.$.media ?? '',\n\t\t\t\t} as Segment);\n\t\t\t});\n\t\t}\n\t});\n\treturn segments;\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Representation } from '../../../types/mapper/dash/Representation.js';
|
|
2
|
-
import type { SegmentTemplate } from '../../../types/mapper/dash/SegmentTemplate.js';
|
|
3
|
-
import type { Segment } from '../../../types/model/Segment.js';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*
|
|
7
|
-
* Maps SegmentTemplate from dash to Segment list from ham.
|
|
8
|
-
*
|
|
9
|
-
* @param representation - Representation to generate the urls
|
|
10
|
-
* @param duration - Duration of the segments
|
|
11
|
-
* @param segmentTemplate - SegmentTemplate to get the properties from
|
|
12
|
-
* @returns list of ham segments
|
|
13
|
-
*/
|
|
14
|
-
export declare function mapSegmentTemplate(representation: Representation, duration: number, segmentTemplate: SegmentTemplate): Segment[];
|
|
15
|
-
//# sourceMappingURL=mapSegmentTemplate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapSegmentTemplate.d.ts","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapSegmentTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAErF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAM/D;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,eAAe,GAC9B,OAAO,EAAE,CAiBX"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { calculateDuration } from './utils/calculateDuration.js';
|
|
2
|
-
import { getNumberOfSegments } from './utils/getNumberOfSegments.js';
|
|
3
|
-
import { getUrlFromTemplate } from './utils/getUrlFromTemplate.js';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*
|
|
7
|
-
* Maps SegmentTemplate from dash to Segment list from ham.
|
|
8
|
-
*
|
|
9
|
-
* @param representation - Representation to generate the urls
|
|
10
|
-
* @param duration - Duration of the segments
|
|
11
|
-
* @param segmentTemplate - SegmentTemplate to get the properties from
|
|
12
|
-
* @returns list of ham segments
|
|
13
|
-
*/
|
|
14
|
-
export function mapSegmentTemplate(representation, duration, segmentTemplate) {
|
|
15
|
-
var _a;
|
|
16
|
-
const numberOfSegments = getNumberOfSegments(segmentTemplate, duration);
|
|
17
|
-
const init = +((_a = segmentTemplate.$.startNumber) !== null && _a !== void 0 ? _a : 0);
|
|
18
|
-
const segments = [];
|
|
19
|
-
for (let id = init; id < numberOfSegments + init; id++) {
|
|
20
|
-
segments.push({
|
|
21
|
-
duration: calculateDuration(segmentTemplate.$.duration, segmentTemplate.$.timescale),
|
|
22
|
-
url: getUrlFromTemplate(representation, segmentTemplate, id),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return segments;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=mapSegmentTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapSegmentTemplate.js","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapSegmentTemplate.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CACjC,cAA8B,EAC9B,QAAgB,EAChB,eAAgC;;IAEhC,MAAM,gBAAgB,GAAW,mBAAmB,CACnD,eAAe,EACf,QAAQ,CACR,CAAC;IACF,MAAM,IAAI,GAAW,CAAC,CAAC,MAAA,eAAe,CAAC,CAAC,CAAC,WAAW,mCAAI,CAAC,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,KAAK,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,gBAAgB,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC;YACb,QAAQ,EAAE,iBAAiB,CAC1B,eAAe,CAAC,CAAC,CAAC,QAAQ,EAC1B,eAAe,CAAC,CAAC,CAAC,SAAS,CAC3B;YACD,GAAG,EAAE,kBAAkB,CAAC,cAAc,EAAE,eAAe,EAAE,EAAE,CAAC;SACjD,CAAC,CAAC;IACf,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import type { Representation } from '../../../types/mapper/dash/Representation.js';\nimport type { SegmentTemplate } from '../../../types/mapper/dash/SegmentTemplate.js';\n\nimport type { Segment } from '../../../types/model/Segment.js';\n\nimport { calculateDuration } from './utils/calculateDuration.js';\nimport { getNumberOfSegments } from './utils/getNumberOfSegments.js';\nimport { getUrlFromTemplate } from './utils/getUrlFromTemplate.js';\n\n/**\n * @internal\n *\n * Maps SegmentTemplate from dash to Segment list from ham.\n *\n * @param representation - Representation to generate the urls\n * @param duration - Duration of the segments\n * @param segmentTemplate - SegmentTemplate to get the properties from\n * @returns list of ham segments\n */\nexport function mapSegmentTemplate(\n\trepresentation: Representation,\n\tduration: number,\n\tsegmentTemplate: SegmentTemplate,\n): Segment[] {\n\tconst numberOfSegments: number = getNumberOfSegments(\n\t\tsegmentTemplate,\n\t\tduration,\n\t);\n\tconst init: number = +(segmentTemplate.$.startNumber ?? 0);\n\tconst segments: Segment[] = [];\n\tfor (let id = init; id < numberOfSegments + init; id++) {\n\t\tsegments.push({\n\t\t\tduration: calculateDuration(\n\t\t\t\tsegmentTemplate.$.duration,\n\t\t\t\tsegmentTemplate.$.timescale,\n\t\t\t),\n\t\t\turl: getUrlFromTemplate(representation, segmentTemplate, id),\n\t\t} as Segment);\n\t}\n\treturn segments;\n}\n"]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../types/mapper/dash/Representation.js';
|
|
3
|
-
import type { Segment } from '../../../types/model/Segment.js';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*
|
|
7
|
-
* Maps dash segments to ham segment.
|
|
8
|
-
*
|
|
9
|
-
* Checks the type of dash segments used to map them accordingly.
|
|
10
|
-
* @see mapSegmentBase
|
|
11
|
-
* @see mapSegmentList
|
|
12
|
-
* @see mapSegmentTemplate
|
|
13
|
-
*
|
|
14
|
-
* @param adaptationSet - AdaptationSet to get the segments from
|
|
15
|
-
* @param representation - Representation to get the segments from
|
|
16
|
-
* @param duration - Duration of the segments
|
|
17
|
-
* @returns list of ham segments
|
|
18
|
-
*/
|
|
19
|
-
export declare function mapSegments(adaptationSet: AdaptationSet, representation: Representation, duration: number): Segment[];
|
|
20
|
-
//# sourceMappingURL=mapSegments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapSegments.d.ts","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapSegments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAInF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAM/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,GACd,OAAO,EAAE,CAmBX"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { mapSegmentBase } from './mapSegmentBase.js';
|
|
2
|
-
import { mapSegmentList } from './mapSegmentList.js';
|
|
3
|
-
import { mapSegmentTemplate } from './mapSegmentTemplate.js';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*
|
|
7
|
-
* Maps dash segments to ham segment.
|
|
8
|
-
*
|
|
9
|
-
* Checks the type of dash segments used to map them accordingly.
|
|
10
|
-
* @see mapSegmentBase
|
|
11
|
-
* @see mapSegmentList
|
|
12
|
-
* @see mapSegmentTemplate
|
|
13
|
-
*
|
|
14
|
-
* @param adaptationSet - AdaptationSet to get the segments from
|
|
15
|
-
* @param representation - Representation to get the segments from
|
|
16
|
-
* @param duration - Duration of the segments
|
|
17
|
-
* @returns list of ham segments
|
|
18
|
-
*/
|
|
19
|
-
export function mapSegments(adaptationSet, representation, duration) {
|
|
20
|
-
var _a, _b, _c, _d;
|
|
21
|
-
const segmentTemplate = (_b = (_a = adaptationSet.SegmentTemplate) === null || _a === void 0 ? void 0 : _a.at(0)) !== null && _b !== void 0 ? _b : (_c = representation.SegmentTemplate) === null || _c === void 0 ? void 0 : _c.at(0);
|
|
22
|
-
const segmentList = (_d = adaptationSet.SegmentList) !== null && _d !== void 0 ? _d : representation.SegmentList;
|
|
23
|
-
if (representation.SegmentBase) {
|
|
24
|
-
return mapSegmentBase(representation, duration);
|
|
25
|
-
}
|
|
26
|
-
else if (segmentList) {
|
|
27
|
-
return mapSegmentList(segmentList);
|
|
28
|
-
}
|
|
29
|
-
else if (segmentTemplate) {
|
|
30
|
-
return mapSegmentTemplate(representation, duration, segmentTemplate);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.error(`Representation ${representation.$.id} has no segments`);
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=mapSegments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapSegments.js","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapSegments.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAC1B,aAA4B,EAC5B,cAA8B,EAC9B,QAAgB;;IAEhB,MAAM,eAAe,GACpB,MAAA,MAAA,aAAa,CAAC,eAAe,0CAAE,EAAE,CAAC,CAAC,CAAC,mCACpC,MAAA,cAAc,CAAC,eAAe,0CAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,WAAW,GAChB,MAAA,aAAa,CAAC,WAAW,mCAAI,cAAc,CAAC,WAAW,CAAC;IACzD,IAAI,cAAc,CAAC,WAAW,EAAE,CAAC;QAChC,OAAO,cAAc,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;SACI,IAAI,WAAW,EAAE,CAAC;QACtB,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;SACI,IAAI,eAAe,EAAE,CAAC;QAC1B,OAAO,kBAAkB,CAAC,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;IACtE,CAAC;SACI,CAAC;QACL,OAAO,CAAC,KAAK,CAAC,kBAAkB,cAAc,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;QACvE,OAAO,EAAe,CAAC;IACxB,CAAC;AACF,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../types/mapper/dash/Representation.js';\nimport type { SegmentList } from '../../../types/mapper/dash/SegmentList.js';\nimport type { SegmentTemplate } from '../../../types/mapper/dash/SegmentTemplate.js';\n\nimport type { Segment } from '../../../types/model/Segment.js';\n\nimport { mapSegmentBase } from './mapSegmentBase.js';\nimport { mapSegmentList } from './mapSegmentList.js';\nimport { mapSegmentTemplate } from './mapSegmentTemplate.js';\n\n/**\n * @internal\n *\n * Maps dash segments to ham segment.\n *\n * Checks the type of dash segments used to map them accordingly.\n * @see mapSegmentBase\n * @see mapSegmentList\n * @see mapSegmentTemplate\n *\n * @param adaptationSet - AdaptationSet to get the segments from\n * @param representation - Representation to get the segments from\n * @param duration - Duration of the segments\n * @returns list of ham segments\n */\nexport function mapSegments(\n\tadaptationSet: AdaptationSet,\n\trepresentation: Representation,\n\tduration: number,\n): Segment[] {\n\tconst segmentTemplate: SegmentTemplate | undefined =\n\t\tadaptationSet.SegmentTemplate?.at(0) ??\n\t\trepresentation.SegmentTemplate?.at(0);\n\tconst segmentList: SegmentList[] | undefined =\n\t\tadaptationSet.SegmentList ?? representation.SegmentList;\n\tif (representation.SegmentBase) {\n\t\treturn mapSegmentBase(representation, duration);\n\t}\n\telse if (segmentList) {\n\t\treturn mapSegmentList(segmentList);\n\t}\n\telse if (segmentTemplate) {\n\t\treturn mapSegmentTemplate(representation, duration, segmentTemplate);\n\t}\n\telse {\n\t\tconsole.error(`Representation ${representation.$.id} has no segments`);\n\t\treturn [] as Segment[];\n\t}\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../types/mapper/dash/Representation.js';
|
|
3
|
-
import type { AudioTrack } from '../../../types/model/AudioTrack.js';
|
|
4
|
-
import type { Segment } from '../../../types/model/Segment.js';
|
|
5
|
-
import type { TextTrack } from '../../../types/model/TextTrack.js';
|
|
6
|
-
import type { VideoTrack } from '../../../types/model/VideoTrack.js';
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*
|
|
10
|
-
* Map dash components to ham tracks.
|
|
11
|
-
*
|
|
12
|
-
* @param adaptationSet - AdaptationSet of the dash manifest
|
|
13
|
-
* @param representation - Representation of the dash manifest
|
|
14
|
-
* @param segments - Segments from the representation of the dash manifest
|
|
15
|
-
* @param initializationUrl - Initialization url from the track
|
|
16
|
-
* @returns AudioTrack, VideoTrack or TextTrack depending on the type
|
|
17
|
-
*/
|
|
18
|
-
export declare function mapTracks(adaptationSet: AdaptationSet, representation: Representation, segments: Segment[], initializationUrl: string | undefined): AudioTrack | VideoTrack | TextTrack;
|
|
19
|
-
//# sourceMappingURL=mapTracks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapTracks.d.ts","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapTracks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAYrE;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CACxB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,OAAO,EAAE,EACnB,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACnC,UAAU,GAAG,UAAU,GAAG,SAAS,CAkDrC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { getChannels } from './utils/getChannels.js';
|
|
2
|
-
import { getCodec } from './utils/getCodec.js';
|
|
3
|
-
import { getContentType } from './utils/getContentType.js';
|
|
4
|
-
import { getFrameRate } from './utils/getFrameRate.js';
|
|
5
|
-
import { getLanguage } from './utils/getLanguage.js';
|
|
6
|
-
import { getSampleRate } from './utils/getSampleRate.js';
|
|
7
|
-
import { getSar } from './utils/getSar.js';
|
|
8
|
-
import { getTrackDuration } from './utils/getTrackDuration.js';
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*
|
|
12
|
-
* Map dash components to ham tracks.
|
|
13
|
-
*
|
|
14
|
-
* @param adaptationSet - AdaptationSet of the dash manifest
|
|
15
|
-
* @param representation - Representation of the dash manifest
|
|
16
|
-
* @param segments - Segments from the representation of the dash manifest
|
|
17
|
-
* @param initializationUrl - Initialization url from the track
|
|
18
|
-
* @returns AudioTrack, VideoTrack or TextTrack depending on the type
|
|
19
|
-
*/
|
|
20
|
-
export function mapTracks(adaptationSet, representation, segments, initializationUrl) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
-
if (!adaptationSet) {
|
|
23
|
-
throw new Error('Error: AdaptationSet is undefined');
|
|
24
|
-
}
|
|
25
|
-
const type = getContentType(adaptationSet, representation);
|
|
26
|
-
if (type === 'video') {
|
|
27
|
-
return {
|
|
28
|
-
bandwidth: +((_a = representation.$.bandwidth) !== null && _a !== void 0 ? _a : 0),
|
|
29
|
-
codec: getCodec(adaptationSet, representation),
|
|
30
|
-
duration: getTrackDuration(segments),
|
|
31
|
-
frameRate: getFrameRate(adaptationSet, representation),
|
|
32
|
-
height: +((_b = representation.$.height) !== null && _b !== void 0 ? _b : 0),
|
|
33
|
-
id: (_c = representation.$.id) !== null && _c !== void 0 ? _c : '',
|
|
34
|
-
language: getLanguage(adaptationSet),
|
|
35
|
-
par: (_d = adaptationSet.$.par) !== null && _d !== void 0 ? _d : '',
|
|
36
|
-
sar: getSar(adaptationSet, representation),
|
|
37
|
-
scanType: (_e = representation.$.scanType) !== null && _e !== void 0 ? _e : '',
|
|
38
|
-
segments,
|
|
39
|
-
type,
|
|
40
|
-
width: +((_f = representation.$.width) !== null && _f !== void 0 ? _f : 0),
|
|
41
|
-
urlInitialization: initializationUrl,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
else if (type === 'audio') {
|
|
45
|
-
return {
|
|
46
|
-
bandwidth: +((_g = representation.$.bandwidth) !== null && _g !== void 0 ? _g : 0),
|
|
47
|
-
channels: getChannels(adaptationSet, representation),
|
|
48
|
-
codec: getCodec(adaptationSet, representation),
|
|
49
|
-
duration: getTrackDuration(segments),
|
|
50
|
-
id: (_h = representation.$.id) !== null && _h !== void 0 ? _h : '',
|
|
51
|
-
language: getLanguage(adaptationSet),
|
|
52
|
-
sampleRate: getSampleRate(adaptationSet, representation),
|
|
53
|
-
segments,
|
|
54
|
-
type,
|
|
55
|
-
urlInitialization: initializationUrl,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
// if (type === 'text')
|
|
60
|
-
return {
|
|
61
|
-
bandwidth: +((_j = representation.$.bandwidth) !== null && _j !== void 0 ? _j : 0),
|
|
62
|
-
codec: getCodec(adaptationSet, representation),
|
|
63
|
-
duration: getTrackDuration(segments),
|
|
64
|
-
id: (_k = representation.$.id) !== null && _k !== void 0 ? _k : '',
|
|
65
|
-
language: getLanguage(adaptationSet),
|
|
66
|
-
segments,
|
|
67
|
-
type,
|
|
68
|
-
urlInitialization: initializationUrl,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=mapTracks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapTracks.js","sourceRoot":"","sources":["../../../../src/mapper/dash/mapDashToHam/mapTracks.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CACxB,aAA4B,EAC5B,cAA8B,EAC9B,QAAmB,EACnB,iBAAqC;;IAErC,IAAI,CAAC,aAAa,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACtD,CAAC;IACD,MAAM,IAAI,GAAG,cAAc,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC3D,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO;YACN,SAAS,EAAE,CAAC,CAAC,MAAA,cAAc,CAAC,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC;YAC7C,KAAK,EAAE,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;YAC9C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC;YACpC,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC;YACtD,MAAM,EAAE,CAAC,CAAC,MAAA,cAAc,CAAC,CAAC,CAAC,MAAM,mCAAI,CAAC,CAAC;YACvC,EAAE,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,EAAE,mCAAI,EAAE;YAC7B,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC;YACpC,GAAG,EAAE,MAAA,aAAa,CAAC,CAAC,CAAC,GAAG,mCAAI,EAAE;YAC9B,GAAG,EAAE,MAAM,CAAC,aAAa,EAAE,cAAc,CAAC;YAC1C,QAAQ,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,QAAQ,mCAAI,EAAE;YACzC,QAAQ;YACR,IAAI;YACJ,KAAK,EAAE,CAAC,CAAC,MAAA,cAAc,CAAC,CAAC,CAAC,KAAK,mCAAI,CAAC,CAAC;YACrC,iBAAiB,EAAE,iBAAiB;SACtB,CAAC;IACjB,CAAC;SACI,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO;YACN,SAAS,EAAE,CAAC,CAAC,MAAA,cAAc,CAAC,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC;YAC7C,QAAQ,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC;YACpD,KAAK,EAAE,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;YAC9C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC;YACpC,EAAE,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,EAAE,mCAAI,EAAE;YAC7B,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC;YACpC,UAAU,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC;YACxD,QAAQ;YACR,IAAI;YACJ,iBAAiB,EAAE,iBAAiB;SACtB,CAAC;IACjB,CAAC;SACI,CAAC;QACL,uBAAuB;QACvB,OAAO;YACN,SAAS,EAAE,CAAC,CAAC,MAAA,cAAc,CAAC,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC;YAC7C,KAAK,EAAE,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;YAC9C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC;YACpC,EAAE,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,EAAE,mCAAI,EAAE;YAC7B,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC;YACpC,QAAQ;YACR,IAAI;YACJ,iBAAiB,EAAE,iBAAiB;SACvB,CAAC;IAChB,CAAC;AACF,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../types/mapper/dash/Representation.js';\n\nimport type { AudioTrack } from '../../../types/model/AudioTrack.js';\nimport type { Segment } from '../../../types/model/Segment.js';\nimport type { TextTrack } from '../../../types/model/TextTrack.js';\nimport type { VideoTrack } from '../../../types/model/VideoTrack.js';\n\n\nimport { getChannels } from './utils/getChannels.js';\nimport { getCodec } from './utils/getCodec.js';\nimport { getContentType } from './utils/getContentType.js';\nimport { getFrameRate } from './utils/getFrameRate.js';\nimport { getLanguage } from './utils/getLanguage.js';\nimport { getSampleRate } from './utils/getSampleRate.js';\nimport { getSar } from './utils/getSar.js';\nimport { getTrackDuration } from './utils/getTrackDuration.js';\n\n/**\n * @internal\n *\n * Map dash components to ham tracks.\n *\n * @param adaptationSet - AdaptationSet of the dash manifest\n * @param representation - Representation of the dash manifest\n * @param segments - Segments from the representation of the dash manifest\n * @param initializationUrl - Initialization url from the track\n * @returns AudioTrack, VideoTrack or TextTrack depending on the type\n */\nexport function mapTracks(\n\tadaptationSet: AdaptationSet,\n\trepresentation: Representation,\n\tsegments: Segment[],\n\tinitializationUrl: string | undefined,\n): AudioTrack | VideoTrack | TextTrack {\n\tif (!adaptationSet) {\n\t\tthrow new Error('Error: AdaptationSet is undefined');\n\t}\n\tconst type = getContentType(adaptationSet, representation);\n\tif (type === 'video') {\n\t\treturn {\n\t\t\tbandwidth: +(representation.$.bandwidth ?? 0),\n\t\t\tcodec: getCodec(adaptationSet, representation),\n\t\t\tduration: getTrackDuration(segments),\n\t\t\tframeRate: getFrameRate(adaptationSet, representation),\n\t\t\theight: +(representation.$.height ?? 0),\n\t\t\tid: representation.$.id ?? '',\n\t\t\tlanguage: getLanguage(adaptationSet),\n\t\t\tpar: adaptationSet.$.par ?? '',\n\t\t\tsar: getSar(adaptationSet, representation),\n\t\t\tscanType: representation.$.scanType ?? '',\n\t\t\tsegments,\n\t\t\ttype,\n\t\t\twidth: +(representation.$.width ?? 0),\n\t\t\turlInitialization: initializationUrl,\n\t\t} as VideoTrack;\n\t}\n\telse if (type === 'audio') {\n\t\treturn {\n\t\t\tbandwidth: +(representation.$.bandwidth ?? 0),\n\t\t\tchannels: getChannels(adaptationSet, representation),\n\t\t\tcodec: getCodec(adaptationSet, representation),\n\t\t\tduration: getTrackDuration(segments),\n\t\t\tid: representation.$.id ?? '',\n\t\t\tlanguage: getLanguage(adaptationSet),\n\t\t\tsampleRate: getSampleRate(adaptationSet, representation),\n\t\t\tsegments,\n\t\t\ttype,\n\t\t\turlInitialization: initializationUrl,\n\t\t} as AudioTrack;\n\t}\n\telse {\n\t\t// if (type === 'text')\n\t\treturn {\n\t\t\tbandwidth: +(representation.$.bandwidth ?? 0),\n\t\t\tcodec: getCodec(adaptationSet, representation),\n\t\t\tduration: getTrackDuration(segments),\n\t\t\tid: representation.$.id ?? '',\n\t\t\tlanguage: getLanguage(adaptationSet),\n\t\t\tsegments,\n\t\t\ttype,\n\t\t\turlInitialization: initializationUrl,\n\t\t} as TextTrack;\n\t}\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Calculates the duration of a segment.
|
|
5
|
-
*
|
|
6
|
-
* segmentDuration = duration / timescale
|
|
7
|
-
*
|
|
8
|
-
* @param duration - Duration of the segment
|
|
9
|
-
* @param timescale - Timescale of the segment
|
|
10
|
-
* @returns Segment duration
|
|
11
|
-
*/
|
|
12
|
-
export declare function calculateDuration(duration: string | undefined, timescale: string | undefined): number;
|
|
13
|
-
//# sourceMappingURL=calculateDuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateDuration.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/calculateDuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,CAKR"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Calculates the duration of a segment.
|
|
5
|
-
*
|
|
6
|
-
* segmentDuration = duration / timescale
|
|
7
|
-
*
|
|
8
|
-
* @param duration - Duration of the segment
|
|
9
|
-
* @param timescale - Timescale of the segment
|
|
10
|
-
* @returns Segment duration
|
|
11
|
-
*/
|
|
12
|
-
export function calculateDuration(duration, timescale) {
|
|
13
|
-
if (!duration || !timescale) {
|
|
14
|
-
return 1;
|
|
15
|
-
}
|
|
16
|
-
return +(duration !== null && duration !== void 0 ? duration : 1) / +(timescale !== null && timescale !== void 0 ? timescale : 1);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=calculateDuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateDuration.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/calculateDuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAChC,QAA4B,EAC5B,SAA6B;IAE7B,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC7B,OAAO,CAAC,CAAC;IACV,CAAC;IACD,OAAO,CAAC,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["/**\n * @internal\n *\n * Calculates the duration of a segment.\n *\n * segmentDuration = duration / timescale\n *\n * @param duration - Duration of the segment\n * @param timescale - Timescale of the segment\n * @returns Segment duration\n */\nexport function calculateDuration(\n\tduration: string | undefined,\n\ttimescale: string | undefined,\n): number {\n\tif (!duration || !timescale) {\n\t\treturn 1;\n\t}\n\treturn +(duration ?? 1) / +(timescale ?? 1);\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../../types/mapper/dash/Representation.js';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*
|
|
6
|
-
* Get the channels value (audio). It can be present on adaptationSet or representation.
|
|
7
|
-
*
|
|
8
|
-
* @param adaptationSet - AdaptationSet to try to get the channels from
|
|
9
|
-
* @param representation - Representation to try to get the channels from
|
|
10
|
-
* @returns Channels value
|
|
11
|
-
*/
|
|
12
|
-
export declare function getChannels(adaptationSet: AdaptationSet, representation: Representation): number;
|
|
13
|
-
//# sourceMappingURL=getChannels.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getChannels.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getChannels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEtF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC5B,MAAM,CAUR"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Get the channels value (audio). It can be present on adaptationSet or representation.
|
|
5
|
-
*
|
|
6
|
-
* @param adaptationSet - AdaptationSet to try to get the channels from
|
|
7
|
-
* @param representation - Representation to try to get the channels from
|
|
8
|
-
* @returns Channels value
|
|
9
|
-
*/
|
|
10
|
-
export function getChannels(adaptationSet, representation) {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f;
|
|
12
|
-
const channels = +((_f = (_c = (_b = (_a = adaptationSet.AudioChannelConfiguration) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.$.value) !== null && _c !== void 0 ? _c : (_e = (_d = representation.AudioChannelConfiguration) === null || _d === void 0 ? void 0 : _d.at(0)) === null || _e === void 0 ? void 0 : _e.$.value) !== null && _f !== void 0 ? _f : 0);
|
|
13
|
-
if (!channels) {
|
|
14
|
-
console.error(`Representation ${representation.$.id} has no channels`);
|
|
15
|
-
}
|
|
16
|
-
return channels;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=getChannels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getChannels.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getChannels.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAC1B,aAA4B,EAC5B,cAA8B;;IAE9B,MAAM,QAAQ,GAAW,CAAC,CACzB,MAAA,MAAA,MAAA,MAAA,aAAa,CAAC,yBAAyB,0CAAE,EAAE,CAAC,CAAC,CAAC,0CAAE,CAAC,CAAC,KAAK,mCACvD,MAAA,MAAA,cAAc,CAAC,yBAAyB,0CAAE,EAAE,CAAC,CAAC,CAAC,0CAAE,CAAC,CAAC,KAAK,mCACxD,CAAC,CACD,CAAC;IACF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kBAAkB,cAAc,CAAC,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../../types/mapper/dash/Representation.js';\n\n/**\n * @internal\n *\n * Get the channels value (audio). It can be present on adaptationSet or representation.\n *\n * @param adaptationSet - AdaptationSet to try to get the channels from\n * @param representation - Representation to try to get the channels from\n * @returns Channels value\n */\nexport function getChannels(\n\tadaptationSet: AdaptationSet,\n\trepresentation: Representation,\n): number {\n\tconst channels: number = +(\n\t\tadaptationSet.AudioChannelConfiguration?.at(0)?.$.value ??\n\t\trepresentation.AudioChannelConfiguration?.at(0)?.$.value ??\n\t\t0\n\t);\n\tif (!channels) {\n\t\tconsole.error(`Representation ${representation.$.id} has no channels`);\n\t}\n\treturn channels;\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../../types/mapper/dash/Representation.js';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*
|
|
6
|
-
* Get the codec value (video and audio). It can be present on adaptationSet or representation.
|
|
7
|
-
*
|
|
8
|
-
* @param adaptationSet - AdaptationSet to try to get the codec from
|
|
9
|
-
* @param representation - Representation to try to get the codec from
|
|
10
|
-
* @returns Content codec
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCodec(adaptationSet: AdaptationSet, representation: Representation): string;
|
|
13
|
-
//# sourceMappingURL=getCodec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCodec.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getCodec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEtF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACvB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC5B,MAAM,CAMR"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Get the codec value (video and audio). It can be present on adaptationSet or representation.
|
|
5
|
-
*
|
|
6
|
-
* @param adaptationSet - AdaptationSet to try to get the codec from
|
|
7
|
-
* @param representation - Representation to try to get the codec from
|
|
8
|
-
* @returns Content codec
|
|
9
|
-
*/
|
|
10
|
-
export function getCodec(adaptationSet, representation) {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const codec = (_b = (_a = representation.$.codecs) !== null && _a !== void 0 ? _a : adaptationSet.$.codecs) !== null && _b !== void 0 ? _b : '';
|
|
13
|
-
if (!codec) {
|
|
14
|
-
console.error(`Representation ${representation.$.id} has no codecs`);
|
|
15
|
-
}
|
|
16
|
-
return codec;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=getCodec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCodec.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getCodec.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CACvB,aAA4B,EAC5B,cAA8B;;IAE9B,MAAM,KAAK,GAAG,MAAA,MAAA,cAAc,CAAC,CAAC,CAAC,MAAM,mCAAI,aAAa,CAAC,CAAC,CAAC,MAAM,mCAAI,EAAE,CAAC;IACtE,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,kBAAkB,cAAc,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../../types/mapper/dash/Representation.js';\n\n/**\n * @internal\n *\n * Get the codec value (video and audio). It can be present on adaptationSet or representation.\n *\n * @param adaptationSet - AdaptationSet to try to get the codec from\n * @param representation - Representation to try to get the codec from\n * @returns Content codec\n */\nexport function getCodec(\n\tadaptationSet: AdaptationSet,\n\trepresentation: Representation,\n): string {\n\tconst codec = representation.$.codecs ?? adaptationSet.$.codecs ?? '';\n\tif (!codec) {\n\t\tconsole.error(`Representation ${representation.$.id} has no codecs`);\n\t}\n\treturn codec;\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../../types/mapper/dash/Representation.js';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*
|
|
6
|
-
* Get the type of the content. It can be obtained directly from AdaptationSet or Representation
|
|
7
|
-
* or can be inferred with the existing properties.
|
|
8
|
-
*
|
|
9
|
-
* @param adaptationSet - AdaptationSet to get the type from
|
|
10
|
-
* @param representation - Representation to get the type from
|
|
11
|
-
* @returns type of the content
|
|
12
|
-
*/
|
|
13
|
-
export declare function getContentType(adaptationSet: AdaptationSet, representation?: Representation): string;
|
|
14
|
-
//# sourceMappingURL=getContentType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getContentType.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getContentType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEtF;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC7B,aAAa,EAAE,aAAa,EAC5B,cAAc,CAAC,EAAE,cAAc,GAC7B,MAAM,CA6BR"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Get the type of the content. It can be obtained directly from AdaptationSet or Representation
|
|
5
|
-
* or can be inferred with the existing properties.
|
|
6
|
-
*
|
|
7
|
-
* @param adaptationSet - AdaptationSet to get the type from
|
|
8
|
-
* @param representation - Representation to get the type from
|
|
9
|
-
* @returns type of the content
|
|
10
|
-
*/
|
|
11
|
-
export function getContentType(adaptationSet, representation) {
|
|
12
|
-
var _a, _b, _c, _d;
|
|
13
|
-
if (adaptationSet.$.contentType) {
|
|
14
|
-
return adaptationSet.$.contentType;
|
|
15
|
-
}
|
|
16
|
-
if ((_a = adaptationSet.ContentComponent) === null || _a === void 0 ? void 0 : _a.at(0)) {
|
|
17
|
-
return adaptationSet.ContentComponent.at(0).$.contentType;
|
|
18
|
-
}
|
|
19
|
-
if (adaptationSet.$.mimeType || (representation === null || representation === void 0 ? void 0 : representation.$.mimeType)) {
|
|
20
|
-
const type = ((_b = adaptationSet.$.mimeType) === null || _b === void 0 ? void 0 : _b.split('/')[0]) ||
|
|
21
|
-
((_c = representation === null || representation === void 0 ? void 0 : representation.$.mimeType) === null || _c === void 0 ? void 0 : _c.split('/')[0]);
|
|
22
|
-
if (type === 'audio' || type === 'video' || type === 'text') {
|
|
23
|
-
return type;
|
|
24
|
-
}
|
|
25
|
-
if (type === 'application') {
|
|
26
|
-
return 'text';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (adaptationSet.$.maxHeight) {
|
|
30
|
-
return 'video';
|
|
31
|
-
}
|
|
32
|
-
const adaptationRef = (_d = adaptationSet.$.id) !== null && _d !== void 0 ? _d : `group: ${adaptationSet.$.group}, lang: ${adaptationSet.$.lang}`;
|
|
33
|
-
console.error(`Could not find contentType from adaptationSet ${adaptationRef}`);
|
|
34
|
-
console.info('Using "text" as default contentType');
|
|
35
|
-
return 'text';
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=getContentType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getContentType.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getContentType.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC7B,aAA4B,EAC5B,cAA+B;;IAE/B,IAAI,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACjC,OAAO,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACpC,CAAC;IACD,IAAI,MAAA,aAAa,CAAC,gBAAgB,0CAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,OAAO,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5D,CAAC;IACD,IAAI,aAAa,CAAC,CAAC,CAAC,QAAQ,KAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,CAAC,CAAC,QAAQ,CAAA,EAAE,CAAC;QAC5D,MAAM,IAAI,GACT,CAAA,MAAA,aAAa,CAAC,CAAC,CAAC,QAAQ,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;aACvC,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,CAAC,CAAC,QAAQ,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA,CAAC;QAC3C,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAC7D,OAAO,IAAI,CAAC;QACb,CAAC;QACD,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;YAC5B,OAAO,MAAM,CAAC;QACf,CAAC;IACF,CAAC;IACD,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;QAC/B,OAAO,OAAO,CAAC;IAChB,CAAC;IACD,MAAM,aAAa,GAClB,MAAA,aAAa,CAAC,CAAC,CAAC,EAAE,mCAClB,UAAU,aAAa,CAAC,CAAC,CAAC,KAAK,WAAW,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAClE,OAAO,CAAC,KAAK,CACZ,iDAAiD,aAAa,EAAE,CAChE,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../../types/mapper/dash/Representation.js';\n\n/**\n * @internal\n *\n * Get the type of the content. It can be obtained directly from AdaptationSet or Representation\n * or can be inferred with the existing properties.\n *\n * @param adaptationSet - AdaptationSet to get the type from\n * @param representation - Representation to get the type from\n * @returns type of the content\n */\nexport function getContentType(\n\tadaptationSet: AdaptationSet,\n\trepresentation?: Representation,\n): string {\n\tif (adaptationSet.$.contentType) {\n\t\treturn adaptationSet.$.contentType;\n\t}\n\tif (adaptationSet.ContentComponent?.at(0)) {\n\t\treturn adaptationSet.ContentComponent.at(0)!.$.contentType;\n\t}\n\tif (adaptationSet.$.mimeType || representation?.$.mimeType) {\n\t\tconst type =\n\t\t\tadaptationSet.$.mimeType?.split('/')[0] ||\n\t\t\trepresentation?.$.mimeType?.split('/')[0];\n\t\tif (type === 'audio' || type === 'video' || type === 'text') {\n\t\t\treturn type;\n\t\t}\n\t\tif (type === 'application') {\n\t\t\treturn 'text';\n\t\t}\n\t}\n\tif (adaptationSet.$.maxHeight) {\n\t\treturn 'video';\n\t}\n\tconst adaptationRef =\n\t\tadaptationSet.$.id ??\n\t\t`group: ${adaptationSet.$.group}, lang: ${adaptationSet.$.lang}`;\n\tconsole.error(\n\t\t`Could not find contentType from adaptationSet ${adaptationRef}`,\n\t);\n\tconsole.info('Using \"text\" as default contentType');\n\treturn 'text';\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../../types/mapper/dash/Representation.js';
|
|
3
|
-
import type { FrameRate } from '../../../../types/model/FrameRate.js';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*
|
|
7
|
-
* Get the frame rate from a dash manifest.
|
|
8
|
-
*
|
|
9
|
-
* This functions assumes the adaptationSet and representation set are type video
|
|
10
|
-
*
|
|
11
|
-
* @param adaptationSet - To try to get the frameRate from
|
|
12
|
-
* @param representation - To try to get the frameRate from
|
|
13
|
-
* @returns object containing numerator and denominator
|
|
14
|
-
*/
|
|
15
|
-
export declare function getFrameRate(adaptationSet: AdaptationSet, representation: Representation): FrameRate;
|
|
16
|
-
//# sourceMappingURL=getFrameRate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFrameRate.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getFrameRate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAUtE;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC3B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC5B,SAAS,CAoBX"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DENOMINATOR, FRAME_RATE_NUMERATOR_30, FRAME_RATE_SEPARATOR, NUMERATOR, ZERO, } from '../../../../utils/constants.js';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*
|
|
5
|
-
* Get the frame rate from a dash manifest.
|
|
6
|
-
*
|
|
7
|
-
* This functions assumes the adaptationSet and representation set are type video
|
|
8
|
-
*
|
|
9
|
-
* @param adaptationSet - To try to get the frameRate from
|
|
10
|
-
* @param representation - To try to get the frameRate from
|
|
11
|
-
* @returns object containing numerator and denominator
|
|
12
|
-
*/
|
|
13
|
-
export function getFrameRate(adaptationSet, representation) {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
15
|
-
const frameRateDash = (_b = (_a = representation.$.frameRate) !== null && _a !== void 0 ? _a : adaptationSet.$.frameRate) !== null && _b !== void 0 ? _b : '';
|
|
16
|
-
if (!frameRateDash) {
|
|
17
|
-
console.error(`Representation ${representation.$.id} has no frame rate`);
|
|
18
|
-
}
|
|
19
|
-
const frameRate = frameRateDash.split(FRAME_RATE_SEPARATOR);
|
|
20
|
-
const frameRateNumerator = parseInt((_c = frameRate.at(NUMERATOR)) !== null && _c !== void 0 ? _c : '');
|
|
21
|
-
const frameRateDenominator = parseInt((_d = frameRate.at(DENOMINATOR)) !== null && _d !== void 0 ? _d : '');
|
|
22
|
-
return {
|
|
23
|
-
frameRateNumerator: isNaN(frameRateNumerator)
|
|
24
|
-
? FRAME_RATE_NUMERATOR_30
|
|
25
|
-
: frameRateNumerator,
|
|
26
|
-
frameRateDenominator: isNaN(frameRateDenominator)
|
|
27
|
-
? ZERO
|
|
28
|
-
: frameRateDenominator,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=getFrameRate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFrameRate.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getFrameRate.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,WAAW,EACX,uBAAuB,EACvB,oBAAoB,EACpB,SAAS,EACT,IAAI,GACJ,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC3B,aAA4B,EAC5B,cAA8B;;IAE9B,MAAM,aAAa,GAClB,MAAA,MAAA,cAAc,CAAC,CAAC,CAAC,SAAS,mCAAI,aAAa,CAAC,CAAC,CAAC,SAAS,mCAAI,EAAE,CAAC;IAC/D,IAAI,CAAC,aAAa,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CACZ,kBAAkB,cAAc,CAAC,CAAC,CAAC,EAAE,oBAAoB,CACzD,CAAC;IACH,CAAC;IACD,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC5D,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAA,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,mCAAI,EAAE,CAAC,CAAC;IACnE,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAA,SAAS,CAAC,EAAE,CAAC,WAAW,CAAC,mCAAI,EAAE,CAAC,CAAC;IAEvE,OAAO;QACN,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,CAAC;YAC5C,CAAC,CAAC,uBAAuB;YACzB,CAAC,CAAC,kBAAkB;QACrB,oBAAoB,EAAE,KAAK,CAAC,oBAAoB,CAAC;YAChD,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,oBAAoB;KACV,CAAC;AAChB,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';\nimport type { Representation } from '../../../../types/mapper/dash/Representation.js';\n\nimport type { FrameRate } from '../../../../types/model/FrameRate.js';\n\nimport {\n\tDENOMINATOR,\n\tFRAME_RATE_NUMERATOR_30,\n\tFRAME_RATE_SEPARATOR,\n\tNUMERATOR,\n\tZERO,\n} from '../../../../utils/constants.js';\n\n/**\n * @internal\n *\n * Get the frame rate from a dash manifest.\n *\n * This functions assumes the adaptationSet and representation set are type video\n *\n * @param adaptationSet - To try to get the frameRate from\n * @param representation - To try to get the frameRate from\n * @returns object containing numerator and denominator\n */\nexport function getFrameRate(\n\tadaptationSet: AdaptationSet,\n\trepresentation: Representation,\n): FrameRate {\n\tconst frameRateDash: string =\n\t\trepresentation.$.frameRate ?? adaptationSet.$.frameRate ?? '';\n\tif (!frameRateDash) {\n\t\tconsole.error(\n\t\t\t`Representation ${representation.$.id} has no frame rate`,\n\t\t);\n\t}\n\tconst frameRate = frameRateDash.split(FRAME_RATE_SEPARATOR);\n\tconst frameRateNumerator = parseInt(frameRate.at(NUMERATOR) ?? '');\n\tconst frameRateDenominator = parseInt(frameRate.at(DENOMINATOR) ?? '');\n\n\treturn {\n\t\tframeRateNumerator: isNaN(frameRateNumerator)\n\t\t\t? FRAME_RATE_NUMERATOR_30\n\t\t\t: frameRateNumerator,\n\t\tframeRateDenominator: isNaN(frameRateDenominator)\n\t\t\t? ZERO\n\t\t\t: frameRateDenominator,\n\t} as FrameRate;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGroup.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAGpF,wBAAgB,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAE7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGroup.js","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getGroup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,UAAU,QAAQ,CAAC,aAA4B;;IACpD,OAAO,MAAA,aAAa,CAAC,CAAC,CAAC,KAAK,mCAAI,cAAc,CAAC,aAAa,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';\nimport { getContentType } from './getContentType.js';\n\nexport function getGroup(adaptationSet: AdaptationSet): string {\n\treturn adaptationSet.$.group ?? getContentType(adaptationSet);\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AdaptationSet } from '../../../../types/mapper/dash/AdaptationSet.js';
|
|
2
|
-
import type { Representation } from '../../../../types/mapper/dash/Representation.js';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*
|
|
6
|
-
* Get the initialization url. It can be present on AdaptationSet or Representation.
|
|
7
|
-
*
|
|
8
|
-
* Url initialization is present on segments.
|
|
9
|
-
*
|
|
10
|
-
* @param adaptationSet - AdaptationSet to try to get the initialization url from
|
|
11
|
-
* @param representation - Representation to try to get the initialization url from
|
|
12
|
-
*/
|
|
13
|
-
export declare function getInitializationUrl(adaptationSet: AdaptationSet, representation: Representation): string | undefined;
|
|
14
|
-
//# sourceMappingURL=getInitializationUrl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInitializationUrl.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/dash/mapDashToHam/utils/getInitializationUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEtF;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CACnC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC5B,MAAM,GAAG,SAAS,CAsBpB"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*
|
|
4
|
-
* Get the initialization url. It can be present on AdaptationSet or Representation.
|
|
5
|
-
*
|
|
6
|
-
* Url initialization is present on segments.
|
|
7
|
-
*
|
|
8
|
-
* @param adaptationSet - AdaptationSet to try to get the initialization url from
|
|
9
|
-
* @param representation - Representation to try to get the initialization url from
|
|
10
|
-
*/
|
|
11
|
-
export function getInitializationUrl(adaptationSet, representation) {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
13
|
-
let initializationUrl;
|
|
14
|
-
if (representation.SegmentBase) {
|
|
15
|
-
initializationUrl = (_a = representation.BaseURL[0]) !== null && _a !== void 0 ? _a : '';
|
|
16
|
-
}
|
|
17
|
-
else if (adaptationSet.SegmentList || representation.SegmentList) {
|
|
18
|
-
initializationUrl =
|
|
19
|
-
((_c = (_b = representation.SegmentList) === null || _b === void 0 ? void 0 : _b.at(0)) === null || _c === void 0 ? void 0 : _c.Initialization[0].$.sourceURL) ||
|
|
20
|
-
((_e = (_d = adaptationSet.SegmentList) === null || _d === void 0 ? void 0 : _d.at(0)) === null || _e === void 0 ? void 0 : _e.Initialization[0].$.sourceURL);
|
|
21
|
-
}
|
|
22
|
-
if (adaptationSet.SegmentTemplate || representation.SegmentTemplate) {
|
|
23
|
-
initializationUrl =
|
|
24
|
-
((_g = (_f = adaptationSet.SegmentTemplate) === null || _f === void 0 ? void 0 : _f.at(0)) === null || _g === void 0 ? void 0 : _g.$.initialization) ||
|
|
25
|
-
((_j = (_h = representation.SegmentTemplate) === null || _h === void 0 ? void 0 : _h.at(0)) === null || _j === void 0 ? void 0 : _j.$.initialization);
|
|
26
|
-
if (initializationUrl === null || initializationUrl === void 0 ? void 0 : initializationUrl.includes('$RepresentationID$')) {
|
|
27
|
-
initializationUrl = initializationUrl.replace('$RepresentationID$', (_k = representation.$.id) !== null && _k !== void 0 ? _k : '');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return initializationUrl;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=getInitializationUrl.js.map
|