camstreamerlib 4.0.0-beta.97 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -15
- package/cjs/CamOverlayAPI.d.ts +147 -109
- package/cjs/CamOverlayAPI.js +14 -63
- package/cjs/CamScripterAPI.d.ts +5 -8
- package/cjs/CamScripterAPI.js +11 -29
- package/cjs/CamStreamerAPI.d.ts +2745 -589
- package/cjs/CamStreamerAPI.js +68 -76
- package/cjs/CamSwitcherAPI.d.ts +23 -22
- package/cjs/CamSwitcherAPI.js +30 -88
- package/cjs/PlaneTrackerAPI.d.ts +28 -30
- package/cjs/PlaneTrackerAPI.js +20 -75
- package/cjs/VapixAPI.d.ts +36 -23
- package/cjs/VapixAPI.js +227 -106
- package/cjs/errors/errors.d.ts +11 -5
- package/cjs/errors/errors.js +5 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/internal/BasicAPI.d.ts +15 -0
- package/cjs/internal/BasicAPI.js +93 -0
- package/cjs/internal/WsEvents.d.ts +1 -0
- package/cjs/internal/WsEvents.js +5 -0
- package/cjs/internal/constants.d.ts +1 -0
- package/cjs/internal/constants.js +2 -1
- package/cjs/internal/convertors.d.ts +6 -0
- package/cjs/internal/convertors.js +115 -0
- package/cjs/internal/transformers.js +8 -8
- package/cjs/internal/types.d.ts +3 -0
- package/cjs/internal/versionCompare.d.ts +2 -2
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +894 -374
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +54 -11
- package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -40
- package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
- package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +21 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/index.d.ts +1 -0
- package/cjs/types/CamOverlayAPI/index.js +1 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/pipSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +10 -10
- package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +13 -13
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +8 -8
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +17 -16
- package/cjs/types/CamOverlayAPI/serviceCommonTypes.js +6 -3
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +8 -8
- package/cjs/types/CamScripterAPI.d.ts +0 -11
- package/cjs/types/CamScripterAPI.js +1 -5
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +19642 -3073
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.js +126 -57
- package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +434 -52
- package/cjs/types/CamStreamerAPI/facebookSchema.js +13 -1
- package/cjs/types/CamStreamerAPI/index.d.ts +1 -3
- package/cjs/types/CamStreamerAPI/index.js +1 -3
- package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +47 -47
- package/cjs/types/CamStreamerAPI/oldStreamSchema.js +1 -1
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +430 -219
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +116 -58
- package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +8812 -0
- package/cjs/types/CamStreamerAPI/streamsSchema.js +81 -0
- package/cjs/types/CamStreamerAPI/windySchema.d.ts +394 -52
- package/cjs/types/CamStreamerAPI/windySchema.js +9 -1
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +402 -52
- package/cjs/types/CamStreamerAPI/youtubeSchema.js +12 -1
- package/cjs/types/CamSwitcherAPI.d.ts +96 -91
- package/cjs/types/CamSwitcherAPI.js +9 -9
- package/cjs/types/GenetecAgent.d.ts +2 -2
- package/cjs/types/PlaneTrackerAPI.d.ts +60 -47
- package/cjs/types/PlaneTrackerAPI.js +5 -2
- package/cjs/types/VapixAPI.d.ts +51 -32
- package/cjs/types/VapixAPI.js +10 -3
- package/cjs/types/common.d.ts +27 -0
- package/cjs/types/common.js +13 -1
- package/cjs/types/ws/CamStreamerEvents.d.ts +110 -77
- package/cjs/types/ws/CamStreamerEvents.js +11 -7
- package/cjs/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +3 -3
- package/esm/CamOverlayAPI.js +16 -65
- package/esm/CamScripterAPI.js +9 -30
- package/esm/CamStreamerAPI.js +70 -78
- package/esm/CamSwitcherAPI.js +31 -89
- package/esm/PlaneTrackerAPI.js +21 -76
- package/esm/VapixAPI.js +228 -107
- package/esm/errors/errors.js +5 -1
- package/esm/index.js +1 -0
- package/esm/internal/BasicAPI.js +89 -0
- package/esm/internal/WsEvents.js +5 -0
- package/esm/internal/constants.js +1 -0
- package/esm/internal/convertors.js +108 -0
- package/esm/internal/transformers.js +1 -1
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +47 -10
- package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +18 -0
- package/esm/types/CamOverlayAPI/index.js +1 -0
- package/esm/types/CamOverlayAPI/serviceCommonTypes.js +6 -3
- package/esm/types/CamScripterAPI.js +0 -4
- package/esm/types/CamStreamerAPI/CamStreamerAPI.js +109 -41
- package/esm/types/CamStreamerAPI/facebookSchema.js +13 -1
- package/esm/types/CamStreamerAPI/index.js +1 -3
- package/esm/types/CamStreamerAPI/oldStreamSchema.js +1 -1
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +116 -58
- package/esm/types/CamStreamerAPI/streamsSchema.js +75 -0
- package/esm/types/CamStreamerAPI/windySchema.js +9 -1
- package/esm/types/CamStreamerAPI/youtubeSchema.js +12 -1
- package/esm/types/CamSwitcherAPI.js +8 -8
- package/esm/types/PlaneTrackerAPI.js +5 -2
- package/esm/types/VapixAPI.js +9 -2
- package/esm/types/common.js +12 -0
- package/esm/types/ws/CamStreamerEvents.js +11 -7
- package/package.json +4 -4
- package/types/CamOverlayAPI.d.ts +147 -109
- package/types/CamScripterAPI.d.ts +5 -8
- package/types/CamStreamerAPI.d.ts +2745 -589
- package/types/CamSwitcherAPI.d.ts +23 -22
- package/types/PlaneTrackerAPI.d.ts +28 -30
- package/types/VapixAPI.d.ts +36 -23
- package/types/errors/errors.d.ts +11 -5
- package/types/index.d.ts +1 -0
- package/types/internal/BasicAPI.d.ts +15 -0
- package/types/internal/WsEvents.d.ts +1 -0
- package/types/internal/constants.d.ts +1 -0
- package/types/internal/convertors.d.ts +6 -0
- package/types/internal/types.d.ts +3 -0
- package/types/internal/versionCompare.d.ts +2 -2
- package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +894 -374
- package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -40
- package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +81 -0
- package/types/types/CamOverlayAPI/imagesSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/index.d.ts +1 -0
- package/types/types/CamOverlayAPI/infotickerSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/pipSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +10 -10
- package/types/types/CamOverlayAPI/ptzSchema.d.ts +13 -13
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +18 -18
- package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +8 -8
- package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +17 -16
- package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +8 -8
- package/types/types/CamScripterAPI.d.ts +0 -11
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +19642 -3073
- package/types/types/CamStreamerAPI/facebookSchema.d.ts +434 -52
- package/types/types/CamStreamerAPI/index.d.ts +1 -3
- package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +47 -47
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +430 -219
- package/types/types/CamStreamerAPI/streamsSchema.d.ts +8812 -0
- package/types/types/CamStreamerAPI/windySchema.d.ts +394 -52
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +402 -52
- package/types/types/CamSwitcherAPI.d.ts +96 -91
- package/types/types/GenetecAgent.d.ts +2 -2
- package/types/types/PlaneTrackerAPI.d.ts +60 -47
- package/types/types/VapixAPI.d.ts +51 -32
- package/types/types/common.d.ts +27 -0
- package/types/types/ws/CamStreamerEvents.d.ts +110 -77
- package/types/types/ws/CamSwitcherEvents.d.ts +8 -8
- package/types/types/ws/PlaneTrackerEvents.d.ts +3 -3
- package/cjs/types/CamStreamerAPI/churchSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/churchSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/daCastSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/daCastSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/dailymotionSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/gameChangerSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/hlsPullSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/hlsPushSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/ibmSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/ibmSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/microsoftAzureSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/microsoftStreamSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +0 -250
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.js +0 -27
- package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +0 -211
- package/cjs/types/CamStreamerAPI/rtmpSchema.js +0 -14
- package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/sdCardSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/srtSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/srtSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/twitchSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/twitchSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/vimeoSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/vimeoSchema.js +0 -11
- package/cjs/types/CamStreamerAPI/wowzaSchema.d.ts +0 -202
- package/cjs/types/CamStreamerAPI/wowzaSchema.js +0 -11
- package/esm/types/CamStreamerAPI/churchSchema.js +0 -5
- package/esm/types/CamStreamerAPI/daCastSchema.js +0 -5
- package/esm/types/CamStreamerAPI/dailymotionSchema.js +0 -5
- package/esm/types/CamStreamerAPI/gameChangerSchema.js +0 -5
- package/esm/types/CamStreamerAPI/hlsPullSchema.js +0 -5
- package/esm/types/CamStreamerAPI/hlsPushSchema.js +0 -5
- package/esm/types/CamStreamerAPI/ibmSchema.js +0 -5
- package/esm/types/CamStreamerAPI/microsoftAzureSchema.js +0 -5
- package/esm/types/CamStreamerAPI/microsoftStreamSchema.js +0 -5
- package/esm/types/CamStreamerAPI/mpegDvbSchema.js +0 -21
- package/esm/types/CamStreamerAPI/rtmpSchema.js +0 -8
- package/esm/types/CamStreamerAPI/sdCardSchema.js +0 -5
- package/esm/types/CamStreamerAPI/srtSchema.js +0 -5
- package/esm/types/CamStreamerAPI/twitchSchema.js +0 -5
- package/esm/types/CamStreamerAPI/vimeoSchema.js +0 -5
- package/esm/types/CamStreamerAPI/wowzaSchema.js +0 -5
- package/types/types/CamStreamerAPI/churchSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/daCastSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/dailymotionSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/gameChangerSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/hlsPullSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/hlsPushSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/ibmSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/microsoftAzureSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/microsoftStreamSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +0 -250
- package/types/types/CamStreamerAPI/rtmpSchema.d.ts +0 -211
- package/types/types/CamStreamerAPI/sdCardSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/srtSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/twitchSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/vimeoSchema.d.ts +0 -202
- package/types/types/CamStreamerAPI/wowzaSchema.d.ts +0 -202
|
@@ -1,124 +1,115 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isGameChangerStream = exports.isMicrosoftStream = exports.isMicrosoftAzureStream = exports.isIbmStream = exports.isDailymotionStream = exports.isWowzaStream = exports.isHlsPushStream = exports.isHlsPullStream = exports.isDaCastStream = exports.isSrtStream = exports.
|
|
3
|
+
exports.diagnosticsSchema = exports.diagnosticsParamsSchema = exports.srtStreamStatisticsSchema = exports.streamStatsSchema = exports.audioLocalSchema = exports.audioUrlSchema = exports.audioFileListSchema = exports.audioFileSchema = exports.storageListSchema = exports.audioFileStorageTypeSchema = exports.AudioType = exports.isYoutubeRtmpStream = exports.isGameChangerStream = exports.isMicrosoftStream = exports.isMicrosoftAzureStream = exports.isIbmStream = exports.isDailymotionStream = exports.isWowzaStream = exports.isHlsPushStream = exports.isHlsPullStream = exports.isDaCastStream = exports.isSrtStream = exports.isTwitchStream = exports.isVimeoStream = exports.isYouTubeStream = exports.isWindyStream = exports.isSdCardStream = exports.isRtmpStream = exports.isMpegDvbStream = exports.isFacebookRtmpStream = exports.isFacebookStream = exports.streamListSchema = exports.streamSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const facebookSchema_1 = require("./facebookSchema");
|
|
6
|
-
const mpegDvbSchema_1 = require("./mpegDvbSchema");
|
|
7
|
-
const rtmpSchema_1 = require("./rtmpSchema");
|
|
8
|
-
const sdCardSchema_1 = require("./sdCardSchema");
|
|
9
6
|
const windySchema_1 = require("./windySchema");
|
|
10
7
|
const youtubeSchema_1 = require("./youtubeSchema");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const srtSchema_1 = require("./srtSchema");
|
|
15
|
-
const daCastSchema_1 = require("./daCastSchema");
|
|
16
|
-
const hlsPullSchema_1 = require("./hlsPullSchema");
|
|
17
|
-
const hlsPushSchema_1 = require("./hlsPushSchema");
|
|
18
|
-
const wowzaSchema_1 = require("./wowzaSchema");
|
|
19
|
-
const dailymotionSchema_1 = require("./dailymotionSchema");
|
|
20
|
-
const ibmSchema_1 = require("./ibmSchema");
|
|
21
|
-
const microsoftAzureSchema_1 = require("./microsoftAzureSchema");
|
|
22
|
-
const microsoftStreamSchema_1 = require("./microsoftStreamSchema");
|
|
23
|
-
const gameChangerSchema_1 = require("./gameChangerSchema");
|
|
24
|
-
exports.streamSchema = zod_1.z.discriminatedUnion('type', [
|
|
8
|
+
const streamsSchema_1 = require("./streamsSchema");
|
|
9
|
+
const common_1 = require("../common");
|
|
10
|
+
exports.streamSchema = zod_1.z.discriminatedUnion('platform', [
|
|
25
11
|
facebookSchema_1.facebookSchema,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
streamsSchema_1.facebookRtmpSchema,
|
|
13
|
+
streamsSchema_1.mpegDvbSchema,
|
|
14
|
+
streamsSchema_1.rtmpSchema,
|
|
15
|
+
streamsSchema_1.sdCardSchema,
|
|
29
16
|
windySchema_1.windySchema,
|
|
30
17
|
youtubeSchema_1.youtubeSchema,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
streamsSchema_1.vimeoSchema,
|
|
19
|
+
streamsSchema_1.twitchSchema,
|
|
20
|
+
streamsSchema_1.srtSchema,
|
|
21
|
+
streamsSchema_1.daCastSchema,
|
|
22
|
+
streamsSchema_1.hlsPullSchema,
|
|
23
|
+
streamsSchema_1.hlsPushSchema,
|
|
24
|
+
streamsSchema_1.wowzaSchema,
|
|
25
|
+
streamsSchema_1.dailymotionSchema,
|
|
26
|
+
streamsSchema_1.ibmSchema,
|
|
27
|
+
streamsSchema_1.microsoftAzureSchema,
|
|
28
|
+
streamsSchema_1.microsoftStreamSchema,
|
|
29
|
+
streamsSchema_1.gameChangerSchema,
|
|
30
|
+
streamsSchema_1.youtubeRtmpSchema,
|
|
44
31
|
]);
|
|
45
32
|
exports.streamListSchema = zod_1.z.object({ streamList: zod_1.z.array(exports.streamSchema) });
|
|
46
33
|
const isFacebookStream = (stream) => {
|
|
47
|
-
return stream.
|
|
34
|
+
return stream.platform === streamsSchema_1.streamPlatforms.facebook;
|
|
48
35
|
};
|
|
49
36
|
exports.isFacebookStream = isFacebookStream;
|
|
37
|
+
const isFacebookRtmpStream = (stream) => {
|
|
38
|
+
return stream.platform === streamsSchema_1.streamPlatforms.facebook_rtmp;
|
|
39
|
+
};
|
|
40
|
+
exports.isFacebookRtmpStream = isFacebookRtmpStream;
|
|
50
41
|
const isMpegDvbStream = (stream) => {
|
|
51
|
-
return stream.
|
|
42
|
+
return stream.platform === streamsSchema_1.streamPlatforms.mpeg_dvb;
|
|
52
43
|
};
|
|
53
44
|
exports.isMpegDvbStream = isMpegDvbStream;
|
|
54
45
|
const isRtmpStream = (stream) => {
|
|
55
|
-
return stream.
|
|
46
|
+
return stream.platform === streamsSchema_1.streamPlatforms.rtmp;
|
|
56
47
|
};
|
|
57
48
|
exports.isRtmpStream = isRtmpStream;
|
|
58
49
|
const isSdCardStream = (stream) => {
|
|
59
|
-
return stream.
|
|
50
|
+
return stream.platform === streamsSchema_1.streamPlatforms.sd_card;
|
|
60
51
|
};
|
|
61
52
|
exports.isSdCardStream = isSdCardStream;
|
|
62
53
|
const isWindyStream = (stream) => {
|
|
63
|
-
return stream.
|
|
54
|
+
return stream.platform === streamsSchema_1.streamPlatforms.windy;
|
|
64
55
|
};
|
|
65
56
|
exports.isWindyStream = isWindyStream;
|
|
66
57
|
const isYouTubeStream = (stream) => {
|
|
67
|
-
return stream.
|
|
58
|
+
return stream.platform === streamsSchema_1.streamPlatforms.youtube;
|
|
68
59
|
};
|
|
69
60
|
exports.isYouTubeStream = isYouTubeStream;
|
|
70
61
|
const isVimeoStream = (stream) => {
|
|
71
|
-
return stream.
|
|
62
|
+
return stream.platform === streamsSchema_1.streamPlatforms.vimeo;
|
|
72
63
|
};
|
|
73
64
|
exports.isVimeoStream = isVimeoStream;
|
|
74
65
|
const isTwitchStream = (stream) => {
|
|
75
|
-
return stream.
|
|
66
|
+
return stream.platform === streamsSchema_1.streamPlatforms.twitch;
|
|
76
67
|
};
|
|
77
68
|
exports.isTwitchStream = isTwitchStream;
|
|
78
|
-
const isChurchStream = (stream) => {
|
|
79
|
-
return stream.type === 'church';
|
|
80
|
-
};
|
|
81
|
-
exports.isChurchStream = isChurchStream;
|
|
82
69
|
const isSrtStream = (stream) => {
|
|
83
|
-
return stream.
|
|
70
|
+
return stream.platform === streamsSchema_1.streamPlatforms.srt;
|
|
84
71
|
};
|
|
85
72
|
exports.isSrtStream = isSrtStream;
|
|
86
73
|
const isDaCastStream = (stream) => {
|
|
87
|
-
return stream.
|
|
74
|
+
return stream.platform === streamsSchema_1.streamPlatforms.da_cast;
|
|
88
75
|
};
|
|
89
76
|
exports.isDaCastStream = isDaCastStream;
|
|
90
77
|
const isHlsPullStream = (stream) => {
|
|
91
|
-
return stream.
|
|
78
|
+
return stream.platform === streamsSchema_1.streamPlatforms.hls_pull;
|
|
92
79
|
};
|
|
93
80
|
exports.isHlsPullStream = isHlsPullStream;
|
|
94
81
|
const isHlsPushStream = (stream) => {
|
|
95
|
-
return stream.
|
|
82
|
+
return stream.platform === streamsSchema_1.streamPlatforms.hls_push;
|
|
96
83
|
};
|
|
97
84
|
exports.isHlsPushStream = isHlsPushStream;
|
|
98
85
|
const isWowzaStream = (stream) => {
|
|
99
|
-
return stream.
|
|
86
|
+
return stream.platform === streamsSchema_1.streamPlatforms.wowza;
|
|
100
87
|
};
|
|
101
88
|
exports.isWowzaStream = isWowzaStream;
|
|
102
89
|
const isDailymotionStream = (stream) => {
|
|
103
|
-
return stream.
|
|
90
|
+
return stream.platform === streamsSchema_1.streamPlatforms.dailymotion;
|
|
104
91
|
};
|
|
105
92
|
exports.isDailymotionStream = isDailymotionStream;
|
|
106
93
|
const isIbmStream = (stream) => {
|
|
107
|
-
return stream.
|
|
94
|
+
return stream.platform === streamsSchema_1.streamPlatforms.ibm;
|
|
108
95
|
};
|
|
109
96
|
exports.isIbmStream = isIbmStream;
|
|
110
97
|
const isMicrosoftAzureStream = (stream) => {
|
|
111
|
-
return stream.
|
|
98
|
+
return stream.platform === streamsSchema_1.streamPlatforms.microsoft_azure;
|
|
112
99
|
};
|
|
113
100
|
exports.isMicrosoftAzureStream = isMicrosoftAzureStream;
|
|
114
101
|
const isMicrosoftStream = (stream) => {
|
|
115
|
-
return stream.
|
|
102
|
+
return stream.platform === streamsSchema_1.streamPlatforms.microsoft_stream;
|
|
116
103
|
};
|
|
117
104
|
exports.isMicrosoftStream = isMicrosoftStream;
|
|
118
105
|
const isGameChangerStream = (stream) => {
|
|
119
|
-
return stream.
|
|
106
|
+
return stream.platform === streamsSchema_1.streamPlatforms.game_changer;
|
|
120
107
|
};
|
|
121
108
|
exports.isGameChangerStream = isGameChangerStream;
|
|
109
|
+
const isYoutubeRtmpStream = (stream) => {
|
|
110
|
+
return stream.platform === streamsSchema_1.streamPlatforms.youtube_rtmp;
|
|
111
|
+
};
|
|
112
|
+
exports.isYoutubeRtmpStream = isYoutubeRtmpStream;
|
|
122
113
|
var AudioType;
|
|
123
114
|
(function (AudioType) {
|
|
124
115
|
AudioType[AudioType["MP3"] = 0] = "MP3";
|
|
@@ -147,7 +138,85 @@ exports.audioUrlSchema = zod_1.z.object({
|
|
|
147
138
|
storage: zod_1.z.literal('url'),
|
|
148
139
|
});
|
|
149
140
|
exports.audioLocalSchema = zod_1.z.object({
|
|
150
|
-
file:
|
|
141
|
+
file: common_1.fileSchema,
|
|
151
142
|
name: zod_1.z.string(),
|
|
152
143
|
storage: zod_1.z.enum(['flash', 'SD0']),
|
|
153
144
|
});
|
|
145
|
+
exports.streamStatsSchema = zod_1.z.object({
|
|
146
|
+
net_stats: zod_1.z.string(),
|
|
147
|
+
stream_bytes_time_ms: zod_1.z.number().nonnegative(),
|
|
148
|
+
stream_bytes: zod_1.z.number().nonnegative(),
|
|
149
|
+
start_count: zod_1.z.number().nonnegative(),
|
|
150
|
+
is_streaming: zod_1.z.literal(0).or(zod_1.z.literal(1)),
|
|
151
|
+
});
|
|
152
|
+
exports.srtStreamStatisticsSchema = zod_1.z.object({
|
|
153
|
+
msTimeStamp: zod_1.z.number().nonnegative(),
|
|
154
|
+
pktSentTotal: zod_1.z.number().nonnegative(),
|
|
155
|
+
byteSentTotal: zod_1.z.number().nonnegative(),
|
|
156
|
+
pktRetransTotal: zod_1.z.number().nonnegative(),
|
|
157
|
+
byteRetransTotal: zod_1.z.number().nonnegative(),
|
|
158
|
+
pktSndDropTotal: zod_1.z.number().nonnegative(),
|
|
159
|
+
byteSndDropTotal: zod_1.z.number().nonnegative(),
|
|
160
|
+
mbpsSendRate: zod_1.z.number().nonnegative(),
|
|
161
|
+
mbpsBandwidth: zod_1.z.number().nonnegative(),
|
|
162
|
+
mbpsMaxBW: zod_1.z.number().nonnegative(),
|
|
163
|
+
msRTT: zod_1.z.number().nonnegative(),
|
|
164
|
+
msSndBuf: zod_1.z.number().nonnegative(),
|
|
165
|
+
});
|
|
166
|
+
exports.diagnosticsParamsSchema = zod_1.z.object({
|
|
167
|
+
camerainfo: (0, zod_1.boolean)().optional(),
|
|
168
|
+
checkserver: (0, zod_1.boolean)().optional(),
|
|
169
|
+
checkservertime: (0, zod_1.boolean)().optional(),
|
|
170
|
+
speedtest: (0, zod_1.boolean)().optional(),
|
|
171
|
+
pingtest: (0, zod_1.boolean)().optional(),
|
|
172
|
+
videoHostPort: zod_1.z.string().optional(),
|
|
173
|
+
audioHostPort: zod_1.z.string().optional(),
|
|
174
|
+
});
|
|
175
|
+
exports.diagnosticsSchema = zod_1.z.object({
|
|
176
|
+
status: zod_1.z.number(),
|
|
177
|
+
message: zod_1.z.string(),
|
|
178
|
+
data: zod_1.z.object({
|
|
179
|
+
audioHostPort: zod_1.z
|
|
180
|
+
.object({
|
|
181
|
+
code: zod_1.z.number(),
|
|
182
|
+
message: zod_1.z.string(),
|
|
183
|
+
})
|
|
184
|
+
.optional(),
|
|
185
|
+
cameraInfo: zod_1.z
|
|
186
|
+
.object({
|
|
187
|
+
uptime: zod_1.z.string(),
|
|
188
|
+
availableRAM: zod_1.z.number(),
|
|
189
|
+
availableInternal: zod_1.z.number(),
|
|
190
|
+
})
|
|
191
|
+
.optional(),
|
|
192
|
+
checkServer: zod_1.z
|
|
193
|
+
.object({
|
|
194
|
+
state: zod_1.z.string(),
|
|
195
|
+
message: zod_1.z.string(),
|
|
196
|
+
})
|
|
197
|
+
.optional(),
|
|
198
|
+
checkServerTime: zod_1.z
|
|
199
|
+
.object({
|
|
200
|
+
code: zod_1.z.number(),
|
|
201
|
+
message: zod_1.z.string(),
|
|
202
|
+
})
|
|
203
|
+
.optional(),
|
|
204
|
+
videoHostPort: zod_1.z
|
|
205
|
+
.object({
|
|
206
|
+
code: zod_1.z.number(),
|
|
207
|
+
message: zod_1.z.string(),
|
|
208
|
+
})
|
|
209
|
+
.optional(),
|
|
210
|
+
speedTest: zod_1.z
|
|
211
|
+
.object({
|
|
212
|
+
code: zod_1.z.string(),
|
|
213
|
+
data: zod_1.z.array(zod_1.z.object({ timestamp: zod_1.z.number(), speed: zod_1.z.number() })),
|
|
214
|
+
})
|
|
215
|
+
.optional(),
|
|
216
|
+
pingTest: zod_1.z
|
|
217
|
+
.object({
|
|
218
|
+
output: zod_1.z.string(),
|
|
219
|
+
})
|
|
220
|
+
.optional(),
|
|
221
|
+
}),
|
|
222
|
+
});
|