@norskvideo/norsk-sdk 0.0.329 → 0.0.330
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/dist/norsk-sdk.d.ts +115 -93
- package/lib/src/media_nodes/input.d.ts +7 -3
- package/lib/src/media_nodes/input.js +17 -16
- package/lib/src/media_nodes/output.d.ts +20 -27
- package/lib/src/media_nodes/output.js +40 -38
- package/lib/src/media_nodes/processor.d.ts +17 -7
- package/lib/src/media_nodes/processor.js +3 -1
- package/lib/src/media_nodes/types.d.ts +16 -1
- package/lib/src/sdk.js +5 -5
- package/package.json +2 -2
- package/src/sdk.ts +18 -18
package/dist/norsk-sdk.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AudioCodec } from '@norskvideo/norsk-api/lib/media_pb';
|
|
2
|
+
import { CmafAudioMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
3
|
+
import { CmafMasterMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
4
|
+
import { CmafVideoMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
5
|
+
import { CmafWebVttMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
2
6
|
import { Context } from '@norskvideo/norsk-api/lib/media_pb';
|
|
3
7
|
import { CurrentLoad } from '@norskvideo/norsk-api/lib/shared/common_pb';
|
|
4
8
|
import { ExplicitChannel } from '@norskvideo/norsk-api/lib/media_pb';
|
|
5
9
|
import * as grpc from '@grpc/grpc-js';
|
|
6
|
-
import { HlsAudioMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
7
|
-
import { HlsMasterMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
8
10
|
import { HlsMasterPushMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
9
11
|
import { HlsOutputEvent } from '@norskvideo/norsk-api/lib/media_pb';
|
|
10
12
|
import { HlsTsAudioMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
@@ -12,8 +14,6 @@ import { HlsTsAudioPushMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
|
12
14
|
import { HlsTsCombinedPushMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
13
15
|
import { HlsTsVideoMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
14
16
|
import { HlsTsVideoPushMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
15
|
-
import { HlsVideoMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
16
|
-
import { HlsWebVttMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
17
17
|
import { HlsWebVttPushMessage } from '@norskvideo/norsk-api/lib/media_pb';
|
|
18
18
|
import { MediaClient } from '@norskvideo/norsk-api/lib/media_grpc_pb';
|
|
19
19
|
import { Nullable } from 'typescript-nullable';
|
|
@@ -49,7 +49,8 @@ export declare class AudioBuildMultichannelNode extends AutoProcessorMediaNode<"
|
|
|
49
49
|
/** @public */
|
|
50
50
|
export declare interface AudioBuildMultichannelSettings extends ProcessorNodeSettings<AudioBuildMultichannelNode> {
|
|
51
51
|
channelLayout: ChannelLayout;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Stream keys specifying the source for each channel, where the order is
|
|
53
54
|
* significant. The streams must all have the same sample format and sample
|
|
54
55
|
* rate.
|
|
55
56
|
*/
|
|
@@ -162,11 +163,11 @@ export declare class AudioMixerNode<Pins extends string> extends ProcessorMediaN
|
|
|
162
163
|
|
|
163
164
|
/** @public */
|
|
164
165
|
export declare interface AudioMixerSettings<Pins extends string> extends ProcessorNodeSettings<AudioMixerNode<Pins>> {
|
|
165
|
-
/** The sources to mix */
|
|
166
|
+
/** The audio sources to mix */
|
|
166
167
|
sources: readonly AudioMixerSource<Pins>[];
|
|
167
|
-
/** The name
|
|
168
|
+
/** The source name to use for the output stream */
|
|
168
169
|
outputSource: string;
|
|
169
|
-
/** The sample rate
|
|
170
|
+
/** The sample rate that the mixer runs at */
|
|
170
171
|
sampleRate?: SampleRate;
|
|
171
172
|
}
|
|
172
173
|
|
|
@@ -302,11 +303,13 @@ export declare class AwsTranscribeNode extends AutoProcessorMediaNode<"audio"> {
|
|
|
302
303
|
|
|
303
304
|
/** @public */
|
|
304
305
|
export declare interface AwsTranscribeSettings extends ProcessorNodeSettings<AwsTranscribeNode> {
|
|
306
|
+
/** Region for the transcribe endpoint */
|
|
305
307
|
awsRegion: string;
|
|
306
308
|
outputStreamId: number;
|
|
307
309
|
language: string;
|
|
308
310
|
sentenceBuildMode: SentenceBuildMode;
|
|
309
311
|
sentenceStabilizationMode: StabilizationMode;
|
|
312
|
+
awsCredentials?: AwsCredentials;
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
/**
|
|
@@ -500,9 +503,82 @@ export declare interface ChaosMonkeySettings extends ProcessorNodeSettings<Chaos
|
|
|
500
503
|
frameDrop?: DropRandom | DropEvery;
|
|
501
504
|
}
|
|
502
505
|
|
|
506
|
+
/**
|
|
507
|
+
* @public
|
|
508
|
+
* {@link NorskOutput.cmafAudio}
|
|
509
|
+
*/
|
|
510
|
+
export declare class CmafAudioOutputNode extends HlsNodeWithPlaylist<CmafAudioMessage, "audio", CmafAudioOutputNode> {
|
|
511
|
+
updateCredentials(settings: UpdateCredentials): void;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/** @public */
|
|
515
|
+
export declare interface CmafAudioOutputSettings extends SinkNodeSettings<CmafAudioOutputNode> {
|
|
516
|
+
segmentDurationSeconds: number;
|
|
517
|
+
partDurationSeconds: number;
|
|
518
|
+
delayOutputMs?: number;
|
|
519
|
+
encryption?: {
|
|
520
|
+
encryptionKey: string;
|
|
521
|
+
encryptionKeyId: string;
|
|
522
|
+
};
|
|
523
|
+
destinations: CMAFDestinationSettings[];
|
|
524
|
+
}
|
|
525
|
+
|
|
503
526
|
/** @public */
|
|
504
527
|
export declare type CMAFDestinationSettings = HlsPushDestinationSettings | AwsS3PushDestinationSettings | LocalPullDestinationSettings;
|
|
505
528
|
|
|
529
|
+
/**
|
|
530
|
+
* @public
|
|
531
|
+
* {@link NorskOutput.cmafMaster}
|
|
532
|
+
*/
|
|
533
|
+
export declare class CmafMasterOutputNode extends CommonHlsNode<CmafMasterMessage, "video" | "audio" | "subtitle", CmafMasterOutputNode> {
|
|
534
|
+
/** @public The URL of the master playlist */
|
|
535
|
+
playlistUrl: string;
|
|
536
|
+
updateCredentials(settings: UpdateCredentials): void;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/** @public */
|
|
540
|
+
export declare interface CmafMasterOutputSettings extends SinkNodeSettings<CmafMasterOutputNode> {
|
|
541
|
+
playlistName: string;
|
|
542
|
+
pathPrefix?: string;
|
|
543
|
+
destinations: CMAFDestinationSettings[];
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @public
|
|
548
|
+
* {@link NorskOutput.cmafVideo}
|
|
549
|
+
*/
|
|
550
|
+
export declare class CmafVideoOutputNode extends HlsNodeWithPlaylist<CmafVideoMessage, "video", CmafVideoOutputNode> {
|
|
551
|
+
updateCredentials(settings: UpdateCredentials): void;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/** @public */
|
|
555
|
+
export declare interface CmafVideoOutputSettings extends SinkNodeSettings<CmafVideoOutputNode> {
|
|
556
|
+
segmentDurationSeconds: number;
|
|
557
|
+
partDurationSeconds: number;
|
|
558
|
+
delayOutputMs?: number;
|
|
559
|
+
sessionId?: string;
|
|
560
|
+
id: string;
|
|
561
|
+
encryption?: {
|
|
562
|
+
encryptionKey: string;
|
|
563
|
+
encryptionKeyId: string;
|
|
564
|
+
};
|
|
565
|
+
destinations: CMAFDestinationSettings[];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* @public
|
|
570
|
+
* {@link NorskOutput.cmafWebVtt}
|
|
571
|
+
*/
|
|
572
|
+
export declare class CmafWebVttOutputNode extends HlsNodeWithPlaylist<CmafWebVttMessage, "subtitle", CmafWebVttOutputNode> {
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/** @public */
|
|
576
|
+
export declare interface CmafWebVttOutputSettings extends SinkNodeSettings<CmafWebVttOutputNode> {
|
|
577
|
+
segmentDurationSeconds: number;
|
|
578
|
+
sessionId?: string;
|
|
579
|
+
delayOutputMs?: number;
|
|
580
|
+
}
|
|
581
|
+
|
|
506
582
|
declare class CommonHlsNode<ClientMessage, Pins extends string, T extends MediaNodeState> extends AutoSinkMediaNode<Pins> {
|
|
507
583
|
constructor(client: MediaClient, settings: SinkNodeSettings<T> & StreamStatsMixin, grpcInit: () => grpc.ClientDuplexStream<ClientMessage, HlsOutputEvent>, subscribeFn: (subscription: Subscription) => void, subscribedStreamsChangedFn?: (streams: StreamMetadata[]) => void);
|
|
508
584
|
close(): void;
|
|
@@ -761,43 +837,6 @@ export declare interface HardwareInfo {
|
|
|
761
837
|
deckLinkCards: DeckLinkCard[];
|
|
762
838
|
}
|
|
763
839
|
|
|
764
|
-
/**
|
|
765
|
-
* @public
|
|
766
|
-
* {@link NorskOutput.hlsAudio}
|
|
767
|
-
*/
|
|
768
|
-
export declare class HlsAudioOutputNode extends HlsNodeWithPlaylist<HlsAudioMessage, "audio", HlsAudioOutputNode> {
|
|
769
|
-
updateCredentials(settings: UpdateCredentials): void;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
/** @public */
|
|
773
|
-
export declare interface HlsAudioOutputSettings extends SinkNodeSettings<HlsAudioOutputNode> {
|
|
774
|
-
segmentDurationSeconds: number;
|
|
775
|
-
partDurationSeconds: number;
|
|
776
|
-
delayOutputMs?: number;
|
|
777
|
-
encryption?: {
|
|
778
|
-
encryptionKey: string;
|
|
779
|
-
encryptionKeyId: string;
|
|
780
|
-
};
|
|
781
|
-
destinations: CMAFDestinationSettings[];
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
* @public
|
|
786
|
-
* {@link NorskOutput.hlsMaster}
|
|
787
|
-
*/
|
|
788
|
-
export declare class HlsMasterOutputNode extends CommonHlsNode<HlsMasterMessage, "video" | "audio" | "subtitle", HlsMasterOutputNode> {
|
|
789
|
-
/** @public The URL of the master playlist */
|
|
790
|
-
playlistUrl: string;
|
|
791
|
-
updateCredentials(settings: UpdateCredentials): void;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/** @public */
|
|
795
|
-
export declare interface HlsMasterOutputSettings extends SinkNodeSettings<HlsMasterOutputNode> {
|
|
796
|
-
playlistName: string;
|
|
797
|
-
pathPrefix?: string;
|
|
798
|
-
destinations: CMAFDestinationSettings[];
|
|
799
|
-
}
|
|
800
|
-
|
|
801
840
|
/**
|
|
802
841
|
* @public
|
|
803
842
|
* {@link NorskOutput.hlsMasterPush}
|
|
@@ -816,7 +855,7 @@ declare class HlsNodeWithPlaylist<ClientMessage, Pins extends string, T extends
|
|
|
816
855
|
/** @public
|
|
817
856
|
* Returns the URL to the HLS playlist entry. Note this can only be evaluated once the stream is active as it
|
|
818
857
|
* varies with the stream subscribed to. Useful during development, but you probably want to
|
|
819
|
-
* use {@link NorskOutput.
|
|
858
|
+
* use {@link NorskOutput.cmafMaster} for production.
|
|
820
859
|
*/
|
|
821
860
|
url(): Promise<string>;
|
|
822
861
|
}
|
|
@@ -901,42 +940,6 @@ export declare interface HlsTsVideoPushOutputSettings extends SinkNodeSettings<H
|
|
|
901
940
|
destination: CMAFDestinationSettings;
|
|
902
941
|
}
|
|
903
942
|
|
|
904
|
-
/**
|
|
905
|
-
* @public
|
|
906
|
-
* {@link NorskOutput.hlsVideo}
|
|
907
|
-
*/
|
|
908
|
-
export declare class HlsVideoOutputNode extends HlsNodeWithPlaylist<HlsVideoMessage, "video", HlsVideoOutputNode> {
|
|
909
|
-
updateCredentials(settings: UpdateCredentials): void;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/** @public */
|
|
913
|
-
export declare interface HlsVideoOutputSettings extends SinkNodeSettings<HlsVideoOutputNode> {
|
|
914
|
-
segmentDurationSeconds: number;
|
|
915
|
-
partDurationSeconds: number;
|
|
916
|
-
delayOutputMs?: number;
|
|
917
|
-
sessionId?: string;
|
|
918
|
-
id: string;
|
|
919
|
-
encryption?: {
|
|
920
|
-
encryptionKey: string;
|
|
921
|
-
encryptionKeyId: string;
|
|
922
|
-
};
|
|
923
|
-
destinations: CMAFDestinationSettings[];
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* @public
|
|
928
|
-
* {@link NorskOutput.hlsWebVtt}
|
|
929
|
-
*/
|
|
930
|
-
export declare class HlsWebVttOutputNode extends HlsNodeWithPlaylist<HlsWebVttMessage, "subtitle", HlsWebVttOutputNode> {
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
/** @public */
|
|
934
|
-
export declare interface HlsWebVttOutputSettings extends SinkNodeSettings<HlsWebVttOutputNode> {
|
|
935
|
-
segmentDurationSeconds: number;
|
|
936
|
-
sessionId?: string;
|
|
937
|
-
delayOutputMs?: number;
|
|
938
|
-
}
|
|
939
|
-
|
|
940
943
|
/**
|
|
941
944
|
* @public
|
|
942
945
|
* {@link NorskOutput.hlsWebVttPush}
|
|
@@ -1294,6 +1297,8 @@ export declare interface NorskControl {
|
|
|
1294
1297
|
* Record statistical information about media streams, including bitrate,
|
|
1295
1298
|
* frame rate, and number of keyframes, measured over some configurable
|
|
1296
1299
|
* sampling windows.
|
|
1300
|
+
*
|
|
1301
|
+
* Corresponding settings are found on many input and output nodes.
|
|
1297
1302
|
* @param settings - Callback and sampling intervals
|
|
1298
1303
|
*/
|
|
1299
1304
|
streamStats(settings: StreamStatsSettings): Promise<StreamStatsNode>;
|
|
@@ -1388,9 +1393,9 @@ export declare interface NorskInput {
|
|
|
1388
1393
|
* * Methods that allow you to egest media from your application
|
|
1389
1394
|
*/
|
|
1390
1395
|
export declare interface NorskOutput {
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1396
|
+
cmafVideo(settings: CmafVideoOutputSettings): Promise<CmafVideoOutputNode>;
|
|
1397
|
+
cmafAudio(settings: CmafAudioOutputSettings): Promise<CmafAudioOutputNode>;
|
|
1398
|
+
cmafWebVtt(settings: CmafWebVttOutputSettings): Promise<CmafWebVttOutputNode>;
|
|
1394
1399
|
hlsWebVttPush(settings: HlsWebVttPushOutputSettings): Promise<HlsWebVttPushOutputNode>;
|
|
1395
1400
|
hlsTsVideo(settings: HlsTsVideoOutputSettings): Promise<HlsTsVideoOutputNode>;
|
|
1396
1401
|
tsUdp(settings: TsUdpOutputSettings): Promise<TsUdpOutputNode>;
|
|
@@ -1399,7 +1404,7 @@ export declare interface NorskOutput {
|
|
|
1399
1404
|
hlsTsVideoPush(settings: HlsTsVideoPushOutputSettings): Promise<HlsTsVideoPushOutputNode>;
|
|
1400
1405
|
hlsTsAudioPush(settings: HlsTsAudioPushOutputSettings): Promise<HlsTsAudioPushOutputNode>;
|
|
1401
1406
|
hlsTsCombinedPush(settings: HlsTsCombinedPushOutputSettings): Promise<HlsTsCombinedPushOutputNode>;
|
|
1402
|
-
|
|
1407
|
+
cmafMaster(settings: CmafMasterOutputSettings): Promise<CmafMasterOutputNode>;
|
|
1403
1408
|
hlsMasterPush(settings: HlsMasterPushOutputSettings): Promise<HlsMasterPushOutputNode>;
|
|
1404
1409
|
webRTCWhip(settings: WebRTCWhipOutputSettings): Promise<WebRTCWhipOutputNode>;
|
|
1405
1410
|
rtmp(settings: RtmpOutputSettings): Promise<RtmpOutputNode>;
|
|
@@ -1416,7 +1421,7 @@ export declare interface NorskOutput {
|
|
|
1416
1421
|
*
|
|
1417
1422
|
* The optional non-fragmented filename will be written when calling
|
|
1418
1423
|
* {@link Mp4FileOutputNode.close} and will be fully written by the time
|
|
1419
|
-
* {@link NodeSettings.
|
|
1424
|
+
* {@link NodeSettings.onClose} is called. This sets up a temp file to
|
|
1420
1425
|
* store the frame data by appending the extension `.tmp`.
|
|
1421
1426
|
*
|
|
1422
1427
|
* A non-fragmented MP4 file can be written on request with
|
|
@@ -1501,9 +1506,14 @@ export declare interface NorskTransform {
|
|
|
1501
1506
|
chaosMonkey(settings: ChaosMonkeySettings): Promise<ChaosMonkeyNode>;
|
|
1502
1507
|
/**
|
|
1503
1508
|
* Compose multiple video streams together into a single output
|
|
1504
|
-
* @param settings - Composition
|
|
1509
|
+
* @param settings - Composition settings
|
|
1505
1510
|
*/
|
|
1506
1511
|
composeOverlay<Pins extends string>(settings: ComposeVideoSettings<Pins>): Promise<ComposeVideoNode<Pins>>;
|
|
1512
|
+
/**
|
|
1513
|
+
* Create a Media Node performing transcription into subtitles using the
|
|
1514
|
+
* Amazon Transcribe AWS service.
|
|
1515
|
+
* @param settings - Settings and credentials for AWS transcribe
|
|
1516
|
+
*/
|
|
1507
1517
|
awsTranscribe(settings: AwsTranscribeSettings): Promise<AwsTranscribeNode>;
|
|
1508
1518
|
/**
|
|
1509
1519
|
* Mix multiple audio streams together into a single output,
|
|
@@ -1567,7 +1577,7 @@ export declare interface NorskTransform {
|
|
|
1567
1577
|
* Override bitrate and language metadata on streams.
|
|
1568
1578
|
*
|
|
1569
1579
|
* Audio and video bitrate metadata is required for playlists for both
|
|
1570
|
-
* {@link NorskOutput.
|
|
1580
|
+
* {@link NorskOutput.cmafMaster} and {@link NorskOutput.hlsMasterPush}
|
|
1571
1581
|
* nodes. It is automatically configured for some sources (like RTMP) and in
|
|
1572
1582
|
* cases where re-encoding is done, but is unset for other sources (like SRT).
|
|
1573
1583
|
* @param settings - Bitrate and language metadata plus general node settings.
|
|
@@ -1775,7 +1785,7 @@ export declare class RtmpServerInputNode extends SourceMediaNode {
|
|
|
1775
1785
|
*/
|
|
1776
1786
|
export declare interface RtmpServerInputSettings extends SourceNodeSettings<RtmpServerInputNode>, StreamStatsMixin {
|
|
1777
1787
|
/** The port the RTMP server should listen on */
|
|
1778
|
-
port
|
|
1788
|
+
port?: number;
|
|
1779
1789
|
/**
|
|
1780
1790
|
* On connect callback, use to accept/reject connections given app/url in use
|
|
1781
1791
|
* @eventProperty
|
|
@@ -1887,7 +1897,15 @@ export declare interface SampleAspectRatio {
|
|
|
1887
1897
|
}
|
|
1888
1898
|
|
|
1889
1899
|
/** @public */
|
|
1890
|
-
export declare type SampleFormat =
|
|
1900
|
+
export declare type SampleFormat =
|
|
1901
|
+
/** Signed 16 bits, non-planar */
|
|
1902
|
+
"s16"
|
|
1903
|
+
/** Signed 16 bits, planar */
|
|
1904
|
+
| "s16p"
|
|
1905
|
+
/** 32bit floating point, non-planar */
|
|
1906
|
+
| "flt"
|
|
1907
|
+
/** 32bit floating point, planar */
|
|
1908
|
+
| "fltp";
|
|
1891
1909
|
|
|
1892
1910
|
/** @public Audio sample rate, in Hz */
|
|
1893
1911
|
export declare type SampleRate = 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
|
|
@@ -2028,6 +2046,7 @@ export declare type SrtConnectionResult =
|
|
|
2028
2046
|
/** Accept the stream */
|
|
2029
2047
|
{
|
|
2030
2048
|
accept: true;
|
|
2049
|
+
/** The source name to assign to the connection */
|
|
2031
2050
|
sourceName: string;
|
|
2032
2051
|
}
|
|
2033
2052
|
/** Reject the stream */
|
|
@@ -2065,9 +2084,12 @@ export declare interface SrtInputSettings extends RemoteInputSettings<SrtInputNo
|
|
|
2065
2084
|
onConnection?: (
|
|
2066
2085
|
/** The stream_id sent on the SRT socket (or empty if none was set) */
|
|
2067
2086
|
streamId: string,
|
|
2068
|
-
/**
|
|
2087
|
+
/**
|
|
2088
|
+
* Identifier indicating which connection this message refers to (for a
|
|
2089
|
+
* listener which may have multiple connections)
|
|
2090
|
+
*/
|
|
2069
2091
|
index: number,
|
|
2070
|
-
/**
|
|
2092
|
+
/** The address of the remote host */
|
|
2071
2093
|
remoteHost: string) => SrtConnectionResult;
|
|
2072
2094
|
/**
|
|
2073
2095
|
* Called when the connection status has changed (e.g. when the SRT socket is closed)
|
|
@@ -64,7 +64,7 @@ export interface RtpInputSettings extends SourceNodeSettings<RtpInputNode>, Stre
|
|
|
64
64
|
*/
|
|
65
65
|
export interface RtmpServerInputSettings extends SourceNodeSettings<RtmpServerInputNode>, StreamStatsMixin {
|
|
66
66
|
/** The port the RTMP server should listen on */
|
|
67
|
-
port
|
|
67
|
+
port?: number;
|
|
68
68
|
/**
|
|
69
69
|
* On connect callback, use to accept/reject connections given app/url in use
|
|
70
70
|
* @eventProperty
|
|
@@ -211,6 +211,7 @@ export declare type SrtConnectionResult =
|
|
|
211
211
|
/** Accept the stream */
|
|
212
212
|
{
|
|
213
213
|
accept: true;
|
|
214
|
+
/** The source name to assign to the connection */
|
|
214
215
|
sourceName: string;
|
|
215
216
|
}
|
|
216
217
|
/** Reject the stream */
|
|
@@ -237,9 +238,12 @@ export interface SrtInputSettings extends RemoteInputSettings<SrtInputNode>, Str
|
|
|
237
238
|
onConnection?: (
|
|
238
239
|
/** The stream_id sent on the SRT socket (or empty if none was set) */
|
|
239
240
|
streamId: string,
|
|
240
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* Identifier indicating which connection this message refers to (for a
|
|
243
|
+
* listener which may have multiple connections)
|
|
244
|
+
*/
|
|
241
245
|
index: number,
|
|
242
|
-
/**
|
|
246
|
+
/** The address of the remote host */
|
|
243
247
|
remoteHost: string) => SrtConnectionResult;
|
|
244
248
|
/**
|
|
245
249
|
* Called when the connection status has changed (e.g. when the SRT socket is closed)
|
|
@@ -26,13 +26,14 @@ class RtmpServerInputNode extends common_1.SourceMediaNode {
|
|
|
26
26
|
super(client, settings.onOutboundContextChange);
|
|
27
27
|
/** @internal */
|
|
28
28
|
this.connections = new Map();
|
|
29
|
-
;
|
|
30
29
|
let config = (0, utils_1.provideFull)(media_pb_1.RtmpInputConfiguration, {
|
|
31
30
|
id: settings.id
|
|
32
31
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
33
32
|
: undefined,
|
|
34
|
-
port: settings.port,
|
|
35
|
-
statsSampling: settings.statsSampling
|
|
33
|
+
port: settings.port ? settings.port : 1935,
|
|
34
|
+
statsSampling: settings.statsSampling
|
|
35
|
+
? new media_pb_1.StreamStatsSampling(settings.statsSampling)
|
|
36
|
+
: undefined,
|
|
36
37
|
});
|
|
37
38
|
this.grpcStream = this.client.createRtmpInput();
|
|
38
39
|
this.grpcStream.write(new media_pb_1.RtmpInputMessage((0, utils_1.mkMessageCase)({ initialConfig: config })));
|
|
@@ -198,7 +199,6 @@ var TsInputType;
|
|
|
198
199
|
class TsCommonInputNode extends common_1.SourceMediaNode {
|
|
199
200
|
constructor(tsType, client, settings, nudgeFn, onEof, grpcStartFn) {
|
|
200
201
|
super(client, settings.onOutboundContextChange);
|
|
201
|
-
;
|
|
202
202
|
this.tsType = tsType;
|
|
203
203
|
this.grpcStream = grpcStartFn();
|
|
204
204
|
this.nudgeFn = nudgeFn;
|
|
@@ -262,7 +262,6 @@ class DeckLinkInputNode extends common_1.SourceMediaNode {
|
|
|
262
262
|
/** @internal */
|
|
263
263
|
constructor(settings, client) {
|
|
264
264
|
super(client, settings.onOutboundContextChange);
|
|
265
|
-
;
|
|
266
265
|
let config = (0, utils_1.provideFull)(media_pb_1.DeckLinkInputConfiguration, {
|
|
267
266
|
id: settings.id
|
|
268
267
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
@@ -337,7 +336,6 @@ class WhipInputNode extends common_1.SourceMediaNode {
|
|
|
337
336
|
/** @internal */
|
|
338
337
|
constructor(settings, client) {
|
|
339
338
|
super(client, settings.onOutboundContextChange);
|
|
340
|
-
;
|
|
341
339
|
let config = (0, utils_1.provideFull)(media_pb_1.WhipInputConfiguration, {
|
|
342
340
|
id: settings.id
|
|
343
341
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
@@ -393,7 +391,7 @@ class WhipInputNode extends common_1.SourceMediaNode {
|
|
|
393
391
|
nudge: nudge,
|
|
394
392
|
programNumber: (0, utils_1.provideFull)(media_pb_1.ProgramNumber, { programNumber }),
|
|
395
393
|
sourceName: (0, utils_1.provideFull)(media_pb_1.SourceName, { sourceName }),
|
|
396
|
-
})
|
|
394
|
+
}),
|
|
397
395
|
})));
|
|
398
396
|
}
|
|
399
397
|
close() {
|
|
@@ -409,7 +407,6 @@ class WebVttFileInputNode extends common_1.SourceMediaNode {
|
|
|
409
407
|
/** @internal */
|
|
410
408
|
constructor(settings, client) {
|
|
411
409
|
super(client, settings.onOutboundContextChange);
|
|
412
|
-
;
|
|
413
410
|
let config = (0, utils_1.provideFull)(media_pb_1.WebVttFileInputConfiguration, {
|
|
414
411
|
id: settings.id
|
|
415
412
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
@@ -500,7 +497,11 @@ class SrtInputNode extends common_1.SourceMediaNode {
|
|
|
500
497
|
const grpcStartFn = () => {
|
|
501
498
|
let config = (0, utils_1.provideFull)(media_pb_1.SrtInputConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
502
499
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
503
|
-
: undefined, sourceName: settings.sourceName, mode: (0, types_1.toSrtMode)(settings.mode), passphrase: settings.passphrase !== undefined
|
|
500
|
+
: undefined, sourceName: settings.sourceName, mode: (0, types_1.toSrtMode)(settings.mode), passphrase: settings.passphrase !== undefined
|
|
501
|
+
? (0, utils_1.provideFull)(media_pb_1.OptionalString, { value: settings.passphrase })
|
|
502
|
+
: undefined, streamId: settings.streamId !== undefined
|
|
503
|
+
? (0, utils_1.provideFull)(media_pb_1.OptionalString, { value: settings.streamId })
|
|
504
|
+
: undefined, statsSampling: settings.statsSampling
|
|
504
505
|
? (0, utils_1.provideFull)(media_pb_1.StreamStatsSampling, settings.statsSampling)
|
|
505
506
|
: undefined }));
|
|
506
507
|
let stream = client.createSrtInput();
|
|
@@ -666,7 +667,6 @@ class RtpInputNode extends common_1.SourceMediaNode {
|
|
|
666
667
|
/** @internal */
|
|
667
668
|
constructor(settings, client) {
|
|
668
669
|
super(client, settings.onOutboundContextChange);
|
|
669
|
-
;
|
|
670
670
|
let streams = settings.streams.map((stream) => {
|
|
671
671
|
let streamType;
|
|
672
672
|
const streamTypeCase = stream.streamType.kind;
|
|
@@ -807,7 +807,6 @@ class BrowserInputNode extends common_1.SourceMediaNode {
|
|
|
807
807
|
/** @internal */
|
|
808
808
|
constructor(settings, client) {
|
|
809
809
|
super(client, settings.onOutboundContextChange);
|
|
810
|
-
;
|
|
811
810
|
let config = (0, utils_1.provideFull)(media_pb_1.BrowserInputConfiguration, {
|
|
812
811
|
id: settings.id
|
|
813
812
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
@@ -895,7 +894,6 @@ class AudioSignalGeneratorNode extends common_1.SourceMediaNode {
|
|
|
895
894
|
/** @internal */
|
|
896
895
|
constructor(settings, client) {
|
|
897
896
|
super(client, settings.onOutboundContextChange);
|
|
898
|
-
;
|
|
899
897
|
let config = (0, utils_1.provideFull)(media_pb_1.AudioSignalGeneratorConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
900
898
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
901
899
|
: undefined, sampleFormat: (0, types_1.toSampleFormat)(settings.sampleFormat ? settings.sampleFormat : "fltp"), sampleRate: (0, types_1.toSampleRate)(settings.sampleRate), channelLayout: (0, types_1.toChannelLayout)(settings.channelLayout) }));
|
|
@@ -946,7 +944,6 @@ class ImageFileInputNode extends common_1.SourceMediaNode {
|
|
|
946
944
|
/** @internal */
|
|
947
945
|
constructor(settings, client) {
|
|
948
946
|
super(client, settings.onOutboundContextChange);
|
|
949
|
-
;
|
|
950
947
|
let config = (0, utils_1.provideFull)(media_pb_1.ImageFileInputConfiguration, {
|
|
951
948
|
id: settings.id
|
|
952
949
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
@@ -1012,7 +1009,6 @@ class Mp4FileInputNode extends common_1.SourceMediaNode {
|
|
|
1012
1009
|
/** @internal */
|
|
1013
1010
|
constructor(settings, client) {
|
|
1014
1011
|
super(client, settings.onOutboundContextChange);
|
|
1015
|
-
;
|
|
1016
1012
|
let config = (0, utils_1.provideFull)(media_pb_1.Mp4FileInputConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
1017
1013
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1018
1014
|
: undefined, statsSampling: settings.statsSampling
|
|
@@ -1039,14 +1035,19 @@ class Mp4FileInputNode extends common_1.SourceMediaNode {
|
|
|
1039
1035
|
break;
|
|
1040
1036
|
}
|
|
1041
1037
|
case "status": {
|
|
1042
|
-
if (data.message.value.state ==
|
|
1038
|
+
if (data.message.value.state ==
|
|
1039
|
+
media_pb_1.Mp4FileInputStatus_State.INPUT_STATUS_EOF &&
|
|
1043
1040
|
settings.onEof) {
|
|
1044
1041
|
settings.onEof();
|
|
1045
1042
|
}
|
|
1046
1043
|
break;
|
|
1047
1044
|
}
|
|
1048
1045
|
case "info": {
|
|
1049
|
-
settings.onInfo &&
|
|
1046
|
+
settings.onInfo &&
|
|
1047
|
+
settings.onInfo({
|
|
1048
|
+
byteLength: (_a = data.message.value.byteLength) === null || _a === void 0 ? void 0 : _a.value,
|
|
1049
|
+
durationMs: (_b = data.message.value.durationMs) === null || _b === void 0 ? void 0 : _b.value,
|
|
1050
|
+
});
|
|
1050
1051
|
break;
|
|
1051
1052
|
}
|
|
1052
1053
|
case "streamStats": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as grpc from "@grpc/grpc-js";
|
|
2
2
|
import { MediaClient } from "@norskvideo/norsk-api/lib/media_grpc_pb";
|
|
3
|
-
import { HlsOutputEvent, Subscription,
|
|
4
|
-
import { SrtMode, StreamMetadata } from "./types";
|
|
3
|
+
import { HlsOutputEvent, Subscription, CmafVideoMessage, CmafAudioMessage, CmafWebVttMessage, HlsWebVttPushMessage, CmafMasterMessage, HlsTsVideoMessage, HlsTsAudioMessage, HlsTsVideoPushMessage, HlsTsAudioPushMessage, HlsTsCombinedPushMessage, HlsMasterPushMessage } from "@norskvideo/norsk-api/lib/media_pb";
|
|
4
|
+
import { AwsCredentials, SrtMode, StreamMetadata } from "./types";
|
|
5
5
|
import { AutoSinkMediaNode, MediaNodeState, SinkNodeSettings, StreamStatsMixin } from "./common";
|
|
6
6
|
/** @public */
|
|
7
|
-
export interface
|
|
7
|
+
export interface CmafVideoOutputSettings extends SinkNodeSettings<CmafVideoOutputNode> {
|
|
8
8
|
segmentDurationSeconds: number;
|
|
9
9
|
partDurationSeconds: number;
|
|
10
10
|
delayOutputMs?: number;
|
|
@@ -17,7 +17,7 @@ export interface HlsVideoOutputSettings extends SinkNodeSettings<HlsVideoOutputN
|
|
|
17
17
|
destinations: CMAFDestinationSettings[];
|
|
18
18
|
}
|
|
19
19
|
/** @public */
|
|
20
|
-
export interface
|
|
20
|
+
export interface CmafAudioOutputSettings extends SinkNodeSettings<CmafAudioOutputNode> {
|
|
21
21
|
segmentDurationSeconds: number;
|
|
22
22
|
partDurationSeconds: number;
|
|
23
23
|
delayOutputMs?: number;
|
|
@@ -38,19 +38,12 @@ export interface HlsTsAudioOutputSettings extends SinkNodeSettings<HlsTsAudioOut
|
|
|
38
38
|
delayOutputMs?: number;
|
|
39
39
|
}
|
|
40
40
|
/** @public */
|
|
41
|
-
export interface
|
|
41
|
+
export interface CmafWebVttOutputSettings extends SinkNodeSettings<CmafWebVttOutputNode> {
|
|
42
42
|
segmentDurationSeconds: number;
|
|
43
43
|
sessionId?: string;
|
|
44
44
|
delayOutputMs?: number;
|
|
45
45
|
}
|
|
46
46
|
/** @public */
|
|
47
|
-
export interface AwsCredentials {
|
|
48
|
-
accessKey: string;
|
|
49
|
-
secretKey: string;
|
|
50
|
-
sessionToken: string;
|
|
51
|
-
region: string;
|
|
52
|
-
}
|
|
53
|
-
/** @public */
|
|
54
47
|
export interface UpdateCredentials {
|
|
55
48
|
destinationId: string;
|
|
56
49
|
awsCredentials: AwsCredentials;
|
|
@@ -84,7 +77,7 @@ export interface HlsTsCombinedPushOutputSettings extends SinkNodeSettings<HlsTsC
|
|
|
84
77
|
playlistName: string;
|
|
85
78
|
}
|
|
86
79
|
/** @public */
|
|
87
|
-
export interface
|
|
80
|
+
export interface CmafMasterOutputSettings extends SinkNodeSettings<CmafMasterOutputNode> {
|
|
88
81
|
playlistName: string;
|
|
89
82
|
pathPrefix?: string;
|
|
90
83
|
destinations: CMAFDestinationSettings[];
|
|
@@ -128,22 +121,22 @@ declare class HlsNodeWithPlaylist<ClientMessage, Pins extends string, T extends
|
|
|
128
121
|
/** @public
|
|
129
122
|
* Returns the URL to the HLS playlist entry. Note this can only be evaluated once the stream is active as it
|
|
130
123
|
* varies with the stream subscribed to. Useful during development, but you probably want to
|
|
131
|
-
* use {@link NorskOutput.
|
|
124
|
+
* use {@link NorskOutput.cmafMaster} for production.
|
|
132
125
|
*/
|
|
133
126
|
url(): Promise<string>;
|
|
134
127
|
}
|
|
135
128
|
/**
|
|
136
129
|
* @public
|
|
137
|
-
* {@link NorskOutput.
|
|
130
|
+
* {@link NorskOutput.cmafVideo}
|
|
138
131
|
*/
|
|
139
|
-
export declare class
|
|
132
|
+
export declare class CmafVideoOutputNode extends HlsNodeWithPlaylist<CmafVideoMessage, "video", CmafVideoOutputNode> {
|
|
140
133
|
updateCredentials(settings: UpdateCredentials): void;
|
|
141
134
|
}
|
|
142
135
|
/**
|
|
143
136
|
* @public
|
|
144
|
-
* {@link NorskOutput.
|
|
137
|
+
* {@link NorskOutput.cmafAudio}
|
|
145
138
|
*/
|
|
146
|
-
export declare class
|
|
139
|
+
export declare class CmafAudioOutputNode extends HlsNodeWithPlaylist<CmafAudioMessage, "audio", CmafAudioOutputNode> {
|
|
147
140
|
updateCredentials(settings: UpdateCredentials): void;
|
|
148
141
|
}
|
|
149
142
|
/**
|
|
@@ -178,9 +171,9 @@ export declare class HlsTsCombinedPushOutputNode extends CommonHlsNode<HlsTsComb
|
|
|
178
171
|
}
|
|
179
172
|
/**
|
|
180
173
|
* @public
|
|
181
|
-
* {@link NorskOutput.
|
|
174
|
+
* {@link NorskOutput.cmafWebVtt}
|
|
182
175
|
*/
|
|
183
|
-
export declare class
|
|
176
|
+
export declare class CmafWebVttOutputNode extends HlsNodeWithPlaylist<CmafWebVttMessage, "subtitle", CmafWebVttOutputNode> {
|
|
184
177
|
}
|
|
185
178
|
/**
|
|
186
179
|
* @public
|
|
@@ -190,9 +183,9 @@ export declare class HlsWebVttPushOutputNode extends CommonHlsNode<HlsWebVttPush
|
|
|
190
183
|
}
|
|
191
184
|
/**
|
|
192
185
|
* @public
|
|
193
|
-
* {@link NorskOutput.
|
|
186
|
+
* {@link NorskOutput.cmafMaster}
|
|
194
187
|
*/
|
|
195
|
-
export declare class
|
|
188
|
+
export declare class CmafMasterOutputNode extends CommonHlsNode<CmafMasterMessage, "video" | "audio" | "subtitle", CmafMasterOutputNode> {
|
|
196
189
|
/** @public The URL of the master playlist */
|
|
197
190
|
playlistUrl: string;
|
|
198
191
|
updateCredentials(settings: UpdateCredentials): void;
|
|
@@ -326,9 +319,9 @@ export declare class Mp4FileOutputNode extends AutoSinkMediaNode<"audio" | "vide
|
|
|
326
319
|
* * Methods that allow you to egest media from your application
|
|
327
320
|
*/
|
|
328
321
|
export interface NorskOutput {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
cmafVideo(settings: CmafVideoOutputSettings): Promise<CmafVideoOutputNode>;
|
|
323
|
+
cmafAudio(settings: CmafAudioOutputSettings): Promise<CmafAudioOutputNode>;
|
|
324
|
+
cmafWebVtt(settings: CmafWebVttOutputSettings): Promise<CmafWebVttOutputNode>;
|
|
332
325
|
hlsWebVttPush(settings: HlsWebVttPushOutputSettings): Promise<HlsWebVttPushOutputNode>;
|
|
333
326
|
hlsTsVideo(settings: HlsTsVideoOutputSettings): Promise<HlsTsVideoOutputNode>;
|
|
334
327
|
tsUdp(settings: TsUdpOutputSettings): Promise<TsUdpOutputNode>;
|
|
@@ -337,7 +330,7 @@ export interface NorskOutput {
|
|
|
337
330
|
hlsTsVideoPush(settings: HlsTsVideoPushOutputSettings): Promise<HlsTsVideoPushOutputNode>;
|
|
338
331
|
hlsTsAudioPush(settings: HlsTsAudioPushOutputSettings): Promise<HlsTsAudioPushOutputNode>;
|
|
339
332
|
hlsTsCombinedPush(settings: HlsTsCombinedPushOutputSettings): Promise<HlsTsCombinedPushOutputNode>;
|
|
340
|
-
|
|
333
|
+
cmafMaster(settings: CmafMasterOutputSettings): Promise<CmafMasterOutputNode>;
|
|
341
334
|
hlsMasterPush(settings: HlsMasterPushOutputSettings): Promise<HlsMasterPushOutputNode>;
|
|
342
335
|
webRTCWhip(settings: WebRTCWhipOutputSettings): Promise<WebRTCWhipOutputNode>;
|
|
343
336
|
rtmp(settings: RtmpOutputSettings): Promise<RtmpOutputNode>;
|
|
@@ -354,7 +347,7 @@ export interface NorskOutput {
|
|
|
354
347
|
*
|
|
355
348
|
* The optional non-fragmented filename will be written when calling
|
|
356
349
|
* {@link Mp4FileOutputNode.close} and will be fully written by the time
|
|
357
|
-
* {@link NodeSettings.
|
|
350
|
+
* {@link NodeSettings.onClose} is called. This sets up a temp file to
|
|
358
351
|
* store the frame data by appending the extension `.tmp`.
|
|
359
352
|
*
|
|
360
353
|
* A non-fragmented MP4 file can be written on request with
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Mp4FileOutputNode = exports.TsFileOutputNode = exports.RtmpOutputNode = exports.WebRTCWhipOutputNode = exports.SrtOutputNode = exports.TsUdpOutputNode = exports.HlsMasterPushOutputNode = exports.
|
|
12
|
+
exports.Mp4FileOutputNode = exports.TsFileOutputNode = exports.RtmpOutputNode = exports.WebRTCWhipOutputNode = exports.SrtOutputNode = exports.TsUdpOutputNode = exports.HlsMasterPushOutputNode = exports.CmafMasterOutputNode = exports.HlsWebVttPushOutputNode = exports.CmafWebVttOutputNode = exports.HlsTsCombinedPushOutputNode = exports.HlsTsAudioPushOutputNode = exports.HlsTsVideoPushOutputNode = exports.HlsTsAudioOutputNode = exports.HlsTsVideoOutputNode = exports.CmafAudioOutputNode = exports.CmafVideoOutputNode = void 0;
|
|
13
13
|
const media_pb_1 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
14
14
|
const types_1 = require("./types");
|
|
15
15
|
const utils_1 = require("../shared/utils");
|
|
@@ -72,7 +72,7 @@ class HlsNodeWithPlaylist extends CommonHlsNode {
|
|
|
72
72
|
/** @public
|
|
73
73
|
* Returns the URL to the HLS playlist entry. Note this can only be evaluated once the stream is active as it
|
|
74
74
|
* varies with the stream subscribed to. Useful during development, but you probably want to
|
|
75
|
-
* use {@link NorskOutput.
|
|
75
|
+
* use {@link NorskOutput.cmafMaster} for production.
|
|
76
76
|
*/
|
|
77
77
|
url() {
|
|
78
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -89,13 +89,13 @@ class HlsNodeWithPlaylist extends CommonHlsNode {
|
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* @public
|
|
92
|
-
* {@link NorskOutput.
|
|
92
|
+
* {@link NorskOutput.cmafVideo}
|
|
93
93
|
*/
|
|
94
|
-
class
|
|
94
|
+
class CmafVideoOutputNode extends HlsNodeWithPlaylist {
|
|
95
95
|
/** @internal */
|
|
96
96
|
static create(settings, client) {
|
|
97
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
let node = new
|
|
98
|
+
let node = new CmafVideoOutputNode(settings, client);
|
|
99
99
|
yield node.initialised;
|
|
100
100
|
return node;
|
|
101
101
|
});
|
|
@@ -104,31 +104,31 @@ class HlsVideoOutputNode extends HlsNodeWithPlaylist {
|
|
|
104
104
|
constructor(settings, client) {
|
|
105
105
|
super(client, settings, () => {
|
|
106
106
|
var _a;
|
|
107
|
-
var config = (0, utils_1.provideFull)(media_pb_1.
|
|
107
|
+
var config = (0, utils_1.provideFull)(media_pb_1.CmafVideoConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
108
108
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
109
109
|
: undefined, encryption: settings.encryption
|
|
110
110
|
? (0, utils_1.provideFull)(media_pb_1.Mp4Encryption, settings.encryption)
|
|
111
111
|
: undefined, destinations: settings.destinations.map(mkCmafDestination), delayOutputMs: (_a = settings.delayOutputMs) !== null && _a !== void 0 ? _a : defaultDelayOutputMs }));
|
|
112
|
-
let hls = client.
|
|
113
|
-
hls.write((0, utils_1.provideFull)(media_pb_1.
|
|
112
|
+
let hls = client.createCmafVideoOutput();
|
|
113
|
+
hls.write((0, utils_1.provideFull)(media_pb_1.CmafVideoMessage, (0, utils_1.mkMessageCase)({ configuration: config })));
|
|
114
114
|
return hls;
|
|
115
|
-
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
115
|
+
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafVideoMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
116
116
|
}
|
|
117
117
|
updateCredentials(settings) {
|
|
118
118
|
const conf = { destinationId: settings.destinationId, awsCredentials: (0, utils_1.provideFull)(media_pb_1.AwsCredentials, settings.awsCredentials) };
|
|
119
|
-
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
119
|
+
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafVideoMessage, (0, utils_1.mkMessageCase)({ updateCredentials: conf })));
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
exports.
|
|
122
|
+
exports.CmafVideoOutputNode = CmafVideoOutputNode;
|
|
123
123
|
/**
|
|
124
124
|
* @public
|
|
125
|
-
* {@link NorskOutput.
|
|
125
|
+
* {@link NorskOutput.cmafAudio}
|
|
126
126
|
*/
|
|
127
|
-
class
|
|
127
|
+
class CmafAudioOutputNode extends HlsNodeWithPlaylist {
|
|
128
128
|
/** @internal */
|
|
129
129
|
static create(settings, client) {
|
|
130
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
let node = new
|
|
131
|
+
let node = new CmafAudioOutputNode(settings, client);
|
|
132
132
|
yield node.initialised;
|
|
133
133
|
return node;
|
|
134
134
|
});
|
|
@@ -137,22 +137,22 @@ class HlsAudioOutputNode extends HlsNodeWithPlaylist {
|
|
|
137
137
|
constructor(settings, client) {
|
|
138
138
|
super(client, settings, () => {
|
|
139
139
|
var _a;
|
|
140
|
-
var config = (0, utils_1.provideFull)(media_pb_1.
|
|
140
|
+
var config = (0, utils_1.provideFull)(media_pb_1.CmafAudioConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
141
141
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
142
142
|
: undefined, encryption: settings.encryption
|
|
143
143
|
? (0, utils_1.provideFull)(media_pb_1.Mp4Encryption, settings.encryption)
|
|
144
144
|
: undefined, destinations: settings.destinations.map(mkCmafDestination), delayOutputMs: (_a = settings.delayOutputMs) !== null && _a !== void 0 ? _a : defaultDelayOutputMs }));
|
|
145
|
-
let hls = client.
|
|
146
|
-
hls.write((0, utils_1.provideFull)(media_pb_1.
|
|
145
|
+
let hls = client.createCmafAudioOutput();
|
|
146
|
+
hls.write((0, utils_1.provideFull)(media_pb_1.CmafAudioMessage, (0, utils_1.mkMessageCase)({ configuration: config })));
|
|
147
147
|
return hls;
|
|
148
|
-
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
148
|
+
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafAudioMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
149
149
|
}
|
|
150
150
|
updateCredentials(settings) {
|
|
151
151
|
const conf = { destinationId: settings.destinationId, awsCredentials: (0, utils_1.provideFull)(media_pb_1.AwsCredentials, settings.awsCredentials) };
|
|
152
|
-
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
152
|
+
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafAudioMessage, (0, utils_1.mkMessageCase)({ updateCredentials: conf })));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
exports.
|
|
155
|
+
exports.CmafAudioOutputNode = CmafAudioOutputNode;
|
|
156
156
|
/** @private */
|
|
157
157
|
function makePlaylistUrl(stream) {
|
|
158
158
|
let theStreamKey = stream.streamKey;
|
|
@@ -295,13 +295,13 @@ class HlsTsCombinedPushOutputNode extends CommonHlsNode {
|
|
|
295
295
|
exports.HlsTsCombinedPushOutputNode = HlsTsCombinedPushOutputNode;
|
|
296
296
|
/**
|
|
297
297
|
* @public
|
|
298
|
-
* {@link NorskOutput.
|
|
298
|
+
* {@link NorskOutput.cmafWebVtt}
|
|
299
299
|
*/
|
|
300
|
-
class
|
|
300
|
+
class CmafWebVttOutputNode extends HlsNodeWithPlaylist {
|
|
301
301
|
/** @internal */
|
|
302
302
|
static create(settings, client) {
|
|
303
303
|
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
-
let node = new
|
|
304
|
+
let node = new CmafWebVttOutputNode(settings, client);
|
|
305
305
|
yield node.initialised;
|
|
306
306
|
return node;
|
|
307
307
|
});
|
|
@@ -310,16 +310,16 @@ class HlsWebVttOutputNode extends HlsNodeWithPlaylist {
|
|
|
310
310
|
constructor(settings, client) {
|
|
311
311
|
super(client, settings, () => {
|
|
312
312
|
var _a, _b;
|
|
313
|
-
var config = (0, utils_1.provideFull)(media_pb_1.
|
|
313
|
+
var config = (0, utils_1.provideFull)(media_pb_1.CmafWebVttConfiguration, Object.assign(Object.assign({}, settings), { sessionId: (_a = settings.sessionId) !== null && _a !== void 0 ? _a : "", id: settings.id
|
|
314
314
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
315
315
|
: undefined, delayOutputMs: (_b = settings.delayOutputMs) !== null && _b !== void 0 ? _b : defaultDelayOutputMs }));
|
|
316
|
-
let hls = client.
|
|
317
|
-
hls.write((0, utils_1.provideFull)(media_pb_1.
|
|
316
|
+
let hls = client.createCmafWebVttOutput();
|
|
317
|
+
hls.write((0, utils_1.provideFull)(media_pb_1.CmafWebVttMessage, (0, utils_1.mkMessageCase)({ configuration: config })));
|
|
318
318
|
return hls;
|
|
319
|
-
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
319
|
+
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafWebVttMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
exports.
|
|
322
|
+
exports.CmafWebVttOutputNode = CmafWebVttOutputNode;
|
|
323
323
|
/**
|
|
324
324
|
* @public
|
|
325
325
|
* {@link NorskOutput.hlsWebVttPush}
|
|
@@ -349,28 +349,28 @@ class HlsWebVttPushOutputNode extends CommonHlsNode {
|
|
|
349
349
|
exports.HlsWebVttPushOutputNode = HlsWebVttPushOutputNode;
|
|
350
350
|
/**
|
|
351
351
|
* @public
|
|
352
|
-
* {@link NorskOutput.
|
|
352
|
+
* {@link NorskOutput.cmafMaster}
|
|
353
353
|
*/
|
|
354
|
-
class
|
|
354
|
+
class CmafMasterOutputNode extends CommonHlsNode {
|
|
355
355
|
/** @internal */
|
|
356
356
|
constructor(settings, client) {
|
|
357
357
|
super(client, settings, () => {
|
|
358
|
-
var config = (0, utils_1.provideFull)(media_pb_1.
|
|
358
|
+
var config = (0, utils_1.provideFull)(media_pb_1.CmafMasterConfiguration, {
|
|
359
359
|
playlistName: settings.playlistName,
|
|
360
360
|
id: settings.id
|
|
361
361
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
362
362
|
: undefined,
|
|
363
363
|
destinations: settings.destinations.map(mkCmafDestination),
|
|
364
364
|
});
|
|
365
|
-
let hls = client.
|
|
366
|
-
hls.write((0, utils_1.provideFull)(media_pb_1.
|
|
365
|
+
let hls = client.createCmafMasterOutput();
|
|
366
|
+
hls.write((0, utils_1.provideFull)(media_pb_1.CmafMasterMessage, (0, utils_1.mkMessageCase)({ configuration: config })));
|
|
367
367
|
return hls;
|
|
368
|
-
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
368
|
+
}, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafMasterMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
369
369
|
}
|
|
370
370
|
/** @internal */
|
|
371
371
|
static create(settings, client) {
|
|
372
372
|
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
-
let node = new
|
|
373
|
+
let node = new CmafMasterOutputNode(settings, client);
|
|
374
374
|
yield node.initialised;
|
|
375
375
|
node.playlistUrl = `${(0, utils_1.publicUrlPrefix)()}/localHls/file/${settings.playlistName}.m3u8`;
|
|
376
376
|
return node;
|
|
@@ -378,10 +378,10 @@ class HlsMasterOutputNode extends CommonHlsNode {
|
|
|
378
378
|
}
|
|
379
379
|
updateCredentials(settings) {
|
|
380
380
|
const conf = { destinationId: settings.destinationId, awsCredentials: (0, utils_1.provideFull)(media_pb_1.AwsCredentials, settings.awsCredentials) };
|
|
381
|
-
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.
|
|
381
|
+
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.CmafMasterMessage, (0, utils_1.mkMessageCase)({ updateCredentials: conf })));
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
exports.
|
|
384
|
+
exports.CmafMasterOutputNode = CmafMasterOutputNode;
|
|
385
385
|
/**
|
|
386
386
|
* @public
|
|
387
387
|
* {@link NorskOutput.hlsMasterPush}
|
|
@@ -802,7 +802,9 @@ exports.Mp4FileOutputNode = Mp4FileOutputNode;
|
|
|
802
802
|
/** @internal */
|
|
803
803
|
function mkCmafDestination(dest) {
|
|
804
804
|
if (dest.type === "s3") {
|
|
805
|
-
const conf = Object.assign(Object.assign({}, dest), { sessionId: dest.sessionId ? dest.sessionId : "", awsCredentials: dest.awsCredentials
|
|
805
|
+
const conf = Object.assign(Object.assign({}, dest), { sessionId: dest.sessionId ? dest.sessionId : "", awsCredentials: dest.awsCredentials
|
|
806
|
+
? (0, utils_1.provideFull)(media_pb_1.AwsCredentials, dest.awsCredentials)
|
|
807
|
+
: undefined });
|
|
806
808
|
return (0, utils_1.provideFull)(media_pb_1.CMAFDestination, (0, utils_1.mkMessageCase)({ awsS3Destination: (0, utils_1.provideFull)(media_pb_1.AwsS3PushDestination, conf) }));
|
|
807
809
|
}
|
|
808
810
|
else if (dest.type === "generic") {
|
|
@@ -2,7 +2,7 @@ import { MediaClient } from "@norskvideo/norsk-api/lib/media_grpc_pb";
|
|
|
2
2
|
import { StreamStatsSampling, Subscription } from "@norskvideo/norsk-api/lib/media_pb";
|
|
3
3
|
import { FrameRate } from "../types";
|
|
4
4
|
import { AutoSinkMediaNode, MediaNodeState, SourceMediaNode, SourceNodeSettings, StreamStatsMixin } from "./common";
|
|
5
|
-
import { AacProfile, AudioLevels, ChannelLayout, ComposeMissingStreamBehaviour, Db, NetintH264, NetintHevc, NvidiaH264, NvidiaHevc, PixelFormat, SampleAspectRatio, Resolution, SampleRate, SentenceBuildMode, SimpleEasing, StabilizationMode, StreamKey, X264Codec, X265Codec, MultiStreamStats } from "./types";
|
|
5
|
+
import { AacProfile, AudioLevels, ChannelLayout, ComposeMissingStreamBehaviour, Db, NetintH264, NetintHevc, NvidiaH264, NvidiaHevc, PixelFormat, SampleAspectRatio, Resolution, SampleRate, SentenceBuildMode, SimpleEasing, StabilizationMode, StreamKey, X264Codec, X265Codec, MultiStreamStats, AwsCredentials } from "./types";
|
|
6
6
|
import { PlainMessage } from "@bufbuild/protobuf";
|
|
7
7
|
interface ProcessorMediaNode<Pins extends string> extends SourceMediaNode, AutoSinkMediaNode<Pins> {
|
|
8
8
|
}
|
|
@@ -316,11 +316,11 @@ export interface AudioMixerSource<Pins> {
|
|
|
316
316
|
}
|
|
317
317
|
/** @public */
|
|
318
318
|
export interface AudioMixerSettings<Pins extends string> extends ProcessorNodeSettings<AudioMixerNode<Pins>> {
|
|
319
|
-
/** The sources to mix */
|
|
319
|
+
/** The audio sources to mix */
|
|
320
320
|
sources: readonly AudioMixerSource<Pins>[];
|
|
321
|
-
/** The name
|
|
321
|
+
/** The source name to use for the output stream */
|
|
322
322
|
outputSource: string;
|
|
323
|
-
/** The sample rate
|
|
323
|
+
/** The sample rate that the mixer runs at */
|
|
324
324
|
sampleRate?: SampleRate;
|
|
325
325
|
}
|
|
326
326
|
/** @public */
|
|
@@ -397,7 +397,8 @@ export declare class AudioSplitMultichannelNode extends AutoProcessorMediaNode<"
|
|
|
397
397
|
/** @public */
|
|
398
398
|
export interface AudioBuildMultichannelSettings extends ProcessorNodeSettings<AudioBuildMultichannelNode> {
|
|
399
399
|
channelLayout: ChannelLayout;
|
|
400
|
-
/**
|
|
400
|
+
/**
|
|
401
|
+
* Stream keys specifying the source for each channel, where the order is
|
|
401
402
|
* significant. The streams must all have the same sample format and sample
|
|
402
403
|
* rate.
|
|
403
404
|
*/
|
|
@@ -413,11 +414,13 @@ export declare class AudioBuildMultichannelNode extends AutoProcessorMediaNode<"
|
|
|
413
414
|
}
|
|
414
415
|
/** @public */
|
|
415
416
|
export interface AwsTranscribeSettings extends ProcessorNodeSettings<AwsTranscribeNode> {
|
|
417
|
+
/** Region for the transcribe endpoint */
|
|
416
418
|
awsRegion: string;
|
|
417
419
|
outputStreamId: number;
|
|
418
420
|
language: string;
|
|
419
421
|
sentenceBuildMode: SentenceBuildMode;
|
|
420
422
|
sentenceStabilizationMode: StabilizationMode;
|
|
423
|
+
awsCredentials?: AwsCredentials;
|
|
421
424
|
}
|
|
422
425
|
/**
|
|
423
426
|
* @public
|
|
@@ -533,9 +536,14 @@ export interface NorskTransform {
|
|
|
533
536
|
chaosMonkey(settings: ChaosMonkeySettings): Promise<ChaosMonkeyNode>;
|
|
534
537
|
/**
|
|
535
538
|
* Compose multiple video streams together into a single output
|
|
536
|
-
* @param settings - Composition
|
|
539
|
+
* @param settings - Composition settings
|
|
537
540
|
*/
|
|
538
541
|
composeOverlay<Pins extends string>(settings: ComposeVideoSettings<Pins>): Promise<ComposeVideoNode<Pins>>;
|
|
542
|
+
/**
|
|
543
|
+
* Create a Media Node performing transcription into subtitles using the
|
|
544
|
+
* Amazon Transcribe AWS service.
|
|
545
|
+
* @param settings - Settings and credentials for AWS transcribe
|
|
546
|
+
*/
|
|
539
547
|
awsTranscribe(settings: AwsTranscribeSettings): Promise<AwsTranscribeNode>;
|
|
540
548
|
/**
|
|
541
549
|
* Mix multiple audio streams together into a single output,
|
|
@@ -599,7 +607,7 @@ export interface NorskTransform {
|
|
|
599
607
|
* Override bitrate and language metadata on streams.
|
|
600
608
|
*
|
|
601
609
|
* Audio and video bitrate metadata is required for playlists for both
|
|
602
|
-
* {@link NorskOutput.
|
|
610
|
+
* {@link NorskOutput.cmafMaster} and {@link NorskOutput.hlsMasterPush}
|
|
603
611
|
* nodes. It is automatically configured for some sources (like RTMP) and in
|
|
604
612
|
* cases where re-encoding is done, but is unset for other sources (like SRT).
|
|
605
613
|
* @param settings - Bitrate and language metadata plus general node settings.
|
|
@@ -632,6 +640,8 @@ export interface NorskControl {
|
|
|
632
640
|
* Record statistical information about media streams, including bitrate,
|
|
633
641
|
* frame rate, and number of keyframes, measured over some configurable
|
|
634
642
|
* sampling windows.
|
|
643
|
+
*
|
|
644
|
+
* Corresponding settings are found on many input and output nodes.
|
|
635
645
|
* @param settings - Callback and sampling intervals
|
|
636
646
|
*/
|
|
637
647
|
streamStats(settings: StreamStatsSettings): Promise<StreamStatsNode>;
|
|
@@ -1094,7 +1094,9 @@ class AwsTranscribeNode extends AutoProcessorMediaNode {
|
|
|
1094
1094
|
super(client, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AwsTranscribeMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
1095
1095
|
let config = (0, utils_1.provideFull)(media_pb_1.AwsTranscribeConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
1096
1096
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1097
|
-
: undefined, awsRegion: settings.awsRegion, sentenceBuildMode: (0, types_1.toSentenceBuildMode)(settings.sentenceBuildMode), sentenceStabilizationMode: (0, types_1.toStabilizationMode)(settings.sentenceStabilizationMode)
|
|
1097
|
+
: undefined, awsRegion: settings.awsRegion, sentenceBuildMode: (0, types_1.toSentenceBuildMode)(settings.sentenceBuildMode), sentenceStabilizationMode: (0, types_1.toStabilizationMode)(settings.sentenceStabilizationMode), awsCredentials: settings.awsCredentials
|
|
1098
|
+
? (0, utils_1.provideFull)(media_pb_1.AwsCredentials, settings.awsCredentials)
|
|
1099
|
+
: undefined }));
|
|
1098
1100
|
this.grpcStream = this.client.createAwsTranscribe();
|
|
1099
1101
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AwsTranscribeMessage, (0, utils_1.mkMessageCase)({ configuration: config })));
|
|
1100
1102
|
this.initialised = new Promise((resolve, reject) => {
|
|
@@ -401,7 +401,15 @@ export declare type ComposeMissingStreamBehaviour =
|
|
|
401
401
|
*/
|
|
402
402
|
| "wait_for_all";
|
|
403
403
|
/** @public */
|
|
404
|
-
export declare type SampleFormat =
|
|
404
|
+
export declare type SampleFormat =
|
|
405
|
+
/** Signed 16 bits, non-planar */
|
|
406
|
+
"s16"
|
|
407
|
+
/** Signed 16 bits, planar */
|
|
408
|
+
| "s16p"
|
|
409
|
+
/** 32bit floating point, non-planar */
|
|
410
|
+
| "flt"
|
|
411
|
+
/** 32bit floating point, planar */
|
|
412
|
+
| "fltp";
|
|
405
413
|
/** @public Audio sample rate, in Hz */
|
|
406
414
|
export declare type SampleRate = 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 64000 | 88200 | 96000;
|
|
407
415
|
/** @public Channel layout for an audio stream */
|
|
@@ -601,4 +609,11 @@ export declare type SourceSubscriptionError = {
|
|
|
601
609
|
subscriberTypes: string[];
|
|
602
610
|
reason: "unsupportedConversion";
|
|
603
611
|
};
|
|
612
|
+
/** @public */
|
|
613
|
+
export interface AwsCredentials {
|
|
614
|
+
accessKey: string;
|
|
615
|
+
secretKey: string;
|
|
616
|
+
sessionToken: string;
|
|
617
|
+
region: string;
|
|
618
|
+
}
|
|
604
619
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/src/sdk.js
CHANGED
|
@@ -94,9 +94,9 @@ class Norsk {
|
|
|
94
94
|
deckLink: (settings) => __awaiter(this, void 0, void 0, function* () { return input_1.DeckLinkInputNode.create(settings, this.client); }),
|
|
95
95
|
};
|
|
96
96
|
this.output = {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
cmafVideo: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.CmafVideoOutputNode.create(settings, this.client); }),
|
|
98
|
+
cmafAudio: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.CmafAudioOutputNode.create(settings, this.client); }),
|
|
99
|
+
cmafWebVtt: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.CmafWebVttOutputNode.create(settings, this.client); }),
|
|
100
100
|
hlsWebVttPush: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsWebVttPushOutputNode.create(settings, this.client); }),
|
|
101
101
|
hlsTsVideo: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsTsVideoOutputNode.create(settings, this.client); }),
|
|
102
102
|
tsUdp: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.TsUdpOutputNode.create(settings, this.client); }),
|
|
@@ -105,8 +105,8 @@ class Norsk {
|
|
|
105
105
|
hlsTsVideoPush: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsTsVideoPushOutputNode.create(settings, this.client); }),
|
|
106
106
|
hlsTsAudioPush: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsTsAudioPushOutputNode.create(settings, this.client); }),
|
|
107
107
|
hlsTsCombinedPush: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsTsCombinedPushOutputNode.create(settings, this.client); }),
|
|
108
|
-
|
|
109
|
-
return output_1.
|
|
108
|
+
cmafMaster: (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return output_1.CmafMasterOutputNode.create(settings, this.client);
|
|
110
110
|
}),
|
|
111
111
|
hlsMasterPush: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.HlsMasterPushOutputNode.create(settings, this.client); }),
|
|
112
112
|
webRTCWhip: (settings) => __awaiter(this, void 0, void 0, function* () { return output_1.WebRTCWhipOutputNode.create(settings, this.client); }),
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"license": "MIT",
|
|
3
3
|
"name": "@norskvideo/norsk-sdk",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.330",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@bufbuild/protobuf": "^0.3.0",
|
|
7
7
|
"@grpc/grpc-js": "^1.2.2",
|
|
8
|
-
"@norskvideo/norsk-api": "0.0.
|
|
8
|
+
"@norskvideo/norsk-api": "0.0.330",
|
|
9
9
|
"typescript-nullable": "^0.6.0"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
package/src/sdk.ts
CHANGED
|
@@ -49,10 +49,10 @@ import {
|
|
|
49
49
|
NorskDuplex,
|
|
50
50
|
} from "./media_nodes/processor";
|
|
51
51
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
CmafAudioOutputNode,
|
|
53
|
+
CmafAudioOutputSettings,
|
|
54
|
+
CmafMasterOutputNode,
|
|
55
|
+
CmafMasterOutputSettings,
|
|
56
56
|
HlsMasterPushOutputNode,
|
|
57
57
|
HlsMasterPushOutputSettings,
|
|
58
58
|
HlsTsAudioOutputNode,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
HlsTsVideoOutputSettings,
|
|
66
66
|
HlsTsVideoPushOutputNode,
|
|
67
67
|
HlsTsVideoPushOutputSettings,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
CmafVideoOutputNode,
|
|
69
|
+
CmafVideoOutputSettings,
|
|
70
|
+
CmafWebVttOutputNode,
|
|
71
|
+
CmafWebVttOutputSettings,
|
|
72
72
|
HlsWebVttPushOutputNode,
|
|
73
73
|
HlsWebVttPushOutputSettings,
|
|
74
74
|
Mp4FileOutputNode,
|
|
@@ -413,14 +413,14 @@ export class Norsk {
|
|
|
413
413
|
};
|
|
414
414
|
|
|
415
415
|
this.output = {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
settings:
|
|
420
|
-
): Promise<
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
416
|
+
cmafVideo: async (settings: CmafVideoOutputSettings) =>
|
|
417
|
+
CmafVideoOutputNode.create(settings, this.client),
|
|
418
|
+
cmafAudio: async (
|
|
419
|
+
settings: CmafAudioOutputSettings
|
|
420
|
+
): Promise<CmafAudioOutputNode> =>
|
|
421
|
+
CmafAudioOutputNode.create(settings, this.client),
|
|
422
|
+
cmafWebVtt: async (settings: CmafWebVttOutputSettings) =>
|
|
423
|
+
CmafWebVttOutputNode.create(settings, this.client),
|
|
424
424
|
hlsWebVttPush: async (settings: HlsWebVttPushOutputSettings) =>
|
|
425
425
|
HlsWebVttPushOutputNode.create(settings, this.client),
|
|
426
426
|
hlsTsVideo: async (settings: HlsTsVideoOutputSettings) =>
|
|
@@ -437,8 +437,8 @@ export class Norsk {
|
|
|
437
437
|
HlsTsAudioPushOutputNode.create(settings, this.client),
|
|
438
438
|
hlsTsCombinedPush: async (settings: HlsTsCombinedPushOutputSettings) =>
|
|
439
439
|
HlsTsCombinedPushOutputNode.create(settings, this.client),
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
cmafMaster: async (settings: CmafMasterOutputSettings) =>
|
|
441
|
+
CmafMasterOutputNode.create(
|
|
442
442
|
settings,
|
|
443
443
|
this.client
|
|
444
444
|
),
|