@bitmovin/player-web-x 10.0.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.
- package/COMPAT.md +201 -0
- package/README.md +196 -0
- package/bundles/playerx-bitmovin-v8-core.d.ts +1 -0
- package/bundles/playerx-bitmovin-v8-core.js +10 -0
- package/bundles/playerx-bitmovin-v8.d.ts +1 -0
- package/bundles/playerx-bitmovin-v8.js +10 -0
- package/bundles/playerx-core.d.ts +1 -0
- package/bundles/playerx-core.js +10 -0
- package/bundles/playerx-dash.d.ts +1 -0
- package/bundles/playerx-dash.js +10 -0
- package/bundles/playerx-hls.d.ts +1 -0
- package/bundles/playerx-hls.js +10 -0
- package/bundles/playerx-playlist.d.ts +1 -0
- package/bundles/playerx-playlist.js +10 -0
- package/bundles/playerx-tv.d.ts +1 -0
- package/bundles/playerx-tv.js +10 -0
- package/framework-types/BaseTypes.d.ts +15 -0
- package/framework-types/Types.d.ts +11 -0
- package/framework-types/abortable/Abortable.d.ts +29 -0
- package/framework-types/abortable/Types.d.ts +10 -0
- package/framework-types/api-manager/ApiManager.d.ts +10 -0
- package/framework-types/api-manager/Errors.d.ts +5 -0
- package/framework-types/data-structures/MapWithDefault.d.ts +3 -0
- package/framework-types/data-structures/Types.d.ts +3 -0
- package/framework-types/effect/EffectFactory.d.ts +4 -0
- package/framework-types/effect/Types.d.ts +7 -0
- package/framework-types/effects/AbortableEffect.d.ts +4 -0
- package/framework-types/effects/LoopEffect.d.ts +3 -0
- package/framework-types/effects/TimeoutEffect.d.ts +4 -0
- package/framework-types/error/FrameworkDisposedError.d.ts +5 -0
- package/framework-types/error/FrameworkError.d.ts +4 -0
- package/framework-types/event-bus/EventBus.d.ts +11 -0
- package/framework-types/execution-context/ExecutionContext.d.ts +25 -0
- package/framework-types/execution-context/Types.d.ts +11 -0
- package/framework-types/framework.d.ts +7 -0
- package/framework-types/index.d.ts +1 -0
- package/framework-types/package-api/Package.d.ts +10 -0
- package/framework-types/package-api/PackageApi.d.ts +11 -0
- package/framework-types/package-api/PackageApiUtils.d.ts +7 -0
- package/framework-types/polyfills/AbortController.d.ts +1 -0
- package/framework-types/polyfills/FlatMap.d.ts +1 -0
- package/framework-types/polyfills/Polyfills.d.ts +1 -0
- package/framework-types/registry/Registry.d.ts +44 -0
- package/framework-types/registry/RegistryInterface.d.ts +9 -0
- package/framework-types/task/Task.d.ts +4 -0
- package/framework-types/task/TaskUtils.d.ts +3 -0
- package/framework-types/task/Types.d.ts +13 -0
- package/framework-types/thread/Thread.d.ts +45 -0
- package/framework-types/thread/ThreadEventBus.d.ts +22 -0
- package/framework-types/utils/Deferred.d.ts +8 -0
- package/framework-types/utils/StringUtils.d.ts +1 -0
- package/framework-types/utils/debug/thread/ThreadDecorator.d.ts +2 -0
- package/package.json +31 -0
- package/packages/playerx-adaptation.package.d.ts +1 -0
- package/packages/playerx-adaptation.package.js +10 -0
- package/packages/playerx-bitmovin-source-api.package.d.ts +1 -0
- package/packages/playerx-bitmovin-source-api.package.js +10 -0
- package/packages/playerx-bitmovin-ui.package.d.ts +1 -0
- package/packages/playerx-bitmovin-ui.package.js +10 -0
- package/packages/playerx-bitmovin-v8-core.package.d.ts +1 -0
- package/packages/playerx-bitmovin-v8-core.package.js +10 -0
- package/packages/playerx-bitmovin-v8-static-api.package.d.ts +1 -0
- package/packages/playerx-bitmovin-v8-static-api.package.js +10 -0
- package/packages/playerx-bitmovin-video-element-utils.package.d.ts +1 -0
- package/packages/playerx-bitmovin-video-element-utils.package.js +10 -0
- package/packages/playerx-capabilities.package.d.ts +1 -0
- package/packages/playerx-capabilities.package.js +10 -0
- package/packages/playerx-container-mp4.package.d.ts +1 -0
- package/packages/playerx-container-mp4.package.js +10 -0
- package/packages/playerx-container-ts.package.d.ts +1 -0
- package/packages/playerx-container-ts.package.js +10 -0
- package/packages/playerx-core.package.d.ts +1 -0
- package/packages/playerx-core.package.js +10 -0
- package/packages/playerx-dash-parsing.package.d.ts +1 -0
- package/packages/playerx-dash-parsing.package.js +10 -0
- package/packages/playerx-dash-translation.package.d.ts +1 -0
- package/packages/playerx-dash-translation.package.js +10 -0
- package/packages/playerx-dash.package.d.ts +1 -0
- package/packages/playerx-dash.package.js +10 -0
- package/packages/playerx-data.package.d.ts +1 -0
- package/packages/playerx-data.package.js +10 -0
- package/packages/playerx-hls-parsing.package.d.ts +1 -0
- package/packages/playerx-hls-parsing.package.js +10 -0
- package/packages/playerx-hls-translation.package.d.ts +1 -0
- package/packages/playerx-hls-translation.package.js +10 -0
- package/packages/playerx-hls.package.d.ts +1 -0
- package/packages/playerx-hls.package.js +10 -0
- package/packages/playerx-network.package.d.ts +1 -0
- package/packages/playerx-network.package.js +10 -0
- package/packages/playerx-playback-state.package.d.ts +1 -0
- package/packages/playerx-playback-state.package.js +10 -0
- package/packages/playerx-playlist.package.d.ts +1 -0
- package/packages/playerx-playlist.package.js +10 -0
- package/packages/playerx-presentation.package.d.ts +1 -0
- package/packages/playerx-presentation.package.js +10 -0
- package/packages/playerx-resize-tracker.package.d.ts +1 -0
- package/packages/playerx-resize-tracker.package.js +10 -0
- package/packages/playerx-segment-processing.package.d.ts +1 -0
- package/packages/playerx-segment-processing.package.js +10 -0
- package/packages/playerx-source-api.package.d.ts +1 -0
- package/packages/playerx-source-api.package.js +10 -0
- package/packages/playerx-source.package.d.ts +1 -0
- package/packages/playerx-source.package.js +10 -0
- package/packages/playerx-sources-api.package.d.ts +1 -0
- package/packages/playerx-sources-api.package.js +10 -0
- package/packages/playerx-trick-play.package.d.ts +1 -0
- package/packages/playerx-trick-play.package.js +10 -0
- package/packages/playerx-ts-transmuxer.package.d.ts +1 -0
- package/packages/playerx-ts-transmuxer.package.js +10 -0
- package/packages/playerx-tv.package.d.ts +1 -0
- package/packages/playerx-tv.package.js +10 -0
- package/playerx-framework-utils.d.ts +1 -0
- package/playerx-framework-utils.js +10 -0
- package/types/BaseTypes.d.ts +19 -0
- package/types/bundles/BitmovinV8.bundle.d.ts +45 -0
- package/types/bundles/BitmovinV8Core.bundle.d.ts +27 -0
- package/types/bundles/Core.bundle.d.ts +18 -0
- package/types/bundles/Dash.bundle.d.ts +36 -0
- package/types/bundles/Hls.bundle.d.ts +38 -0
- package/types/bundles/Playlist.bundle.d.ts +16 -0
- package/types/bundles/Tv.bundle.d.ts +33 -0
- package/types/bundles/Types.d.ts +13 -0
- package/types/framework/FrameworkUtils.d.ts +3 -0
- package/types/framework/Types.d.ts +46 -0
- package/types/framework/core/Types.d.ts +8 -0
- package/types/framework/core/adaptation/Adaptation.package.d.ts +102 -0
- package/types/framework/core/adaptation/AdaptationStateAtom.d.ts +36 -0
- package/types/framework/core/adaptation/RingBufferAtom.d.ts +16 -0
- package/types/framework/core/adaptation/WishConfigAtom.d.ts +43 -0
- package/types/framework/core/adaptation/WishDataAtom.d.ts +14 -0
- package/types/framework/core/capabilities/Capabilities.package.d.ts +39 -0
- package/types/framework/core/capabilities/Types.d.ts +9 -0
- package/types/framework/core/container/container-mp4/ContainerMp4.package.d.ts +52 -0
- package/types/framework/core/container/container-ts/ContainerTs.package.d.ts +49 -0
- package/types/framework/core/container/ts-transmuxer/TsTransmuxer.package.d.ts +50 -0
- package/types/framework/core/core/Constants.d.ts +21 -0
- package/types/framework/core/core/Core.package.d.ts +144 -0
- package/types/framework/core/core/FrameworkError.d.ts +4 -0
- package/types/framework/core/core/effects/EventListenerEffectFactory.d.ts +28 -0
- package/types/framework/core/core/metrics/MetricsAtom.d.ts +19 -0
- package/types/framework/core/core/metrics/network/NetworkSampleAtom.d.ts +30 -0
- package/types/framework/core/core/network/NetworkAtom.d.ts +21 -0
- package/types/framework/core/core/state/ArrayStateAtom.d.ts +21 -0
- package/types/framework/core/core/state/MapStateAtom.d.ts +8 -0
- package/types/framework/core/core/state/PrimitiveAtom.d.ts +9 -0
- package/types/framework/core/core/state/StoreEffectFactory.d.ts +5 -0
- package/types/framework/core/core/state/Symbols.d.ts +2 -0
- package/types/framework/core/core/state/Types.d.ts +26 -0
- package/types/framework/core/core/state/codec-map/CodecMapAtom.d.ts +15 -0
- package/types/framework/core/core/state/data-ranges/DataRangesAtom.d.ts +30 -0
- package/types/framework/core/core/state/data-stream/DataStreamAtom.d.ts +27 -0
- package/types/framework/core/core/state/segment/SegmentAtom.d.ts +74 -0
- package/types/framework/core/core/state/segment/SegmentDataAtom.d.ts +32 -0
- package/types/framework/core/core/state/segment/SegmentTimingAtom.d.ts +20 -0
- package/types/framework/core/core/state/segment/SegmentTypeGuards.d.ts +4 -0
- package/types/framework/core/core/state/segment/SegmentUtils.d.ts +10 -0
- package/types/framework/core/core/state/selection-group/SelectionGroupAtom.d.ts +68 -0
- package/types/framework/core/core/state/selection-group/SelectionGroupTypeGuards.d.ts +4 -0
- package/types/framework/core/core/state/selection-group/SelectionGroupUtils.d.ts +7 -0
- package/types/framework/core/core/state/state-effect/StateEffectFactory.d.ts +26 -0
- package/types/framework/core/core/state/state-effect/Types.d.ts +8 -0
- package/types/framework/core/core/state/stream/StreamAtom.d.ts +64 -0
- package/types/framework/core/core/state/stream-timeline/StreamSectionAtom.d.ts +21 -0
- package/types/framework/core/core/state/stream-timeline/StreamSequenceMapAtom.d.ts +7 -0
- package/types/framework/core/core/state/stream-timeline/StreamTimelineMapAtom.d.ts +5 -0
- package/types/framework/core/core/state/track/TrackAtom.d.ts +81 -0
- package/types/framework/core/core/state/track/TrackTypeGuards.d.ts +5 -0
- package/types/framework/core/core/utils/ArrayHelper.d.ts +24 -0
- package/types/framework/core/core/utils/CodecStringHelper.d.ts +47 -0
- package/types/framework/core/core/utils/FormatError.d.ts +5 -0
- package/types/framework/core/core/utils/Logger.d.ts +40 -0
- package/types/framework/core/core/utils/RangesHelper.d.ts +20 -0
- package/types/framework/core/core/utils/StateUtils.d.ts +39 -0
- package/types/framework/core/core/utils/StringHelper.d.ts +13 -0
- package/types/framework/core/core/utils/TypedArrayHelper.d.ts +5 -0
- package/types/framework/core/core/utils/Types.d.ts +20 -0
- package/types/framework/core/core/utils/UrlHelper.d.ts +15 -0
- package/types/framework/core/data/Data.package.d.ts +124 -0
- package/types/framework/core/manifest/dash/parsing/DashParsing.package.d.ts +34 -0
- package/types/framework/core/manifest/dash/parsing/DashParsingTask.d.ts +2 -0
- package/types/framework/core/manifest/dash/parsing/Errors.d.ts +4 -0
- package/types/framework/core/manifest/dash/parsing/Types.d.ts +8 -0
- package/types/framework/core/manifest/dash/root/Dash.package.d.ts +119 -0
- package/types/framework/core/manifest/dash/root/ManifestLoadTask.d.ts +3 -0
- package/types/framework/core/manifest/dash/root/Types.d.ts +3 -0
- package/types/framework/core/manifest/dash/translation/DashTranslation.package.d.ts +48 -0
- package/types/framework/core/manifest/dash/translation/Types.d.ts +3 -0
- package/types/framework/core/manifest/dash/translation/manifests/DashPlaylistTranslatorTask.d.ts +3 -0
- package/types/framework/core/manifest/hls/parsing/Errors.d.ts +7 -0
- package/types/framework/core/manifest/hls/parsing/HlsParsing.package.d.ts +38 -0
- package/types/framework/core/manifest/hls/parsing/HlsParsingFunctions.d.ts +16 -0
- package/types/framework/core/manifest/hls/parsing/HlsParsingTask.d.ts +2 -0
- package/types/framework/core/manifest/hls/parsing/Types.d.ts +272 -0
- package/types/framework/core/manifest/hls/parsing/m3u8/AbstractStream.d.ts +9 -0
- package/types/framework/core/manifest/hls/parsing/m3u8/DefaultTagParsers.d.ts +6 -0
- package/types/framework/core/manifest/hls/parsing/m3u8/TranslatorStream.d.ts +59 -0
- package/types/framework/core/manifest/hls/root/Hls.package.d.ts +128 -0
- package/types/framework/core/manifest/hls/root/ManifestLoadTask.d.ts +3 -0
- package/types/framework/core/manifest/hls/root/Types.d.ts +3 -0
- package/types/framework/core/manifest/hls/translation/HlsTranslation.package.d.ts +51 -0
- package/types/framework/core/manifest/hls/translation/Types.d.ts +14 -0
- package/types/framework/core/manifest/hls/translation/manifests/HlsMultivariantPlaylistTranslatorTask.d.ts +4 -0
- package/types/framework/core/manifest/hls/translation/manifests/HlsVariantTranslationTask.d.ts +11 -0
- package/types/framework/core/network/FetchTask.d.ts +5 -0
- package/types/framework/core/network/Network.package.d.ts +79 -0
- package/types/framework/core/network/NetworkMessageTypes.d.ts +44 -0
- package/types/framework/core/network/NetworkTask.d.ts +12 -0
- package/types/framework/core/network/Types.d.ts +70 -0
- package/types/framework/core/presentation/Presentation.package.d.ts +122 -0
- package/types/framework/core/segment-processing/Errors.d.ts +8 -0
- package/types/framework/core/segment-processing/SegmentProcessing.package.d.ts +31 -0
- package/types/framework/core/segment-processing/SegmentProcessingComponent.d.ts +2 -0
- package/types/framework/core/segment-processing/Types.d.ts +95 -0
- package/types/framework/core/source/Source.package.d.ts +108 -0
- package/types/framework/core/source/SourceThread.d.ts +2 -0
- package/types/framework/core/source/atoms/BufferConfigAtom.d.ts +24 -0
- package/types/framework/core/source/atoms/MediaTypeMapAtom.d.ts +14 -0
- package/types/framework/core/source/atoms/PlaybackAtom.d.ts +17 -0
- package/types/framework/core/source/atoms/PlayheadAtom.d.ts +16 -0
- package/types/framework/core/source/atoms/SourceStateAtom.d.ts +47 -0
- package/types/framework/core/source/atoms/StartupOptionsAtom.d.ts +17 -0
- package/types/framework/core/source/atoms/VideoElementAtom.d.ts +12 -0
- package/types/framework/core/source-api/SourceApi.package.d.ts +56 -0
- package/types/framework/core/source-api/Types.d.ts +8 -0
- package/types/framework/core/sources-api/PlaybackApi.d.ts +9 -0
- package/types/framework/core/sources-api/SourcesApi.package.d.ts +67 -0
- package/types/framework/core/sources-api/Types.d.ts +17 -0
- package/types/framework/core/sources-api/VideoElementUtils.d.ts +8 -0
- package/types/framework/core/trick-play/TrickPlay.package.d.ts +71 -0
- package/types/framework/player/bitmovin-v8-compat/BitmovinUi.package.d.ts +27 -0
- package/types/framework/player/bitmovin-v8-compat/BitmovinV8Core.package.d.ts +28 -0
- package/types/framework/player/bitmovin-v8-compat/BitmovinV8StaticApi.package.d.ts +54 -0
- package/types/framework/player/bitmovin-v8-compat/apis/BufferApi.d.ts +4 -0
- package/types/framework/player/bitmovin-v8-compat/apis/DrmApi.d.ts +3 -0
- package/types/framework/player/bitmovin-v8-compat/apis/ManifestApi.d.ts +4 -0
- package/types/framework/player/bitmovin-v8-compat/apis/SubtitleApi.d.ts +9 -0
- package/types/framework/player/bitmovin-v8-compat/enums/PlayerExports.d.ts +384 -0
- package/types/framework/player/bitmovin-v8-compat/event-handling/EventListenerAtom.d.ts +16 -0
- package/types/framework/player/bitmovin-v8-compat/source-api/BitmovinSourceApi.package.d.ts +83 -0
- package/types/framework/player/bitmovin-v8-compat/types/AdvertisingConfig.d.ts +87 -0
- package/types/framework/player/bitmovin-v8-compat/types/DrmConfig.d.ts +90 -0
- package/types/framework/player/bitmovin-v8-compat/types/NetworkConfig.d.ts +58 -0
- package/types/framework/player/bitmovin-v8-compat/types/PlayerConfig.d.ts +419 -0
- package/types/framework/player/bitmovin-v8-compat/types/Types.d.ts +191 -0
- package/types/framework/player/bitmovin-v8-compat/video-element/BitmovinVideoElementUtils.package.d.ts +42 -0
- package/types/framework/player/playback-state/PlaybackState.package.d.ts +72 -0
- package/types/framework/player/playback-state/PlaybackStateAtom.d.ts +40 -0
- package/types/framework/player/playback-state/Types.d.ts +7 -0
- package/types/framework/player/playback-state/VideoElementStateAtom.d.ts +9 -0
- package/types/framework/player/playlist/Playlist.package.d.ts +63 -0
- package/types/framework/player/resize-tracker/ResizeObserverEffectFactory.d.ts +11 -0
- package/types/framework/player/resize-tracker/ResizeTracker.package.d.ts +73 -0
- package/types/framework/player/resize-tracker/ResizeTrackerStateAtom.d.ts +9 -0
- package/types/framework/player/resize-tracker/VideoElementStateAtom.d.ts +9 -0
- package/types/framework/player/tv/Tv.package.d.ts +59 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { PlayerConfig } from '../bundles/Types';
|
|
2
|
+
import type { Constants } from './core/core/Constants';
|
|
3
|
+
import type { CoreEffects, CoreStateAtoms } from './core/core/Core.package';
|
|
4
|
+
import type { MetricsAtom } from './core/core/metrics/MetricsAtom';
|
|
5
|
+
import type { createNetworkAtom } from './core/core/network/NetworkAtom';
|
|
6
|
+
import type { StreamTimelineAtom } from './core/core/state/stream-timeline/StreamTimelineMapAtom';
|
|
7
|
+
import type { Logger } from './core/core/utils/Logger';
|
|
8
|
+
import type { CoreUtils } from './core/core/utils/Types';
|
|
9
|
+
import type { FetchTask } from './core/network/FetchTask';
|
|
10
|
+
import type { NetworkTask } from './core/network/NetworkTask';
|
|
11
|
+
import type { SourceStateAtom } from './core/source/atoms/SourceStateAtom';
|
|
12
|
+
import type { SourceThread } from './core/source/SourceThread';
|
|
13
|
+
import type VideoElementUtils from './core/sources-api/VideoElementUtils';
|
|
14
|
+
export declare enum ComponentName {
|
|
15
|
+
Logger = "logger",
|
|
16
|
+
Constants = "constants",
|
|
17
|
+
NetworkTask = "network-task",
|
|
18
|
+
FetchTask = "fetch-task",
|
|
19
|
+
SourceState = "source-state",
|
|
20
|
+
StreamTimeline = "stream-timeline",
|
|
21
|
+
Utils = "utils",
|
|
22
|
+
CoreEffects = "core-effects",
|
|
23
|
+
CoreStateAtoms = "core-state-atoms",
|
|
24
|
+
NetworkAtom = "network-atom",
|
|
25
|
+
SourceThread = "source-thread",
|
|
26
|
+
VideoElementUtils = "video-element-utils",
|
|
27
|
+
Metrics = "metrics",
|
|
28
|
+
AdaptationTask = "adaptation-task",
|
|
29
|
+
PlayerConfig = "player-config"
|
|
30
|
+
}
|
|
31
|
+
export type ComponentMap = {
|
|
32
|
+
[ComponentName.Logger]: Logger;
|
|
33
|
+
[ComponentName.Constants]: Constants;
|
|
34
|
+
[ComponentName.FetchTask]: typeof FetchTask;
|
|
35
|
+
[ComponentName.NetworkTask]: typeof NetworkTask;
|
|
36
|
+
[ComponentName.StreamTimeline]: StreamTimelineAtom;
|
|
37
|
+
[ComponentName.SourceState]: SourceStateAtom;
|
|
38
|
+
[ComponentName.Utils]: CoreUtils;
|
|
39
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
40
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
41
|
+
[ComponentName.NetworkAtom]: typeof createNetworkAtom;
|
|
42
|
+
[ComponentName.SourceThread]: typeof SourceThread;
|
|
43
|
+
[ComponentName.VideoElementUtils]: typeof VideoElementUtils;
|
|
44
|
+
[ComponentName.Metrics]: MetricsAtom;
|
|
45
|
+
[ComponentName.PlayerConfig]: PlayerConfig;
|
|
46
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContextUsing } from '../../../framework-types/execution-context/Types';
|
|
2
|
+
import type { BaseContext } from '../../../framework-types/Types';
|
|
3
|
+
import type { EventListenerEffectFactory } from './core/effects/EventListenerEffectFactory';
|
|
4
|
+
import type { StateEffectFactory } from './core/state/state-effect/StateEffectFactory';
|
|
5
|
+
export type ContextWithState = ContextUsing<[
|
|
6
|
+
typeof StateEffectFactory,
|
|
7
|
+
typeof EventListenerEffectFactory
|
|
8
|
+
], BaseContext>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation Adaptation.package
|
|
3
|
+
*
|
|
4
|
+
* Adaptation package provides adaptive streaming solution. Currently, it is integrated with
|
|
5
|
+
* WISH ABR algorithm, but any other ABR algorithm can be added and selected via
|
|
6
|
+
* `AdaptationStateAtom`.
|
|
7
|
+
*
|
|
8
|
+
* ## WISH config
|
|
9
|
+
*
|
|
10
|
+
* The `WishConfigAtom` holds the WISH algorithm configuration to tweak desired adaptation
|
|
11
|
+
* logic and comprises of the following properties.
|
|
12
|
+
*
|
|
13
|
+
* *qualityFunction*
|
|
14
|
+
* Scaling function used to map tracks
|
|
15
|
+
*
|
|
16
|
+
* *xi*
|
|
17
|
+
* How full the buffer needs to be in order to consider switching to a higher quality (0 < xi <= 1)
|
|
18
|
+
*
|
|
19
|
+
* *delta*
|
|
20
|
+
* How much the throughput should be, compared to the selected bitrate (delta > 0)
|
|
21
|
+
*
|
|
22
|
+
* ## API
|
|
23
|
+
* The way the adaptation logic currently works is by providing `select` function that takes
|
|
24
|
+
* `AdaptationPackageContext` and list of tracks Available tracks sorted ascending by bitrate.
|
|
25
|
+
* When called it is expected to return selected `MediaTrackAtom`.
|
|
26
|
+
*
|
|
27
|
+
* ### `Adaptation` Package Dependency Graph
|
|
28
|
+
* ```mermaid
|
|
29
|
+
* flowchart LR
|
|
30
|
+
* subgraph Adaptation
|
|
31
|
+
* AdaptationExportNames.ShouldCancel["ShouldCancel"]
|
|
32
|
+
* AdaptationExportNames.Select["Select"]
|
|
33
|
+
* ComponentName.Metrics["Metrics"]
|
|
34
|
+
* end
|
|
35
|
+
* subgraph Core
|
|
36
|
+
* ComponentName.Utils["Utils"]
|
|
37
|
+
* ComponentName.Constants["Constants"]
|
|
38
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
39
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
40
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
41
|
+
* end
|
|
42
|
+
* subgraph SourceApi
|
|
43
|
+
* ComponentName.SourceState#1["SourceState"]
|
|
44
|
+
* ComponentName.VideoElementUtils#1["VideoElementUtils"]
|
|
45
|
+
* end
|
|
46
|
+
* subgraph SourcesApi
|
|
47
|
+
* ComponentName.SourceState#2["SourceState"]
|
|
48
|
+
* ComponentName.VideoElementUtils#2["VideoElementUtils"]
|
|
49
|
+
* SourceApiExportNames.SourceList["SourceList"]
|
|
50
|
+
* end
|
|
51
|
+
* Adaptation --> ComponentName.Logger
|
|
52
|
+
* Adaptation --> ComponentName.CoreEffects
|
|
53
|
+
* Adaptation --> ComponentName.CoreStateAtoms
|
|
54
|
+
* Adaptation --> ComponentName.SourceState#1
|
|
55
|
+
* Adaptation --> ComponentName.SourceState#2
|
|
56
|
+
* SourceApi --> ComponentName.CoreEffects
|
|
57
|
+
* SourceApi --> ComponentName.CoreStateAtoms
|
|
58
|
+
* SourceApi --> ComponentName.Logger
|
|
59
|
+
* SourceApi --> ComponentName.Utils
|
|
60
|
+
* SourceApi --> ComponentName.Constants
|
|
61
|
+
* SourcesApi --> ComponentName.Utils
|
|
62
|
+
* SourcesApi --> ComponentName.CoreEffects
|
|
63
|
+
* SourcesApi --> ComponentName.CoreStateAtoms
|
|
64
|
+
* SourcesApi --> ComponentName.Logger
|
|
65
|
+
* SourcesApi --> ComponentName.Constants
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
import type { ContextHaving, ContextUsing } from '../../../../framework-types/execution-context/Types';
|
|
69
|
+
import type { MyApi } from '../../../bundles/Types';
|
|
70
|
+
import { ComponentName } from '../../Types';
|
|
71
|
+
import type { CoreEffects, CoreStateAtoms } from '../core/Core.package';
|
|
72
|
+
import { type MetricsAtom } from '../core/metrics/MetricsAtom';
|
|
73
|
+
import type { StoreEffectFactory } from '../core/state/StoreEffectFactory';
|
|
74
|
+
import type { MediaTrackAtom } from '../core/state/track/TrackAtom';
|
|
75
|
+
import type { Logger } from '../core/utils/Logger';
|
|
76
|
+
import type { SourceStateAtom } from '../source/atoms/SourceStateAtom';
|
|
77
|
+
import type { ContextWithState } from '../Types';
|
|
78
|
+
import { type AdaptationStateAtom } from './AdaptationStateAtom';
|
|
79
|
+
import type { WishConfigAtom } from './WishConfigAtom';
|
|
80
|
+
import type { WishDataAtom } from './WishDataAtom';
|
|
81
|
+
export declare enum AdaptationExportNames {
|
|
82
|
+
ShouldCancel = "should-cancel",
|
|
83
|
+
Select = "select"
|
|
84
|
+
}
|
|
85
|
+
export type AdaptationExports = {
|
|
86
|
+
[AdaptationExportNames.ShouldCancel]: () => boolean;
|
|
87
|
+
[AdaptationExportNames.Select]: (tracks: readonly MediaTrackAtom[]) => MediaTrackAtom;
|
|
88
|
+
[ComponentName.Metrics]: MetricsAtom;
|
|
89
|
+
};
|
|
90
|
+
type AdaptationDependencies = {
|
|
91
|
+
[ComponentName.Logger]: Logger;
|
|
92
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
93
|
+
[ComponentName.SourceState]: SourceStateAtom;
|
|
94
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
95
|
+
};
|
|
96
|
+
export type AdaptationPackageContext = ContextUsing<[
|
|
97
|
+
StoreEffectFactory<'adaptationData', WishDataAtom>,
|
|
98
|
+
StoreEffectFactory<'wishConfig', WishConfigAtom>,
|
|
99
|
+
StoreEffectFactory<'adaptationState', AdaptationStateAtom>
|
|
100
|
+
], ContextHaving<AdaptationDependencies, AdaptationExports, ContextWithState>>;
|
|
101
|
+
export declare const AdaptationPackage: import("../../../../framework-types/package-api/Package").Package<AdaptationDependencies, AdaptationExports, MyApi>;
|
|
102
|
+
export default AdaptationPackage;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
|
|
2
|
+
import type { EmptyObject } from '../../../BaseTypes';
|
|
3
|
+
import { ComponentName } from '../../Types';
|
|
4
|
+
import type { MediaType } from '../core/Constants';
|
|
5
|
+
import type { MediaTrackAtom } from '../core/state/track/TrackAtom';
|
|
6
|
+
import type { Logger } from '../core/utils/Logger';
|
|
7
|
+
import type { ContextWithState } from '../Types';
|
|
8
|
+
type AbrAlgorithm = 'wish' | 'default';
|
|
9
|
+
type AdaptationSuggestion = {
|
|
10
|
+
[key in MediaType]?: MediaTrackAtom;
|
|
11
|
+
};
|
|
12
|
+
export interface AdaptationState {
|
|
13
|
+
abr: AbrAlgorithm;
|
|
14
|
+
suggestion: AdaptationSuggestion;
|
|
15
|
+
}
|
|
16
|
+
export declare function getDefaultState(baseState?: Partial<AdaptationState>): {
|
|
17
|
+
abr: string;
|
|
18
|
+
suggestion: AdaptationSuggestion;
|
|
19
|
+
};
|
|
20
|
+
export type AdaptationStateAtom = ReturnType<typeof createAdaptationStateAtom>;
|
|
21
|
+
export declare function createAdaptationStateAtom(context: ContextHaving<{
|
|
22
|
+
[ComponentName.Logger]: Logger;
|
|
23
|
+
}, EmptyObject, ContextWithState>, baseState?: Partial<AdaptationState>): import("../core/state/Types").StateAtom<{
|
|
24
|
+
abr: string;
|
|
25
|
+
suggestion: AdaptationSuggestion;
|
|
26
|
+
}, {
|
|
27
|
+
setAbr: (_logger: {
|
|
28
|
+
abr: string;
|
|
29
|
+
suggestion: AdaptationSuggestion;
|
|
30
|
+
}, state: AdaptationState, abr: AbrAlgorithm) => boolean;
|
|
31
|
+
setSuggestion: (_logger: {
|
|
32
|
+
abr: string;
|
|
33
|
+
suggestion: AdaptationSuggestion;
|
|
34
|
+
}, state: AdaptationState, suggestion: AdaptationSuggestion) => boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ContextWithState } from '../Types';
|
|
2
|
+
export interface RingBuffer<T> {
|
|
3
|
+
buffer: T[];
|
|
4
|
+
capacity: number;
|
|
5
|
+
size: number;
|
|
6
|
+
head: number;
|
|
7
|
+
tail: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function getDefaultRingBuffer<T>(capacity?: number, input?: T[]): RingBuffer<T>;
|
|
10
|
+
export declare function getTail<T>(data: RingBufferAtom<T>): T | undefined;
|
|
11
|
+
export declare function getHead<T>(data: RingBufferAtom<T>): T | undefined;
|
|
12
|
+
export type RingBufferAtom<T> = ReturnType<typeof createRingBufferAtom<T>>;
|
|
13
|
+
export declare const createRingBufferAtom: <ElementType>(context: ContextWithState, capacity?: number, defaultData?: ElementType[] | undefined) => import("../core/state/Types").StateAtom<RingBuffer<ElementType>, {
|
|
14
|
+
add: (data: RingBuffer<ElementType>, element: ElementType) => boolean;
|
|
15
|
+
clear: (data: RingBuffer<ElementType>) => boolean;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ContextHaving } from '../../../../framework-types/execution-context/Types';
|
|
2
|
+
import type { EmptyObject } from '../../../BaseTypes';
|
|
3
|
+
import { ComponentName } from '../../Types';
|
|
4
|
+
import type { Logger } from '../core/utils/Logger';
|
|
5
|
+
import type { ContextWithState } from '../Types';
|
|
6
|
+
export declare enum QualityFunction {
|
|
7
|
+
Linear = "linear",
|
|
8
|
+
Logarithmic = "logarithmic"
|
|
9
|
+
}
|
|
10
|
+
export interface WishConfig {
|
|
11
|
+
xi: number;
|
|
12
|
+
delta: number;
|
|
13
|
+
qualityFunction: QualityFunction;
|
|
14
|
+
}
|
|
15
|
+
export declare function getDefaultConfig(baseConfig?: Partial<WishConfig>): {
|
|
16
|
+
xi: number;
|
|
17
|
+
delta: number;
|
|
18
|
+
qualityFunction: QualityFunction;
|
|
19
|
+
};
|
|
20
|
+
export type WishConfigAtom = ReturnType<typeof createWishConfigAtom>;
|
|
21
|
+
export declare function createWishConfigAtom(context: ContextHaving<{
|
|
22
|
+
[ComponentName.Logger]: Logger;
|
|
23
|
+
}, EmptyObject, ContextWithState>, baseConfig?: Partial<WishConfig>): import("../core/state/Types").StateAtom<{
|
|
24
|
+
xi: number;
|
|
25
|
+
delta: number;
|
|
26
|
+
qualityFunction: QualityFunction;
|
|
27
|
+
}, {
|
|
28
|
+
setXi: (config: {
|
|
29
|
+
xi: number;
|
|
30
|
+
delta: number;
|
|
31
|
+
qualityFunction: QualityFunction;
|
|
32
|
+
}, xi: number) => boolean;
|
|
33
|
+
setDelta: (config: {
|
|
34
|
+
xi: number;
|
|
35
|
+
delta: number;
|
|
36
|
+
qualityFunction: QualityFunction;
|
|
37
|
+
}, delta: number) => boolean;
|
|
38
|
+
setQualityFunction: (config: {
|
|
39
|
+
xi: number;
|
|
40
|
+
delta: number;
|
|
41
|
+
qualityFunction: QualityFunction;
|
|
42
|
+
}, qualityFunction: QualityFunction) => boolean;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ContextWithState } from '../Types';
|
|
2
|
+
import type { RingBufferAtom } from './RingBufferAtom';
|
|
3
|
+
interface WishData {
|
|
4
|
+
weights: [number, number, number];
|
|
5
|
+
selectedQualityHistory: RingBufferAtom<number>;
|
|
6
|
+
}
|
|
7
|
+
declare function setWeights(data: WishData, weights: WishData['weights']): boolean;
|
|
8
|
+
declare function updateHistory(data: WishData, selectedQuality: number): boolean;
|
|
9
|
+
export type WishDataAtom = ReturnType<typeof createWishDataAtom>;
|
|
10
|
+
export declare function createWishDataAtom(context: ContextWithState): import("../core/state/Types").StateAtom<WishData, {
|
|
11
|
+
setWeights: typeof setWeights;
|
|
12
|
+
updateHistory: typeof updateHistory;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation Capabilities.package
|
|
3
|
+
*
|
|
4
|
+
* The package provides set of functions that verify whether certain media related feature like
|
|
5
|
+
* codecs and containers are supported by current MSE platform integration.
|
|
6
|
+
*
|
|
7
|
+
* - *mediaSourceSupported* Verifies if the `MediaSource` is supported.
|
|
8
|
+
* - *isContainerSupported* Verifies if passed `ContainerFormat` is supported.
|
|
9
|
+
* - *typeSupported* Verifies if passed `MediaType` is supported.
|
|
10
|
+
*
|
|
11
|
+
* ### `Capabilities` Package Dependency Graph
|
|
12
|
+
* ```mermaid
|
|
13
|
+
* flowchart LR
|
|
14
|
+
* subgraph Capabilities
|
|
15
|
+
* CapabilitiesExportNames.PlatformCapabilities["PlatformCapabilities"]
|
|
16
|
+
* end
|
|
17
|
+
* subgraph Core
|
|
18
|
+
* ComponentName.Utils["Utils"]
|
|
19
|
+
* ComponentName.Constants["Constants"]
|
|
20
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
21
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
22
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
23
|
+
* end
|
|
24
|
+
* Capabilities --> ComponentName.Constants
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import type { MyApi } from '../../../bundles/Types';
|
|
28
|
+
import { ComponentName } from '../../Types';
|
|
29
|
+
import type { Constants } from '../core/Constants';
|
|
30
|
+
import type { PlatformCapabilities } from './Types';
|
|
31
|
+
import { CapabilitiesExportNames } from './Types';
|
|
32
|
+
type Exports = {
|
|
33
|
+
[CapabilitiesExportNames.PlatformCapabilities]: PlatformCapabilities;
|
|
34
|
+
};
|
|
35
|
+
type Dependencies = {
|
|
36
|
+
[ComponentName.Constants]: Constants;
|
|
37
|
+
};
|
|
38
|
+
export declare const CapabilitiesPackage: import("../../../../framework-types/package-api/Package").Package<Dependencies, Exports, MyApi>;
|
|
39
|
+
export default CapabilitiesPackage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ContainerFormat } from '../core/state/segment/SegmentDataAtom';
|
|
2
|
+
export interface PlatformCapabilities {
|
|
3
|
+
mediaSourceSupported(): boolean;
|
|
4
|
+
typeSupported(mimeType: string): boolean;
|
|
5
|
+
isContainerSupported(container: ContainerFormat): boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare enum CapabilitiesExportNames {
|
|
8
|
+
PlatformCapabilities = "platform-capabilities"
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation ContainerMp4.package
|
|
3
|
+
*
|
|
4
|
+
* Provides MP4 related processors. FMP4 parser, Fragment parser & ISOBoxer.
|
|
5
|
+
* We use these to extract necessary media metadata beforehand like segment playback
|
|
6
|
+
* times, codecs and duration so we do no rely plainly on manifests.
|
|
7
|
+
*
|
|
8
|
+
* Fragment parser is used to support CMAF chunked data from the download associated
|
|
9
|
+
* streams so we can support low latency streaming and start the playback as soon as
|
|
10
|
+
* we have first playable data available.
|
|
11
|
+
*
|
|
12
|
+
* ### `ContainerMp4` Package Dependency Graph
|
|
13
|
+
* ```mermaid
|
|
14
|
+
* flowchart LR
|
|
15
|
+
* subgraph Core
|
|
16
|
+
* ComponentName.Utils["Utils"]
|
|
17
|
+
* ComponentName.Constants["Constants"]
|
|
18
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
19
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
20
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
21
|
+
* end
|
|
22
|
+
* subgraph SegmentProcessing
|
|
23
|
+
* SegmentProcessingExportNames.SegmentProcessorErrors["SegmentProcessorErrors"]
|
|
24
|
+
* SegmentProcessingExportNames.SegmentProcessorType["SegmentProcessorType"]
|
|
25
|
+
* SegmentProcessingExportNames.SegmentProcessingComponent["SegmentProcessingComponent"]
|
|
26
|
+
* end
|
|
27
|
+
* ContainerMp4 --> ComponentName.CoreEffects
|
|
28
|
+
* ContainerMp4 --> ComponentName.CoreStateAtoms
|
|
29
|
+
* ContainerMp4 --> SegmentProcessingExportNames.SegmentProcessorType
|
|
30
|
+
* ContainerMp4 --> SegmentProcessingExportNames.SegmentProcessingComponent
|
|
31
|
+
* ContainerMp4 --> SegmentProcessingExportNames.SegmentProcessorErrors
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
|
|
35
|
+
import type { EmptyObject } from '../../../../BaseTypes';
|
|
36
|
+
import type { MyApi } from '../../../../bundles/Types';
|
|
37
|
+
import { ComponentName } from '../../../Types';
|
|
38
|
+
import type { CoreEffects, CoreStateAtoms } from '../../core/Core.package';
|
|
39
|
+
import type SegmentProcessorErrors from '../../segment-processing/Errors';
|
|
40
|
+
import type { SegmentProcessingComponent, SegmentProcessorType } from '../../segment-processing/Types';
|
|
41
|
+
import { SegmentProcessingExportNames } from '../../segment-processing/Types';
|
|
42
|
+
import type { ContextWithState } from '../../Types';
|
|
43
|
+
type Dependencies = {
|
|
44
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
45
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
46
|
+
[SegmentProcessingExportNames.SegmentProcessorType]: typeof SegmentProcessorType;
|
|
47
|
+
[SegmentProcessingExportNames.SegmentProcessingComponent]: SegmentProcessingComponent;
|
|
48
|
+
[SegmentProcessingExportNames.SegmentProcessorErrors]: typeof SegmentProcessorErrors;
|
|
49
|
+
};
|
|
50
|
+
export type ContainerMp4PackageContext = ContextHaving<Dependencies, EmptyObject, ContextWithState>;
|
|
51
|
+
export declare const ContainerMp4Package: import("../../../../../framework-types/package-api/Package").Package<Dependencies, EmptyObject, MyApi>;
|
|
52
|
+
export default ContainerMp4Package;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation ContainerTs.package
|
|
3
|
+
*
|
|
4
|
+
* Provides Transport stream segments parser. We need this to get data like media type codecs,
|
|
5
|
+
* playback times and program mapping beforehand.
|
|
6
|
+
*
|
|
7
|
+
* Provides Transport stream segments parser.
|
|
8
|
+
*
|
|
9
|
+
* ### `ContainerTs` Package Dependency Graph
|
|
10
|
+
* ```mermaid
|
|
11
|
+
* flowchart LR
|
|
12
|
+
* subgraph Core
|
|
13
|
+
* ComponentName.Utils["Utils"]
|
|
14
|
+
* ComponentName.Constants["Constants"]
|
|
15
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
16
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
17
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
18
|
+
* end
|
|
19
|
+
* subgraph SegmentProcessing
|
|
20
|
+
* SegmentProcessingExportNames.SegmentProcessorErrors["SegmentProcessorErrors"]
|
|
21
|
+
* SegmentProcessingExportNames.SegmentProcessorType["SegmentProcessorType"]
|
|
22
|
+
* SegmentProcessingExportNames.SegmentProcessingComponent["SegmentProcessingComponent"]
|
|
23
|
+
* end
|
|
24
|
+
* ContainerTs --> ComponentName.CoreEffects
|
|
25
|
+
* ContainerTs --> ComponentName.CoreStateAtoms
|
|
26
|
+
* ContainerTs --> SegmentProcessingExportNames.SegmentProcessorType
|
|
27
|
+
* ContainerTs --> SegmentProcessingExportNames.SegmentProcessingComponent
|
|
28
|
+
* ContainerTs --> SegmentProcessingExportNames.SegmentProcessorErrors
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
|
|
32
|
+
import type { EmptyObject } from '../../../../BaseTypes';
|
|
33
|
+
import type { MyApi } from '../../../../bundles/Types';
|
|
34
|
+
import { ComponentName } from '../../../Types';
|
|
35
|
+
import type { CoreEffects, CoreStateAtoms } from '../../core/Core.package';
|
|
36
|
+
import type SegmentProcessorErrors from '../../segment-processing/Errors';
|
|
37
|
+
import type { SegmentProcessingComponent, SegmentProcessorType } from '../../segment-processing/Types';
|
|
38
|
+
import { SegmentProcessingExportNames } from '../../segment-processing/Types';
|
|
39
|
+
import type { ContextWithState } from '../../Types';
|
|
40
|
+
type Dependencies = {
|
|
41
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
42
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
43
|
+
[SegmentProcessingExportNames.SegmentProcessorType]: typeof SegmentProcessorType;
|
|
44
|
+
[SegmentProcessingExportNames.SegmentProcessingComponent]: SegmentProcessingComponent;
|
|
45
|
+
[SegmentProcessingExportNames.SegmentProcessorErrors]: typeof SegmentProcessorErrors;
|
|
46
|
+
};
|
|
47
|
+
export type ContainerTsPackageContext = ContextHaving<Dependencies, EmptyObject, ContextWithState>;
|
|
48
|
+
export declare const ContainerTsPackage: import("../../../../../framework-types/package-api/Package").Package<Dependencies, EmptyObject, MyApi>;
|
|
49
|
+
export default ContainerTsPackage;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation TsTransmuxer.package
|
|
3
|
+
*
|
|
4
|
+
* Provides processors for TS segments to MP4. This is used in case the platform
|
|
5
|
+
* does not support native playback of transport stream segments (like Safari).
|
|
6
|
+
*
|
|
7
|
+
* Currently transmuxing process runs on the main thead so some blocking may
|
|
8
|
+
* impact the performance.
|
|
9
|
+
*
|
|
10
|
+
* ### `TsTransmuxer` Package Dependency Graph
|
|
11
|
+
* ```mermaid
|
|
12
|
+
* flowchart LR
|
|
13
|
+
* subgraph Core
|
|
14
|
+
* ComponentName.Utils["Utils"]
|
|
15
|
+
* ComponentName.Constants["Constants"]
|
|
16
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
17
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
18
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
19
|
+
* end
|
|
20
|
+
* subgraph SegmentProcessing
|
|
21
|
+
* SegmentProcessingExportNames.SegmentProcessorErrors["SegmentProcessorErrors"]
|
|
22
|
+
* SegmentProcessingExportNames.SegmentProcessorType["SegmentProcessorType"]
|
|
23
|
+
* SegmentProcessingExportNames.SegmentProcessingComponent["SegmentProcessingComponent"]
|
|
24
|
+
* end
|
|
25
|
+
* TsTransmuxer --> ComponentName.CoreEffects
|
|
26
|
+
* TsTransmuxer --> ComponentName.CoreStateAtoms
|
|
27
|
+
* TsTransmuxer --> SegmentProcessingExportNames.SegmentProcessorType
|
|
28
|
+
* TsTransmuxer --> SegmentProcessingExportNames.SegmentProcessingComponent
|
|
29
|
+
* TsTransmuxer --> SegmentProcessingExportNames.SegmentProcessorErrors
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import type { ContextHaving } from '../../../../../framework-types/execution-context/Types';
|
|
33
|
+
import type { EmptyObject } from '../../../../BaseTypes';
|
|
34
|
+
import type { MyApi } from '../../../../bundles/Types';
|
|
35
|
+
import { ComponentName } from '../../../Types';
|
|
36
|
+
import type { CoreEffects, CoreStateAtoms } from '../../core/Core.package';
|
|
37
|
+
import type SegmentProcessorErrors from '../../segment-processing/Errors';
|
|
38
|
+
import type { SegmentProcessingComponent, SegmentProcessorType } from '../../segment-processing/Types';
|
|
39
|
+
import { SegmentProcessingExportNames } from '../../segment-processing/Types';
|
|
40
|
+
import type { ContextWithState } from '../../Types';
|
|
41
|
+
type Dependencies = {
|
|
42
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
43
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
44
|
+
[SegmentProcessingExportNames.SegmentProcessorType]: typeof SegmentProcessorType;
|
|
45
|
+
[SegmentProcessingExportNames.SegmentProcessingComponent]: SegmentProcessingComponent;
|
|
46
|
+
[SegmentProcessingExportNames.SegmentProcessorErrors]: typeof SegmentProcessorErrors;
|
|
47
|
+
};
|
|
48
|
+
export type TsTransmuxerPackageContext = ContextHaving<Dependencies, EmptyObject, ContextWithState>;
|
|
49
|
+
export declare const TsTransmuxerPackage: import("../../../../../framework-types/package-api/Package").Package<Dependencies, EmptyObject, MyApi>;
|
|
50
|
+
export default TsTransmuxerPackage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum MediaType {
|
|
2
|
+
Audio = "audio",
|
|
3
|
+
Video = "video",
|
|
4
|
+
Muxed = "muxed",
|
|
5
|
+
Subtitle = "subtitle",
|
|
6
|
+
Thumbnail = "thumbnail",
|
|
7
|
+
Unknown = "unknown"
|
|
8
|
+
}
|
|
9
|
+
export declare enum Codec {
|
|
10
|
+
Mp4a = "mp4a",
|
|
11
|
+
AVC = "avc1",
|
|
12
|
+
HEVC = "hvc1",
|
|
13
|
+
ADTS = "adts",
|
|
14
|
+
Unknown = "unknown"
|
|
15
|
+
}
|
|
16
|
+
export declare const MediaTypeValues: MediaType[];
|
|
17
|
+
export type Constants = {
|
|
18
|
+
Codec: typeof Codec;
|
|
19
|
+
MediaType: typeof MediaType;
|
|
20
|
+
MediaTypeValues: typeof MediaTypeValues;
|
|
21
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation Core.package
|
|
3
|
+
*
|
|
4
|
+
* Exposes core utils, constants, effects and state atoms.
|
|
5
|
+
* Most of the player packages depends on core package for either their utils, or atoms.
|
|
6
|
+
*
|
|
7
|
+
* ### `Core` Package Dependency Graph
|
|
8
|
+
* ```mermaid
|
|
9
|
+
* flowchart LR
|
|
10
|
+
* subgraph Core
|
|
11
|
+
* ComponentName.Utils["Utils"]
|
|
12
|
+
* ComponentName.Constants["Constants"]
|
|
13
|
+
* ComponentName.CoreEffects["CoreEffects"]
|
|
14
|
+
* ComponentName.PlayerConfig["PlayerConfig"]
|
|
15
|
+
* ComponentName.CoreStateAtoms["CoreStateAtoms"]
|
|
16
|
+
* end
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import type { EmptyObject } from '../../../BaseTypes';
|
|
20
|
+
import type { MyApi, PlayerConfig } from '../../../bundles/Types';
|
|
21
|
+
import { ComponentName } from '../../Types';
|
|
22
|
+
import { createSourceStateAtom } from '../source/atoms/SourceStateAtom';
|
|
23
|
+
import type { Constants } from './Constants';
|
|
24
|
+
import { EventListenerEffectFactory } from './effects/EventListenerEffectFactory';
|
|
25
|
+
import { createMetricsAtom } from './metrics/MetricsAtom';
|
|
26
|
+
import { createNetworkSampleAtom, Type } from './metrics/network/NetworkSampleAtom';
|
|
27
|
+
import { createArrayAtom } from './state/ArrayStateAtom';
|
|
28
|
+
import { addCodecs, copyCodecs, createCodecMapAtom } from './state/codec-map/CodecMapAtom';
|
|
29
|
+
import { createDataStreamAtom } from './state/data-stream/DataStreamAtom';
|
|
30
|
+
import { createMapStateAtom } from './state/MapStateAtom';
|
|
31
|
+
import { createPrimitiveAtom } from './state/PrimitiveAtom';
|
|
32
|
+
import { createDataSegmentAtom, createInitSegmentAtom, createSelfInitSegmentAtom, getGapToNextSegment, getReadableSegmentName, getTimeRange } from './state/segment/SegmentAtom';
|
|
33
|
+
import { ContainerFormat, createSegmentDataAtom } from './state/segment/SegmentDataAtom';
|
|
34
|
+
import { createSegmentTiming } from './state/segment/SegmentTimingAtom';
|
|
35
|
+
import { isDataOrSelfInitSegment, isDataSegment, isInitSegment } from './state/segment/SegmentTypeGuards';
|
|
36
|
+
import { SegmentUtils } from './state/segment/SegmentUtils';
|
|
37
|
+
import { createAudioSelectionGroupAtom, createSubtitleSelectionGroupAtom, createUnknownSelectionGroupAtom, createVideoSelectionGroupAtom } from './state/selection-group/SelectionGroupAtom';
|
|
38
|
+
import { isAudioSelectionGroup, isMediaSelectionGroup, isVideoSelectionGroup } from './state/selection-group/SelectionGroupTypeGuards';
|
|
39
|
+
import { SelectionGroupUtils } from './state/selection-group/SelectionGroupUtils';
|
|
40
|
+
import { StateEffectFactory } from './state/state-effect/StateEffectFactory';
|
|
41
|
+
import { CreateStoreEffectFactory } from './state/StoreEffectFactory';
|
|
42
|
+
import { createStreamAtom, StreamType } from './state/stream/StreamAtom';
|
|
43
|
+
import { createStreamSectionAtom } from './state/stream-timeline/StreamSectionAtom';
|
|
44
|
+
import { createStreamSequenceMapAtom } from './state/stream-timeline/StreamSequenceMapAtom';
|
|
45
|
+
import { createStreamTimelineAtom } from './state/stream-timeline/StreamTimelineMapAtom';
|
|
46
|
+
import { createAudioTrackAtom, createMuxedTrackAtom, createSubtitleTrackAtom, createUnknownTrackAtom, createVideoTrackAtom } from './state/track/TrackAtom';
|
|
47
|
+
import { isAudioTrack, isMediaTrack, isMuxedTrack, isVideoTrack } from './state/track/TrackTypeGuards';
|
|
48
|
+
import type { CoreUtils } from './utils/Types';
|
|
49
|
+
export type CoreExports = {
|
|
50
|
+
[ComponentName.Utils]: CoreUtils;
|
|
51
|
+
[ComponentName.Constants]: Constants;
|
|
52
|
+
[ComponentName.CoreEffects]: CoreEffects;
|
|
53
|
+
[ComponentName.PlayerConfig]: PlayerConfig;
|
|
54
|
+
[ComponentName.CoreStateAtoms]: CoreStateAtoms;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The core effects that the player needs to function.
|
|
58
|
+
*
|
|
59
|
+
* The state effect is concerned with reacting to state changes for a given state atom.
|
|
60
|
+
*
|
|
61
|
+
* The store effect is concerned with tracking the state atoms across threads
|
|
62
|
+
*
|
|
63
|
+
* The event listener effect is what allows us to react to DOM element events.
|
|
64
|
+
*
|
|
65
|
+
* <button onclick='eval("sudo reboot")'>Click me for free money</button>
|
|
66
|
+
*/
|
|
67
|
+
export type CoreEffects = {
|
|
68
|
+
StateEffectFactory: typeof StateEffectFactory;
|
|
69
|
+
StoreEffectFactory: typeof CreateStoreEffectFactory;
|
|
70
|
+
EventListenerEffectFactory: typeof EventListenerEffectFactory;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The core state atoms make up the data structures on which the player as a whole, operates.
|
|
74
|
+
*
|
|
75
|
+
* This main object is designed to be exposed on the registry for easy access. It consists of the atom
|
|
76
|
+
* creators for all the core state atoms, along with a number of predicates that can be used to test
|
|
77
|
+
* various assertions.
|
|
78
|
+
*/
|
|
79
|
+
export type CoreStateAtoms = {
|
|
80
|
+
createArrayAtom: typeof createArrayAtom;
|
|
81
|
+
createSourceStateAtom: typeof createSourceStateAtom;
|
|
82
|
+
createMapStateAtom: typeof createMapStateAtom;
|
|
83
|
+
createPrimitiveAtom: typeof createPrimitiveAtom;
|
|
84
|
+
Segments: {
|
|
85
|
+
ContainerFormat: typeof ContainerFormat;
|
|
86
|
+
createDataSegmentAtom: typeof createDataSegmentAtom;
|
|
87
|
+
createInitSegmentAtom: typeof createInitSegmentAtom;
|
|
88
|
+
createSelfInitSegmentAtom: typeof createSelfInitSegmentAtom;
|
|
89
|
+
createSegmentDataAtom: typeof createSegmentDataAtom;
|
|
90
|
+
createSegmentTiming: typeof createSegmentTiming;
|
|
91
|
+
getReadableSegmentName: typeof getReadableSegmentName;
|
|
92
|
+
getTimeRange: typeof getTimeRange;
|
|
93
|
+
getGapToNextSegment: typeof getGapToNextSegment;
|
|
94
|
+
isDataOrSelfInitSegment: typeof isDataOrSelfInitSegment;
|
|
95
|
+
isDataSegment: typeof isDataSegment;
|
|
96
|
+
isInitSegment: typeof isInitSegment;
|
|
97
|
+
} & typeof SegmentUtils;
|
|
98
|
+
SelectionGroups: {
|
|
99
|
+
createVideoSelectionGroupAtom: typeof createVideoSelectionGroupAtom;
|
|
100
|
+
createAudioSelectionGroupAtom: typeof createAudioSelectionGroupAtom;
|
|
101
|
+
createSubtitleSelectionGroupAtom: typeof createSubtitleSelectionGroupAtom;
|
|
102
|
+
createUnknownSelectionGroupAtom: typeof createUnknownSelectionGroupAtom;
|
|
103
|
+
isVideoSelectionGroup: typeof isVideoSelectionGroup;
|
|
104
|
+
isAudioSelectionGroup: typeof isAudioSelectionGroup;
|
|
105
|
+
isMediaSelectionGroup: typeof isMediaSelectionGroup;
|
|
106
|
+
} & typeof SelectionGroupUtils;
|
|
107
|
+
Tracks: {
|
|
108
|
+
createAudioTrackAtom: typeof createAudioTrackAtom;
|
|
109
|
+
createVideoTrackAtom: typeof createVideoTrackAtom;
|
|
110
|
+
createMuxedTrackAtom: typeof createMuxedTrackAtom;
|
|
111
|
+
createSubtitleTrackAtom: typeof createSubtitleTrackAtom;
|
|
112
|
+
createUnknownTrackAtom: typeof createUnknownTrackAtom;
|
|
113
|
+
isAudioTrack: typeof isAudioTrack;
|
|
114
|
+
isMediaTrack: typeof isMediaTrack;
|
|
115
|
+
isVideoTrack: typeof isVideoTrack;
|
|
116
|
+
isMuxedTrack: typeof isMuxedTrack;
|
|
117
|
+
};
|
|
118
|
+
Stream: {
|
|
119
|
+
Type: typeof StreamType;
|
|
120
|
+
createStreamAtom: typeof createStreamAtom;
|
|
121
|
+
};
|
|
122
|
+
SegmentTimeline: {
|
|
123
|
+
createStreamTimelineAtom: typeof createStreamTimelineAtom;
|
|
124
|
+
createStreamSequenceMapAtom: typeof createStreamSequenceMapAtom;
|
|
125
|
+
createStreamSectionAtom: typeof createStreamSectionAtom;
|
|
126
|
+
};
|
|
127
|
+
Metrics: {
|
|
128
|
+
createMetricsAtom: typeof createMetricsAtom;
|
|
129
|
+
network: {
|
|
130
|
+
SampleType: typeof Type;
|
|
131
|
+
createNetworkSampleAtom: typeof createNetworkSampleAtom;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
DataStream: {
|
|
135
|
+
createDataStreamAtom: typeof createDataStreamAtom;
|
|
136
|
+
};
|
|
137
|
+
CodecMap: {
|
|
138
|
+
createCodecMapAtom: typeof createCodecMapAtom;
|
|
139
|
+
addCodecs: typeof addCodecs;
|
|
140
|
+
copyCodecs: typeof copyCodecs;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export declare const CorePackage: import("../../../../framework-types/package-api/Package").Package<EmptyObject, CoreExports, MyApi>;
|
|
144
|
+
export default CorePackage;
|