@trash-streamers/contracts 1.1.47 → 1.1.48

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.
@@ -0,0 +1,55 @@
1
+ export declare enum VideoContainer {
2
+ mp4 = "mp4",
3
+ mov = "mov",
4
+ avi = "avi",
5
+ mkv = "mkv",
6
+ wmv = "wmv",
7
+ flv = "flv",
8
+ webm = "webm",
9
+ mpeg = "mpeg",
10
+ mpg = "mpg",
11
+ "3gp" = "3gp",
12
+ ogg = "ogg",
13
+ ts = "ts",
14
+ m4v = "m4v",
15
+ m2ts = "m2ts",
16
+ vob = "vob",
17
+ rm = "rm",
18
+ rmvb = "rmvb",
19
+ divx = "divx",
20
+ asf = "asf",
21
+ swf = "swf",
22
+ f4v = "f4v"
23
+ }
24
+ export declare enum EncodingContainer {
25
+ mp4 = "mp4",
26
+ mov = "mov",
27
+ avi = "avi",
28
+ mkv = "mkv",
29
+ wmv = "wmv",
30
+ flv = "flv",
31
+ webm = "webm",
32
+ mpeg = "mpeg",
33
+ mpg = "mpg",
34
+ "3gp" = "3gp",
35
+ ogg = "ogg",
36
+ ts = "ts",
37
+ m4v = "m4v",
38
+ m2ts = "m2ts",
39
+ vob = "vob",
40
+ rm = "rm",
41
+ rmvb = "rmvb",
42
+ divx = "divx",
43
+ asf = "asf",
44
+ swf = "swf",
45
+ f4v = "f4v",
46
+ jpeg = "jpeg",
47
+ jpg = "jpg",
48
+ png = "png",
49
+ gif = "gif",
50
+ m3u8 = "m3u8"
51
+ }
52
+ export declare function isVideoContainer(container: string): container is VideoContainer;
53
+ export declare function isEncodingContainer(container: string | undefined): container is EncodingContainer;
54
+ export declare function mapVideoContainerToContentType(container: VideoContainer): string;
55
+ export declare function mapEncodingContainerToContentType(container: EncodingContainer): string;
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EncodingContainer = exports.VideoContainer = void 0;
4
+ exports.isVideoContainer = isVideoContainer;
5
+ exports.isEncodingContainer = isEncodingContainer;
6
+ exports.mapVideoContainerToContentType = mapVideoContainerToContentType;
7
+ exports.mapEncodingContainerToContentType = mapEncodingContainerToContentType;
8
+ var VideoContainer;
9
+ (function (VideoContainer) {
10
+ VideoContainer["mp4"] = "mp4";
11
+ VideoContainer["mov"] = "mov";
12
+ VideoContainer["avi"] = "avi";
13
+ VideoContainer["mkv"] = "mkv";
14
+ VideoContainer["wmv"] = "wmv";
15
+ VideoContainer["flv"] = "flv";
16
+ VideoContainer["webm"] = "webm";
17
+ VideoContainer["mpeg"] = "mpeg";
18
+ VideoContainer["mpg"] = "mpg";
19
+ VideoContainer["3gp"] = "3gp";
20
+ VideoContainer["ogg"] = "ogg";
21
+ VideoContainer["ts"] = "ts";
22
+ VideoContainer["m4v"] = "m4v";
23
+ VideoContainer["m2ts"] = "m2ts";
24
+ VideoContainer["vob"] = "vob";
25
+ VideoContainer["rm"] = "rm";
26
+ VideoContainer["rmvb"] = "rmvb";
27
+ VideoContainer["divx"] = "divx";
28
+ VideoContainer["asf"] = "asf";
29
+ VideoContainer["swf"] = "swf";
30
+ VideoContainer["f4v"] = "f4v";
31
+ })(VideoContainer || (exports.VideoContainer = VideoContainer = {}));
32
+ var EncodingContainer;
33
+ (function (EncodingContainer) {
34
+ EncodingContainer["mp4"] = "mp4";
35
+ EncodingContainer["mov"] = "mov";
36
+ EncodingContainer["avi"] = "avi";
37
+ EncodingContainer["mkv"] = "mkv";
38
+ EncodingContainer["wmv"] = "wmv";
39
+ EncodingContainer["flv"] = "flv";
40
+ EncodingContainer["webm"] = "webm";
41
+ EncodingContainer["mpeg"] = "mpeg";
42
+ EncodingContainer["mpg"] = "mpg";
43
+ EncodingContainer["3gp"] = "3gp";
44
+ EncodingContainer["ogg"] = "ogg";
45
+ EncodingContainer["ts"] = "ts";
46
+ EncodingContainer["m4v"] = "m4v";
47
+ EncodingContainer["m2ts"] = "m2ts";
48
+ EncodingContainer["vob"] = "vob";
49
+ EncodingContainer["rm"] = "rm";
50
+ EncodingContainer["rmvb"] = "rmvb";
51
+ EncodingContainer["divx"] = "divx";
52
+ EncodingContainer["asf"] = "asf";
53
+ EncodingContainer["swf"] = "swf";
54
+ EncodingContainer["f4v"] = "f4v";
55
+ EncodingContainer["jpeg"] = "jpeg";
56
+ EncodingContainer["jpg"] = "jpg";
57
+ EncodingContainer["png"] = "png";
58
+ EncodingContainer["gif"] = "gif";
59
+ EncodingContainer["m3u8"] = "m3u8";
60
+ })(EncodingContainer || (exports.EncodingContainer = EncodingContainer = {}));
61
+ function isVideoContainer(container) {
62
+ return Object.values(VideoContainer).includes(container);
63
+ }
64
+ function isEncodingContainer(container) {
65
+ return Object.values(EncodingContainer).includes(container);
66
+ }
67
+ function mapVideoContainerToContentType(container) {
68
+ const videoContainerToContentTypeMapping = {
69
+ [VideoContainer.mp4]: "video/mp4",
70
+ [VideoContainer.mov]: "video/quicktime",
71
+ [VideoContainer.avi]: "video/x-msvideo",
72
+ [VideoContainer.mkv]: "video/x-matroska",
73
+ [VideoContainer.wmv]: "video/x-ms-wmv",
74
+ [VideoContainer.flv]: "video/x-flv",
75
+ [VideoContainer.webm]: "video/webm",
76
+ [VideoContainer.mpeg]: "video/mpeg",
77
+ [VideoContainer.mpg]: "video/mpeg",
78
+ [VideoContainer["3gp"]]: "video/3gpp",
79
+ [VideoContainer.ogg]: "video/ogg",
80
+ [VideoContainer.ts]: "video/mp2t",
81
+ [VideoContainer.m4v]: "video/x-m4v",
82
+ [VideoContainer.m2ts]: "video/MP2T",
83
+ [VideoContainer.vob]: "video/dvd",
84
+ [VideoContainer.rm]: "application/vnd.rn-realmedia",
85
+ [VideoContainer.rmvb]: "application/vnd.rn-realmedia-vbr",
86
+ [VideoContainer.divx]: "video/divx",
87
+ [VideoContainer.asf]: "video/x-ms-asf",
88
+ [VideoContainer.swf]: "application/x-shockwave-flash",
89
+ [VideoContainer.f4v]: "video/x-f4v",
90
+ };
91
+ return videoContainerToContentTypeMapping[container];
92
+ }
93
+ function mapEncodingContainerToContentType(container) {
94
+ const encodingContainerToContentTypeMapping = {
95
+ [EncodingContainer.mp4]: "video/mp4",
96
+ [EncodingContainer.mov]: "video/quicktime",
97
+ [EncodingContainer.avi]: "video/x-msvideo",
98
+ [EncodingContainer.mkv]: "video/x-matroska",
99
+ [EncodingContainer.wmv]: "video/x-ms-wmv",
100
+ [EncodingContainer.flv]: "video/x-flv",
101
+ [EncodingContainer.webm]: "video/webm",
102
+ [EncodingContainer.mpeg]: "video/mpeg",
103
+ [EncodingContainer.mpg]: "video/mpeg",
104
+ [EncodingContainer["3gp"]]: "video/3gpp",
105
+ [EncodingContainer.ogg]: "video/ogg",
106
+ [EncodingContainer.ts]: "video/mp2t",
107
+ [EncodingContainer.m4v]: "video/x-m4v",
108
+ [EncodingContainer.m2ts]: "video/MP2T",
109
+ [EncodingContainer.vob]: "video/dvd",
110
+ [EncodingContainer.rm]: "application/vnd.rn-realmedia",
111
+ [EncodingContainer.rmvb]: "application/vnd.rn-realmedia-vbr",
112
+ [EncodingContainer.divx]: "video/divx",
113
+ [EncodingContainer.asf]: "video/x-ms-asf",
114
+ [EncodingContainer.swf]: "application/x-shockwave-flash",
115
+ [EncodingContainer.f4v]: "video/x-f4v",
116
+ [EncodingContainer.jpeg]: "image/jpeg",
117
+ [EncodingContainer.jpg]: "image/jpeg",
118
+ [EncodingContainer.png]: "image/png",
119
+ [EncodingContainer.gif]: "image/gif",
120
+ [EncodingContainer.m3u8]: "application/vnd.apple.mpegurl",
121
+ };
122
+ return encodingContainerToContentTypeMapping[container];
123
+ }
@@ -0,0 +1,15 @@
1
+ export declare enum EncodingId {
2
+ "360p" = "360p",
3
+ "480p" = "480p",
4
+ "720p" = "720p",
5
+ "1080p" = "1080p",
6
+ "preview" = "preview",
7
+ "preview_360p" = "preview_360p",
8
+ "preview_480p" = "preview_480p",
9
+ "preview_720p" = "preview_720p",
10
+ "preview_1080p" = "preview_1080p",
11
+ "thumbnails" = "thumbnails"
12
+ }
13
+ export declare function isFullVideoFormat(encodingId: EncodingId): boolean;
14
+ export declare function isPreviewFormat(encodingId: EncodingId): boolean;
15
+ export declare function isThumbnailsFormat(encodingId: EncodingId): boolean;
@@ -1 +1,40 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.EncodingId = void 0;
5
+ exports.isFullVideoFormat = isFullVideoFormat;
6
+ exports.isPreviewFormat = isPreviewFormat;
7
+ exports.isThumbnailsFormat = isThumbnailsFormat;
8
+ var EncodingId;
9
+ (function (EncodingId) {
10
+ EncodingId["360p"] = "360p";
11
+ EncodingId["480p"] = "480p";
12
+ EncodingId["720p"] = "720p";
13
+ EncodingId["1080p"] = "1080p";
14
+ EncodingId["preview"] = "preview";
15
+ EncodingId["preview_360p"] = "preview_360p";
16
+ EncodingId["preview_480p"] = "preview_480p";
17
+ EncodingId["preview_720p"] = "preview_720p";
18
+ EncodingId["preview_1080p"] = "preview_1080p";
19
+ EncodingId["thumbnails"] = "thumbnails";
20
+ })(EncodingId || (exports.EncodingId = EncodingId = {}));
21
+ function isFullVideoFormat(encodingId) {
22
+ return [
23
+ EncodingId["360p"],
24
+ EncodingId["480p"],
25
+ EncodingId["720p"],
26
+ EncodingId["1080p"],
27
+ ].includes(encodingId);
28
+ }
29
+ function isPreviewFormat(encodingId) {
30
+ return [
31
+ EncodingId["preview"],
32
+ EncodingId["preview_360p"],
33
+ EncodingId["preview_480p"],
34
+ EncodingId["preview_720p"],
35
+ EncodingId["preview_1080p"],
36
+ ].includes(encodingId);
37
+ }
38
+ function isThumbnailsFormat(encodingId) {
39
+ return encodingId === EncodingId.thumbnails;
40
+ }
@@ -1,15 +1,2 @@
1
- export declare enum EncodingId {
2
- "360p" = "360p",
3
- "480p" = "480p",
4
- "720p" = "720p",
5
- "1080p" = "1080p",
6
- "preview" = "preview",
7
- "preview_360p" = "preview_360p",
8
- "preview_480p" = "preview_480p",
9
- "preview_720p" = "preview_720p",
10
- "preview_1080p" = "preview_1080p",
11
- "thumbnails" = "thumbnails"
12
- }
13
- export declare function isFullVideoFormat(encodingId: EncodingId): boolean;
14
- export declare function isPreviewFormat(encodingId: EncodingId): boolean;
15
- export declare function isThumbnailsFormat(encodingId: EncodingId): boolean;
1
+ export * from "./encodingContainer";
2
+ export * from "./encodingId";
@@ -1,39 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EncodingId = void 0;
4
- exports.isFullVideoFormat = isFullVideoFormat;
5
- exports.isPreviewFormat = isPreviewFormat;
6
- exports.isThumbnailsFormat = isThumbnailsFormat;
7
- var EncodingId;
8
- (function (EncodingId) {
9
- EncodingId["360p"] = "360p";
10
- EncodingId["480p"] = "480p";
11
- EncodingId["720p"] = "720p";
12
- EncodingId["1080p"] = "1080p";
13
- EncodingId["preview"] = "preview";
14
- EncodingId["preview_360p"] = "preview_360p";
15
- EncodingId["preview_480p"] = "preview_480p";
16
- EncodingId["preview_720p"] = "preview_720p";
17
- EncodingId["preview_1080p"] = "preview_1080p";
18
- EncodingId["thumbnails"] = "thumbnails";
19
- })(EncodingId || (exports.EncodingId = EncodingId = {}));
20
- function isFullVideoFormat(encodingId) {
21
- return [
22
- EncodingId["360p"],
23
- EncodingId["480p"],
24
- EncodingId["720p"],
25
- EncodingId["1080p"],
26
- ].includes(encodingId);
27
- }
28
- function isPreviewFormat(encodingId) {
29
- return [
30
- EncodingId["preview"],
31
- EncodingId["preview_360p"],
32
- EncodingId["preview_480p"],
33
- EncodingId["preview_720p"],
34
- EncodingId["preview_1080p"],
35
- ].includes(encodingId);
36
- }
37
- function isThumbnailsFormat(encodingId) {
38
- return encodingId === EncodingId.thumbnails;
39
- }
17
+ __exportStar(require("./encodingContainer"), exports);
18
+ __exportStar(require("./encodingId"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.47",
3
+ "version": "1.1.48",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {