@ngxsp/core 0.0.1-next.0 → 0.0.1-next.1

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/index.d.cts CHANGED
@@ -395,6 +395,40 @@ type PlayerEvent = {
395
395
  id?: string;
396
396
  };
397
397
 
398
+ /**
399
+ * Sensible, framework-agnostic defaults for the mandatory sub-configs of
400
+ * {@link PlayerConfig}. They mirror the values used by the existing
401
+ * consumers (local audio/video players) so a brand new integration can get a
402
+ * valid config without restating every field.
403
+ */
404
+ declare const DEFAULT_PROGRESS_CONFIG: ProgressConfig;
405
+ declare const DEFAULT_UI_CONFIG: UiConfig;
406
+ declare const DEFAULT_RESILIENCE_CONFIG: ResilienceConfig;
407
+ declare const DEFAULT_SUBTITLES_CONFIG: SubtitlesConfig;
408
+ declare const DEFAULT_METADATA_CONFIG: MetadataConfig;
409
+ declare const DEFAULT_ADS_CONFIG: AdsConfig;
410
+ /**
411
+ * Build a complete, type-safe {@link PlayerConfig} from a minimal set of
412
+ * overrides. Only `source` is required; the mandatory sub-configs
413
+ * (`progress`, `ui`, `resilience`, `subtitles`, `metadata`, `ads`) are filled
414
+ * with the defaults above and shallow-merged with any override provided.
415
+ *
416
+ * Optional top-level fields (`profile`, `drm`, `series`, `playlist`,
417
+ * `offline`, `remoteConfig`, ...) are passed through untouched when present.
418
+ *
419
+ * @example
420
+ * ```ts
421
+ * const config = createDefaultConfig({
422
+ * source: { type: 'hls', url: 'https://cdn.example.com/movie.m3u8' },
423
+ * drm: { keySystems: { 'com.widevine.alpha': { licenseServerUrl: 'https://drm/widevine' } } },
424
+ * subtitles: { enabled: true, providers: ['local'], preferredLang: 'fr' },
425
+ * });
426
+ * ```
427
+ */
428
+ declare function createDefaultConfig(overrides: Partial<PlayerConfig> & {
429
+ source: PlayerSource;
430
+ }): PlayerConfig;
431
+
398
432
  type EngineEvent = {
399
433
  type: 'timeupdate';
400
434
  currentTime: number;
@@ -545,7 +579,6 @@ interface PlayerSnapshot {
545
579
  */
546
580
  type PlayerDiagnostics = DiagnosticsSnapshot;
547
581
  declare class PlayerFacade {
548
- private chooseEngine;
549
582
  private ports;
550
583
  private engineFactories;
551
584
  private engineId;
@@ -579,7 +612,7 @@ declare class PlayerFacade {
579
612
  private playlist;
580
613
  private playlistKey;
581
614
  private externalVttUrl?;
582
- constructor(chooseEngine?: (cfg: PlayerConfig) => PlaybackEngine, ports?: PlayerPorts);
615
+ constructor(ports?: PlayerPorts);
583
616
  attach(videoEl: HTMLVideoElement, plugins: PlayerPlugin[] | undefined, config: PlayerConfig, ports?: Partial<PlayerPorts>, engines?: EngineFactory[]): void;
584
617
  load(config: PlayerConfig, opts?: LoadOptions): Promise<void>;
585
618
  reload(opts?: LoadOptions): Promise<void>;
@@ -850,4 +883,101 @@ declare function applyRemoteConfig(cfg: PlayerConfig, ports: Partial<PlayerPorts
850
883
  source: 'cache' | 'network' | 'none';
851
884
  }>;
852
885
 
853
- export { type AdsConfig, type AdsMode, type AspectRatioMode, type CacheStore, type CapabilityReport, ConsoleLogPort, DefaultCacheStore, type DiagnosticsEngineInfo, type DiagnosticsSnapshot, type DrmConfig, type EngineEvent, type EngineFactory, type EngineProfileHints, type EngineProfileId, type EpisodeItem, type HttpPort, type LoadOptions, LocalMetadataProvider, LocalSubtitleProvider, type LogPort, type MediaTrack, MemoryStoragePort, type MetadataConfig, type MetadataHint, type MetadataMatch, type MetadataProvider, NativeEngine, type NextEpisodeHint, NoopTelemetryPort, type PlaybackCapabilities, type PlaybackEngine, type PlayerCommand, type PlayerConfig, type PlayerContext, type PlayerDiagnostics, type PlayerError, type PlayerErrorCode, type PlayerEvent, type PlayerEventBus, PlayerFacade, type PlayerPlugin, type PlayerPorts, type PlayerSnapshot, type PlayerSource, type PlayerState, type PlayerTime, type ProgressConfig, type ProgressMode, ProgressPlugin, type RemoteConfigConfig, type RemoteConfigPayload, type ResilienceConfig, ResiliencePlugin, type SeriesConfig, SimpleEventBus, type SkipSegment, type SourceType, type SsaiManifestRewriteConfig, type StoragePort, type SubtitleCandidate, type SubtitleHint, type SubtitleProvider, type SubtitleQuery, type SubtitlesConfig, type TelemetryEvent, type TelemetryLevel, type TelemetryPort, type TelemetrySample, type UiConfig, type Unsubscribe, type VideoMetadata, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
886
+ type MediaKind = 'audio' | 'video';
887
+ interface MediaArtwork {
888
+ src: string;
889
+ kind?: 'cover' | 'poster' | 'backdrop' | 'thumbnail';
890
+ }
891
+ interface MediaProgress {
892
+ currentTimeSec: number;
893
+ durationSec?: number;
894
+ updatedAt: number;
895
+ }
896
+ interface MediaItem {
897
+ id: string;
898
+ kind: MediaKind;
899
+ title: string;
900
+ path?: string;
901
+ url?: string;
902
+ subtitle?: string;
903
+ artwork?: MediaArtwork[];
904
+ durationSec?: number;
905
+ sizeBytes?: number;
906
+ mtimeMs?: number;
907
+ }
908
+
909
+ interface AudioTrack extends MediaItem {
910
+ kind: 'audio';
911
+ artist?: string;
912
+ album?: string;
913
+ albumArtist?: string;
914
+ genre?: string;
915
+ trackNo?: number;
916
+ discNo?: number;
917
+ year?: number;
918
+ }
919
+ interface AudioAlbum {
920
+ id: string;
921
+ title: string;
922
+ artist?: string;
923
+ artwork?: string;
924
+ year?: number;
925
+ tracks: AudioTrack[];
926
+ }
927
+ interface AudioArtist {
928
+ id: string;
929
+ name: string;
930
+ artwork?: string;
931
+ tracks: AudioTrack[];
932
+ }
933
+ interface AudioGenre {
934
+ id: string;
935
+ name: string;
936
+ tracks: AudioTrack[];
937
+ }
938
+ interface AudioPlaylistRef {
939
+ id: string;
940
+ name: string;
941
+ trackIds: string[];
942
+ }
943
+ interface AudioLibrarySnapshot {
944
+ tracks: AudioTrack[];
945
+ albums: AudioAlbum[];
946
+ artists: AudioArtist[];
947
+ genres: AudioGenre[];
948
+ playlists: AudioPlaylistRef[];
949
+ }
950
+
951
+ type RepeatMode = 'off' | 'one' | 'all';
952
+ interface QueueItem<TItem = unknown> {
953
+ id: string;
954
+ item: TItem;
955
+ }
956
+ interface QueueSnapshot<TItem = unknown> {
957
+ items: QueueItem<TItem>[];
958
+ currentIndex: number;
959
+ shuffle: boolean;
960
+ repeat: RepeatMode;
961
+ history: number[];
962
+ }
963
+
964
+ type DevicePlaybackKind = 'dlna';
965
+ type DevicePlaybackStatus = 'idle' | 'connecting' | 'playing' | 'failed';
966
+ interface PlaybackDevice {
967
+ id: string;
968
+ name: string;
969
+ kind: DevicePlaybackKind;
970
+ address: string;
971
+ model?: string;
972
+ connected?: boolean;
973
+ }
974
+ interface DevicePlaybackState {
975
+ status: DevicePlaybackStatus;
976
+ activeDeviceId: string | null;
977
+ activeDeviceName: string | null;
978
+ targetUrl?: string;
979
+ message?: string;
980
+ error?: string;
981
+ }
982
+
983
+ export { type AdsConfig, type AdsMode, type AspectRatioMode, type AudioAlbum, type AudioArtist, type AudioGenre, type AudioLibrarySnapshot, type AudioPlaylistRef, type AudioTrack, type CacheStore, type CapabilityReport, ConsoleLogPort, DEFAULT_ADS_CONFIG, DEFAULT_METADATA_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SUBTITLES_CONFIG, DEFAULT_UI_CONFIG, DefaultCacheStore, type DevicePlaybackKind, type DevicePlaybackState, type DevicePlaybackStatus, type DiagnosticsEngineInfo, type DiagnosticsSnapshot, type DrmConfig, type EngineEvent, type EngineFactory, type EngineProfileHints, type EngineProfileId, type EpisodeItem, type HttpPort, type LoadOptions, LocalMetadataProvider, LocalSubtitleProvider, type LogPort, type MediaArtwork, type MediaItem, type MediaKind, type MediaProgress, type MediaTrack, MemoryStoragePort, type MetadataConfig, type MetadataHint, type MetadataMatch, type MetadataProvider, NativeEngine, type NextEpisodeHint, NoopTelemetryPort, type PlaybackCapabilities, type PlaybackDevice, type PlaybackEngine, type PlayerCommand, type PlayerConfig, type PlayerContext, type PlayerDiagnostics, type PlayerError, type PlayerErrorCode, type PlayerEvent, type PlayerEventBus, PlayerFacade, type PlayerPlugin, type PlayerPorts, type PlayerSnapshot, type PlayerSource, type PlayerState, type PlayerTime, type ProgressConfig, type ProgressMode, ProgressPlugin, type QueueItem, type QueueSnapshot, type RemoteConfigConfig, type RemoteConfigPayload, type RepeatMode, type ResilienceConfig, ResiliencePlugin, type SeriesConfig, SimpleEventBus, type SkipSegment, type SourceType, type SsaiManifestRewriteConfig, type StoragePort, type SubtitleCandidate, type SubtitleHint, type SubtitleProvider, type SubtitleQuery, type SubtitlesConfig, type TelemetryEvent, type TelemetryLevel, type TelemetryPort, type TelemetrySample, type UiConfig, type Unsubscribe, type VideoMetadata, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultConfig, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
package/index.d.ts CHANGED
@@ -395,6 +395,40 @@ type PlayerEvent = {
395
395
  id?: string;
396
396
  };
397
397
 
398
+ /**
399
+ * Sensible, framework-agnostic defaults for the mandatory sub-configs of
400
+ * {@link PlayerConfig}. They mirror the values used by the existing
401
+ * consumers (local audio/video players) so a brand new integration can get a
402
+ * valid config without restating every field.
403
+ */
404
+ declare const DEFAULT_PROGRESS_CONFIG: ProgressConfig;
405
+ declare const DEFAULT_UI_CONFIG: UiConfig;
406
+ declare const DEFAULT_RESILIENCE_CONFIG: ResilienceConfig;
407
+ declare const DEFAULT_SUBTITLES_CONFIG: SubtitlesConfig;
408
+ declare const DEFAULT_METADATA_CONFIG: MetadataConfig;
409
+ declare const DEFAULT_ADS_CONFIG: AdsConfig;
410
+ /**
411
+ * Build a complete, type-safe {@link PlayerConfig} from a minimal set of
412
+ * overrides. Only `source` is required; the mandatory sub-configs
413
+ * (`progress`, `ui`, `resilience`, `subtitles`, `metadata`, `ads`) are filled
414
+ * with the defaults above and shallow-merged with any override provided.
415
+ *
416
+ * Optional top-level fields (`profile`, `drm`, `series`, `playlist`,
417
+ * `offline`, `remoteConfig`, ...) are passed through untouched when present.
418
+ *
419
+ * @example
420
+ * ```ts
421
+ * const config = createDefaultConfig({
422
+ * source: { type: 'hls', url: 'https://cdn.example.com/movie.m3u8' },
423
+ * drm: { keySystems: { 'com.widevine.alpha': { licenseServerUrl: 'https://drm/widevine' } } },
424
+ * subtitles: { enabled: true, providers: ['local'], preferredLang: 'fr' },
425
+ * });
426
+ * ```
427
+ */
428
+ declare function createDefaultConfig(overrides: Partial<PlayerConfig> & {
429
+ source: PlayerSource;
430
+ }): PlayerConfig;
431
+
398
432
  type EngineEvent = {
399
433
  type: 'timeupdate';
400
434
  currentTime: number;
@@ -545,7 +579,6 @@ interface PlayerSnapshot {
545
579
  */
546
580
  type PlayerDiagnostics = DiagnosticsSnapshot;
547
581
  declare class PlayerFacade {
548
- private chooseEngine;
549
582
  private ports;
550
583
  private engineFactories;
551
584
  private engineId;
@@ -579,7 +612,7 @@ declare class PlayerFacade {
579
612
  private playlist;
580
613
  private playlistKey;
581
614
  private externalVttUrl?;
582
- constructor(chooseEngine?: (cfg: PlayerConfig) => PlaybackEngine, ports?: PlayerPorts);
615
+ constructor(ports?: PlayerPorts);
583
616
  attach(videoEl: HTMLVideoElement, plugins: PlayerPlugin[] | undefined, config: PlayerConfig, ports?: Partial<PlayerPorts>, engines?: EngineFactory[]): void;
584
617
  load(config: PlayerConfig, opts?: LoadOptions): Promise<void>;
585
618
  reload(opts?: LoadOptions): Promise<void>;
@@ -850,4 +883,101 @@ declare function applyRemoteConfig(cfg: PlayerConfig, ports: Partial<PlayerPorts
850
883
  source: 'cache' | 'network' | 'none';
851
884
  }>;
852
885
 
853
- export { type AdsConfig, type AdsMode, type AspectRatioMode, type CacheStore, type CapabilityReport, ConsoleLogPort, DefaultCacheStore, type DiagnosticsEngineInfo, type DiagnosticsSnapshot, type DrmConfig, type EngineEvent, type EngineFactory, type EngineProfileHints, type EngineProfileId, type EpisodeItem, type HttpPort, type LoadOptions, LocalMetadataProvider, LocalSubtitleProvider, type LogPort, type MediaTrack, MemoryStoragePort, type MetadataConfig, type MetadataHint, type MetadataMatch, type MetadataProvider, NativeEngine, type NextEpisodeHint, NoopTelemetryPort, type PlaybackCapabilities, type PlaybackEngine, type PlayerCommand, type PlayerConfig, type PlayerContext, type PlayerDiagnostics, type PlayerError, type PlayerErrorCode, type PlayerEvent, type PlayerEventBus, PlayerFacade, type PlayerPlugin, type PlayerPorts, type PlayerSnapshot, type PlayerSource, type PlayerState, type PlayerTime, type ProgressConfig, type ProgressMode, ProgressPlugin, type RemoteConfigConfig, type RemoteConfigPayload, type ResilienceConfig, ResiliencePlugin, type SeriesConfig, SimpleEventBus, type SkipSegment, type SourceType, type SsaiManifestRewriteConfig, type StoragePort, type SubtitleCandidate, type SubtitleHint, type SubtitleProvider, type SubtitleQuery, type SubtitlesConfig, type TelemetryEvent, type TelemetryLevel, type TelemetryPort, type TelemetrySample, type UiConfig, type Unsubscribe, type VideoMetadata, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
886
+ type MediaKind = 'audio' | 'video';
887
+ interface MediaArtwork {
888
+ src: string;
889
+ kind?: 'cover' | 'poster' | 'backdrop' | 'thumbnail';
890
+ }
891
+ interface MediaProgress {
892
+ currentTimeSec: number;
893
+ durationSec?: number;
894
+ updatedAt: number;
895
+ }
896
+ interface MediaItem {
897
+ id: string;
898
+ kind: MediaKind;
899
+ title: string;
900
+ path?: string;
901
+ url?: string;
902
+ subtitle?: string;
903
+ artwork?: MediaArtwork[];
904
+ durationSec?: number;
905
+ sizeBytes?: number;
906
+ mtimeMs?: number;
907
+ }
908
+
909
+ interface AudioTrack extends MediaItem {
910
+ kind: 'audio';
911
+ artist?: string;
912
+ album?: string;
913
+ albumArtist?: string;
914
+ genre?: string;
915
+ trackNo?: number;
916
+ discNo?: number;
917
+ year?: number;
918
+ }
919
+ interface AudioAlbum {
920
+ id: string;
921
+ title: string;
922
+ artist?: string;
923
+ artwork?: string;
924
+ year?: number;
925
+ tracks: AudioTrack[];
926
+ }
927
+ interface AudioArtist {
928
+ id: string;
929
+ name: string;
930
+ artwork?: string;
931
+ tracks: AudioTrack[];
932
+ }
933
+ interface AudioGenre {
934
+ id: string;
935
+ name: string;
936
+ tracks: AudioTrack[];
937
+ }
938
+ interface AudioPlaylistRef {
939
+ id: string;
940
+ name: string;
941
+ trackIds: string[];
942
+ }
943
+ interface AudioLibrarySnapshot {
944
+ tracks: AudioTrack[];
945
+ albums: AudioAlbum[];
946
+ artists: AudioArtist[];
947
+ genres: AudioGenre[];
948
+ playlists: AudioPlaylistRef[];
949
+ }
950
+
951
+ type RepeatMode = 'off' | 'one' | 'all';
952
+ interface QueueItem<TItem = unknown> {
953
+ id: string;
954
+ item: TItem;
955
+ }
956
+ interface QueueSnapshot<TItem = unknown> {
957
+ items: QueueItem<TItem>[];
958
+ currentIndex: number;
959
+ shuffle: boolean;
960
+ repeat: RepeatMode;
961
+ history: number[];
962
+ }
963
+
964
+ type DevicePlaybackKind = 'dlna';
965
+ type DevicePlaybackStatus = 'idle' | 'connecting' | 'playing' | 'failed';
966
+ interface PlaybackDevice {
967
+ id: string;
968
+ name: string;
969
+ kind: DevicePlaybackKind;
970
+ address: string;
971
+ model?: string;
972
+ connected?: boolean;
973
+ }
974
+ interface DevicePlaybackState {
975
+ status: DevicePlaybackStatus;
976
+ activeDeviceId: string | null;
977
+ activeDeviceName: string | null;
978
+ targetUrl?: string;
979
+ message?: string;
980
+ error?: string;
981
+ }
982
+
983
+ export { type AdsConfig, type AdsMode, type AspectRatioMode, type AudioAlbum, type AudioArtist, type AudioGenre, type AudioLibrarySnapshot, type AudioPlaylistRef, type AudioTrack, type CacheStore, type CapabilityReport, ConsoleLogPort, DEFAULT_ADS_CONFIG, DEFAULT_METADATA_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SUBTITLES_CONFIG, DEFAULT_UI_CONFIG, DefaultCacheStore, type DevicePlaybackKind, type DevicePlaybackState, type DevicePlaybackStatus, type DiagnosticsEngineInfo, type DiagnosticsSnapshot, type DrmConfig, type EngineEvent, type EngineFactory, type EngineProfileHints, type EngineProfileId, type EpisodeItem, type HttpPort, type LoadOptions, LocalMetadataProvider, LocalSubtitleProvider, type LogPort, type MediaArtwork, type MediaItem, type MediaKind, type MediaProgress, type MediaTrack, MemoryStoragePort, type MetadataConfig, type MetadataHint, type MetadataMatch, type MetadataProvider, NativeEngine, type NextEpisodeHint, NoopTelemetryPort, type PlaybackCapabilities, type PlaybackDevice, type PlaybackEngine, type PlayerCommand, type PlayerConfig, type PlayerContext, type PlayerDiagnostics, type PlayerError, type PlayerErrorCode, type PlayerEvent, type PlayerEventBus, PlayerFacade, type PlayerPlugin, type PlayerPorts, type PlayerSnapshot, type PlayerSource, type PlayerState, type PlayerTime, type ProgressConfig, type ProgressMode, ProgressPlugin, type QueueItem, type QueueSnapshot, type RemoteConfigConfig, type RemoteConfigPayload, type RepeatMode, type ResilienceConfig, ResiliencePlugin, type SeriesConfig, SimpleEventBus, type SkipSegment, type SourceType, type SsaiManifestRewriteConfig, type StoragePort, type SubtitleCandidate, type SubtitleHint, type SubtitleProvider, type SubtitleQuery, type SubtitlesConfig, type TelemetryEvent, type TelemetryLevel, type TelemetryPort, type TelemetrySample, type UiConfig, type Unsubscribe, type VideoMetadata, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultConfig, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
package/index.js CHANGED
@@ -1,6 +1,64 @@
1
1
  import { BehaviorSubject, Subject } from 'rxjs';
2
2
 
3
- // src/facade/player-facade.ts
3
+ // src/config/default-config.ts
4
+ var DEFAULT_PROGRESS_CONFIG = {
5
+ mode: "local",
6
+ intervalSec: 5
7
+ };
8
+ var DEFAULT_UI_CONFIG = {
9
+ ratios: ["16:9"],
10
+ defaultRatio: "16:9",
11
+ keyboardShortcuts: true
12
+ };
13
+ var DEFAULT_RESILIENCE_CONFIG = {
14
+ retries: 2,
15
+ backoffMs: { min: 300, max: 1500 }
16
+ };
17
+ var DEFAULT_SUBTITLES_CONFIG = {
18
+ enabled: false,
19
+ providers: ["local"]
20
+ };
21
+ var DEFAULT_METADATA_CONFIG = {
22
+ enabled: false,
23
+ providers: ["local"],
24
+ localSidecar: false
25
+ };
26
+ var DEFAULT_ADS_CONFIG = {
27
+ enabled: false,
28
+ mode: "csai"
29
+ };
30
+ function createDefaultConfig(overrides) {
31
+ const {
32
+ source,
33
+ progress,
34
+ ui,
35
+ resilience,
36
+ subtitles,
37
+ metadata,
38
+ ads,
39
+ ...rest
40
+ } = overrides;
41
+ return {
42
+ // Pass through every other (mostly optional) top-level field as provided:
43
+ // profile, drm, series, playlist, playlistStartIndex, autoNext, offline,
44
+ // remoteConfig, ...
45
+ ...rest,
46
+ source,
47
+ progress: { ...DEFAULT_PROGRESS_CONFIG, ...progress },
48
+ ui: { ...DEFAULT_UI_CONFIG, ...ui },
49
+ resilience: {
50
+ ...DEFAULT_RESILIENCE_CONFIG,
51
+ ...resilience,
52
+ backoffMs: {
53
+ ...DEFAULT_RESILIENCE_CONFIG.backoffMs,
54
+ ...resilience?.backoffMs
55
+ }
56
+ },
57
+ subtitles: { ...DEFAULT_SUBTITLES_CONFIG, ...subtitles },
58
+ metadata: { ...DEFAULT_METADATA_CONFIG, ...metadata },
59
+ ads: { ...DEFAULT_ADS_CONFIG, ...ads }
60
+ };
61
+ }
4
62
 
5
63
  // src/engine/engine-factory.ts
6
64
  function selectEngine(config, factories, caps) {
@@ -505,8 +563,7 @@ function createDefaultPorts() {
505
563
 
506
564
  // src/facade/player-facade.ts
507
565
  var PlayerFacade = class {
508
- constructor(chooseEngine = defaultEngineChooser, ports = createDefaultPorts()) {
509
- this.chooseEngine = chooseEngine;
566
+ constructor(ports = createDefaultPorts()) {
510
567
  this.ports = ports;
511
568
  }
512
569
  engineFactories = [createNativeEngineFactory()];
@@ -1010,15 +1067,6 @@ var PlayerFacade = class {
1010
1067
  return null;
1011
1068
  }
1012
1069
  };
1013
- function defaultEngineChooser(cfg) {
1014
- const t = cfg.source.type;
1015
- const url = t === "url" ? cfg.source.url : "";
1016
- const looksLikeHls = typeof url === "string" && /\.m3u8($|\?)/i.test(url);
1017
- const looksLikeDash = typeof url === "string" && /\.mpd($|\?)/i.test(url);
1018
- const hasDrm = !!cfg.source.drm;
1019
- if (t === "hls" || t === "dash" || looksLikeHls || looksLikeDash || hasDrm) return new NativeEngine();
1020
- return new NativeEngine();
1021
- }
1022
1070
 
1023
1071
  // src/plugins/metadata/providers/local-metadata.provider.ts
1024
1072
  var LocalMetadataProvider = class {
@@ -1326,6 +1374,6 @@ function createSsaiManifestRewritePlugin() {
1326
1374
  };
1327
1375
  }
1328
1376
 
1329
- export { ConsoleLogPort, DefaultCacheStore, LocalMetadataProvider, LocalSubtitleProvider, MemoryStoragePort, NativeEngine, NoopTelemetryPort, PlayerFacade, ProgressPlugin, ResiliencePlugin, SimpleEventBus, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
1377
+ export { ConsoleLogPort, DEFAULT_ADS_CONFIG, DEFAULT_METADATA_CONFIG, DEFAULT_PROGRESS_CONFIG, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SUBTITLES_CONFIG, DEFAULT_UI_CONFIG, DefaultCacheStore, LocalMetadataProvider, LocalSubtitleProvider, MemoryStoragePort, NativeEngine, NoopTelemetryPort, PlayerFacade, ProgressPlugin, ResiliencePlugin, SimpleEventBus, applyEngineProfileToSource, applyRemoteConfig, createCapabilityReport, createDefaultCapabilities, createDefaultConfig, createDefaultPorts, createMediaDecodingReport, createNativeEngineFactory, createSsaiManifestRewritePlugin, detectPlaybackCapabilities, getEngineProfileHints, isCategorizedEventType, selectEngine };
1330
1378
  //# sourceMappingURL=index.js.map
1331
1379
  //# sourceMappingURL=index.js.map