@bitmovin/player-web-x 10.2.0-beta.0 → 10.2.0-beta.10

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 (256) hide show
  1. package/bundles/playerx-bitmovin-v8-core.js +3 -3
  2. package/bundles/playerx-bitmovin-v8.js +3 -3
  3. package/bundles/playerx-core.js +3 -3
  4. package/bundles/playerx-dash.js +3 -3
  5. package/bundles/playerx-hls-ts-audio.d.ts +1 -0
  6. package/bundles/playerx-hls-ts-audio.js +3 -3
  7. package/bundles/playerx-hls.js +3 -3
  8. package/bundles/playerx-playback.d.ts +1 -0
  9. package/bundles/playerx-playback.js +10 -0
  10. package/bundles/playerx-tv.js +3 -3
  11. package/framework-types/Types.d.ts +3 -1
  12. package/framework-types/effects/LoggerEffect.d.ts +59 -0
  13. package/framework-types/registry/Registry.d.ts +3 -3
  14. package/package.json +1 -1
  15. package/packages/playerx-adaptation.package.js +3 -3
  16. package/packages/playerx-advertising-api.package.d.ts +1 -0
  17. package/packages/playerx-advertising-api.package.js +10 -0
  18. package/packages/playerx-advertising-base.package.d.ts +1 -0
  19. package/packages/playerx-advertising-base.package.js +10 -0
  20. package/packages/playerx-advertising-bitmovin.package.d.ts +1 -0
  21. package/packages/playerx-advertising-bitmovin.package.js +10 -0
  22. package/packages/playerx-analytics.package.d.ts +1 -0
  23. package/packages/playerx-analytics.package.js +3 -3
  24. package/packages/playerx-bitmovin-advertising-bundle.package.d.ts +1 -0
  25. package/packages/playerx-bitmovin-advertising-bundle.package.js +10 -0
  26. package/packages/playerx-bitmovin-source-api.package.js +3 -3
  27. package/packages/playerx-bitmovin-ui.package.js +3 -3
  28. package/packages/playerx-bitmovin-v8-core.package.js +3 -3
  29. package/packages/playerx-bitmovin-v8-static-api.package.js +3 -3
  30. package/packages/playerx-bitmovin-video-element-utils.package.js +3 -3
  31. package/packages/playerx-capabilities.package.js +3 -3
  32. package/packages/playerx-container-mp4.package.js +3 -3
  33. package/packages/playerx-container-ts.package.js +3 -3
  34. package/packages/playerx-core.package.js +3 -3
  35. package/packages/playerx-dash-manifest-technology.package.d.ts +1 -0
  36. package/packages/playerx-dash-manifest-technology.package.js +10 -0
  37. package/packages/playerx-dash-manifest.package.d.ts +1 -0
  38. package/packages/playerx-dash-manifest.package.js +10 -0
  39. package/packages/playerx-dash-parsing.package.js +3 -3
  40. package/packages/playerx-dash-translation.package.js +3 -3
  41. package/packages/playerx-dash.package.js +3 -3
  42. package/packages/playerx-data.package.js +3 -3
  43. package/packages/playerx-event-bus.package.js +3 -3
  44. package/packages/playerx-hls-manifest-technology.package.d.ts +1 -0
  45. package/packages/playerx-hls-manifest-technology.package.js +10 -0
  46. package/packages/playerx-hls-manifest.package.d.ts +1 -0
  47. package/packages/playerx-hls-manifest.package.js +10 -0
  48. package/packages/playerx-hls-parsing.package.js +3 -3
  49. package/packages/playerx-hls-translation.package.js +3 -3
  50. package/packages/playerx-hls.package.js +3 -3
  51. package/packages/playerx-mse-playback.package.d.ts +1 -0
  52. package/packages/playerx-mse-playback.package.js +10 -0
  53. package/packages/playerx-mse-presentation.package.d.ts +1 -0
  54. package/packages/playerx-mse-presentation.package.js +10 -0
  55. package/packages/playerx-native-playback.package.d.ts +1 -0
  56. package/packages/playerx-native-playback.package.js +10 -0
  57. package/packages/playerx-native-presentation.package.d.ts +1 -0
  58. package/packages/playerx-native-presentation.package.js +10 -0
  59. package/packages/playerx-network.package.js +3 -3
  60. package/packages/playerx-no-adaptation.package.d.ts +1 -0
  61. package/packages/playerx-no-adaptation.package.js +3 -3
  62. package/packages/playerx-playback-api.package.js +3 -3
  63. package/packages/playerx-playback-technology.package.d.ts +1 -0
  64. package/packages/playerx-playback-technology.package.js +10 -0
  65. package/packages/playerx-playback.package.js +3 -3
  66. package/packages/playerx-player-api.package.js +3 -3
  67. package/packages/playerx-segment-processing.package.js +3 -3
  68. package/packages/playerx-source.package.js +3 -3
  69. package/packages/playerx-sources-api.package.js +3 -3
  70. package/packages/playerx-stream-data-structure.package.d.ts +1 -0
  71. package/packages/playerx-stream-data-structure.package.js +10 -0
  72. package/packages/playerx-streaming.package.d.ts +1 -0
  73. package/packages/playerx-streaming.package.js +10 -0
  74. package/packages/playerx-subtitle-api.package.js +3 -3
  75. package/packages/playerx-subtitle-base.package.js +3 -3
  76. package/packages/playerx-subtitle-format-detection.package.js +3 -3
  77. package/packages/playerx-subtitle-native-renderer.package.js +3 -3
  78. package/packages/playerx-subtitles.package.js +3 -3
  79. package/packages/playerx-trick-play.package.js +3 -3
  80. package/packages/playerx-ts-transmuxer.package.js +3 -3
  81. package/packages/playerx-tv.package.js +3 -3
  82. package/packages/playerx-ui.package.d.ts +1 -0
  83. package/packages/playerx-ui.package.js +10 -0
  84. package/packages/playerx-view-mode.package.js +3 -3
  85. package/packages/playerx-web-vtt.package.js +3 -3
  86. package/playerx-framework-utils.js +2 -2
  87. package/types/bundles/BitmovinV8.bundle.d.ts +1 -1
  88. package/types/bundles/Dash.bundle.d.ts +2 -3
  89. package/types/bundles/Hls.bundle.d.ts +3 -4
  90. package/types/bundles/HlsTsAudio.bundle.d.ts +26 -0
  91. package/types/bundles/Playback.bundle.d.ts +28 -0
  92. package/types/bundles/Tv.bundle.d.ts +1 -1
  93. package/types/bundles/Types.d.ts +2 -2
  94. package/types/packages/adaptation/Adaptation.package.d.ts +1 -1
  95. package/types/packages/adaptation/AdaptationStateAtom.d.ts +2 -8
  96. package/types/packages/adaptation/NoAdaptation.package.d.ts +10 -0
  97. package/types/packages/adaptation/Types.d.ts +5 -5
  98. package/types/packages/adaptation/WishConfigAtom.d.ts +1 -7
  99. package/types/packages/advertising/BitmovinAdvertisingBundle.package.d.ts +14 -0
  100. package/types/packages/advertising/api/AdvertisingApi.package.d.ts +12 -0
  101. package/types/packages/advertising/api/AdvertisingEvents.d.ts +44 -0
  102. package/types/packages/advertising/api/Types.d.ts +49 -0
  103. package/types/packages/advertising/base/AdPosition.d.ts +4 -0
  104. package/types/packages/advertising/base/AdSchedule.d.ts +3 -0
  105. package/types/packages/advertising/base/AdTagAtom.d.ts +11 -0
  106. package/types/packages/advertising/base/AdvertisingBase.package.d.ts +12 -0
  107. package/types/packages/advertising/base/BaseAdAtom.d.ts +22 -0
  108. package/types/packages/advertising/base/BaseAdBreakAtom.d.ts +29 -0
  109. package/types/packages/advertising/base/PreloadConfigAtom.d.ts +17 -0
  110. package/types/packages/advertising/base/Types.d.ts +67 -0
  111. package/types/packages/advertising/bitmovin/AdvertisingBitmovin.package.d.ts +14 -0
  112. package/types/packages/advertising/bitmovin/Types.d.ts +46 -0
  113. package/types/packages/analytics/Analytics.package.d.ts +15 -0
  114. package/types/packages/analytics/Types.d.ts +20 -0
  115. package/types/packages/capabilities/Capabilities.package.d.ts +1 -1
  116. package/types/packages/capabilities/Types.d.ts +5 -2
  117. package/types/packages/container/container-mp4/ContainerMp4.package.d.ts +3 -2
  118. package/types/packages/container/container-ts/ContainerTs.package.d.ts +3 -2
  119. package/types/packages/container/ts-transmuxer/TsTransmuxer.package.d.ts +3 -2
  120. package/types/packages/core/Constants.d.ts +11 -2
  121. package/types/packages/core/Types.d.ts +4 -54
  122. package/types/packages/core/state/StateMachineAtom.d.ts +20 -6
  123. package/types/packages/core/state/Symbols.d.ts +1 -0
  124. package/types/packages/core/state/Types.d.ts +2 -1
  125. package/types/packages/core/state/stream-timeline/StreamSectionAtom.d.ts +1 -1
  126. package/types/packages/core/state/stream-timeline/StreamSequenceMapAtom.d.ts +2 -2
  127. package/types/packages/core/state/timeline/Types.d.ts +1 -1
  128. package/types/packages/core/technology/Types.d.ts +19 -0
  129. package/types/packages/core/utils/MapUnsubscribedError.d.ts +1 -1
  130. package/types/packages/core/utils/RangesHelper.d.ts +3 -1
  131. package/types/packages/core/utils/StateUtils.d.ts +9 -3
  132. package/types/packages/core/utils/Types.d.ts +0 -2
  133. package/types/packages/data/Data.package.d.ts +1 -1
  134. package/types/packages/data/Types.d.ts +6 -7
  135. package/types/packages/event-bus/EventBus.d.ts +6 -3
  136. package/types/packages/event-bus/EventBus.package.d.ts +2 -1
  137. package/types/packages/event-bus/Types.d.ts +32 -12
  138. package/types/packages/manifest/dash/DashManifest.package.d.ts +3 -0
  139. package/types/packages/manifest/dash/parsing/DashParsing.package.d.ts +0 -3
  140. package/types/packages/manifest/dash/root/Dash.package.d.ts +1 -1
  141. package/types/packages/manifest/dash/root/Types.d.ts +4 -4
  142. package/types/packages/manifest/dash/technology/DashManifestTechnology.package.d.ts +11 -0
  143. package/types/packages/manifest/dash/technology/Types.d.ts +32 -0
  144. package/types/packages/manifest/dash/technology/atoms/DashTechStateAtom.d.ts +10 -0
  145. package/types/packages/manifest/dash/translation/DashTranslation.package.d.ts +1 -1
  146. package/types/packages/manifest/dash/translation/Types.d.ts +2 -4
  147. package/types/packages/manifest/dash/translation/manifests/DashPlaylistTranslatorTask.d.ts +1 -1
  148. package/types/packages/manifest/hls/HlsManifest.package.d.ts +3 -0
  149. package/types/packages/manifest/hls/parsing/HlsParsing.package.d.ts +0 -3
  150. package/types/packages/manifest/hls/parsing/HlsParsingFunctions.d.ts +1 -1
  151. package/types/packages/manifest/hls/parsing/Types.d.ts +1 -1
  152. package/types/packages/manifest/hls/parsing/m3u8/TranslatorStream.d.ts +2 -2
  153. package/types/packages/manifest/hls/root/Hls.package.d.ts +5 -5
  154. package/types/packages/manifest/hls/technology/HlsManifestTechnology.package.d.ts +11 -0
  155. package/types/packages/manifest/hls/technology/Types.d.ts +32 -0
  156. package/types/packages/manifest/hls/technology/atoms/HlsTechStateAtom.d.ts +10 -0
  157. package/types/packages/manifest/hls/translation/HlsTranslation.package.d.ts +3 -5
  158. package/types/packages/manifest/hls/translation/manifests/HlsMultivariantPlaylistTranslatorTask.d.ts +1 -1
  159. package/types/packages/manifest/hls/translation/manifests/HlsVariantTranslationTask.d.ts +2 -2
  160. package/types/packages/network/Network.package.d.ts +1 -1
  161. package/types/packages/playback/play-pause/Types.d.ts +0 -3
  162. package/types/packages/playback/playback-state/Types.d.ts +0 -3
  163. package/types/packages/playback/video-element-state/SeekRestrictionAtom.d.ts +2 -0
  164. package/types/packages/playback/video-element-state/Types.d.ts +4 -1
  165. package/types/packages/playback/volume/TargetVolumeStateAtom.d.ts +10 -0
  166. package/types/packages/playback/volume/Types.d.ts +19 -0
  167. package/types/packages/playback-api/Types.d.ts +5 -3
  168. package/types/packages/playback-api/playback-api-events/Types.d.ts +7 -5
  169. package/types/packages/playback-api/playback-api-events/events/DurationChangedEvent.d.ts +6 -0
  170. package/types/packages/playback-api/playback-api-events/events/PlaybackEventMap.d.ts +14 -1
  171. package/types/packages/playback-api/playback-api-events/events/PlaybackRateChangedEvent.d.ts +6 -0
  172. package/types/packages/playback-api/playback-api-events/events/VolumeChangedEvent.d.ts +6 -0
  173. package/types/packages/playback-api/time-api/SeekableRangeProviderAtom.d.ts +20 -0
  174. package/types/packages/playback-api/time-api/Types.d.ts +36 -0
  175. package/types/packages/playback-api/volume-api/Types.d.ts +19 -0
  176. package/types/packages/playback-technology/PlaybackTechnology.package.d.ts +23 -0
  177. package/types/packages/playback-technology/Types.d.ts +54 -0
  178. package/types/packages/player-api/PlayerApi.package.d.ts +2 -4
  179. package/types/packages/player-api/Types.d.ts +3 -2
  180. package/types/packages/presentation/mse/MsePlayback.package.d.ts +3 -0
  181. package/types/packages/presentation/mse/playback-technology/Types.d.ts +26 -0
  182. package/types/packages/presentation/mse/playback-technology/atoms/MsePresentationStateAtom.d.ts +10 -0
  183. package/types/packages/presentation/mse/presentation/MsePresentation.package.d.ts +55 -0
  184. package/types/packages/presentation/{Types.d.ts → mse/presentation/Types.d.ts} +1 -1
  185. package/types/packages/presentation/mse/presentation/cache/Types.d.ts +4 -0
  186. package/types/packages/presentation/native/NativePlayback.package.d.ts +4 -0
  187. package/types/packages/presentation/native/Types.d.ts +12 -0
  188. package/types/packages/presentation/native/playback-technology/Types.d.ts +26 -0
  189. package/types/packages/presentation/native/playback-technology/atoms/NativePresentationStateAtom.d.ts +10 -0
  190. package/types/packages/presentation/native/presentation/NativePresentation.package.d.ts +14 -0
  191. package/types/packages/presentation/native/presentation/Types.d.ts +12 -0
  192. package/types/packages/segment-processing/SegmentProcessing.package.d.ts +1 -1
  193. package/types/packages/segment-processing/Types.d.ts +4 -6
  194. package/types/packages/source/Source.package.d.ts +1 -1
  195. package/types/packages/source/SourceReference.d.ts +2 -1
  196. package/types/packages/source/Types.d.ts +4 -0
  197. package/types/packages/source/atoms/PlaybackAtom.d.ts +5 -1
  198. package/types/packages/source/atoms/PlaybackConfigAtom.d.ts +1 -0
  199. package/types/packages/source/atoms/SourceConfigAtom.d.ts +11 -4
  200. package/types/packages/source/atoms/SourceStateAtom.d.ts +10 -23
  201. package/types/packages/sources-api/SourceRemovedError.d.ts +5 -0
  202. package/types/packages/sources-api/SourcesApi.package.d.ts +1 -1
  203. package/types/packages/sources-api/Types.d.ts +22 -7
  204. package/types/packages/stream-data-structure/StreamDataStructure.package.d.ts +4 -0
  205. package/types/packages/stream-data-structure/Types.d.ts +23 -0
  206. package/types/packages/stream-data-structure/segment/Exports.d.ts +22 -0
  207. package/types/packages/{core/state → stream-data-structure}/segment/SegmentAtom.d.ts +8 -8
  208. package/types/packages/stream-data-structure/segment/SegmentDataAtom.d.ts +19 -0
  209. package/types/packages/{core/state → stream-data-structure}/segment/SegmentTimingAtom.d.ts +3 -3
  210. package/types/packages/{core/state → stream-data-structure}/segment/SegmentUtils.d.ts +10 -10
  211. package/types/packages/stream-data-structure/selection-group/Exports.d.ts +16 -0
  212. package/types/packages/{core/state → stream-data-structure}/selection-group/SelectionGroupAtom.d.ts +17 -15
  213. package/types/packages/stream-data-structure/selection-group/SelectionGroupTypeGuards.d.ts +11 -0
  214. package/types/packages/stream-data-structure/selection-group/SelectionGroupUtils.d.ts +7 -0
  215. package/types/packages/stream-data-structure/stream/Exports.d.ts +8 -0
  216. package/types/packages/{core/state → stream-data-structure}/stream/StreamAtom.d.ts +8 -8
  217. package/types/packages/stream-data-structure/track/Exports.d.ts +18 -0
  218. package/types/packages/{core/state → stream-data-structure}/track/TrackAtom.d.ts +18 -26
  219. package/types/packages/stream-data-structure/track/TrackTypeGuards.d.ts +13 -0
  220. package/types/packages/streaming/Streaming.package.d.ts +12 -0
  221. package/types/packages/streaming/Types.d.ts +11 -0
  222. package/types/packages/{core/state/data-ranges → streaming/atoms}/DataRangesAtom.d.ts +8 -8
  223. package/types/packages/streaming/atoms/StreamingStateAtom.d.ts +30 -0
  224. package/types/packages/subtitles/subtitle-api/SubtitleApi.package.d.ts +1 -1
  225. package/types/packages/subtitles/subtitle-api/Types.d.ts +8 -5
  226. package/types/packages/subtitles/subtitle-base/SubtitleBase.package.d.ts +1 -1
  227. package/types/packages/subtitles/subtitle-base/SubtitleCueMapAtom.d.ts +1 -1
  228. package/types/packages/subtitles/subtitle-base/Types.d.ts +4 -4
  229. package/types/packages/subtitles/subtitle-format-detection/SubtitleFormatDetection.package.d.ts +1 -1
  230. package/types/packages/subtitles/subtitle-format-detection/Types.d.ts +3 -4
  231. package/types/packages/subtitles/subtitle-native-renderer/SubtitleNativeRenderer.package.d.ts +1 -1
  232. package/types/packages/subtitles/subtitle-native-renderer/Types.d.ts +4 -1
  233. package/types/packages/subtitles/webvtt/Types.d.ts +5 -3
  234. package/types/packages/subtitles/webvtt/WebVtt.package.d.ts +1 -1
  235. package/types/packages/trick-play/TrickPlay.package.d.ts +6 -14
  236. package/types/packages/tv/Tv.package.d.ts +1 -4
  237. package/types/packages/ui/Types.d.ts +36 -0
  238. package/types/packages/ui/Ui.package.d.ts +4 -0
  239. package/types/packages/v8-compat/BitmovinUi.package.d.ts +1 -1
  240. package/types/packages/v8-compat/BitmovinV8StaticApi.package.d.ts +5 -6
  241. package/types/packages/v8-compat/source-api/BitmovinSourceApi.package.d.ts +4 -2
  242. package/types/packages/v8-compat/types/Types.d.ts +1 -1
  243. package/types/packages/v8-compat/video-element/BitmovinVideoElementUtils.package.d.ts +1 -4
  244. package/types/packages/view-mode/ViewMode.package.d.ts +1 -4
  245. package/packages/playerx-presentation.package.d.ts +0 -1
  246. package/packages/playerx-presentation.package.js +0 -10
  247. package/types/packages/core/state/segment/SegmentDataAtom.d.ts +0 -31
  248. package/types/packages/core/state/selection-group/SelectionGroupTypeGuards.d.ts +0 -5
  249. package/types/packages/core/state/selection-group/SelectionGroupUtils.d.ts +0 -7
  250. package/types/packages/core/state/track/TrackTypeGuards.d.ts +0 -7
  251. package/types/packages/core/utils/Logger.d.ts +0 -40
  252. package/types/packages/presentation/Presentation.package.d.ts +0 -62
  253. package/types/packages/presentation/cache/Types.d.ts +0 -4
  254. /package/types/packages/{core/state → stream-data-structure}/segment/SegmentTypeGuards.d.ts +0 -0
  255. /package/types/packages/{source → streaming}/atoms/BufferConfigAtom.d.ts +0 -0
  256. /package/types/packages/{source → streaming}/atoms/MediaTypeMapAtom.d.ts +0 -0
@@ -1,7 +1,9 @@
1
1
  import type { Abortable } from '../../../framework-types/abortable/Abortable';
2
2
  import type { ContextHaving } from '../../../framework-types/execution-context/Types';
3
+ import type { Constants } from '../core/Constants';
3
4
  import type { ArrayAtom } from '../core/state/ArrayStateAtom';
4
5
  import type { CoreEffects, CoreExportNames, CoreStateAtoms } from '../core/Types';
6
+ import type { CoreUtils } from '../core/utils/Types';
5
7
  import type { ContextWithState } from '../Types';
6
8
  import type { SourceConfig } from './atoms/SourceConfigAtom';
7
9
  import type { CreateSourceStateAtom, SourceStateAtom } from './atoms/SourceStateAtom';
@@ -15,6 +17,8 @@ export declare enum SourceExportNames {
15
17
  export type SourcePackageDependencies = {
16
18
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
17
19
  [CoreExportNames.CoreEffects]: CoreEffects;
20
+ [CoreExportNames.Constants]: Constants;
21
+ [CoreExportNames.Utils]: CoreUtils;
18
22
  };
19
23
  export type SourcePackageExports = {
20
24
  [SourceExportNames.CreateSourceStateAtom]: CreateSourceStateAtom;
@@ -1,10 +1,14 @@
1
1
  import type { EmptyObject } from '../../../../framework-types/BaseTypes';
2
2
  import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
3
- import type { CoreExportNames, CoreStateAtoms } from '../../core/Types';
3
+ import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
4
+ import type { CoreStateAtoms } from '../../core/Types';
5
+ import { CoreExportNames } from '../../core/Types';
4
6
  import type { ContextWithState } from '../../Types';
5
7
  import type { PlayheadAtom } from './PlayheadAtom';
6
8
  interface Playback {
7
9
  playhead: PlayheadAtom;
10
+ duration: PrimitiveAtom<number>;
11
+ playbackRate: PrimitiveAtom<number>;
8
12
  }
9
13
  export type PlaybackAtom = ReturnType<typeof createPlaybackAtom>;
10
14
  type ContextT = ContextHaving<{
@@ -4,4 +4,5 @@ export type PlaybackConfigAtom = ReturnType<typeof createPlaybackConfigAtom>;
4
4
  export declare const createPlaybackConfigAtom: (context: ContextWithState, options: PlaybackConfig | undefined) => import("../../core/state/Types").StateAtom<{
5
5
  autoplay: boolean;
6
6
  muted: boolean;
7
+ preventSeeking: boolean;
7
8
  }, {}>;
@@ -1,16 +1,23 @@
1
- import type { ContentType, ResourceType } from '../../core/Constants';
2
- import type { SourceContext } from './SourceStateAtom';
1
+ import type { EmptyObject } from '../../../../framework-types/BaseTypes';
2
+ import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
3
+ import type { Constants, ContentType, ResourceType } from '../../core/Constants';
4
+ import { CoreExportNames } from '../../core/Types';
5
+ import type { ContextWithState } from '../../Types';
3
6
  export type SourceConfigAtom = ReturnType<typeof createSourceConfigAtom>;
7
+ type ExtendedContext = ContextHaving<{
8
+ [CoreExportNames.Constants]: Constants;
9
+ }, EmptyObject, ContextWithState>;
4
10
  export interface Resource {
5
11
  url: string;
6
- type?: ResourceType | string;
12
+ type: ResourceType | string;
7
13
  metadata?: Record<string, unknown>;
8
14
  }
9
15
  export interface SourceConfig {
10
16
  resources: Resource[];
11
17
  contentType?: ContentType | string;
12
18
  }
13
- export declare const createSourceConfigAtom: (context: SourceContext, config: SourceConfig) => import("../../core/state/Types").StateAtom<{
19
+ export declare const createSourceConfigAtom: (context: ExtendedContext, config: SourceConfig) => import("../../core/state/Types").StateAtom<{
14
20
  contentType: string;
15
21
  resources: import("../../core/state/ArrayStateAtom").ArrayAtom<Resource>;
16
22
  }, {}>;
23
+ export {};
@@ -1,51 +1,38 @@
1
+ import { LogLevel } from '../../../../framework-types/effects/LoggerEffect';
1
2
  import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
2
3
  import type { PlaybackConfig } from '../../../bundles/Types';
3
4
  import type { EmptyObject } from '../../../Types';
4
5
  import type { Constants, LoadControl } from '../../core/Constants';
5
6
  import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
6
- import type { DataRangesAtom } from '../../core/state/data-ranges/DataRangesAtom';
7
7
  import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
8
- import type { SelectionGroupAtom } from '../../core/state/selection-group/SelectionGroupAtom';
9
- import type { StreamAtom } from '../../core/state/stream/StreamAtom';
10
- import type { TrackAtom } from '../../core/state/track/TrackAtom';
11
8
  import type { CoreStateAtoms } from '../../core/Types';
12
9
  import { CoreExportNames } from '../../core/Types';
13
- import { LogLevel } from '../../core/utils/Logger';
14
10
  import type { CoreUtils } from '../../core/utils/Types';
11
+ import type { SelectionGroupAtom } from '../../stream-data-structure/selection-group/SelectionGroupAtom';
12
+ import type { TrackAtom } from '../../stream-data-structure/track/TrackAtom';
15
13
  import type { ContextWithState } from '../../Types';
16
- import type { BufferConfigAtom } from './BufferConfigAtom';
17
- import type { MediaTypeMapAtom } from './MediaTypeMapAtom';
18
14
  import type { PlaybackAtom } from './PlaybackAtom';
19
15
  import type { PlaybackConfigAtom } from './PlaybackConfigAtom';
20
16
  import type { SourceConfig, SourceConfigAtom } from './SourceConfigAtom';
21
17
  import type { StartupOptionsAtom } from './StartupOptionsAtom';
22
18
  import type { VideoElementAtom } from './VideoElementAtom';
23
- export type SourceContext = ContextHaving<{
24
- [CoreExportNames.Utils]: CoreUtils;
25
- [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
26
- [CoreExportNames.Constants]: Constants;
27
- }, EmptyObject, ContextWithState>;
28
19
  export type ActiveTracksAtom = ArrayAtom<TrackAtom>;
29
20
  export type ActiveSelectionGroupsAtom = ArrayAtom<SelectionGroupAtom>;
30
21
  export type SourceState = {
31
- url: string;
32
- stream: StreamAtom;
33
- activeTracks: ActiveTracksAtom;
34
- activeSelectionGroups: ActiveSelectionGroupsAtom;
35
22
  logLevel: PrimitiveAtom<LogLevel>;
36
- dataRanges: DataRangesAtom;
37
23
  video: VideoElementAtom;
38
24
  container: PrimitiveAtom<HTMLElement | undefined>;
39
25
  sourceConfig: SourceConfigAtom;
40
- config: {
41
- buffer: BufferConfigAtom;
42
- startup: StartupOptionsAtom;
43
- playback: PlaybackConfigAtom;
44
- };
26
+ startupConfig: StartupOptionsAtom;
27
+ playbackConfig: PlaybackConfigAtom;
45
28
  loadControl: PrimitiveAtom<LoadControl>;
46
29
  playback: PlaybackAtom;
47
- activeMediaTypes: MediaTypeMapAtom;
48
30
  };
31
+ export type SourceContext = ContextHaving<{
32
+ [CoreExportNames.Utils]: CoreUtils;
33
+ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
34
+ [CoreExportNames.Constants]: Constants;
35
+ }, EmptyObject, ContextWithState>;
49
36
  export type SourceStateAtom = ReturnType<typeof createSourceStateAtom>;
50
37
  export type CreateSourceStateAtom = typeof createSourceStateAtom;
51
38
  export type SourceOptions = {
@@ -0,0 +1,5 @@
1
+ import { FrameworkError } from '../../../framework-types/error/FrameworkError';
2
+ export declare class SourceRemovedError extends FrameworkError {
3
+ name: string;
4
+ constructor();
5
+ }
@@ -5,7 +5,7 @@
5
5
  * of multiple sources and switching between them using the API.
6
6
  *
7
7
  * ### `SourcesApi` Package Dependency Graph
8
- * <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -17.25 379.796875 187" style="max-width: 379.797px; background-color: transparent;" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="100%" id="my-svg"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#ccc;}#my-svg .error-icon{fill:#a44141;}#my-svg .error-text{fill:#ddd;stroke:#ddd;}#my-svg .edge-thickness-normal{stroke-width:2px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:lightgrey;stroke:lightgrey;}#my-svg .marker.cross{stroke:lightgrey;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#ccc;}#my-svg .cluster-label text{fill:#F9FFFE;}#my-svg .cluster-label span,#my-svg p{color:#F9FFFE;}#my-svg .label text,#my-svg span,#my-svg p{fill:#ccc;color:#ccc;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#1f2020;stroke:#81B1DB;stroke-width:1px;}#my-svg .flowchart-label text{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .node .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .arrowheadPath{fill:lightgrey;}#my-svg .edgePath .path{stroke:lightgrey;stroke-width:2.0px;}#my-svg .flowchart-link{stroke:lightgrey;fill:none;}#my-svg .edgeLabel{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#my-svg .edgeLabel rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#my-svg .labelBkg{background-color:rgba(87.75, 87.75, 87.75, 0.5);}#my-svg .cluster rect{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:rgba(255, 255, 255, 0.25);stroke-width:1px;}#my-svg .cluster text{fill:#F9FFFE;}#my-svg .cluster span,#my-svg p{color:#F9FFFE;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(20, 1.5873015873%, 12.3529411765%);border:1px solid rgba(255, 255, 255, 0.25);border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#ccc;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="6" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"/></marker><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart" id="my-svg_flowchart-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart" id="my-svg_flowchart-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-SourcesApi LE-Core" id="L-SourcesApi-Core-0" d="M64.095,51.5L73.717,41.375C83.339,31.25,102.584,11,123.33,0.875C144.076,-9.25,166.323,-9.25,188.57,-9.25C210.818,-9.25,233.065,-9.25,250.348,-6.874C267.63,-4.498,279.948,0.255,286.107,2.631L292.266,5.007"/><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-SourcesApi LE-Source" id="L-SourcesApi-Source-0" d="M95.456,51.5L99.851,49.958C104.247,48.417,113.037,45.333,122.198,43.792C131.358,42.25,140.889,42.25,145.654,42.25L150.419,42.25"/><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-SourcesApi LE-EventBus" id="L-SourcesApi-EventBus-0" d="M95.456,84.5L99.851,86.042C104.247,87.583,113.037,90.667,128.556,92.208C144.076,93.75,166.323,93.75,188.57,93.75C210.818,93.75,233.065,93.75,247.531,95.04C261.998,96.329,268.683,98.908,272.025,100.198L275.368,101.488"/><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-SourcesApi LE-PlayerApi" id="L-SourcesApi-PlayerApi-0" d="M64.095,84.5L73.717,94.625C83.339,104.75,102.584,125,115.489,135.125C128.395,145.25,134.961,145.25,138.245,145.25L141.528,145.25"/><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-Source LE-Core" id="L-Source-Core-0" d="M221.422,42.25L227.07,42.25C232.719,42.25,244.016,42.25,255.823,39.874C267.63,37.498,279.948,32.745,286.107,30.369L292.266,27.993"/><path marker-end="url(#my-svg_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-PlayerApi LE-EventBus" id="L-PlayerApi-EventBus-0" d="M230.313,145.25L234.479,145.25C238.646,145.25,246.979,145.25,254.488,143.96C261.998,142.671,268.683,140.092,272.025,138.802L275.368,137.512"/></g><g class="edgeLabels"><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g transform="translate(0, 0)" class="label"><foreignObject height="0" width="0"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(48.4140625, 68)" data-id="SourcesApi" data-node="true" id="flowchart-SourcesApi-0" class="node default default flowchart-label"><rect height="33" width="96.828125" y="-16.5" x="-48.4140625" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-40.9140625, -9)" style="" class="label"><rect/><foreignObject height="18" width="81.828125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">SourcesApi</span></div></foreignObject></g></g><g transform="translate(322.0546875, 16.5)" data-id="Core" data-node="true" id="flowchart-Core-1" class="node default default flowchart-label"><rect height="33" width="49.6875" y="-16.5" x="-24.84375" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-17.34375, -9)" style="" class="label"><rect/><foreignObject height="18" width="34.6875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Core</span></div></foreignObject></g></g><g transform="translate(188.5703125, 42.25)" data-id="Source" data-node="true" id="flowchart-Source-3" class="node default default flowchart-label"><rect height="33" width="65.703125" y="-16.5" x="-32.8515625" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-25.3515625, -9)" style="" class="label"><rect/><foreignObject height="18" width="50.703125"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">Source</span></div></foreignObject></g></g><g transform="translate(322.0546875, 119.5)" data-id="EventBus" data-node="true" id="flowchart-EventBus-5" class="node default default flowchart-label"><rect height="33" width="83.484375" y="-16.5" x="-41.7421875" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-34.2421875, -9)" style="" class="label"><rect/><foreignObject height="18" width="68.484375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">EventBus</span></div></foreignObject></g></g><g transform="translate(188.5703125, 145.25)" data-id="PlayerApi" data-node="true" id="flowchart-PlayerApi-7" class="node default default flowchart-label"><rect height="33" width="83.484375" y="-16.5" x="-41.7421875" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-34.2421875, -9)" style="" class="label"><rect/><foreignObject height="18" width="68.484375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">PlayerApi</span></div></foreignObject></g></g></g></g></g></svg>
8
+ * <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -8 16 16" style="max-width: 16px; background-color: transparent;" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="100%" id="my-svg"><style>#my-svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#ccc;}#my-svg .error-icon{fill:#a44141;}#my-svg .error-text{fill:#ddd;stroke:#ddd;}#my-svg .edge-thickness-normal{stroke-width:2px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:lightgrey;stroke:lightgrey;}#my-svg .marker.cross{stroke:lightgrey;}#my-svg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#my-svg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#ccc;}#my-svg .cluster-label text{fill:#F9FFFE;}#my-svg .cluster-label span,#my-svg p{color:#F9FFFE;}#my-svg .label text,#my-svg span,#my-svg p{fill:#ccc;color:#ccc;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#1f2020;stroke:#81B1DB;stroke-width:1px;}#my-svg .flowchart-label text{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .node .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .arrowheadPath{fill:lightgrey;}#my-svg .edgePath .path{stroke:lightgrey;stroke-width:2.0px;}#my-svg .flowchart-link{stroke:lightgrey;fill:none;}#my-svg .edgeLabel{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#my-svg .edgeLabel rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#my-svg .labelBkg{background-color:rgba(87.75, 87.75, 87.75, 0.5);}#my-svg .cluster rect{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:rgba(255, 255, 255, 0.25);stroke-width:1px;}#my-svg .cluster text{fill:#F9FFFE;}#my-svg .cluster span,#my-svg p{color:#F9FFFE;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(20, 1.5873015873%, 12.3529411765%);border:1px solid rgba(255, 255, 255, 0.25);border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#ccc;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="6" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"/></marker><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart" id="my-svg_flowchart-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart" id="my-svg_flowchart-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart" id="my-svg_flowchart-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"/><g class="edgeLabels"/><g class="nodes"/></g></g></svg>
9
9
  */
10
10
  import type { SourceApiBase, SourcesApi, SourcesApiDependencies, SourcesApiExports } from './Types';
11
11
  export declare const SourcesApiPackage: import("../../../framework-types/package-api/Package").Package<SourcesApiDependencies, SourcesApiExports, SourcesApi<SourceApiBase>>;
@@ -1,19 +1,23 @@
1
1
  import type { ApiManager } from '../../../framework-types/api-manager/ApiManager';
2
2
  import type { EmptyObject } from '../../../framework-types/BaseTypes';
3
+ import type { LogLevel } from '../../../framework-types/effects/LoggerEffect';
3
4
  import type { ContextHaving } from '../../../framework-types/execution-context/Types';
4
5
  import type { BundleExportNames, PlayerConfig } from '../../bundles/Types';
5
6
  import type { Constants, LoadControl } from '../core/Constants';
7
+ import type { MapStateAtom } from '../core/state/MapStateAtom';
6
8
  import type { CoreEffects, CoreExportNames, CoreStateAtoms } from '../core/Types';
7
- import type { Logger, LogLevel } from '../core/utils/Logger';
8
9
  import type { CoreUtils } from '../core/utils/Types';
9
- import type { createEventBus } from '../event-bus/EventBus';
10
+ import type { createEventBus, extendEventBusTypes } from '../event-bus/EventBus';
10
11
  import type { EventBus, EventBusExportNames } from '../event-bus/Types';
11
12
  import type { PlayerApiExportNames } from '../player-api/Types';
12
13
  import type { SourceConfig } from '../source/atoms/SourceConfigAtom';
13
14
  import type { CreateSourceStateAtom, SourceOptions } from '../source/atoms/SourceStateAtom';
14
15
  import type { createSourceReference } from '../source/SourceReference';
15
16
  import type { SourceExportNames, SourceReference, SourceReferences } from '../source/Types';
17
+ import type { StreamDataStructurePackageExports } from '../stream-data-structure/Types';
18
+ import type { StreamingPackageExports } from '../streaming/Types';
16
19
  import type { ContextWithState } from '../Types';
20
+ import type { SourceRemovedError } from './SourceRemovedError';
17
21
  import type VideoElementUtils from './VideoElementUtils';
18
22
  export interface SourcesApiObject<SourceApi extends EmptyObject> {
19
23
  list(): SourceApi[];
@@ -43,7 +47,11 @@ export type SourcesApiEventMap = {
43
47
  [SourcesApiEvent.VideoDetached]: VideoDetachedEvent;
44
48
  [SourcesApiEvent.SourceError]: SourceErrorEvent;
45
49
  };
46
- export type SourcesMap = Map<SourceApiBase, SourceReference>;
50
+ export type SourceApiComponents = {
51
+ apiManager: ApiManager<SourceApiBase>;
52
+ eventBus: EventBus<EmptyObject>;
53
+ };
54
+ export type SourceApiComponentMap = MapStateAtom<SourceReference, SourceApiComponents>;
47
55
  export type SourcesApiContext = ContextHaving<SourcesApiDependencies, SourcesApiExports, ContextWithState>;
48
56
  export type VideoAttachedEvent = {
49
57
  videoElement: HTMLVideoElement;
@@ -68,7 +76,7 @@ export type SourceErrorEvent = {
68
76
  error: Error;
69
77
  };
70
78
  export type SourcesApi<SourceApi extends EmptyObject> = {
71
- events: EventBus<SourcesApiEventMap>;
79
+ events: EventBus<SourcesApiEventMap, typeof SourcesApiEvent>;
72
80
  sources: SourcesApiObject<SourceApi>;
73
81
  };
74
82
  export interface SourceApiBase {
@@ -76,27 +84,34 @@ export interface SourceApiBase {
76
84
  loadControl: LoadControl;
77
85
  readonly id: string;
78
86
  readonly events: EventBus<EmptyObject>;
87
+ readonly video: HTMLVideoElement | undefined;
88
+ readonly container: HTMLElement | undefined;
89
+ readonly attached: boolean;
79
90
  }
80
91
  export type SourcesApiDependencies = {
81
92
  [CoreExportNames.Utils]: CoreUtils;
82
93
  [CoreExportNames.CoreEffects]: CoreEffects;
83
94
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
84
- [BundleExportNames.Logger]: Logger;
85
95
  [CoreExportNames.Constants]: Constants;
86
96
  [BundleExportNames.PlayerConfig]: PlayerConfig;
87
97
  [SourceExportNames.CreateSourceStateAtom]: CreateSourceStateAtom;
88
98
  [SourceExportNames.CreateSourceReference]: typeof createSourceReference;
89
99
  [SourceExportNames.SourceReferences]: SourceReferences;
90
100
  [EventBusExportNames.CreateEventBus]: typeof createEventBus;
101
+ [EventBusExportNames.ExtendEventBusTypes]: typeof extendEventBusTypes;
91
102
  [PlayerApiExportNames.PlayerEventBus]: EventBus<SourcesApiEventMap>;
92
- };
103
+ } & StreamDataStructurePackageExports & StreamingPackageExports;
93
104
  export declare enum SourcesApiExportNames {
94
105
  SourceApiManager = "source-api-manager",
95
106
  VideoElementUtils = "video-element-utils",
96
- SourceEventBus = "source-event-bus"
107
+ SourceEventBus = "source-event-bus",
108
+ SourceApiComponentMap = "source-api-component-map",
109
+ SourceRemovedError = "source-removed-error"
97
110
  }
98
111
  export type SourcesApiExports = {
99
112
  [SourcesApiExportNames.SourceApiManager]: ApiManager<SourceApiBase>;
100
113
  [SourcesApiExportNames.VideoElementUtils]: typeof VideoElementUtils;
101
114
  [SourcesApiExportNames.SourceEventBus]: EventBus<EmptyObject>;
115
+ [SourcesApiExportNames.SourceApiComponentMap]: SourceApiComponentMap;
116
+ [SourcesApiExportNames.SourceRemovedError]: typeof SourceRemovedError;
102
117
  };
@@ -0,0 +1,4 @@
1
+ import type { EmptyObject } from '../../../framework-types/BaseTypes';
2
+ import type { StreamDataStructurePackageExports } from './Types';
3
+ export declare const StreamDataStructurePackage: import("../../../framework-types/package-api/Package").Package<EmptyObject, StreamDataStructurePackageExports, EmptyObject>;
4
+ export default StreamDataStructurePackage;
@@ -0,0 +1,23 @@
1
+ import type { EmptyObject } from '../../../framework-types/BaseTypes';
2
+ import type { ContextHaving } from '../../../framework-types/execution-context/Types';
3
+ import type { Constants } from '../core/Constants';
4
+ import type { CoreExportNames, CoreStateAtoms } from '../core/Types';
5
+ import type { CoreUtils } from '../core/utils/Types';
6
+ import type { ContextWithState } from '../Types';
7
+ import { StreamDataStructureSegments } from './segment/Exports';
8
+ import { StreamDataStructureSelectionGroups } from './selection-group/Exports';
9
+ import { StreamDataStructureStream } from './stream/Exports';
10
+ import type { StreamAtom } from './stream/StreamAtom';
11
+ import { StreamDataStructureTracks } from './track/Exports';
12
+ export declare const StreamDataStructure = "stream-data-structure";
13
+ export type StreamDataStructure = {
14
+ [StreamDataStructure]: StreamAtom;
15
+ };
16
+ export declare const StreamDataStructureExportNames: readonly ["stream-data-structure-segments", "stream-data-structure-selection-groups", "stream-data-structure-tracks", "stream-data-structure-stream"];
17
+ export type StreamDataStructurePackageExports = StreamDataStructureSegments & StreamDataStructureSelectionGroups & StreamDataStructureTracks & StreamDataStructureStream;
18
+ export type StreamDataStructureContext = ContextHaving<{
19
+ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
20
+ [CoreExportNames.Constants]: Constants;
21
+ [CoreExportNames.Utils]: CoreUtils;
22
+ }, EmptyObject, ContextWithState>;
23
+ export type StreamDataStructurePackageDependencies = EmptyObject;
@@ -0,0 +1,22 @@
1
+ import type { createDataSegmentAtom, createInitSegmentAtom, createSelfInitSegmentAtom, getGapToNextSegment, getReadableSegmentName, getTimeRange } from './SegmentAtom';
2
+ import type { ContainerFormat, createSegmentDataAtom } from './SegmentDataAtom';
3
+ import type { createSegmentTiming } from './SegmentTimingAtom';
4
+ import type { isDataOrSelfInitSegment, isDataSegment, isInitSegment } from './SegmentTypeGuards';
5
+ import type { SegmentUtils } from './SegmentUtils';
6
+ export declare const StreamDataStructureSegments = "stream-data-structure-segments";
7
+ export type StreamDataStructureSegments = {
8
+ [StreamDataStructureSegments]: {
9
+ ContainerFormat: typeof ContainerFormat;
10
+ createDataSegmentAtom: typeof createDataSegmentAtom;
11
+ createInitSegmentAtom: typeof createInitSegmentAtom;
12
+ createSelfInitSegmentAtom: typeof createSelfInitSegmentAtom;
13
+ createSegmentDataAtom: typeof createSegmentDataAtom;
14
+ createSegmentTiming: typeof createSegmentTiming;
15
+ getReadableSegmentName: typeof getReadableSegmentName;
16
+ getTimeRange: typeof getTimeRange;
17
+ getGapToNextSegment: typeof getGapToNextSegment;
18
+ isDataOrSelfInitSegment: typeof isDataOrSelfInitSegment;
19
+ isDataSegment: typeof isDataSegment;
20
+ isInitSegment: typeof isInitSegment;
21
+ } & typeof SegmentUtils;
22
+ };
@@ -1,10 +1,10 @@
1
- import type { PartialRequired } from '../../../../Types';
2
- import type { ContextWithState } from '../../../Types';
3
- import type { DataStreamAtom } from '../data-stream/DataStreamAtom';
4
- import type { MapStateAtom } from '../MapStateAtom';
1
+ import type { PartialRequired } from '../../../Types';
2
+ import type { DataStreamAtom } from '../../core/state/data-stream/DataStreamAtom';
3
+ import type { MapStateAtom } from '../../core/state/MapStateAtom';
4
+ import type { StateAtom } from '../../core/state/Types';
5
5
  import type { SelectionGroupAtom } from '../selection-group/SelectionGroupAtom';
6
6
  import type { TimeRange, TrackAtom } from '../track/TrackAtom';
7
- import type { StateAtom } from '../Types';
7
+ import type { StreamDataStructureContext } from '../Types';
8
8
  import type { SegmentTimingAtom } from './SegmentTimingAtom';
9
9
  export type Metadata = Record<string, any>;
10
10
  export type DataSegmentAtom = StateAtom<DataSegment, typeof BaseSegmentModifiers & {
@@ -48,14 +48,14 @@ declare const setInitSegment: (data: DataSegment, initSegment: InitSegmentAtom)
48
48
  declare const BaseSegmentModifiers: {
49
49
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
50
50
  };
51
- export declare const createDataSegmentAtom: (context: ContextWithState, initialData: PartialRequired<DataSegment, 'url' | 'initSegment' | 'segmentTiming' | 'track'>) => StateAtom<DataSegment, {
51
+ export declare const createDataSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<DataSegment, 'url' | 'initSegment' | 'segmentTiming' | 'track'>) => StateAtom<DataSegment, {
52
52
  setInitSegment: (data: DataSegment, initSegment: InitSegmentAtom) => boolean;
53
53
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
54
54
  }>;
55
- export declare const createInitSegmentAtom: (context: ContextWithState, initialData: PartialRequired<InitSegment, 'url' | 'track'>) => StateAtom<InitSegment, {
55
+ export declare const createInitSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<InitSegment, 'url' | 'track'>) => StateAtom<InitSegment, {
56
56
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
57
57
  }>;
58
- export declare const createSelfInitSegmentAtom: (context: ContextWithState, initialData: PartialRequired<SelfInitializingSegment, 'url' | 'segmentTiming' | 'track'>) => StateAtom<SelfInitializingSegment, {
58
+ export declare const createSelfInitSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<SelfInitializingSegment, 'url' | 'segmentTiming' | 'track'>) => StateAtom<SelfInitializingSegment, {
59
59
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
60
60
  }>;
61
61
  export declare function getReadableSegmentName(segment: SegmentAtom, pathLength?: number): string;
@@ -0,0 +1,19 @@
1
+ import type { MediaType } from '../../core/Constants';
2
+ import type { DataStreamAtom } from '../../core/state/data-stream/DataStreamAtom';
3
+ import type { ContextWithState } from '../../Types';
4
+ export declare enum ContainerFormat {
5
+ MP4 = "mp4",
6
+ TS = "mp2t",
7
+ WebM = "webm",
8
+ Unknown = "unknown"
9
+ }
10
+ export interface Fragment {
11
+ data: Uint8Array;
12
+ }
13
+ export interface SegmentData {
14
+ mediaTypes: MediaType[];
15
+ fragments: DataStreamAtom<Fragment>;
16
+ containerFormat: ContainerFormat;
17
+ }
18
+ export type SegmentDataAtom = ReturnType<typeof createSegmentDataAtom>;
19
+ export declare const createSegmentDataAtom: (context: ContextWithState, initialData: SegmentData) => import("../../core/state/Types").StateAtom<SegmentData, {}>;
@@ -1,5 +1,5 @@
1
- import type { PartialRequired } from '../../../../Types';
2
- import type { ContextWithState } from '../../../Types';
1
+ import type { PartialRequired } from '../../../Types';
2
+ import type { ContextWithState } from '../../Types';
3
3
  interface SegmentTiming {
4
4
  parsedDuration: number;
5
5
  parsedPlaybackTime: number;
@@ -12,7 +12,7 @@ declare function manifestParsed(timing: SegmentTiming, parsedDuration: number, p
12
12
  declare function dataParsed(timing: SegmentTiming, encodedDuration: number, encodedPlaybackTime: number): boolean;
13
13
  declare function timestampOffsetChanged(timing: SegmentTiming, newTimestampOffset: number): boolean;
14
14
  export type SegmentTimingAtom = ReturnType<typeof createSegmentTiming>;
15
- export declare function createSegmentTiming(context: ContextWithState, initialValue: PartialRequired<SegmentTiming, 'parsedDuration' | 'parsedPlaybackTime'>): import("../Types").StateAtom<SegmentTiming, {
15
+ export declare function createSegmentTiming(context: ContextWithState, initialValue: PartialRequired<SegmentTiming, 'parsedDuration' | 'parsedPlaybackTime'>): import("../../core/state/Types").StateAtom<SegmentTiming, {
16
16
  manifestParsed: typeof manifestParsed;
17
17
  dataParsed: typeof dataParsed;
18
18
  timestampOffsetChanged: typeof timestampOffsetChanged;
@@ -1,16 +1,16 @@
1
- import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
2
- import type { EmptyObject } from '../../../../Types';
3
- import type { ContextWithState } from '../../../Types';
4
- import { CoreExportNames } from '../../Types';
5
- import type { Logger } from '../../utils/Logger';
6
- import type { CoreUtils } from '../../utils/Types';
1
+ import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
2
+ import type { EmptyObject } from '../../../Types';
3
+ import { CoreExportNames } from '../../core/Types';
4
+ import type { CoreUtils } from '../../core/utils/Types';
5
+ import type { ContextWithState } from '../../Types';
7
6
  import type { DataOrSelfInitSegmentAtom, SegmentAtom } from './SegmentAtom';
8
7
  import { ContainerFormat } from './SegmentDataAtom';
9
- declare function areSegmentsOverlapping(segments: DataOrSelfInitSegmentAtom[]): boolean;
10
- declare function resetData(segment: SegmentAtom, { effects: { state } }: ContextWithState, logger: Logger): void;
11
- declare function resolveContainerFormatFromUrl(context: ContextHaving<{
8
+ type ExtendedContext = ContextHaving<{
12
9
  [CoreExportNames.Utils]: CoreUtils;
13
- }, EmptyObject, ContextWithState>, url: string): ContainerFormat | undefined;
10
+ }, EmptyObject, ContextWithState>;
11
+ declare function areSegmentsOverlapping(segments: DataOrSelfInitSegmentAtom[]): boolean;
12
+ declare function resetData(segment: SegmentAtom, { effects: { state, logger } }: ContextWithState): void;
13
+ declare function resolveContainerFormatFromUrl(context: ExtendedContext, url: string): ContainerFormat | undefined;
14
14
  declare function resolveContainerFormatFromExtension(extension: string): ContainerFormat | undefined;
15
15
  export declare const SegmentUtils: {
16
16
  areSegmentsOverlapping: typeof areSegmentsOverlapping;
@@ -0,0 +1,16 @@
1
+ import type { createAudioSelectionGroupAtom, createSubtitleSelectionGroupAtom, createUnknownSelectionGroupAtom, createVideoSelectionGroupAtom } from './SelectionGroupAtom';
2
+ import type { isAudioSelectionGroup, isMediaSelectionGroup, isSubtitleSelectionGroup, isVideoSelectionGroup } from './SelectionGroupTypeGuards';
3
+ import type { SelectionGroupUtils } from './SelectionGroupUtils';
4
+ export declare const StreamDataStructureSelectionGroups = "stream-data-structure-selection-groups";
5
+ export type StreamDataStructureSelectionGroups = {
6
+ [StreamDataStructureSelectionGroups]: {
7
+ createVideoSelectionGroupAtom: typeof createVideoSelectionGroupAtom;
8
+ createAudioSelectionGroupAtom: typeof createAudioSelectionGroupAtom;
9
+ createSubtitleSelectionGroupAtom: typeof createSubtitleSelectionGroupAtom;
10
+ createUnknownSelectionGroupAtom: typeof createUnknownSelectionGroupAtom;
11
+ isVideoSelectionGroup: typeof isVideoSelectionGroup;
12
+ isAudioSelectionGroup: typeof isAudioSelectionGroup;
13
+ isSubtitleSelectionGroup: typeof isSubtitleSelectionGroup;
14
+ isMediaSelectionGroup: typeof isMediaSelectionGroup;
15
+ } & typeof SelectionGroupUtils;
16
+ };
@@ -1,17 +1,19 @@
1
- import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
2
- import type { EmptyObject, PartialRequired } from '../../../../Types';
3
- import type { ContextWithState } from '../../../Types';
4
- import type { Constants } from '../../Constants';
5
- import { CoreExportNames } from '../../Types';
6
- import type { CoreUtils } from '../../utils/Types';
7
- import type { ArrayAtom } from '../ArrayStateAtom';
8
- import type { PrimitiveAtom } from '../PrimitiveAtom';
1
+ import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
2
+ import type { EmptyObject, PartialRequired } from '../../../Types';
3
+ import type { Constants } from '../../core/Constants';
4
+ import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
5
+ import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
6
+ import type { StateAtom } from '../../core/state/Types';
7
+ import type { CoreStateAtoms } from '../../core/Types';
8
+ import { CoreExportNames } from '../../core/Types';
9
+ import type { CoreUtils } from '../../core/utils/Types';
10
+ import type { ContextWithState } from '../../Types';
9
11
  import type { ContainerFormat } from '../segment/SegmentDataAtom';
10
12
  import type { AudioTrackAtom, MediaTrackAtom, SubtitleTrackAtom, TimeRange, TrackAtom, VideoTrackAtom } from '../track/TrackAtom';
11
- import type { StateAtom } from '../Types';
12
- type ContextT = ContextHaving<{
13
- [CoreExportNames.Utils]: CoreUtils;
13
+ type ExtendedContext = ContextHaving<{
14
+ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
14
15
  [CoreExportNames.Constants]: Constants;
16
+ [CoreExportNames.Utils]: CoreUtils;
15
17
  }, EmptyObject, ContextWithState>;
16
18
  type BaseSelectionGroup = {
17
19
  tracks: ArrayAtom<TrackAtom>;
@@ -50,19 +52,19 @@ type SelectionGroup = AudioSelectionGroup | VideoSelectionGroup | SubtitleSelect
50
52
  declare function getVideoSelectionGroupModifiers(): {
51
53
  setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
52
54
  };
53
- export declare const createVideoSelectionGroupAtom: (context: ContextT, initialValue: PartialRequired<VideoSelectionGroup, 'tracks'>) => VideoSelectionGroupAtom;
55
+ export declare const createVideoSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<VideoSelectionGroup, 'tracks'>) => VideoSelectionGroupAtom;
54
56
  declare function getAudioSelectionGroupModifiers(): {
55
57
  setLanguage: (selectionGroup: AudioSelectionGroup | SubtitleSelectionGroup, language: string) => boolean;
56
58
  setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
57
59
  };
58
- export declare const createAudioSelectionGroupAtom: (context: ContextT, initialValue: PartialRequired<AudioSelectionGroup, 'tracks' | 'language'>) => AudioSelectionGroupAtom;
60
+ export declare const createAudioSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<AudioSelectionGroup, 'tracks' | 'language'>) => AudioSelectionGroupAtom;
59
61
  declare const SubtitleSelectionGroupModifiers: {
60
62
  setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
61
63
  setLanguage: (selectionGroup: AudioSelectionGroup | SubtitleSelectionGroup, language: string) => boolean;
62
64
  };
63
- export declare const createSubtitleSelectionGroupAtom: (context: ContextT, initialValue: PartialRequired<SubtitleSelectionGroup, 'tracks' | 'language'>, label: string) => SubtitleSelectionGroupAtom;
65
+ export declare const createSubtitleSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<SubtitleSelectionGroup, 'tracks' | 'language'>, label: string) => SubtitleSelectionGroupAtom;
64
66
  declare const UnknownSelectionGroupModifiers: {
65
67
  setSequenceNumber: (selectionGroup: SelectionGroup, sequenceNumber: number) => boolean;
66
68
  };
67
- export declare const createUnknownSelectionGroupAtom: (context: ContextT, initialValue: PartialRequired<UnknownSelectionGroup, 'tracks'>) => UnknownSelectionGroupAtom;
69
+ export declare const createUnknownSelectionGroupAtom: (context: ExtendedContext, initialValue: PartialRequired<UnknownSelectionGroup, 'tracks'>) => UnknownSelectionGroupAtom;
68
70
  export {};
@@ -0,0 +1,11 @@
1
+ import type { AudioSelectionGroupAtom, MediaSelectionGroupAtom, SubtitleSelectionGroupAtom, UnknownSelectionGroupAtom, VideoSelectionGroupAtom } from './SelectionGroupAtom';
2
+ type AnySelectionGroup = AudioSelectionGroupAtom | VideoSelectionGroupAtom | SubtitleSelectionGroupAtom | UnknownSelectionGroupAtom | MediaSelectionGroupAtom;
3
+ export declare function isVideoSelectionGroup(selectionGroup: AnySelectionGroup): selectionGroup is VideoSelectionGroupAtom;
4
+ export declare function isVideoSelectionGroup(selectionGroup: AnySelectionGroup, index: number, array: AnySelectionGroup[]): selectionGroup is VideoSelectionGroupAtom;
5
+ export declare function isAudioSelectionGroup(selectionGroup: AnySelectionGroup): selectionGroup is AudioSelectionGroupAtom;
6
+ export declare function isAudioSelectionGroup(selectionGroup: AnySelectionGroup, index: number, array: AnySelectionGroup[]): selectionGroup is AudioSelectionGroupAtom;
7
+ export declare function isSubtitleSelectionGroup(selectionGroup: AnySelectionGroup): selectionGroup is SubtitleSelectionGroupAtom;
8
+ export declare function isSubtitleSelectionGroup(selectionGroup: AnySelectionGroup, index: number, array: AnySelectionGroup[]): selectionGroup is SubtitleSelectionGroupAtom;
9
+ export declare function isMediaSelectionGroup(selectionGroup: AnySelectionGroup): selectionGroup is MediaSelectionGroupAtom;
10
+ export declare function isMediaSelectionGroup(selectionGroup: AnySelectionGroup, index: number, array: AnySelectionGroup[]): selectionGroup is MediaSelectionGroupAtom;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { StreamDataStructureContext } from '../Types';
2
+ import type { MediaSelectionGroupAtom } from './SelectionGroupAtom';
3
+ declare function getMediaType(context: StreamDataStructureContext, group: MediaSelectionGroupAtom): import("../../core/Constants").MediaType.Audio | import("../../core/Constants").MediaType.Video;
4
+ export declare const SelectionGroupUtils: {
5
+ getMediaType: typeof getMediaType;
6
+ };
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { createStreamAtom, StreamType } from './StreamAtom';
2
+ export declare const StreamDataStructureStream = "stream-data-structure-stream";
3
+ export type StreamDataStructureStream = {
4
+ [StreamDataStructureStream]: {
5
+ Type: typeof StreamType;
6
+ createStreamAtom: typeof createStreamAtom;
7
+ };
8
+ };
@@ -1,10 +1,10 @@
1
- import type { ContextWithState } from '../../../Types';
2
- import type { Transient } from '../../utils/StateUtils';
3
- import type { ArrayAtom } from '../ArrayStateAtom';
4
- import type { PrimitiveAtom } from '../PrimitiveAtom';
1
+ import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
2
+ import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
3
+ import type { Transient } from '../../core/utils/StateUtils';
5
4
  import type { DataOrSelfInitSegmentAtom } from '../segment/SegmentAtom';
6
5
  import type { SelectionGroupAtom } from '../selection-group/SelectionGroupAtom';
7
6
  import type { MediaTrackAtom, TrackAtom } from '../track/TrackAtom';
7
+ import type { StreamDataStructureContext } from '../Types';
8
8
  export type SelectionGroupsAtom = ArrayAtom<SelectionGroupAtom>;
9
9
  export type TracksAtom = ArrayAtom<TrackAtom>;
10
10
  export type PlaybackTimeMismatchTransientPayload = {
@@ -33,25 +33,25 @@ type Stream = {
33
33
  };
34
34
  declare function setType(stream: Stream, type: StreamType): boolean;
35
35
  export type StreamAtom = ReturnType<typeof createStreamAtom>;
36
- export declare const createStreamAtom: (context: ContextWithState, type: StreamType) => import("../Types").StateAtom<{
36
+ export declare const createStreamAtom: (context: StreamDataStructureContext, type: StreamType) => import("../../core/state/Types").StateAtom<{
37
37
  tracks: ArrayAtom<TrackAtom>;
38
38
  selectionGroups: ArrayAtom<SelectionGroupAtom>;
39
39
  type: StreamType;
40
- duration: import("../Types").StateAtom<{
40
+ duration: import("../../core/state/Types").StateAtom<{
41
41
  value: number;
42
42
  }, {
43
43
  setValue: (data: {
44
44
  value: number;
45
45
  }, value: number) => boolean;
46
46
  }>;
47
- onPlaybackTimeMismatch: import("../Types").StateAtom<{
47
+ onPlaybackTimeMismatch: import("../../core/state/Types").StateAtom<{
48
48
  value: PlaybackTimeMismatchTransientPayload | undefined;
49
49
  }, {
50
50
  trigger: (t: {
51
51
  value: PlaybackTimeMismatchTransientPayload | undefined;
52
52
  }, value: PlaybackTimeMismatchTransientPayload) => boolean;
53
53
  }>;
54
- onDurationMismatch: import("../Types").StateAtom<{
54
+ onDurationMismatch: import("../../core/state/Types").StateAtom<{
55
55
  value: DurationMismatchTransientPayload | undefined;
56
56
  }, {
57
57
  trigger: (t: {
@@ -0,0 +1,18 @@
1
+ import type { createAudioTrackAtom, createMuxedTrackAtom, createSubtitleTrackAtom, createUnknownTrackAtom, createVideoTrackAtom } from './TrackAtom';
2
+ import type { isAudioTrack, isMediaOrSubtitleTrack, isMediaTrack, isMuxedTrack, isSubtitleTrack, isVideoTrack } from './TrackTypeGuards';
3
+ export declare const StreamDataStructureTracks = "stream-data-structure-tracks";
4
+ export type StreamDataStructureTracks = {
5
+ [StreamDataStructureTracks]: {
6
+ createAudioTrackAtom: typeof createAudioTrackAtom;
7
+ createVideoTrackAtom: typeof createVideoTrackAtom;
8
+ createMuxedTrackAtom: typeof createMuxedTrackAtom;
9
+ createSubtitleTrackAtom: typeof createSubtitleTrackAtom;
10
+ createUnknownTrackAtom: typeof createUnknownTrackAtom;
11
+ isAudioTrack: typeof isAudioTrack;
12
+ isMediaTrack: typeof isMediaTrack;
13
+ isSubtitleTrack: typeof isSubtitleTrack;
14
+ isVideoTrack: typeof isVideoTrack;
15
+ isMuxedTrack: typeof isMuxedTrack;
16
+ isMediaOrSubtitleTrack: typeof isMediaOrSubtitleTrack;
17
+ };
18
+ };