@norskvideo/norsk-sdk 1.0.348 → 1.0.350

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.
@@ -18,13 +18,11 @@ import { HlsTsMultiVariantMessage } from '@norskvideo/norsk-api/lib/media_pb';
18
18
  import { HlsTsVideoMessage } from '@norskvideo/norsk-api/lib/media_pb';
19
19
  import { MediaClient } from '@norskvideo/norsk-api/lib/media_grpc_pb';
20
20
  import { Nullable } from 'typescript-nullable';
21
- import { OptionalBool } from '@norskvideo/norsk-api/lib/shared/common_pb';
22
- import { OptionalInt } from '@norskvideo/norsk-api/lib/shared/common_pb';
23
21
  import { PlainMessage } from '@bufbuild/protobuf';
24
22
  import { Readable } from 'stream';
25
23
  import { RtmpError_UnsupportedAudio } from '@norskvideo/norsk-api/lib/media_pb';
26
24
  import { RtmpError_UnsupportedVideo } from '@norskvideo/norsk-api/lib/media_pb';
27
- import { Scte35SpliceInfoSection } from '@norskvideo/norsk-api/lib/media_pb';
25
+ import { Scte35SpliceInfoSection as Scte35SpliceInfoSection_2 } from '@norskvideo/norsk-api/lib/media_pb';
28
26
  import { StreamKey as StreamKey_2 } from '@norskvideo/norsk-api/lib/media_pb';
29
27
  import { StreamStatisticsSampling } from '@norskvideo/norsk-api/lib/media_pb';
30
28
  import { Subscription } from '@norskvideo/norsk-api/lib/media_pb';
@@ -52,12 +50,20 @@ export declare interface AacSettings {
52
50
  profile: AacProfile;
53
51
  }
54
52
 
53
+ /** @public */
54
+ export declare interface AdMarker {
55
+ id: string;
56
+ startDate: Date;
57
+ durationSeconds: number;
58
+ scte35: Scte35SpliceInfoSection;
59
+ }
60
+
55
61
  export declare class AncillaryNode extends AutoProcessorMediaNode<"ancillary"> {
56
- sendScte35(key: StreamKey, info: Scte35SpliceInfoSection): void;
62
+ sendScte35(key: StreamKey, info: Scte35SpliceInfoSection_2): void;
57
63
  }
58
64
 
59
65
  export declare interface AncillarySettings extends ProcessorNodeSettings<AncillaryNode> {
60
- onScte35?: (stream: StreamKey, message: Scte35SpliceInfoSection) => void;
66
+ onScte35?: (stream: StreamKey, message: Scte35SpliceInfoSection_2) => void;
61
67
  onSmpte2038?: (stream: StreamKey, message: Smpte2038Message) => void;
62
68
  }
63
69
 
@@ -512,7 +518,7 @@ export declare interface AwsS3PushDestinationSettings {
512
518
  * This can be used for supplying updates to configuration to this destination specifically
513
519
  * see: {@link UpdateCredentials}
514
520
  */
515
- id: string;
521
+ id: DestinationId;
516
522
  /**
517
523
  * The AWS region being pushed to
518
524
  */
@@ -756,6 +762,8 @@ export declare function clientPortInternal(): string;
756
762
  * see: {@link NorskOutput.cmafAudio}
757
763
  */
758
764
  export declare class CmafAudioOutputNode extends CmafNodeWithPlaylist<CmafAudioMessage, "audio", CmafAudioOutputNode> {
765
+ /** @public */
766
+ onPlaylistAddition?: (destinationId: DestinationId, pl: HlsPlaylistAdditions) => HlsPlaylist;
759
767
  /**
760
768
  * @public
761
769
  * Updates the credentials for a specific destination within this output by id
@@ -812,14 +820,29 @@ export declare interface CmafMultiVariantOutputSettings extends SinkNodeSettings
812
820
  * XML fragment to add to the (top-level) MPD element
813
821
  */
814
822
  mpdAdditions?: string;
823
+ /**
824
+ * A callback invoked every time a CMAF multi variant playlist is changed
825
+ */
826
+ onPlaylistChange?: (destinationId: DestinationId, playlist: CmafMultiVariantPlaylistData) => CmafMultiVariantPlaylistData;
827
+ }
828
+
829
+ /** @public */
830
+ export declare interface CmafMultiVariantPlaylistData {
831
+ hls: string;
832
+ dash: string;
815
833
  }
816
834
 
817
835
  declare class CmafNodeBase<ClientMessage, Pins extends string, T extends MediaNodeState> extends AutoProcessorMediaNode<Pins> {
818
- constructor(client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: ProcessorNodeSettings<T> & StreamStatisticsMixin, grpcInit: () => grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, subscribeFn: (subscription: Subscription) => Promise<boolean>, _playlistPath: PlaylistPath, subscribedStreamsChangedFn?: (streams: StreamMetadata[]) => void);
836
+ playlists: HlsPlaylistDestination;
837
+ destinations: DestinationId[];
838
+ scheduledTags: ScheduledTag[];
839
+ constructor(client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: ProcessorNodeSettings<T> & StreamStatisticsMixin, grpcInit: () => grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, subscribeFn: (subscription: Subscription) => Promise<boolean>, onPlaylistAddition: PlaylistOnChangeFn<ClientMessage>, destinations: DestinationId[], subscribedStreamsChangedFn?: (streams: StreamMetadata[]) => void);
840
+ scheduleTag(tag: MediaPlaylistPart, scheduleAt: Date, destinationId?: DestinationId): ScheduledTag;
841
+ removeScheduledTag(tagId: number): void;
819
842
  }
820
843
 
821
844
  declare class CmafNodeWithPlaylist<ClientMessage, Pins extends string, T extends MediaNodeState> extends CmafNodeBase<ClientMessage, Pins, T> {
822
- constructor(client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: ProcessorNodeSettings<T> & StreamStatisticsMixin, grpcInit: () => grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, subscribeFn: (subscription: Subscription) => Promise<boolean>, playlistPath: PlaylistPath, sessionId: string);
845
+ constructor(client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: ProcessorNodeSettings<T> & StreamStatisticsMixin, grpcInit: () => grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, subscribeFn: (subscription: Subscription) => Promise<boolean>, playlistPath: PlaylistPath, segmentDuration: number, onPlaylistAddition: PlaylistOnChangeFn<ClientMessage>, destinations: DestinationId[], localDestination?: LocalPullDestinationSettings, maximumPlaylistSegments?: number);
823
846
  /**
824
847
  * @public
825
848
  * Returns the URL to the HLS playlist entry. Note this can only be evaluated once the stream is active as it
@@ -877,6 +900,10 @@ export declare interface CmafOutputSettings extends SinkNodeSettings<CmafAudioOu
877
900
  * Audio or video bitrate for the {@link NorskOutput.cmafMultiVariant} playlist
878
901
  */
879
902
  bitrate?: number;
903
+ /**
904
+ * The maximum number of segments to display in a single generated playlist
905
+ */
906
+ maximumPlaylistSegments?: number;
880
907
  }
881
908
 
882
909
  /**
@@ -884,6 +911,8 @@ export declare interface CmafOutputSettings extends SinkNodeSettings<CmafAudioOu
884
911
  * see: {@link NorskOutput.cmafVideo}
885
912
  */
886
913
  export declare class CmafVideoOutputNode extends CmafNodeWithPlaylist<CmafVideoMessage, "video", CmafVideoOutputNode> {
914
+ /** @public */
915
+ onPlaylistAddition?: (destinationId: DestinationId, pl: HlsPlaylistAdditions) => HlsPlaylist;
887
916
  /**
888
917
  * @public
889
918
  * Updates the credentials for a specific destination within this output by id
@@ -898,6 +927,8 @@ export declare class CmafVideoOutputNode extends CmafNodeWithPlaylist<CmafVideoM
898
927
  * see: {@link NorskOutput.cmafWebVtt}
899
928
  */
900
929
  export declare class CmafWebVttOutputNode extends CmafNodeWithPlaylist<CmafWebVttMessage, "subtitle", CmafWebVttOutputNode> {
930
+ /** @public */
931
+ onPlaylistAddition?: (destinationId: DestinationId, pl: HlsPlaylistAdditions) => HlsPlaylist;
901
932
  /**
902
933
  * @public
903
934
  * Updates the credentials for a specific destination within this output by id
@@ -941,7 +972,7 @@ export declare interface CmafWebVttOutputSettings extends SinkNodeSettings<CmafW
941
972
  /**
942
973
  * The maximum number of segments to display in a single generated playlist
943
974
  */
944
- maximumPlaylistSegments: number;
975
+ maximumPlaylistSegments?: number;
945
976
  }
946
977
 
947
978
  /** @public */
@@ -1111,6 +1142,9 @@ export declare type DeckLinkVideoIOSupport = "capture" | "playback";
1111
1142
  /** @public */
1112
1143
  export declare type DeferredVideoComposeSettings<Pins extends string> = (streams: StreamMetadata[]) => VideoComposeSettings<Pins> | undefined;
1113
1144
 
1145
+ /** @public */
1146
+ export declare type DestinationId = string;
1147
+
1114
1148
  /**
1115
1149
  * @public
1116
1150
  * Drop every N frames from an incoming video stream
@@ -1329,6 +1363,74 @@ export declare interface FrameRate {
1329
1363
  seconds: number;
1330
1364
  }
1331
1365
 
1366
+ export declare type FrameStoreCut = {
1367
+ startDateTime: Date;
1368
+ durationMs: number;
1369
+ sessionNum?: number;
1370
+ };
1371
+
1372
+ /**
1373
+ * @public
1374
+ * see: {@link NorskInput.frameStorePlayer}
1375
+ */
1376
+ export declare class FrameStorePlayerNode extends SourceMediaNode {
1377
+ }
1378
+
1379
+ /**
1380
+ * @public
1381
+ * Settings for Frame Store playback
1382
+ * see: {@link NorskInput.frameStorePlayer}
1383
+ */
1384
+ export declare interface FrameStorePlayerSettings extends InputSettings<FrameStorePlayerNode>, StreamStatisticsMixin {
1385
+ /**
1386
+ * Required: Name of the frame store instance.
1387
+ */
1388
+ name: string;
1389
+ /**
1390
+ * Required: The streams you want to playback from the frame store
1391
+ */
1392
+ streamSelection: FrameStoreStreamSelection;
1393
+ /**
1394
+ * Required: The start times and durations of the playback
1395
+ */
1396
+ cuts: FrameStoreCut[];
1397
+ /**
1398
+ * Required: If a start time or end time falls mid-gop, should the gop be trimmed to be frame accurate?
1399
+ */
1400
+ trimPartialSegments: boolean;
1401
+ /** Callback to be notified when playback ends */
1402
+ onEof?: () => void;
1403
+ }
1404
+
1405
+ /**
1406
+ * @public
1407
+ * see: {@link NorskOutput.frameStoreRecording}
1408
+ */
1409
+ export declare class FrameStoreRecorderNode extends AutoSinkMediaNode<"audio" | "video"> {
1410
+ }
1411
+
1412
+ /**
1413
+ * @public
1414
+ * Settings to configure a frame store recorder
1415
+ * see {@link NorskOutput.frameStoreRecorder}
1416
+ */
1417
+ export declare interface FrameStoreRecorderSettings extends SinkNodeSettings<FrameStoreRecorderNode>, StreamStatisticsMixin {
1418
+ /**
1419
+ * Required: Name of this frame store instance.
1420
+ */
1421
+ name: string;
1422
+ /**
1423
+ * Required: Path for the frame store database.
1424
+ */
1425
+ path: string;
1426
+ /**
1427
+ * Required: Duration of the frame store chunk files
1428
+ */
1429
+ chunkFileDurationSeconds: number;
1430
+ }
1431
+
1432
+ export declare type FrameStoreStreamSelection = "all" | StreamKey[];
1433
+
1332
1434
  export declare function fromVancPayloadFormat(format: VancPayloadFormat_2): VancPayloadFormat;
1333
1435
 
1334
1436
  /**
@@ -1355,6 +1457,21 @@ export declare interface HardwareInfo {
1355
1457
  deckLinkCards: DeckLinkCard[];
1356
1458
  }
1357
1459
 
1460
+ /** @public */
1461
+ export declare type HlsPlaylist = {
1462
+ hlsFilePartPlaylist: MediaPlaylistPart[];
1463
+ hlsByteRangePlaylist: MediaPlaylistPart[];
1464
+ hlsStandardPlaylist: MediaPlaylistPart[];
1465
+ programDateTime?: Date;
1466
+ };
1467
+
1468
+ /** @public */
1469
+ export declare type HlsPlaylistAdditions = HlsPlaylist;
1470
+
1471
+ declare type HlsPlaylistDestination = {
1472
+ [destination: DestinationId]: HlsPlaylist;
1473
+ };
1474
+
1358
1475
  /**
1359
1476
  * @public
1360
1477
  * Configuration for pushing a segmented media stream directly to a generic http server
@@ -1382,7 +1499,7 @@ export declare interface HlsPushDestinationSettings {
1382
1499
  * This can be used for supplying updates to configuration to this destination specifically
1383
1500
  * see: {@link UpdateCredentials}
1384
1501
  */
1385
- id: string;
1502
+ id: DestinationId;
1386
1503
  /**
1387
1504
  * Informs the playlist generation how long segments will be retained for on the remote server
1388
1505
  * in order to generate an accurate playlist
@@ -1390,11 +1507,19 @@ export declare interface HlsPushDestinationSettings {
1390
1507
  retentionPeriodSeconds: number;
1391
1508
  }
1392
1509
 
1510
+ /** @public */
1511
+ export declare interface HlsTag {
1512
+ tag: string;
1513
+ }
1514
+
1393
1515
  /**
1394
1516
  * @public
1395
1517
  * see: {@link NorskOutput.hlsTsAudio}
1396
1518
  */
1397
1519
  export declare class HlsTsAudioOutputNode extends CmafNodeWithPlaylist<HlsTsAudioMessage, "audio", HlsTsAudioOutputNode> {
1520
+ /** @public */
1521
+ onPlaylistAddition?: (destinationId: DestinationId, pl: TsPlaylistAdditions) => TsPlaylist;
1522
+ get playlist(): HlsTsPlaylistDestination;
1398
1523
  /**
1399
1524
  * @public
1400
1525
  * Updates the credentials for a specific destination within this output by id
@@ -1443,6 +1568,10 @@ export declare interface HlsTsAudioOutputSettings extends SinkNodeSettings<HlsTs
1443
1568
  * Audio bitrate for the {@link NorskOutput.hlsTsMultiVariant} playlist
1444
1569
  */
1445
1570
  bitrate?: number;
1571
+ /**
1572
+ * The maximum number of segments to display in a single generated playlist
1573
+ */
1574
+ maximumPlaylistSegments?: number;
1446
1575
  }
1447
1576
 
1448
1577
  /**
@@ -1524,13 +1653,24 @@ export declare interface HlsTsMultiVariantOutputSettings extends SinkNodeSetting
1524
1653
  * Directives to add to the m3u multi variant playlist
1525
1654
  */
1526
1655
  m3uAdditions?: string;
1656
+ /**
1657
+ * A callback invoked every time a TS multi variant playlist is changed
1658
+ */
1659
+ onPlaylistChange?: (destinationId: DestinationId, playlist: string) => string;
1527
1660
  }
1528
1661
 
1662
+ declare type HlsTsPlaylistDestination = {
1663
+ [destination: DestinationId]: MediaPlaylistPart[];
1664
+ };
1665
+
1529
1666
  /**
1530
1667
  * @public
1531
1668
  * see: {@link NorskOutput.hlsTsVideo}
1532
1669
  */
1533
1670
  export declare class HlsTsVideoOutputNode extends CmafNodeWithPlaylist<HlsTsVideoMessage, "video", HlsTsVideoOutputNode> {
1671
+ /** @public */
1672
+ onPlaylistAddition?: (destinationId: DestinationId, pl: TsPlaylistAdditions) => TsPlaylist;
1673
+ get playlist(): HlsTsPlaylistDestination;
1534
1674
  /**
1535
1675
  * @public
1536
1676
  * Updates the credentials for a specific destination within this output by id
@@ -1579,6 +1719,10 @@ export declare interface HlsTsVideoOutputSettings extends SinkNodeSettings<HlsTs
1579
1719
  * Video bitrate for the {@link NorskOutput.hlsTsMultiVariant} playlist
1580
1720
  */
1581
1721
  bitrate?: number;
1722
+ /**
1723
+ * The maximum number of segments to display in a single generated playlist
1724
+ */
1725
+ maximumPlaylistSegments?: number;
1582
1726
  }
1583
1727
 
1584
1728
  /** @public */
@@ -1600,6 +1744,16 @@ export declare interface InputSettings<T extends MediaNodeState> extends SourceN
1600
1744
  sourceName: string;
1601
1745
  }
1602
1746
 
1747
+ /** @public */
1748
+ export declare type InsertComponent = {
1749
+ components: Scte35InsertCommandComponent[];
1750
+ };
1751
+
1752
+ /** @public */
1753
+ export declare type InsertProgram = {
1754
+ spliceTime?: Scte35SpliceTime;
1755
+ };
1756
+
1603
1757
  /** @public A time interval measured as ticks / (ticks per second) */
1604
1758
  export declare interface Interval {
1605
1759
  n: number;
@@ -1612,6 +1766,21 @@ export declare interface IntervalTimestamp {
1612
1766
  d: number;
1613
1767
  }
1614
1768
 
1769
+ /** @public */
1770
+ export declare function isAdMarker(seg: MediaPlaylistPart): seg is AdMarker;
1771
+
1772
+ /** @public */
1773
+ export declare function isHlsTag(seg: MediaPlaylistPart): seg is HlsTag;
1774
+
1775
+ /** @public */
1776
+ export declare function isMediaSegment(seg: MediaPlaylistPart): seg is MediaSegment;
1777
+
1778
+ /** @public */
1779
+ export declare function isProgramDateTime(seg: MediaPlaylistPart): seg is ProgramDateTime;
1780
+
1781
+ /** @public */
1782
+ export declare function isScheduledTag(seg: MediaPlaylistPart): seg is ScheduledTag;
1783
+
1615
1784
  /**
1616
1785
  * @public
1617
1786
  * see: {@link NorskTransform.jitterBuffer}
@@ -1648,6 +1817,10 @@ export declare interface LocalFileInputSettings extends InputSettings<SourceMedi
1648
1817
  * */
1649
1818
  export declare interface LocalPullDestinationSettings {
1650
1819
  type: "local";
1820
+ /**
1821
+ * A unique identifier for this destination
1822
+ */
1823
+ id: DestinationId;
1651
1824
  /**
1652
1825
  * Optionally supply a string that will be inserted into the path structure for segments published in this stream
1653
1826
  *
@@ -1772,10 +1945,23 @@ export declare type MediaNodeId = string;
1772
1945
  /** @public */
1773
1946
  export declare class MediaNodeState {
1774
1947
  id: MediaNodeId | undefined;
1948
+ closeAwait?: () => void;
1949
+ closed: boolean;
1775
1950
  constructor(client: MediaClient);
1776
1951
  close(): Promise<void>;
1777
1952
  }
1778
1953
 
1954
+ /** @public */
1955
+ export declare type MediaPlaylistPart = MediaSegment | AdMarker | HlsTag | ProgramDateTime | ScheduledTag;
1956
+
1957
+ /** @public */
1958
+ export declare interface MediaSegment {
1959
+ uri: string;
1960
+ duration: number;
1961
+ title: string;
1962
+ number?: number;
1963
+ }
1964
+
1779
1965
  /**
1780
1966
  * @public
1781
1967
  * Generate encryption parameters from from an encryption KeyID and Key,
@@ -1786,6 +1972,21 @@ export declare function mkEncryption(encryption: string | undefined, pssh?: stri
1786
1972
  /** @public */
1787
1973
  export declare function mkSine(freq: number): Wave;
1788
1974
 
1975
+ /**
1976
+ * @public
1977
+ * see: {@link NorskOutput.moqEgest}
1978
+ */
1979
+ export declare class MoqEgestNode extends AutoSinkMediaNode<"audio" | "video"> {
1980
+ }
1981
+
1982
+ /**
1983
+ * @public
1984
+ * Settings to configure a Moq Egest
1985
+ * see {@link NorskOutput.moqEgest}
1986
+ */
1987
+ export declare interface MoqEgestSettings extends SinkNodeSettings<MoqEgestNode>, StreamStatisticsMixin {
1988
+ }
1989
+
1789
1990
  /** @public */
1790
1991
  export declare interface MultiStreamStatistics {
1791
1992
  allStreams: SingleStreamStatistics[];
@@ -1825,7 +2026,7 @@ export declare interface NodeSettings<T extends MediaNodeState> {
1825
2026
  * This may be by request, because the node naturally exits or an error has occurred. See `onError`
1826
2027
  * to be notified of errors which may lead to the node closing.
1827
2028
  */
1828
- onClose?: () => void;
2029
+ onClose?: (() => Promise<void>) | (() => void);
1829
2030
  /**
1830
2031
  * Callback to synchronously perform an action when node creation is complete
1831
2032
  * (e.g. subscribe a downstream node before the first context/frame might arrive)
@@ -1973,7 +2174,7 @@ export declare interface NorskInput {
1973
2174
  * This can be multicast/unicast or broadcast
1974
2175
  * @param settings - Configuration for the UDP input
1975
2176
  */
1976
- udpTs(settings: RemoteInputSettings<UdpTsInputNode>): Promise<UdpTsInputNode>;
2177
+ udpTs(settings: UdpTsInputSettings): Promise<UdpTsInputNode>;
1977
2178
  fileWebVtt(settings: LocalFileInputSettings): Promise<FileWebVttInputNode>;
1978
2179
  /**
1979
2180
  * Read an image from a file. Various image formats are supported, see the
@@ -1993,6 +2194,8 @@ export declare interface NorskInput {
1993
2194
  fileMp4(settings: FileMp4InputSettings): Promise<FileMp4InputNode>;
1994
2195
  /**
1995
2196
  * Stream from a remote RTP source
2197
+ *
2198
+ * Note that MPEG-TS sources encapsulated in RTP should use the {@link NorskInput.udpTs} input with appropriate config.
1996
2199
  * @param settings - Configuration for the RTP input
1997
2200
  */
1998
2201
  rtp(settings: RtpInputSettings): Promise<RtpInputNode>;
@@ -2022,6 +2225,10 @@ export declare interface NorskInput {
2022
2225
  * @param settings - Settings for the SDI capture
2023
2226
  */
2024
2227
  deckLink(settings: DeckLinkInputSettings): Promise<DeckLinkInputNode>;
2228
+ /**
2229
+ * Playback from an existing Frame Store recording
2230
+ */
2231
+ frameStorePlayer(settings: FrameStorePlayerSettings): Promise<FrameStorePlayerNode>;
2025
2232
  }
2026
2233
 
2027
2234
  /**
@@ -2160,6 +2367,18 @@ export declare interface NorskOutput {
2160
2367
  * @param settings - Configuration for the MP4 output.
2161
2368
  */
2162
2369
  fileMp4(settings: FileMp4OutputSettings): Promise<FileMp4OutputNode>;
2370
+ /**
2371
+ * Create a frame store recording
2372
+ *
2373
+ * @param settings - Configuration for the frame store recorder
2374
+ */
2375
+ frameStoreRecording(settings: FrameStoreRecorderSettings): Promise<FrameStoreRecorderNode>;
2376
+ /**
2377
+ * Create a Moq Egest
2378
+ *
2379
+ * @param settings - Configuration for the egest
2380
+ */
2381
+ moqEgest(settings: MoqEgestSettings): Promise<MoqEgestNode>;
2163
2382
  }
2164
2383
 
2165
2384
  /** @public */
@@ -2586,6 +2805,14 @@ export declare type PinToKey<Pins extends string> = Nullable<Partial<Record<Pins
2586
2805
  /** @public */
2587
2806
  export declare type PixelFormat = "bgra" | "rgba" | "yuv420p" | "yuv422p" | "yuv444p" | "yuva420p" | "yuva422p" | "yuva444p";
2588
2807
 
2808
+ /** @public */
2809
+ export declare type PlaylistOnChangeFn<ClientMessage> = {
2810
+ cmafMediaPlaylist?: (grpcStream: grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, destinationId: DestinationId, additions: HlsPlaylistAdditions, playlistWithAdditions: HlsPlaylist) => void;
2811
+ tsMediaPlaylist?: (grpcStream: grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, destinationId: DestinationId, additions: TsPlaylistAdditions, playlistWithAdditions: MediaPlaylistPart[]) => void;
2812
+ cmafMultiVariantPlaylist?: (grpcStream: grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, destinationId: DestinationId, playlist: CmafMultiVariantPlaylistData) => void;
2813
+ hlsTsMultiVariantPlaylist?: (grpcStream: grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, destinationId: DestinationId, playlist: string) => void;
2814
+ };
2815
+
2589
2816
  /** @public */
2590
2817
  declare enum PlaylistPath {
2591
2818
  Cmaf = 0,
@@ -2628,6 +2855,11 @@ export declare class ProcessorMediaNode<Pins extends string> {
2628
2855
  export declare interface ProcessorNodeSettings<T extends MediaNodeState> extends SinkNodeSettings<T>, SourceNodeSettings<T> {
2629
2856
  }
2630
2857
 
2858
+ /** @public */
2859
+ export declare interface ProgramDateTime {
2860
+ programDateTime: Date;
2861
+ }
2862
+
2631
2863
  /** @public */
2632
2864
  export declare function publicUrlPrefix(): string;
2633
2865
 
@@ -2787,6 +3019,11 @@ export declare interface Resolution {
2787
3019
  height: number;
2788
3020
  }
2789
3021
 
3022
+ /** @public */
3023
+ export declare enum RtmpConnectionFailureReason {
3024
+ RtmpConnectionFailedRetry = "RtmpConnectionFailedRetry"
3025
+ }
3026
+
2790
3027
  /**
2791
3028
  * @public
2792
3029
  * see: {@link NorskOutput.rtmp}
@@ -2808,6 +3045,16 @@ export declare interface RtmpOutputSettings extends SinkNodeSettings<RtmpOutputN
2808
3045
  bufferDelayMs?: number;
2809
3046
  /** Called when the RTMP output succesfully connects to a server and starts publishing data */
2810
3047
  onPublishStart?: () => void;
3048
+ /** Called when the connection to the RTMP server fails */
3049
+ onConnectionFailure?: (failureReason: RtmpConnectionFailureReason) => void;
3050
+ /**
3051
+ * Number of seconds to wait until a retry is attempted to the RTMP server.
3052
+ * Defaults to five seconds
3053
+ */
3054
+ retryConnectionTimeout?: number;
3055
+ sslOptions?: {
3056
+ verifyPeerCert?: boolean;
3057
+ };
2811
3058
  }
2812
3059
 
2813
3060
  /**
@@ -2830,6 +3077,11 @@ export declare class RtmpServerInputNode extends SourceMediaNode {
2830
3077
  export declare interface RtmpServerInputSettings extends SourceNodeSettings<RtmpServerInputNode>, StreamStatisticsMixin {
2831
3078
  /** The port the RTMP server should listen on */
2832
3079
  port?: number;
3080
+ ssl?: boolean;
3081
+ sslOptions?: {
3082
+ certFile?: string;
3083
+ keyFile?: string;
3084
+ };
2833
3085
  /**
2834
3086
  * On connect callback, use to accept/reject connections given app/url in use
2835
3087
  * @eventProperty
@@ -2992,7 +3244,7 @@ export declare interface RtpStreamSettings {
2992
3244
  ip: string;
2993
3245
  /** The interface to bind to, "loopback" and "any" are special cases
2994
3246
  * and anything else will be interpreted as the name of a network interface */
2995
- iface: string;
3247
+ interface: string;
2996
3248
  /** The port to connect to for the RTP stream itself */
2997
3249
  rtpPort: number;
2998
3250
  /** The port to connect to for the associated RTCP stream */
@@ -3025,6 +3277,196 @@ export declare type SampleFormat =
3025
3277
  /** @public Audio sample rate, in Hz */
3026
3278
  export declare type SampleRate = 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
3027
3279
 
3280
+ /** @public */
3281
+ export declare type ScheduleComponent = {
3282
+ components: Scte35ScheduleCommandComponent[];
3283
+ };
3284
+
3285
+ /** @public */
3286
+ export declare type ScheduledTag = [number, MediaPlaylistPart, Date, DestinationId?];
3287
+
3288
+ /** @public */
3289
+ export declare type ScheduleProgram = {
3290
+ utcSpliceTime: number;
3291
+ };
3292
+
3293
+ /** @public */
3294
+ export declare type Scte35AudioComponent = {
3295
+ componentTag: number;
3296
+ isoCode: number;
3297
+ bitStreamMode: number;
3298
+ numChannels: number;
3299
+ fullSrvcAudio: boolean;
3300
+ };
3301
+
3302
+ /** @public */
3303
+ export declare type Scte35AudioDescriptor = {
3304
+ components: Scte35AudioComponent[];
3305
+ };
3306
+
3307
+ /** @public */
3308
+ export declare type Scte35AvailDescriptor = {
3309
+ providerAvailId: number;
3310
+ };
3311
+
3312
+ /** @public */
3313
+ export declare type Scte35BreakDuration = {
3314
+ autoReturn: boolean;
3315
+ duration: bigint;
3316
+ };
3317
+
3318
+ /** @public */
3319
+ export declare type Scte35DtmfDescriptor = {
3320
+ preroll: number;
3321
+ dtmfChars: Uint8Array;
3322
+ };
3323
+
3324
+ /** @public */
3325
+ export declare type Scte35GenericDescriptor = {
3326
+ identifier: number;
3327
+ spliceDescriptorTag: number;
3328
+ privateBytes: Uint8Array;
3329
+ };
3330
+
3331
+ /** @public */
3332
+ export declare type Scte35InsertCommand = {
3333
+ spliceEventId: number;
3334
+ spliceEventCancelIndicator: boolean;
3335
+ outOfNetworkIndicator: boolean;
3336
+ spliceImmediateFlag: boolean;
3337
+ mode: Scte35InsertCommandMode;
3338
+ breakDuration: Scte35BreakDuration;
3339
+ uniqueProgramId: number;
3340
+ availNum: number;
3341
+ availsExpected: number;
3342
+ };
3343
+
3344
+ /** @public */
3345
+ export declare type Scte35InsertCommandComponent = {
3346
+ componentTag: number;
3347
+ spliceTime: Scte35SpliceTime;
3348
+ };
3349
+
3350
+ /** @public */
3351
+ export declare type Scte35InsertCommandMode = InsertProgram | InsertComponent;
3352
+
3353
+ /** @public */
3354
+ export declare type Scte35PrivateCommand = {
3355
+ identifier: number;
3356
+ privateBytes: Uint8Array;
3357
+ };
3358
+
3359
+ /** @public */
3360
+ export declare type Scte35ReservedCommand = {
3361
+ reserved: number;
3362
+ };
3363
+
3364
+ /** @public */
3365
+ export declare type Scte35ScheduleCommand = {
3366
+ items: Scte35ScheduleItem[];
3367
+ };
3368
+
3369
+ /** @public */
3370
+ export declare type Scte35ScheduleCommandComponent = {
3371
+ componentTag: number;
3372
+ utcSpliceTime: number;
3373
+ };
3374
+
3375
+ /** @public */
3376
+ export declare type Scte35ScheduleCommandMode = ScheduleProgram | ScheduleComponent;
3377
+
3378
+ /** @public */
3379
+ export declare type Scte35ScheduleItem = {
3380
+ spliceEventId: number;
3381
+ spliceEventCancelIndicator: boolean;
3382
+ outOfNetworkIndicator: boolean;
3383
+ mode: Scte35ScheduleCommandMode;
3384
+ breakDuration: Scte35BreakDuration;
3385
+ uniqueProgramId: number;
3386
+ availNum: number;
3387
+ availsExpected: number;
3388
+ };
3389
+
3390
+ /** @public */
3391
+ export declare type Scte35SegmentationComponent = {
3392
+ componentTag: number;
3393
+ ptsOffset: bigint;
3394
+ };
3395
+
3396
+ /** @public */
3397
+ export declare type Scte35SegmentationDescriptor = {
3398
+ segmentationEventId: number;
3399
+ segmentationEventCancelIndicator: boolean;
3400
+ programSegmentationFlag: boolean;
3401
+ deliveryRestrictions?: Scte35SegmentDeliveryRestrictions;
3402
+ components: Scte35SegmentationComponent[];
3403
+ segmentationDuration?: bigint;
3404
+ segmentationUpidType: number;
3405
+ segmentationUpid: Uint8Array;
3406
+ segmentationTypeId: number;
3407
+ segmentNum: number;
3408
+ segmentsExpected: number;
3409
+ subSegmentNum?: number;
3410
+ subSegmentsExpected?: number;
3411
+ };
3412
+
3413
+ /** @public */
3414
+ export declare type Scte35SegmentDeliveryRestrictions = {
3415
+ webDeliveryAllowedFlag: boolean;
3416
+ noRegionalBlackoutFlag: boolean;
3417
+ archiveAllowedFlag: boolean;
3418
+ deviceRestrictions: number;
3419
+ };
3420
+
3421
+ /** @public */
3422
+ export declare type Scte35SpliceCommand = {
3423
+ type: Scte35SpliceCommandType;
3424
+ value?: Scte35InsertCommand | Scte35ScheduleCommand | Scte35TimeSignalCommand | Scte35PrivateCommand | Scte35ReservedCommand;
3425
+ };
3426
+
3427
+ /** @public */
3428
+ export declare type Scte35SpliceCommandType = "null" | "schedule" | "insert" | "timeSignal" | "bandwidthReservation" | "privateCommand" | "reserved";
3429
+
3430
+ /** @public */
3431
+ export declare type Scte35SpliceDescriptor = {
3432
+ type: Scte35SpliceDescriptorType;
3433
+ value: Scte35AvailDescriptor | Scte35DtmfDescriptor | Scte35SegmentationDescriptor | Scte35TimeDescriptor | Scte35AudioDescriptor | Scte35GenericDescriptor;
3434
+ };
3435
+
3436
+ /** @public */
3437
+ /** @public */
3438
+ export declare type Scte35SpliceDescriptorType = "avail" | "dtmf" | "segmentation" | "time" | "audio" | "generic";
3439
+
3440
+ /** @public */
3441
+ export declare type Scte35SpliceInfoSection = {
3442
+ sapType: number;
3443
+ protocolVersion: number;
3444
+ encryptedPacket: boolean;
3445
+ encryptionAlgorithm: number;
3446
+ ptsAdjustment: bigint;
3447
+ cwIndex: number;
3448
+ tier: number;
3449
+ spliceCommand: Scte35SpliceCommand;
3450
+ descriptors: Scte35SpliceDescriptor[];
3451
+ };
3452
+
3453
+ /** @public */
3454
+ export declare type Scte35SpliceTime = {
3455
+ ptsTime?: number;
3456
+ };
3457
+
3458
+ /** @public */
3459
+ export declare type Scte35TimeDescriptor = {
3460
+ taiSeconds: bigint;
3461
+ taiNs: number;
3462
+ utcOffset: number;
3463
+ };
3464
+
3465
+ /** @public */
3466
+ export declare type Scte35TimeSignalCommand = {
3467
+ spliceTime: Scte35SpliceTime;
3468
+ };
3469
+
3028
3470
  /** @public */
3029
3471
  export declare function selectAudio(streams: readonly StreamMetadata[]): StreamKey[];
3030
3472
 
@@ -3375,7 +3817,7 @@ export declare interface StreamKeySettings {
3375
3817
 
3376
3818
  /** @public */
3377
3819
  export declare interface StreamMetadata {
3378
- streamKey?: StreamKey;
3820
+ streamKey: StreamKey;
3379
3821
  message: StreamMetadataMessage;
3380
3822
  }
3381
3823
 
@@ -3415,7 +3857,7 @@ export declare class StreamMetadataOverrideNode extends AutoProcessorMediaNode<"
3415
3857
 
3416
3858
  /**
3417
3859
  * @public
3418
- * Settings for a Stream Key Metadata Override Node
3860
+ * Settings for a Stream Metadata Override Node
3419
3861
  * see: {@link NorskTransform.streamMetadataOverride}
3420
3862
  * */
3421
3863
  export declare interface StreamMetadataOverrideSettings extends ProcessorNodeSettings<StreamMetadataOverrideNode>, StreamMetadataOverrideSettingsUpdate {
@@ -3692,10 +4134,6 @@ export declare interface SubtitleStreamMetadata {
3692
4134
  */
3693
4135
  export declare function subtitleStreams(streams: readonly StreamMetadata[]): StreamMetadata[];
3694
4136
 
3695
- export declare function toOptBool(b?: boolean): OptionalBool | undefined;
3696
-
3697
- export declare function toOptInt(i?: number): OptionalInt | undefined;
3698
-
3699
4137
  declare class TsCommonInputNode<SourceMessage, T extends SourceMediaNode> extends SourceMediaNode {
3700
4138
  constructor(tsType: TsInputType, client: MediaClient, unregisterNode: (node: MediaNodeState) => void, settings: SourceNodeSettings<T> & StreamStatisticsMixin, nudgeFn: (nudge: TimestampProgramNudge) => SourceMessage, onEof: (() => void) | undefined, grpcStartFn: () => grpc.ClientDuplexStream<SourceMessage, TsInputEvent>);
3701
4139
  /**
@@ -3712,6 +4150,12 @@ declare enum TsInputType {
3712
4150
  M3u8 = 3
3713
4151
  }
3714
4152
 
4153
+ /** @public */
4154
+ export declare type TsPlaylist = MediaPlaylistPart[];
4155
+
4156
+ /** @public */
4157
+ export declare type TsPlaylistAdditions = [MediaPlaylistPart[], Date];
4158
+
3715
4159
  /**
3716
4160
  * @public
3717
4161
  * see: {@link NorskInput.udpTs}
@@ -3725,6 +4169,10 @@ export declare class UdpTsInputNode extends TsCommonInputNode<UdpTsInputMessage,
3725
4169
  * see: {@link NorskInput.udpTs}
3726
4170
  * */
3727
4171
  export declare interface UdpTsInputSettings extends RemoteInputSettings<UdpTsInputNode> {
4172
+ interface?: string;
4173
+ timeout?: number;
4174
+ /** Whether to expect the input TS to be encapsulated in RTP via RFC 2250 (default: false) */
4175
+ rtpDecapsulate?: boolean;
3728
4176
  }
3729
4177
 
3730
4178
  /**
@@ -3750,11 +4198,13 @@ export declare interface UdpTsOutputSettings extends SinkNodeSettings<UdpTsOutpu
3750
4198
  * This can be 'any', 'loopback' or any named interface on the machine
3751
4199
  * Note: If running inside docker this may be different to expected
3752
4200
  */
3753
- iface: string;
4201
+ interface: string;
3754
4202
  /** The port to send to */
3755
4203
  port: number;
3756
4204
  /** Jitter buffer delay in milliseconds */
3757
4205
  bufferDelayMs?: number;
4206
+ /** Whether to encapsulate in RTP via RFC 2250 (default: false) */
4207
+ rtpEncapsulate?: boolean;
3758
4208
  }
3759
4209
 
3760
4210
  /**