@bitmovin/player-web-x 10.2.0-beta.13 → 10.2.0-beta.14

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 (193) hide show
  1. package/bundles/playerx-bitmovin-v8-core.js +2 -2
  2. package/bundles/playerx-bitmovin-v8.js +2 -2
  3. package/bundles/playerx-core.js +2 -2
  4. package/bundles/playerx-dash.js +2 -2
  5. package/bundles/playerx-hls-ts-audio.js +2 -2
  6. package/bundles/playerx-hls.js +2 -2
  7. package/bundles/playerx-playback.js +2 -2
  8. package/bundles/playerx-tv.js +2 -2
  9. package/package.json +1 -1
  10. package/packages/playerx-adaptation.package.js +2 -2
  11. package/packages/playerx-advertising-api.package.js +2 -2
  12. package/packages/playerx-advertising-base.package.js +2 -2
  13. package/packages/playerx-advertising-bitmovin.package.js +2 -2
  14. package/packages/playerx-analytics.package.js +1 -1
  15. package/packages/playerx-bitmovin-advertising-bundle.package.js +2 -2
  16. package/packages/playerx-bitmovin-source-api.package.js +2 -2
  17. package/packages/playerx-bitmovin-ui.package.js +2 -2
  18. package/packages/playerx-bitmovin-v8-core.package.js +2 -2
  19. package/packages/playerx-bitmovin-v8-static-api.package.js +2 -2
  20. package/packages/playerx-bitmovin-video-element-utils.package.js +2 -2
  21. package/packages/playerx-capabilities.package.js +2 -2
  22. package/packages/playerx-container-mp4.package.js +2 -2
  23. package/packages/playerx-container-ts.package.js +2 -2
  24. package/packages/playerx-core.package.js +2 -2
  25. package/packages/playerx-dash-manifest-technology.package.js +2 -2
  26. package/packages/playerx-dash-manifest.package.js +2 -2
  27. package/packages/playerx-dash-parsing.package.js +2 -2
  28. package/packages/playerx-dash-translation.package.js +2 -2
  29. package/packages/playerx-dash.package.js +2 -2
  30. package/packages/playerx-data.package.js +2 -2
  31. package/packages/playerx-event-bus.package.js +1 -1
  32. package/packages/playerx-hls-manifest-technology.package.js +2 -2
  33. package/packages/playerx-hls-manifest.package.js +2 -2
  34. package/packages/playerx-hls-parsing.package.js +2 -2
  35. package/packages/playerx-hls-translation.package.js +2 -2
  36. package/packages/playerx-hls.package.js +2 -2
  37. package/packages/playerx-media-state.package.d.ts +1 -0
  38. package/packages/playerx-media-state.package.js +10 -0
  39. package/packages/playerx-mse-playback.package.js +2 -2
  40. package/packages/playerx-mse-presentation.package.js +2 -2
  41. package/packages/playerx-native-playback.package.js +2 -2
  42. package/packages/playerx-native-presentation.package.js +2 -2
  43. package/packages/playerx-network.package.js +2 -2
  44. package/packages/playerx-no-adaptation.package.js +2 -2
  45. package/packages/playerx-playback-api.package.js +2 -2
  46. package/packages/playerx-playback-technology.package.js +2 -2
  47. package/packages/playerx-playback.package.js +2 -2
  48. package/packages/playerx-player-api.package.js +2 -2
  49. package/packages/playerx-segment-processing.package.js +2 -2
  50. package/packages/playerx-source.package.js +2 -2
  51. package/packages/playerx-sources-api.package.js +2 -2
  52. package/packages/playerx-stream-data-structure.package.js +2 -2
  53. package/packages/playerx-streaming.package.js +1 -1
  54. package/packages/playerx-subtitle-api.package.js +2 -2
  55. package/packages/playerx-subtitle-base.package.js +2 -2
  56. package/packages/playerx-subtitle-format-detection.package.js +1 -1
  57. package/packages/playerx-subtitle-native-renderer.package.js +2 -2
  58. package/packages/playerx-subtitles.package.js +2 -2
  59. package/packages/playerx-trick-play.package.js +2 -2
  60. package/packages/playerx-ts-transmuxer.package.js +2 -2
  61. package/packages/playerx-tv.package.js +1 -1
  62. package/packages/playerx-ui.package.js +2 -2
  63. package/packages/playerx-video-element-controller.package.d.ts +1 -0
  64. package/packages/playerx-video-element-controller.package.js +10 -0
  65. package/packages/playerx-view-mode.package.js +2 -2
  66. package/packages/playerx-web-vtt.package.js +2 -2
  67. package/playerx-framework-utils.js +1 -1
  68. package/types/Types.d.ts +3 -0
  69. package/types/bundles/BitmovinV8.bundle.d.ts +1 -1
  70. package/types/bundles/Dash.bundle.d.ts +1 -1
  71. package/types/bundles/Hls.bundle.d.ts +1 -1
  72. package/types/bundles/HlsTsAudio.bundle.d.ts +1 -1
  73. package/types/bundles/Playback.bundle.d.ts +1 -1
  74. package/types/bundles/Tv.bundle.d.ts +1 -1
  75. package/types/packages/adaptation/AdaptationAlgorithm.d.ts +4 -0
  76. package/types/packages/adaptation/StartupQuality.d.ts +5 -0
  77. package/types/packages/adaptation/Types.d.ts +7 -11
  78. package/types/packages/adaptation/WishDataAtom.d.ts +9 -2
  79. package/types/packages/advertising/BitmovinAdvertisingBundle.package.d.ts +1 -1
  80. package/types/packages/advertising/api/AdvertisingApi.package.d.ts +1 -1
  81. package/types/packages/advertising/api/AdvertisingEvents.d.ts +29 -5
  82. package/types/packages/advertising/api/Types.d.ts +24 -6
  83. package/types/packages/advertising/base/AdPosition.d.ts +1 -0
  84. package/types/packages/advertising/base/AdQuartile.d.ts +5 -0
  85. package/types/packages/advertising/base/AdSchedule.d.ts +2 -2
  86. package/types/packages/advertising/base/AdTagAtom.d.ts +1 -1
  87. package/types/packages/advertising/base/AdType.d.ts +4 -0
  88. package/types/packages/advertising/base/BaseAdAtom.d.ts +5 -3
  89. package/types/packages/advertising/base/{BaseAdBreakAtom.d.ts → BaseAdPodAtom.d.ts} +8 -6
  90. package/types/packages/advertising/base/BaseAdPodState.d.ts +7 -0
  91. package/types/packages/advertising/base/BaseAdState.d.ts +7 -0
  92. package/types/packages/advertising/base/Types.d.ts +13 -29
  93. package/types/packages/advertising/bitmovin/Types.d.ts +13 -10
  94. package/types/packages/capabilities/Types.d.ts +1 -1
  95. package/types/packages/container/container-mp4/ContainerMp4.package.d.ts +2 -0
  96. package/types/packages/container/container-ts/ContainerTs.package.d.ts +3 -1
  97. package/types/packages/container/ts-transmuxer/TsTransmuxer.package.d.ts +2 -0
  98. package/types/packages/core/Constants.d.ts +7 -0
  99. package/types/packages/core/Types.d.ts +3 -2
  100. package/types/packages/core/metrics/MetricsAtom.d.ts +1 -1
  101. package/types/packages/{adaptation → core/state}/RingBufferAtom.d.ts +2 -2
  102. package/types/packages/core/state/StateMachineAtom.d.ts +13 -12
  103. package/types/packages/core/state/state-effect/Types.d.ts +2 -2
  104. package/types/packages/core/technology/Types.d.ts +2 -2
  105. package/types/packages/data/Types.d.ts +7 -1
  106. package/types/packages/manifest/dash/parsing/Errors.d.ts +1 -1
  107. package/types/packages/manifest/dash/root/Types.d.ts +3 -1
  108. package/types/packages/manifest/dash/technology/Types.d.ts +2 -1
  109. package/types/packages/manifest/hls/parsing/Constants.d.ts +47 -0
  110. package/types/packages/manifest/hls/parsing/Errors.d.ts +1 -1
  111. package/types/packages/manifest/hls/parsing/Types.d.ts +5 -48
  112. package/types/packages/manifest/hls/root/Hls.package.d.ts +6 -1
  113. package/types/packages/manifest/hls/technology/Types.d.ts +2 -1
  114. package/types/packages/manifest/hls/translation/HlsTranslation.package.d.ts +5 -0
  115. package/types/packages/manifest/hls/translation/Types.d.ts +10 -11
  116. package/types/packages/manifest/hls/translation/segments/StreamHelpers.d.ts +14 -0
  117. package/types/packages/manifest/hls/translation/stream/TracksToSelectionGroups.d.ts +6 -0
  118. package/types/packages/manifest/hls/translation/stream/UnknownTrackToMediaTrackTranslator.d.ts +4 -0
  119. package/types/packages/media-state/MediaInfoAtoms.d.ts +18 -0
  120. package/types/packages/media-state/MediaState.d.ts +10 -0
  121. package/types/packages/media-state/MediaState.package.d.ts +22 -0
  122. package/types/packages/media-state/MediaStateAtom.d.ts +16 -0
  123. package/types/packages/media-state/MediaStateTransitionType.d.ts +11 -0
  124. package/types/packages/media-state/SeekRestrictionAtom.d.ts +2 -0
  125. package/types/packages/media-state/Types.d.ts +48 -0
  126. package/types/packages/media-state/controllers/video-element/Types.d.ts +32 -0
  127. package/types/packages/media-state/controllers/video-element/VideoElementController.package.d.ts +15 -0
  128. package/types/packages/network/HttpRequestMethod.d.ts +5 -0
  129. package/types/packages/network/HttpRequestType.d.ts +11 -0
  130. package/types/packages/network/HttpResponseType.d.ts +7 -0
  131. package/types/packages/network/NetworkAtom.d.ts +15 -0
  132. package/types/packages/network/NetworkTask.d.ts +8 -7
  133. package/types/packages/network/Types.d.ts +17 -26
  134. package/types/packages/playback/play-pause/Types.d.ts +0 -3
  135. package/types/packages/playback/volume/Types.d.ts +2 -4
  136. package/types/packages/playback-api/play-pause-api/Types.d.ts +4 -3
  137. package/types/packages/playback-api/playback-api-events/Types.d.ts +11 -8
  138. package/types/packages/playback-api/time-api/Types.d.ts +4 -5
  139. package/types/packages/playback-technology/PlaybackTechnologyEntryType.d.ts +4 -0
  140. package/types/packages/playback-technology/Types.d.ts +6 -6
  141. package/types/packages/player-api/PlayerApi.package.d.ts +2 -0
  142. package/types/packages/player-api/PlayerEvent.d.ts +3 -0
  143. package/types/packages/player-api/Types.d.ts +4 -4
  144. package/types/packages/presentation/mse/playback-technology/Types.d.ts +2 -1
  145. package/types/packages/presentation/mse/playback-technology/atoms/MsePresentationStateAtom.d.ts +1 -4
  146. package/types/packages/presentation/mse/presentation/MsePresentation.package.d.ts +4 -2
  147. package/types/packages/presentation/mse/presentation/Types.d.ts +6 -0
  148. package/types/packages/presentation/native/Types.d.ts +1 -1
  149. package/types/packages/presentation/native/playback-technology/Types.d.ts +2 -1
  150. package/types/packages/segment-processing/SegmentProcessing.package.d.ts +2 -1
  151. package/types/packages/segment-processing/SegmentProcessorType.d.ts +7 -0
  152. package/types/packages/segment-processing/Types.d.ts +10 -10
  153. package/types/packages/source/SourceReference.d.ts +1 -1
  154. package/types/packages/source/atoms/PlaybackConfigAtom.d.ts +2 -2
  155. package/types/packages/source/atoms/SourceConfigAtom.d.ts +2 -0
  156. package/types/packages/sources-api/SourcesApiEvent.d.ts +7 -0
  157. package/types/packages/sources-api/Types.d.ts +4 -8
  158. package/types/packages/stream-data-structure/Types.d.ts +1 -0
  159. package/types/packages/stream-data-structure/segment/Exports.d.ts +3 -3
  160. package/types/packages/stream-data-structure/segment/SegmentAtom.d.ts +11 -2
  161. package/types/packages/stream-data-structure/segment/SegmentDataAtom.d.ts +1 -7
  162. package/types/packages/stream-data-structure/segment/SegmentUtils.d.ts +3 -2
  163. package/types/packages/stream-data-structure/selection-group/SelectionGroupAtom.d.ts +1 -2
  164. package/types/packages/stream-data-structure/track/Exports.d.ts +6 -1
  165. package/types/packages/stream-data-structure/track/TrackAtom.d.ts +19 -4
  166. package/types/packages/stream-data-structure/track/TrackTypeGuards.d.ts +3 -1
  167. package/types/packages/stream-data-structure/track/TypeDetection.d.ts +25 -0
  168. package/types/packages/stream-data-structure/track/TypeDetectionTypeGuards.d.ts +4 -0
  169. package/types/packages/streaming/Streaming.package.d.ts +2 -2
  170. package/types/packages/streaming/Types.d.ts +3 -2
  171. package/types/packages/subtitles/subtitle-api/SubtitleEvent.d.ts +9 -0
  172. package/types/packages/subtitles/subtitle-api/Types.d.ts +3 -9
  173. package/types/packages/trick-play/TrickPlay.package.d.ts +2 -1
  174. package/types/packages/v8-compat/BitmovinUi.package.d.ts +4 -4
  175. package/types/packages/v8-compat/BitmovinV8Core.package.d.ts +16 -4
  176. package/types/packages/v8-compat/BitmovinV8StaticApi.package.d.ts +8 -5
  177. package/types/packages/v8-compat/apis/SourceApis.d.ts +5 -0
  178. package/types/packages/v8-compat/apis/SubtitleApi.d.ts +5 -0
  179. package/types/packages/v8-compat/enums/AdditionalPlayerExportNames.d.ts +9 -0
  180. package/types/packages/v8-compat/enums/PlayerExports.d.ts +0 -7
  181. package/types/packages/v8-compat/event-handling/EventDispatcher.d.ts +11 -0
  182. package/types/packages/v8-compat/source-api/BitmovinSourceApi.package.d.ts +10 -4
  183. package/types/packages/v8-compat/video-element/BitmovinVideoElementUtils.package.d.ts +4 -4
  184. package/types/packages/view-mode/Types.d.ts +4 -6
  185. package/types/packages/view-mode/ViewMode.d.ts +5 -0
  186. package/types/packages/view-mode/ViewMode.package.d.ts +2 -0
  187. package/types/packages/view-mode/ViewModeAtom.d.ts +1 -1
  188. package/types/packages/core/FrameworkError.d.ts +0 -4
  189. package/types/packages/core/network/NetworkAtom.d.ts +0 -21
  190. package/types/packages/playback/playback-state/Types.d.ts +0 -41
  191. package/types/packages/playback/video-element-state/SeekRestrictionAtom.d.ts +0 -2
  192. package/types/packages/playback/video-element-state/Types.d.ts +0 -32
  193. package/types/packages/playback/video-element-state/VideoElementStateAtom.d.ts +0 -58
@@ -15,7 +15,8 @@ import type { SourceStateAtom } from '../source/atoms/SourceStateAtom';
15
15
  import { SourceExportNames } from '../source/Types';
16
16
  import Errors from './Errors';
17
17
  import { createSegmentProcessingComponent } from './SegmentProcessingComponent';
18
- import { SegmentProcessingExportNames, SegmentProcessorType } from './Types';
18
+ import { SegmentProcessorType } from './SegmentProcessorType';
19
+ import { SegmentProcessingExportNames } from './Types';
19
20
  export type SegmentProcessingDependencies = {
20
21
  [SourceExportNames.SourceState]: SourceStateAtom;
21
22
  };
@@ -0,0 +1,7 @@
1
+ export declare enum SegmentProcessorType {
2
+ Decryptor = "decryptor",
3
+ Parser = "parser",
4
+ Preprocessor = "preprocessor",
5
+ Transmuxer = "transmuxer",
6
+ Postprocessor = "postprocessor"
7
+ }
@@ -1,7 +1,7 @@
1
1
  import type { ContextHaving, ContextUsing } from '../../../framework-types/execution-context/Types';
2
2
  import type { NamedTask, Task } from '../../../framework-types/task/Types';
3
3
  import type { EmptyObject } from '../../Types';
4
- import type { Constants, MediaType } from '../core/Constants';
4
+ import type { Constants, ContainerFormat, MediaType } from '../core/Constants';
5
5
  import type { EventListenerEffect } from '../core/effects/EventListenerEffectFactory';
6
6
  import type { DataStreamAtom } from '../core/state/data-stream/DataStreamAtom';
7
7
  import type { CoreExportNames, CoreStateAtoms } from '../core/Types';
@@ -9,9 +9,11 @@ import type { Transient } from '../core/utils/StateUtils';
9
9
  import type { CoreUtils } from '../core/utils/Types';
10
10
  import type { StreamDataStructureSegments } from '../stream-data-structure/segment/Exports';
11
11
  import type { SegmentAtom } from '../stream-data-structure/segment/SegmentAtom';
12
- import type { ContainerFormat, SegmentDataAtom } from '../stream-data-structure/segment/SegmentDataAtom';
12
+ import type { SegmentDataAtom } from '../stream-data-structure/segment/SegmentDataAtom';
13
13
  import type { ContextWithState } from '../Types';
14
14
  import type Errors from './Errors';
15
+ import type { SegmentProcessorType } from './SegmentProcessorType';
16
+ export type { SegmentProcessorType } from './SegmentProcessorType';
15
17
  type ProcessorDependencies = {
16
18
  [CoreExportNames.Utils]: CoreUtils;
17
19
  [CoreExportNames.Constants]: Constants;
@@ -29,13 +31,10 @@ export type SegmentProcessorContext = ContextUsing<[
29
31
  export type CodecMap = {
30
32
  [key in MediaType]?: string[];
31
33
  };
32
- export declare enum SegmentProcessorType {
33
- Decryptor = "decryptor",
34
- Parser = "parser",
35
- Preprocessor = "preprocessor",
36
- Transmuxer = "transmuxer",
37
- Postprocessor = "postprocessor"
38
- }
34
+ export type VideoInfo = {
35
+ width: number;
36
+ height: number;
37
+ };
39
38
  type BaseProcessorData<I, O> = {
40
39
  segment: SegmentAtom;
41
40
  input: DataStreamAtom<I>;
@@ -54,6 +53,7 @@ export type SegmentDecryptor = BaseSegmentProcessor<SegmentDecryptorData> & {
54
53
  export type SegmentParserData = BaseProcessorData<Uint8Array, SegmentDataAtom> & {
55
54
  segment: SegmentAtom;
56
55
  codecsExtracted: Transient<CodecMap>;
56
+ videoInfoExtracted: Transient<VideoInfo>;
57
57
  playbackTimeExtracted: Transient<number>;
58
58
  durationExtracted: Transient<number>;
59
59
  };
@@ -90,6 +90,7 @@ export type SegmentProcessingComponentData = BaseProcessorData<Uint8Array, Segme
90
90
  codecsExtracted: Transient<{
91
91
  [key in MediaType]?: string[];
92
92
  }>;
93
+ videoInfoExtracted: Transient<VideoInfo>;
93
94
  playbackTimeExtracted: Transient<number>;
94
95
  durationExtracted: Transient<number>;
95
96
  selectContainerFormat: SelectContainerFormatTask;
@@ -98,4 +99,3 @@ export interface SegmentProcessingComponent {
98
99
  addProcessor(processor: SegmentProcessor): RemoveProcessor;
99
100
  process: NamedTask<Task<SegmentProcessorContext, SegmentProcessingComponentData, void>>;
100
101
  }
101
- export {};
@@ -20,7 +20,7 @@ type ExtendedContext = ContextHaving<{
20
20
  type CreateSourceReferenceParam = {
21
21
  context?: ExtendedContext;
22
22
  sourceConfig: SourceConfig;
23
- sourceOptions?: Partial<SourceOptions>;
23
+ sourceOptions: SourceOptions;
24
24
  sourceErrorHandler?: (error: Error) => boolean;
25
25
  task?: NamedTask<Task<ExtendedContext, void, void>>;
26
26
  sourceId?: string;
@@ -1,8 +1,8 @@
1
1
  import type { PlaybackConfig } from '../../../bundles/Types';
2
2
  import type { ContextWithState } from '../../Types';
3
3
  export type PlaybackConfigAtom = ReturnType<typeof createPlaybackConfigAtom>;
4
- export declare const createPlaybackConfigAtom: (context: ContextWithState, options: PlaybackConfig | undefined) => import("../../core/state/Types").StateAtom<{
5
- autoplay: boolean;
4
+ export declare const createPlaybackConfigAtom: (context: ContextWithState, options: PlaybackConfig) => import("../../core/state/Types").StateAtom<{
6
5
  muted: boolean;
6
+ autoplay: boolean;
7
7
  preventSeeking: boolean;
8
8
  }, {}>;
@@ -1,11 +1,13 @@
1
1
  import type { EmptyObject } from '../../../../framework-types/BaseTypes';
2
2
  import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
3
3
  import type { Constants, ContentType, ResourceType } from '../../core/Constants';
4
+ import type { CoreStateAtoms } from '../../core/Types';
4
5
  import { CoreExportNames } from '../../core/Types';
5
6
  import type { ContextWithState } from '../../Types';
6
7
  export type SourceConfigAtom = ReturnType<typeof createSourceConfigAtom>;
7
8
  type ExtendedContext = ContextHaving<{
8
9
  [CoreExportNames.Constants]: Constants;
10
+ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
9
11
  }, EmptyObject, ContextWithState>;
10
12
  export interface Resource {
11
13
  url: string;
@@ -0,0 +1,7 @@
1
+ export declare enum SourcesApiEvent {
2
+ SourceAdded = "source-added",
3
+ SourceRemoved = "source-removed",
4
+ VideoAttached = "video-attached",
5
+ VideoDetached = "video-detached",
6
+ SourceError = "source-error"
7
+ }
@@ -3,6 +3,7 @@ import type { EmptyObject } from '../../../framework-types/BaseTypes';
3
3
  import type { LogLevel } from '../../../framework-types/effects/LoggerEffect';
4
4
  import type { ContextHaving } from '../../../framework-types/execution-context/Types';
5
5
  import type { BundleExportNames, PlayerConfig } from '../../bundles/Types';
6
+ import type { DeepPartial } from '../../Types';
6
7
  import type { Constants, LoadControl } from '../core/Constants';
7
8
  import type { MapStateAtom } from '../core/state/MapStateAtom';
8
9
  import type { CoreEffects, CoreExportNames, CoreStateAtoms } from '../core/Types';
@@ -18,7 +19,9 @@ import type { StreamDataStructurePackageExports } from '../stream-data-structure
18
19
  import type { StreamingPackageExports } from '../streaming/Types';
19
20
  import type { ContextWithState } from '../Types';
20
21
  import type { SourceRemovedError } from './SourceRemovedError';
22
+ import type { SourcesApiEvent } from './SourcesApiEvent';
21
23
  import type VideoElementUtils from './VideoElementUtils';
24
+ export type { SourcesApiEvent } from './SourcesApiEvent';
22
25
  export interface SourcesApiObject<SourceApi extends EmptyObject> {
23
26
  list(): SourceApi[];
24
27
  add(config: SourceConfig, options?: SourceOptionsWithAttach, insertAt?: number): SourceApi;
@@ -26,20 +29,13 @@ export interface SourcesApiObject<SourceApi extends EmptyObject> {
26
29
  attachVideo(source: SourceApi, options?: AttachOptions): void;
27
30
  detachVideo(source: SourceApi): void;
28
31
  }
29
- export type SourceOptionsWithAttach = Partial<SourceOptions> & {
32
+ export type SourceOptionsWithAttach = DeepPartial<SourceOptions> & {
30
33
  attach?: boolean | AttachOptions;
31
34
  };
32
35
  export interface AttachOptions {
33
36
  video?: HTMLVideoElement;
34
37
  container?: HTMLElement;
35
38
  }
36
- export declare enum SourcesApiEvent {
37
- SourceAdded = "source-added",
38
- SourceRemoved = "source-removed",
39
- VideoAttached = "video-attached",
40
- VideoDetached = "video-detached",
41
- SourceError = "source-error"
42
- }
43
39
  export type SourcesApiEventMap = {
44
40
  [SourcesApiEvent.SourceAdded]: SourceAddedEvent;
45
41
  [SourcesApiEvent.SourceRemoved]: SourceRemovedEvent;
@@ -14,6 +14,7 @@ export type StreamDataStructure = {
14
14
  [StreamDataStructure]: StreamAtom;
15
15
  };
16
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 StreamDataStructureExportNames = typeof StreamDataStructureExportNames;
17
18
  export type StreamDataStructurePackageExports = StreamDataStructureSegments & StreamDataStructureSelectionGroups & StreamDataStructureTracks & StreamDataStructureStream;
18
19
  export type StreamDataStructureContext = ContextHaving<{
19
20
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
@@ -1,12 +1,12 @@
1
- import type { createDataSegmentAtom, createInitSegmentAtom, createSelfInitSegmentAtom, getGapToNextSegment, getReadableSegmentName, getTimeRange } from './SegmentAtom';
2
- import type { ContainerFormat, createSegmentDataAtom } from './SegmentDataAtom';
1
+ import type { createDataSegmentAtom, createInitSegmentAtom, createSelfInitSegmentAtom, getGapToNextSegment, getReadableSegmentName, getTimeRange, SegmentType } from './SegmentAtom';
2
+ import type { createSegmentDataAtom } from './SegmentDataAtom';
3
3
  import type { createSegmentTiming } from './SegmentTimingAtom';
4
4
  import type { isDataOrSelfInitSegment, isDataSegment, isInitSegment } from './SegmentTypeGuards';
5
5
  import type { SegmentUtils } from './SegmentUtils';
6
6
  export declare const StreamDataStructureSegments = "stream-data-structure-segments";
7
7
  export type StreamDataStructureSegments = {
8
8
  [StreamDataStructureSegments]: {
9
- ContainerFormat: typeof ContainerFormat;
9
+ SegmentType: typeof SegmentType;
10
10
  createDataSegmentAtom: typeof createDataSegmentAtom;
11
11
  createInitSegmentAtom: typeof createInitSegmentAtom;
12
12
  createSelfInitSegmentAtom: typeof createSelfInitSegmentAtom;
@@ -9,9 +9,14 @@ import type { SegmentTimingAtom } from './SegmentTimingAtom';
9
9
  export type Metadata = Record<string, any>;
10
10
  export type DataSegmentAtom = StateAtom<DataSegment, typeof BaseSegmentModifiers & {
11
11
  setInitSegment: typeof setInitSegment;
12
+ setTrack: typeof setTrack;
13
+ }>;
14
+ export type InitSegmentAtom = StateAtom<InitSegment, typeof BaseSegmentModifiers & {
15
+ setTrack: typeof setTrack;
16
+ }>;
17
+ export type SelfInitSegmentAtom = StateAtom<SelfInitializingSegment, typeof BaseSegmentModifiers & {
18
+ setTrack: typeof setTrack;
12
19
  }>;
13
- export type InitSegmentAtom = StateAtom<InitSegment, typeof BaseSegmentModifiers>;
14
- export type SelfInitSegmentAtom = StateAtom<SelfInitializingSegment, typeof BaseSegmentModifiers>;
15
20
  export interface ByteRange {
16
21
  start: number;
17
22
  end: number;
@@ -45,17 +50,21 @@ type Segment = InitSegment | DataSegment | SelfInitializingSegment;
45
50
  export type DataOrSelfInitSegmentAtom = DataSegmentAtom | SelfInitSegmentAtom;
46
51
  export type SegmentAtom = InitSegmentAtom | DataSegmentAtom | SelfInitSegmentAtom;
47
52
  declare const setInitSegment: (data: DataSegment, initSegment: InitSegmentAtom) => boolean;
53
+ declare const setTrack: (segment: Segment, track: TrackAtom) => boolean;
48
54
  declare const BaseSegmentModifiers: {
49
55
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
50
56
  };
51
57
  export declare const createDataSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<DataSegment, 'url' | 'initSegment' | 'segmentTiming' | 'track'>) => StateAtom<DataSegment, {
52
58
  setInitSegment: (data: DataSegment, initSegment: InitSegmentAtom) => boolean;
59
+ setTrack: (segment: Segment, track: TrackAtom) => boolean;
53
60
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
54
61
  }>;
55
62
  export declare const createInitSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<InitSegment, 'url' | 'track'>) => StateAtom<InitSegment, {
63
+ setTrack: (segment: Segment, track: TrackAtom) => boolean;
56
64
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
57
65
  }>;
58
66
  export declare const createSelfInitSegmentAtom: (context: StreamDataStructureContext, initialData: PartialRequired<SelfInitializingSegment, 'url' | 'segmentTiming' | 'track'>) => StateAtom<SelfInitializingSegment, {
67
+ setTrack: (segment: Segment, track: TrackAtom) => boolean;
59
68
  setSelectionGroup: (segment: Segment, selectionGroup: SelectionGroupAtom) => boolean;
60
69
  }>;
61
70
  export declare function getReadableSegmentName(segment: SegmentAtom, pathLength?: number): string;
@@ -1,12 +1,6 @@
1
- import type { MediaType } from '../../core/Constants';
1
+ import type { ContainerFormat, MediaType } from '../../core/Constants';
2
2
  import type { DataStreamAtom } from '../../core/state/data-stream/DataStreamAtom';
3
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
4
  export interface Fragment {
11
5
  data: Uint8Array;
12
6
  }
@@ -1,17 +1,18 @@
1
1
  import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
2
2
  import type { EmptyObject } from '../../../Types';
3
+ import type { Constants, ContainerFormat } from '../../core/Constants';
3
4
  import { CoreExportNames } from '../../core/Types';
4
5
  import type { CoreUtils } from '../../core/utils/Types';
5
6
  import type { ContextWithState } from '../../Types';
6
7
  import type { DataOrSelfInitSegmentAtom, SegmentAtom } from './SegmentAtom';
7
- import { ContainerFormat } from './SegmentDataAtom';
8
8
  type ExtendedContext = ContextHaving<{
9
9
  [CoreExportNames.Utils]: CoreUtils;
10
+ [CoreExportNames.Constants]: Constants;
10
11
  }, EmptyObject, ContextWithState>;
11
12
  declare function areSegmentsOverlapping(segments: DataOrSelfInitSegmentAtom[]): boolean;
12
13
  declare function resetData(segment: SegmentAtom, { effects: { state, logger } }: ContextWithState): void;
13
14
  declare function resolveContainerFormatFromUrl(context: ExtendedContext, url: string): ContainerFormat | undefined;
14
- declare function resolveContainerFormatFromExtension(extension: string): ContainerFormat | undefined;
15
+ declare function resolveContainerFormatFromExtension(context: ExtendedContext, extension: string): ContainerFormat | undefined;
15
16
  export declare const SegmentUtils: {
16
17
  areSegmentsOverlapping: typeof areSegmentsOverlapping;
17
18
  resetData: typeof resetData;
@@ -1,6 +1,6 @@
1
1
  import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
2
2
  import type { EmptyObject, PartialRequired } from '../../../Types';
3
- import type { Constants } from '../../core/Constants';
3
+ import type { Constants, ContainerFormat } from '../../core/Constants';
4
4
  import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
5
5
  import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
6
6
  import type { StateAtom } from '../../core/state/Types';
@@ -8,7 +8,6 @@ import type { CoreStateAtoms } from '../../core/Types';
8
8
  import { CoreExportNames } from '../../core/Types';
9
9
  import type { CoreUtils } from '../../core/utils/Types';
10
10
  import type { ContextWithState } from '../../Types';
11
- import type { ContainerFormat } from '../segment/SegmentDataAtom';
12
11
  import type { AudioTrackAtom, MediaTrackAtom, SubtitleTrackAtom, TimeRange, TrackAtom, VideoTrackAtom } from '../track/TrackAtom';
13
12
  type ExtendedContext = ContextHaving<{
14
13
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
@@ -1,5 +1,6 @@
1
1
  import type { createAudioTrackAtom, createMuxedTrackAtom, createSubtitleTrackAtom, createUnknownTrackAtom, createVideoTrackAtom } from './TrackAtom';
2
- import type { isAudioTrack, isMediaOrSubtitleTrack, isMediaTrack, isMuxedTrack, isSubtitleTrack, isVideoTrack } from './TrackTypeGuards';
2
+ import type { isAudioTrack, isMediaOrSubtitleTrack, isMediaTrack, isMuxedTrack, isSubtitleTrack, isUnknownTrack, isVideoTrack } from './TrackTypeGuards';
3
+ import type { isAudioTypeDetection, isMuxedTypeDetection, isVideoTypeDetection } from './TypeDetectionTypeGuards';
3
4
  export declare const StreamDataStructureTracks = "stream-data-structure-tracks";
4
5
  export type StreamDataStructureTracks = {
5
6
  [StreamDataStructureTracks]: {
@@ -8,11 +9,15 @@ export type StreamDataStructureTracks = {
8
9
  createMuxedTrackAtom: typeof createMuxedTrackAtom;
9
10
  createSubtitleTrackAtom: typeof createSubtitleTrackAtom;
10
11
  createUnknownTrackAtom: typeof createUnknownTrackAtom;
12
+ isUnknownTrack: typeof isUnknownTrack;
11
13
  isAudioTrack: typeof isAudioTrack;
12
14
  isMediaTrack: typeof isMediaTrack;
13
15
  isSubtitleTrack: typeof isSubtitleTrack;
14
16
  isVideoTrack: typeof isVideoTrack;
15
17
  isMuxedTrack: typeof isMuxedTrack;
16
18
  isMediaOrSubtitleTrack: typeof isMediaOrSubtitleTrack;
19
+ isAudioTypeDetection: typeof isAudioTypeDetection;
20
+ isVideoTypeDetection: typeof isVideoTypeDetection;
21
+ isMuxedTypeDetection: typeof isMuxedTypeDetection;
17
22
  };
18
23
  };
@@ -1,12 +1,25 @@
1
+ import type { EmptyObject } from '../../../../framework-types/BaseTypes';
2
+ import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
1
3
  import type { PartialRequired } from '../../../Types';
2
- import type { MediaType, SubtitleFormatType } from '../../core/Constants';
4
+ import type { Constants, MediaType, SubtitleFormatType } from '../../core/Constants';
3
5
  import type { ArrayAtom } from '../../core/state/ArrayStateAtom';
4
6
  import type { CodecMapAtom } from '../../core/state/codec-map/CodecMapAtom';
5
7
  import type { PrimitiveAtom } from '../../core/state/PrimitiveAtom';
6
8
  import type { StateAtom } from '../../core/state/Types';
9
+ import type { CoreStateAtoms } from '../../core/Types';
10
+ import { CoreExportNames } from '../../core/Types';
11
+ import type { Transient } from '../../core/utils/StateUtils';
12
+ import type { CoreUtils } from '../../core/utils/Types';
13
+ import type { ContextWithState } from '../../Types';
7
14
  import type { DataOrSelfInitSegmentAtom } from '../segment/SegmentAtom';
8
15
  import type { SelectionGroupAtom } from '../selection-group/SelectionGroupAtom';
9
16
  import type { StreamDataStructureContext } from '../Types';
17
+ import type { TypeDetection } from './TypeDetection';
18
+ type ExtendedContext = ContextHaving<{
19
+ [CoreExportNames.Utils]: CoreUtils;
20
+ [CoreExportNames.Constants]: Constants;
21
+ [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
22
+ }, EmptyObject, ContextWithState>;
10
23
  export interface TimeRange {
11
24
  start: number;
12
25
  end: number;
@@ -49,9 +62,11 @@ type SubtitleTrack = LanguageTrack & {
49
62
  external: boolean;
50
63
  fragmented: boolean;
51
64
  };
52
- type UnknownTrack = {
65
+ type UnknownTrack = BaseTrack & {
53
66
  type: MediaType.Unknown;
54
- } & BaseTrack;
67
+ uri?: string;
68
+ typeDetected: Transient<TypeDetection>;
69
+ };
55
70
  type Track = AudioTrack | VideoTrack | MuxedTrack | SubtitleTrack | UnknownTrack;
56
71
  export type AudioTrackAtom = StateAtom<AudioTrack, ReturnType<typeof getAudioTrackModifiers>>;
57
72
  export type VideoTrackAtom = StateAtom<VideoTrack, ReturnType<typeof getMediaTrackModifiers>>;
@@ -84,5 +99,5 @@ export declare const createAudioTrackAtom: (context: StreamDataStructureContext,
84
99
  export declare const createVideoTrackAtom: (context: StreamDataStructureContext, initialValue: PartialRequired<Omit<VideoTrack, 'timeRange'>, RequiredBaseTrackKeys | 'resolution' | 'bitrate' | 'codecs' | 'uri'>) => VideoTrackAtom;
85
100
  export declare const createMuxedTrackAtom: (context: StreamDataStructureContext, initialValue: PartialRequired<Omit<MuxedTrack, 'timeRange'>, RequiredBaseTrackKeys | 'language' | 'resolution' | 'bitrate' | 'codecs' | 'uri'>) => MuxedTrackAtom;
86
101
  export declare const createSubtitleTrackAtom: (context: StreamDataStructureContext, initialValue: PartialRequired<Omit<SubtitleTrack, 'timeRange' | 'formatType'>, RequiredBaseTrackKeys | 'language'>) => SubtitleTrackAtom;
87
- export declare const createUnknownTrackAtom: (context: StreamDataStructureContext, initialValue: PartialRequired<Omit<UnknownTrack, 'timeRange'>, RequiredBaseTrackKeys>) => UnknownTrackAtom;
102
+ export declare const createUnknownTrackAtom: (context: ExtendedContext, initialValue: PartialRequired<Omit<UnknownTrack, 'timeRange' | 'typeDetected'>, RequiredBaseTrackKeys>) => UnknownTrackAtom;
88
103
  export {};
@@ -1,4 +1,6 @@
1
- import type { AudioTrackAtom, MediaTrackAtom, SubtitleTrackAtom, TrackAtom, VideoTrackAtom } from './TrackAtom';
1
+ import type { AudioTrackAtom, MediaTrackAtom, SubtitleTrackAtom, TrackAtom, UnknownTrackAtom, VideoTrackAtom } from './TrackAtom';
2
+ export declare function isUnknownTrack(track: TrackAtom): track is UnknownTrackAtom;
3
+ export declare function isUnknownTrack(track: TrackAtom, index: number, array: TrackAtom[]): track is UnknownTrackAtom;
2
4
  export declare function isAudioTrack(track: TrackAtom): track is AudioTrackAtom;
3
5
  export declare function isAudioTrack(track: TrackAtom, index: number, array: TrackAtom[]): track is AudioTrackAtom;
4
6
  export declare function isMediaTrack(track: TrackAtom): track is MediaTrackAtom;
@@ -0,0 +1,25 @@
1
+ import type { MediaType } from '../../core/Constants';
2
+ type BaseTypeDetection = {
3
+ detectedType: MediaType;
4
+ };
5
+ export type AudioTypeDetection = BaseTypeDetection & {
6
+ detectedType: MediaType.Audio;
7
+ codecs: string[];
8
+ language?: string;
9
+ };
10
+ export type VideoTypeDetection = BaseTypeDetection & {
11
+ detectedType: MediaType.Video;
12
+ codecs: string[];
13
+ width?: number;
14
+ height?: number;
15
+ };
16
+ export type MuxedTypeDetection = BaseTypeDetection & {
17
+ detectedType: MediaType.Muxed;
18
+ audioCodecs: string[];
19
+ videoCodecs: string[];
20
+ language?: string;
21
+ width?: number;
22
+ height?: number;
23
+ };
24
+ export type TypeDetection = AudioTypeDetection | VideoTypeDetection | MuxedTypeDetection;
25
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { AudioTypeDetection, MuxedTypeDetection, TypeDetection, VideoTypeDetection } from './TypeDetection';
2
+ export declare function isAudioTypeDetection(detection: TypeDetection): detection is AudioTypeDetection;
3
+ export declare function isVideoTypeDetection(detection: TypeDetection): detection is VideoTypeDetection;
4
+ export declare function isMuxedTypeDetection(detection: TypeDetection): detection is MuxedTypeDetection;
@@ -7,6 +7,6 @@
7
7
  * <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>
8
8
  */
9
9
  import type { EmptyObject } from '../../../framework-types/BaseTypes';
10
- import type { StreamingPackageExports } from './Types';
11
- export declare const StreamingPackage: import("../../../framework-types/package-api/Package").Package<EmptyObject, StreamingPackageExports, EmptyObject>;
10
+ import { CreateStreamingStateAtom } from './Types';
11
+ export declare const StreamingPackage: import("../../../framework-types/package-api/Package").Package<EmptyObject, CreateStreamingStateAtom, EmptyObject>;
12
12
  export default StreamingPackage;
@@ -5,7 +5,8 @@ export type StreamingState = {
5
5
  [StreamingState]: StreamingStateAtom;
6
6
  };
7
7
  export declare const CreateStreamingStateAtom = "create-streaming-state-atom";
8
- export type StreamingPackageDependencies = EmptyObject;
9
- export type StreamingPackageExports = {
8
+ export type CreateStreamingStateAtom = {
10
9
  [CreateStreamingStateAtom]: typeof createStreamingStateAtom;
11
10
  };
11
+ export type StreamingPackageDependencies = EmptyObject;
12
+ export type StreamingPackageExports = CreateStreamingStateAtom;
@@ -0,0 +1,9 @@
1
+ export declare enum SubtitleEvent {
2
+ TrackAvailable = "subtitle-track-available",
3
+ TrackUnavailable = "subtitle-track-unavailable",
4
+ TrackActivated = "subtitle-track-activated",
5
+ TrackDeactivated = "subtitle-track-deactivated",
6
+ CueParsed = "subtitle-cue-parsed",
7
+ CueEnter = "subtitle-cue-enter",
8
+ CueExit = "subtitle-cue-exit"
9
+ }
@@ -18,6 +18,8 @@ import type { ContextWithState } from '../../Types';
18
18
  import type { SubtitleCueAtom } from '../subtitle-base/SubtitleCueAtom';
19
19
  import type { SubtitleCueMapAtom } from '../subtitle-base/SubtitleCueMapAtom';
20
20
  import type { SubtitleBaseExportNames } from '../subtitle-base/Types';
21
+ import type { SubtitleEvent } from './SubtitleEvent';
22
+ export type { SubtitleEvent } from './SubtitleEvent';
21
23
  export type SubtitleApiDependencies = {
22
24
  [CoreExportNames.CoreEffects]: CoreEffects;
23
25
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
@@ -66,16 +68,8 @@ export type SubtitleApi = {
66
68
  };
67
69
  export type SubtitleSourceApi = {
68
70
  subtitles: SubtitleApi;
71
+ events: EventBus<SubtitleEventMap>;
69
72
  };
70
- export declare enum SubtitleEvent {
71
- TrackAvailable = "subtitle-track-available",
72
- TrackUnavailable = "subtitle-track-unavailable",
73
- TrackActivated = "subtitle-track-activated",
74
- TrackDeactivated = "subtitle-track-deactivated",
75
- CueParsed = "subtitle-cue-parsed",
76
- CueEnter = "subtitle-cue-enter",
77
- CueExit = "subtitle-cue-exit"
78
- }
79
73
  export interface TrackEvent extends EventBase {
80
74
  track: SubtitleTrack;
81
75
  }
@@ -13,12 +13,13 @@ import type { EmptyObject } from '../../Types';
13
13
  import type { CoreExports } from '../core/Types';
14
14
  import type { SourceStateAtom } from '../source/atoms/SourceStateAtom';
15
15
  import { SourceExportNames } from '../source/Types';
16
+ import { StreamDataStructureStream } from '../stream-data-structure/stream/Exports';
16
17
  import { StreamDataStructureTracks } from '../stream-data-structure/track/Exports';
17
18
  import type { TimeRange } from '../stream-data-structure/track/TrackAtom';
18
19
  import { StreamingState } from '../streaming/Types';
19
20
  type Dependencies = {
20
21
  [SourceExportNames.SourceState]: SourceStateAtom;
21
- } & CoreExports & StreamDataStructureTracks & StreamingState;
22
+ } & CoreExports & StreamDataStructureTracks & StreamDataStructureStream & StreamingState;
22
23
  export type TrickPlayApi = {
23
24
  play(): void;
24
25
  pause(): void;
@@ -8,13 +8,13 @@
8
8
  * <svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -8 288.078125 49" style="max-width: 288.078px; 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-BitmovinUi LE-BitmovinV8Core" id="L-BitmovinUi-BitmovinV8Core-0" d="M91.469,16.5L95.635,16.5C99.802,16.5,108.135,16.5,115.585,16.5C123.035,16.5,129.602,16.5,132.885,16.5L136.169,16.5"/></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><g class="nodes"><g transform="translate(45.734375, 16.5)" data-id="BitmovinUi" data-node="true" id="flowchart-BitmovinUi-0" class="node default default flowchart-label"><rect height="33" width="91.46875" y="-16.5" x="-45.734375" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-38.234375, -9)" style="" class="label"><rect/><foreignObject height="18" width="76.46875"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">BitmovinUi</span></div></foreignObject></g></g><g transform="translate(206.7734375, 16.5)" data-id="BitmovinV8Core" data-node="true" id="flowchart-BitmovinV8Core-1" class="node default default flowchart-label"><rect height="33" width="130.609375" y="-16.5" x="-65.3046875" ry="0" rx="0" style="" class="basic label-container"/><g transform="translate(-57.8046875, -9)" style="" class="label"><rect/><foreignObject height="18" width="115.609375"><div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel">BitmovinV8Core</span></div></foreignObject></g></g></g></g></g></svg>
9
9
  */
10
10
  import type { EmptyObject } from '../../Types';
11
- import { AdditionalPlayerExports } from './enums/PlayerExports';
11
+ import { AdditionalPlayerExportNames } from './enums/AdditionalPlayerExportNames';
12
12
  import type { EventListenerAtom } from './event-handling/EventListenerAtom';
13
13
  import type { BitmovinV8PlayerApi, PlayerConfig } from './types/Types';
14
14
  type Dependencies = {
15
- [AdditionalPlayerExports.UserConfig]: PlayerConfig;
16
- [AdditionalPlayerExports.PlayerApi]: BitmovinV8PlayerApi;
17
- [AdditionalPlayerExports.EventListenerAtom]: EventListenerAtom;
15
+ [AdditionalPlayerExportNames.UserConfig]: PlayerConfig;
16
+ [AdditionalPlayerExportNames.PlayerApi]: BitmovinV8PlayerApi;
17
+ [AdditionalPlayerExportNames.EventListenerAtom]: EventListenerAtom;
18
18
  };
19
19
  export declare const BitmovinPlayerUiPackage: import("../../../framework-types/package-api/Package").Package<Dependencies, EmptyObject, BitmovinV8PlayerApi>;
20
20
  export default BitmovinPlayerUiPackage;
@@ -9,13 +9,25 @@
9
9
  * <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>
10
10
  */
11
11
  import type { EmptyObject } from '../../Types';
12
- import { AdditionalPlayerExports } from './enums/PlayerExports';
12
+ import { addActiveSourceApiMethods, addInactiveSourceApiMethods } from './apis/SourceApis';
13
+ import { addActiveSubtitleApi } from './apis/SubtitleApi';
14
+ import { AdditionalPlayerExportNames } from './enums/AdditionalPlayerExportNames';
15
+ import { PlayerEvent } from './enums/PlayerExports';
16
+ import { dispatchEvent } from './event-handling/EventDispatcher';
13
17
  import type { PlayerConfig } from './types/PlayerConfig';
14
18
  import type { BitmovinV8PlayerApi } from './types/Types';
19
+ export type V8CompatUtils = {
20
+ addActiveSourceApiMethods: typeof addActiveSourceApiMethods;
21
+ addInactiveSourceApiMethods: typeof addInactiveSourceApiMethods;
22
+ addActiveSubtitleApi: typeof addActiveSubtitleApi;
23
+ dispatchEvent: typeof dispatchEvent;
24
+ };
15
25
  type Exports = {
16
- [AdditionalPlayerExports.UserConfig]: PlayerConfig;
17
- [AdditionalPlayerExports.Container]: HTMLElement;
18
- [AdditionalPlayerExports.PlayerApi]: BitmovinV8PlayerApi;
26
+ [AdditionalPlayerExportNames.UserConfig]: PlayerConfig;
27
+ [AdditionalPlayerExportNames.Container]: HTMLElement;
28
+ [AdditionalPlayerExportNames.PlayerApi]: BitmovinV8PlayerApi;
29
+ [AdditionalPlayerExportNames.V8CompatUtils]: V8CompatUtils;
30
+ [AdditionalPlayerExportNames.PlayerEvent]: typeof PlayerEvent;
19
31
  };
20
32
  export declare const createBitmovinV8PlayerCorePackage: (container: HTMLElement, userConfig: PlayerConfig, playerApi: BitmovinV8PlayerApi) => import("../../../framework-types/package-api/Package").Package<EmptyObject, Exports, BitmovinV8PlayerApi>;
21
33
  export {};
@@ -19,13 +19,15 @@ import type { StateEffect } from '../core/state/state-effect/StateEffectFactory'
19
19
  import type { CoreEffects, CoreStateAtoms } from '../core/Types';
20
20
  import { CoreExportNames } from '../core/Types';
21
21
  import type { CoreUtils } from '../core/utils/Types';
22
+ import type { createEventBus } from '../event-bus/EventBus';
22
23
  import type { EventBus } from '../event-bus/Types';
24
+ import { EventBusExportNames } from '../event-bus/Types';
23
25
  import type { createSourceStateAtom, SourceStateAtom } from '../source/atoms/SourceStateAtom';
24
26
  import { SourceExportNames } from '../source/Types';
25
27
  import type { SourcesApiExportNames } from '../sources-api/Types';
26
28
  import type { StreamDataStructurePackageExports } from '../stream-data-structure/Types';
27
29
  import type { StreamingPackageExports, StreamingState } from '../streaming/Types';
28
- import { AdditionalPlayerExports } from './enums/PlayerExports';
30
+ import { AdditionalPlayerExportNames } from './enums/AdditionalPlayerExportNames';
29
31
  import type { EventListenerAtom } from './event-handling/EventListenerAtom';
30
32
  import type { PlayerConfig } from './types/PlayerConfig';
31
33
  import type { BitmovinV8PlayerApi } from './types/Types';
@@ -35,12 +37,13 @@ type PlayerApiCompatDependencies = {
35
37
  [CoreExportNames.CoreStateAtoms]: CoreStateAtoms;
36
38
  [CoreExportNames.Constants]: Constants;
37
39
  [SourceExportNames.CreateSourceStateAtom]: typeof createSourceStateAtom;
38
- [AdditionalPlayerExports.Container]: HTMLElement;
39
- [AdditionalPlayerExports.VideoElement]: HTMLVideoElement;
40
- [AdditionalPlayerExports.UserConfig]: PlayerConfig;
40
+ [AdditionalPlayerExportNames.Container]: HTMLElement;
41
+ [AdditionalPlayerExportNames.VideoElement]: HTMLVideoElement;
42
+ [AdditionalPlayerExportNames.UserConfig]: PlayerConfig;
43
+ [EventBusExportNames.CreateEventBus]: typeof createEventBus;
41
44
  } & StreamDataStructurePackageExports & StreamingPackageExports;
42
45
  type PlayerApiCompatExports = {
43
- [AdditionalPlayerExports.EventListenerAtom]: EventListenerAtom;
46
+ [AdditionalPlayerExportNames.EventListenerAtom]: EventListenerAtom;
44
47
  [SourceExportNames.SourceState]: SourceStateAtom;
45
48
  [SourcesApiExportNames.SourceApiManager]: ApiManager<EmptyObject>;
46
49
  [SourcesApiExportNames.SourceEventBus]: EventBus<EmptyObject>;
@@ -0,0 +1,5 @@
1
+ import type { ApiManager } from '../../../../framework-types/api-manager/ApiManager';
2
+ import type { SourceApiCompatContext } from '../source-api/BitmovinSourceApi.package';
3
+ import type { BitmovinV8PlayerApi } from '../types/Types';
4
+ export declare function addActiveSourceApiMethods(apiManager: ApiManager<BitmovinV8PlayerApi>, context: SourceApiCompatContext): void;
5
+ export declare function addInactiveSourceApiMethods(apiManager: ApiManager<BitmovinV8PlayerApi>): void;