stormcloud-video-player 0.7.19 → 0.7.21
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/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +65 -15
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +65 -15
- package/lib/index.js.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +65 -15
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/adcision.cjs +29 -0
- package/lib/utils/adcision.cjs.map +1 -1
- package/lib/utils/adcision.d.cts +9 -1
- package/package.json +1 -1
package/lib/utils/adcision.cjs
CHANGED
|
@@ -183,6 +183,9 @@ __export(adcision_exports, {
|
|
|
183
183
|
fetchAdcisionChannel: function fetchAdcisionChannel1() {
|
|
184
184
|
return fetchAdcisionChannel;
|
|
185
185
|
},
|
|
186
|
+
fetchAdcisionChannelLiveContext: function fetchAdcisionChannelLiveContext1() {
|
|
187
|
+
return fetchAdcisionChannelLiveContext;
|
|
188
|
+
},
|
|
186
189
|
fetchAdcisionTemplates: function fetchAdcisionTemplates1() {
|
|
187
190
|
return fetchAdcisionTemplates;
|
|
188
191
|
}
|
|
@@ -214,6 +217,31 @@ function fetchAdcisionChannel(_0) {
|
|
|
214
217
|
});
|
|
215
218
|
}).apply(this, arguments);
|
|
216
219
|
}
|
|
220
|
+
function fetchAdcisionChannelLiveContext(_0) {
|
|
221
|
+
return _async_to_generator(function(channelId) {
|
|
222
|
+
var apiBaseUrl, response;
|
|
223
|
+
var _arguments = arguments;
|
|
224
|
+
return _ts_generator(this, function(_state) {
|
|
225
|
+
switch(_state.label){
|
|
226
|
+
case 0:
|
|
227
|
+
apiBaseUrl = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : ADCISION_API_BASE;
|
|
228
|
+
return [
|
|
229
|
+
4,
|
|
230
|
+
fetch("".concat(apiBaseUrl, "/adstorm/adcision/channels/").concat(channelId, "/live-context"))
|
|
231
|
+
];
|
|
232
|
+
case 1:
|
|
233
|
+
response = _state.sent();
|
|
234
|
+
if (!response.ok) {
|
|
235
|
+
throw new Error("Failed to fetch adcision channel live context ".concat(channelId, ": ").concat(response.status, " ").concat(response.statusText));
|
|
236
|
+
}
|
|
237
|
+
return [
|
|
238
|
+
2,
|
|
239
|
+
response.json()
|
|
240
|
+
];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}).apply(this, arguments);
|
|
244
|
+
}
|
|
217
245
|
function fetchAdcisionTemplates() {
|
|
218
246
|
return _async_to_generator(function() {
|
|
219
247
|
var apiBaseUrl, response, data;
|
|
@@ -248,6 +276,7 @@ function fetchAdcisionTemplates() {
|
|
|
248
276
|
// Annotate the CommonJS export names for ESM import in node:
|
|
249
277
|
0 && (module.exports = {
|
|
250
278
|
fetchAdcisionChannel: fetchAdcisionChannel,
|
|
279
|
+
fetchAdcisionChannelLiveContext: fetchAdcisionChannelLiveContext,
|
|
251
280
|
fetchAdcisionTemplates: fetchAdcisionTemplates
|
|
252
281
|
});
|
|
253
282
|
//# sourceMappingURL=adcision.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ubuntu24-new/Dev/stormcloud-vp/lib/utils/adcision.cjs"],"names":[],"mappings":"AAAA","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/utils/adcision.ts\nvar adcision_exports = {};\n__export(adcision_exports, {\n fetchAdcisionChannel: () => fetchAdcisionChannel,\n fetchAdcisionTemplates: () => fetchAdcisionTemplates\n});\nmodule.exports = __toCommonJS(adcision_exports);\nvar ADCISION_API_BASE = \"https://adstorm.co/api-adstorm-dev\";\nasync function fetchAdcisionChannel(channelId, apiBaseUrl = ADCISION_API_BASE) {\n const response = await fetch(\n `${apiBaseUrl}/adstorm/adcision/channels/${channelId}`\n );\n if (!response.ok) {\n throw new Error(\n `Failed to fetch adcision channel ${channelId}: ${response.status} ${response.statusText}`\n );\n }\n return response.json();\n}\nasync function fetchAdcisionTemplates(apiBaseUrl = ADCISION_API_BASE) {\n const response = await fetch(`${apiBaseUrl}/adstorm/adcision/templates`);\n if (!response.ok) {\n throw new Error(\n `Failed to fetch adcision templates: ${response.status} ${response.statusText}`\n );\n }\n const data = await response.json();\n return Array.isArray(data) ? data : [];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n fetchAdcisionChannel,\n fetchAdcisionTemplates\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/ubuntu24-new/Dev/stormcloud-vp/lib/utils/adcision.cjs"],"names":[],"mappings":"AAAA","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/utils/adcision.ts\nvar adcision_exports = {};\n__export(adcision_exports, {\n fetchAdcisionChannel: () => fetchAdcisionChannel,\n fetchAdcisionChannelLiveContext: () => fetchAdcisionChannelLiveContext,\n fetchAdcisionTemplates: () => fetchAdcisionTemplates\n});\nmodule.exports = __toCommonJS(adcision_exports);\nvar ADCISION_API_BASE = \"https://adstorm.co/api-adstorm-dev\";\nasync function fetchAdcisionChannel(channelId, apiBaseUrl = ADCISION_API_BASE) {\n const response = await fetch(\n `${apiBaseUrl}/adstorm/adcision/channels/${channelId}`\n );\n if (!response.ok) {\n throw new Error(\n `Failed to fetch adcision channel ${channelId}: ${response.status} ${response.statusText}`\n );\n }\n return response.json();\n}\nasync function fetchAdcisionChannelLiveContext(channelId, apiBaseUrl = ADCISION_API_BASE) {\n const response = await fetch(\n `${apiBaseUrl}/adstorm/adcision/channels/${channelId}/live-context`\n );\n if (!response.ok) {\n throw new Error(\n `Failed to fetch adcision channel live context ${channelId}: ${response.status} ${response.statusText}`\n );\n }\n return response.json();\n}\nasync function fetchAdcisionTemplates(apiBaseUrl = ADCISION_API_BASE) {\n const response = await fetch(`${apiBaseUrl}/adstorm/adcision/templates`);\n if (!response.ok) {\n throw new Error(\n `Failed to fetch adcision templates: ${response.status} ${response.statusText}`\n );\n }\n const data = await response.json();\n return Array.isArray(data) ? data : [];\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n fetchAdcisionChannel,\n fetchAdcisionChannelLiveContext,\n fetchAdcisionTemplates\n});\n"]}
|
package/lib/utils/adcision.d.cts
CHANGED
|
@@ -18,6 +18,14 @@ interface AdcisionTemplate {
|
|
|
18
18
|
channels: AdcisionChannel[];
|
|
19
19
|
}
|
|
20
20
|
declare function fetchAdcisionChannel(channelId: number, apiBaseUrl?: string): Promise<AdcisionChannel>;
|
|
21
|
+
interface AdcisionChannelLiveContext {
|
|
22
|
+
id: number;
|
|
23
|
+
channel_id: number;
|
|
24
|
+
keywords: string[];
|
|
25
|
+
context: string;
|
|
26
|
+
updated_at: string;
|
|
27
|
+
}
|
|
28
|
+
declare function fetchAdcisionChannelLiveContext(channelId: number, apiBaseUrl?: string): Promise<AdcisionChannelLiveContext>;
|
|
21
29
|
declare function fetchAdcisionTemplates(apiBaseUrl?: string): Promise<AdcisionTemplate[]>;
|
|
22
30
|
|
|
23
|
-
export { type AdcisionChannel, type AdcisionTemplate, fetchAdcisionChannel, fetchAdcisionTemplates };
|
|
31
|
+
export { type AdcisionChannel, type AdcisionChannelLiveContext, type AdcisionTemplate, fetchAdcisionChannel, fetchAdcisionChannelLiveContext, fetchAdcisionTemplates };
|