stentor-media 1.59.69 → 1.59.72
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/lib/Guards.js +10 -11
- package/lib/Guards.js.map +1 -1
- package/lib/determineMediaSource.js +1 -2
- package/lib/determineMediaSource.js.map +1 -1
- package/package.json +7 -7
package/lib/Guards.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isReportable = isReportable;
|
|
4
|
+
exports.isSong = isSong;
|
|
5
|
+
exports.isGenericAudio = isGenericAudio;
|
|
6
|
+
exports.isAudioLiveStream = isAudioLiveStream;
|
|
7
|
+
exports.isPodcastEpisode = isPodcastEpisode;
|
|
8
|
+
exports.isAudio = isAudio;
|
|
9
|
+
exports.isVideo = isVideo;
|
|
10
|
+
exports.isVideoLiveStream = isVideoLiveStream;
|
|
11
|
+
exports.isRSSFeedProps = isRSSFeedProps;
|
|
12
|
+
exports.isPlaylistProps = isPlaylistProps;
|
|
4
13
|
const Constants_1 = require("./Constants");
|
|
5
14
|
/**
|
|
6
15
|
* Check if the playable is reportable.
|
|
@@ -11,7 +20,6 @@ const Constants_1 = require("./Constants");
|
|
|
11
20
|
function isReportable(playable) {
|
|
12
21
|
return playable.playedId !== undefined;
|
|
13
22
|
}
|
|
14
|
-
exports.isReportable = isReportable;
|
|
15
23
|
/**
|
|
16
24
|
* Type guard to see if the Audio is a song.
|
|
17
25
|
*
|
|
@@ -21,7 +29,6 @@ exports.isReportable = isReportable;
|
|
|
21
29
|
function isSong(media) {
|
|
22
30
|
return !!media && media.type === Constants_1.SONG;
|
|
23
31
|
}
|
|
24
|
-
exports.isSong = isSong;
|
|
25
32
|
/**
|
|
26
33
|
* Type guard to check if media is GenericAudio.
|
|
27
34
|
*
|
|
@@ -31,7 +38,6 @@ exports.isSong = isSong;
|
|
|
31
38
|
function isGenericAudio(media) {
|
|
32
39
|
return !!media && media.type === Constants_1.GENERIC_AUDIO;
|
|
33
40
|
}
|
|
34
|
-
exports.isGenericAudio = isGenericAudio;
|
|
35
41
|
/**
|
|
36
42
|
* Type guard to check if media is a AudioLiveStream
|
|
37
43
|
*
|
|
@@ -41,7 +47,6 @@ exports.isGenericAudio = isGenericAudio;
|
|
|
41
47
|
function isAudioLiveStream(media) {
|
|
42
48
|
return !!media && media.type === Constants_1.AUDIO_LIVE_STREAM;
|
|
43
49
|
}
|
|
44
|
-
exports.isAudioLiveStream = isAudioLiveStream;
|
|
45
50
|
/**
|
|
46
51
|
* Type guard to determine if media is a PodcastEpisode
|
|
47
52
|
*
|
|
@@ -51,7 +56,6 @@ exports.isAudioLiveStream = isAudioLiveStream;
|
|
|
51
56
|
function isPodcastEpisode(media) {
|
|
52
57
|
return !!media && media.type === Constants_1.PODCAST_EPISODE;
|
|
53
58
|
}
|
|
54
|
-
exports.isPodcastEpisode = isPodcastEpisode;
|
|
55
59
|
/**
|
|
56
60
|
* Type guard to determine if the Media is Audio
|
|
57
61
|
*
|
|
@@ -65,7 +69,6 @@ function isAudio(media) {
|
|
|
65
69
|
media.type === Constants_1.SONG ||
|
|
66
70
|
media.type === Constants_1.PODCAST_EPISODE));
|
|
67
71
|
}
|
|
68
|
-
exports.isAudio = isAudio;
|
|
69
72
|
/**
|
|
70
73
|
* Type guard to determine if the Media is Video
|
|
71
74
|
*
|
|
@@ -75,7 +78,6 @@ exports.isAudio = isAudio;
|
|
|
75
78
|
function isVideo(media) {
|
|
76
79
|
return !!media && (media.type === Constants_1.VIDEO || media.type === Constants_1.VIDEO_LIVE_STREAM);
|
|
77
80
|
}
|
|
78
|
-
exports.isVideo = isVideo;
|
|
79
81
|
/**
|
|
80
82
|
* Type guard to determine if Media is a Video
|
|
81
83
|
*
|
|
@@ -85,7 +87,6 @@ exports.isVideo = isVideo;
|
|
|
85
87
|
function isVideoLiveStream(media) {
|
|
86
88
|
return !!media && media.type === Constants_1.VIDEO_LIVE_STREAM;
|
|
87
89
|
}
|
|
88
|
-
exports.isVideoLiveStream = isVideoLiveStream;
|
|
89
90
|
/**
|
|
90
91
|
* Type guard to determine if the props are for an RSSFeed.
|
|
91
92
|
*
|
|
@@ -97,7 +98,6 @@ function isRSSFeedProps(props) {
|
|
|
97
98
|
}
|
|
98
99
|
return props.type === Constants_1.GENERIC_RSS_FEED || props.type === Constants_1.PODCAST;
|
|
99
100
|
}
|
|
100
|
-
exports.isRSSFeedProps = isRSSFeedProps;
|
|
101
101
|
/**
|
|
102
102
|
* Guard to determine if the props are PlaylistProps
|
|
103
103
|
*/
|
|
@@ -112,5 +112,4 @@ function isPlaylistProps(props) {
|
|
|
112
112
|
const hasZeroIndex = props[0] || props["0"];
|
|
113
113
|
return hasName || hasZeroIndex;
|
|
114
114
|
}
|
|
115
|
-
exports.isPlaylistProps = isPlaylistProps;
|
|
116
115
|
//# sourceMappingURL=Guards.js.map
|
package/lib/Guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":";;AAkCA,oCAEC;AAQD,wBAEC;AAQD,wCAEC;AAQD,8CAEC;AAQD,4CAEC;AAQD,0BAQC;AAQD,0BAEC;AAQD,8CAEC;AAOD,wCAQC;AAKD,0CAaC;AAnID,2CASqB;AAKrB;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,QAAkB;IAC3C,OAAQ,QAAuB,CAAC,QAAQ,KAAK,SAAS,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAC,KAAY;IAC/B,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAI,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,KAAY;IAC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,CAAC;QACT,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAY,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;IAClD,MAAM,YAAY,GAAY,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IAErD,OAAO,OAAO,IAAI,YAAY,CAAC;AACnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.determineMediaSource =
|
|
3
|
+
exports.determineMediaSource = determineMediaSource;
|
|
4
4
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
5
5
|
const stentor_time_1 = require("stentor-time");
|
|
6
6
|
/**
|
|
@@ -32,5 +32,4 @@ function determineMediaSource(potentialMultimedia, capabilities) {
|
|
|
32
32
|
}
|
|
33
33
|
return mediaSource;
|
|
34
34
|
}
|
|
35
|
-
exports.determineMediaSource = determineMediaSource;
|
|
36
35
|
//# sourceMappingURL=determineMediaSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineMediaSource.js","sourceRoot":"","sources":["../src/determineMediaSource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"determineMediaSource.js","sourceRoot":"","sources":["../src/determineMediaSource.ts"],"names":[],"mappings":";;AAYA,oDA8BC;AA1CD,oCAAoC;AACpC,+CAAyE;AAIzE;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAChC,mBAAiC,EACjC,YAAkC;IAElC,IAAI,CAAC,mBAAmB,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,UAAU,GAAe,IAAA,mCAAoB,EAAC,mBAAmB,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAEnG,wCAAwC;IACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,WAAwB,CAAC;IAE7B,oDAAoD;IACpD,IAAI,YAAY,CAAC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3D,WAAW;YACP,IAAA,mCAAoB,EAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAA,kCAAmB,EAAC,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;IAED,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,yDAAyD;QACzD,WAAW;YACP,IAAA,mCAAoB,EAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAA,kCAAmB,EAAC,UAAU,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.59.
|
|
7
|
+
"version": "1.59.72",
|
|
8
8
|
"description": "Media for stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"chai": "4.4.1",
|
|
24
24
|
"mocha": "9.2.2",
|
|
25
25
|
"sinon": "18.0.0",
|
|
26
|
-
"stentor-models": "1.59.
|
|
27
|
-
"typescript": "5.
|
|
26
|
+
"stentor-models": "1.59.70",
|
|
27
|
+
"typescript": "5.5.2"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"stentor-guards": "1.59.
|
|
31
|
-
"stentor-time": "1.59.
|
|
32
|
-
"stentor-utils": "1.59.
|
|
30
|
+
"stentor-guards": "1.59.70",
|
|
31
|
+
"stentor-time": "1.59.72",
|
|
32
|
+
"stentor-utils": "1.59.72"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"stentor-models": "1.x"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"clean": "rm -rf ./lib/*",
|
|
40
40
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0c714432955eb2ecaebadce26ab800206b5da3fc"
|
|
43
43
|
}
|