@clockworkdog/cogs-client 2.4.0 → 2.5.0
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/helpers/urls.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
export declare const COGS_ASSETS_SERVER_PORT = 12094;
|
|
2
1
|
export declare const COGS_SERVER_PORT = 12095;
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
5
|
-
* HTTP/2 asset URL or not.
|
|
3
|
+
* Get the URL of an asset hosted by the COGS server.
|
|
6
4
|
*/
|
|
7
5
|
export declare function assetUrl(file: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Returns a URL for the asset. This is different based on if HTTP/2 is requested or not
|
|
10
|
-
*/
|
|
11
|
-
export declare function assetUrl(file: string, useHttp2AssetsServer: boolean): string;
|
|
12
6
|
export declare function preloadUrl(url: string): Promise<string>;
|
package/dist/helpers/urls.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.preloadUrl = exports.assetUrl = exports.COGS_SERVER_PORT =
|
|
4
|
-
exports.COGS_ASSETS_SERVER_PORT = 12094;
|
|
3
|
+
exports.preloadUrl = exports.assetUrl = exports.COGS_SERVER_PORT = void 0;
|
|
5
4
|
exports.COGS_SERVER_PORT = 12095;
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Get the URL of an asset hosted by the COGS server.
|
|
7
|
+
*/
|
|
8
|
+
function assetUrl(file) {
|
|
7
9
|
const location = typeof window !== 'undefined' ? window.location : undefined;
|
|
8
10
|
const path = `/assets/${encodeURIComponent(file)}`;
|
|
9
|
-
|
|
10
|
-
return `https://${location === null || location === void 0 ? void 0 : location.hostname}:${exports.COGS_ASSETS_SERVER_PORT}${path}`;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return `${location === null || location === void 0 ? void 0 : location.protocol}//${location === null || location === void 0 ? void 0 : location.hostname}:${exports.COGS_SERVER_PORT}${path}`;
|
|
14
|
-
}
|
|
11
|
+
return `${location === null || location === void 0 ? void 0 : location.protocol}//${location === null || location === void 0 ? void 0 : location.hostname}:${exports.COGS_SERVER_PORT}${path}`;
|
|
15
12
|
}
|
|
16
13
|
exports.assetUrl = assetUrl;
|
|
17
14
|
async function preloadUrl(url) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clockworkdog/cogs-client",
|
|
3
|
-
"version": "v2.
|
|
3
|
+
"version": "v2.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"unpkg": "dist/browser/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@clockworkdog/media-stream-library-browser": "^11.1.1-fixes.6",
|
|
34
|
-
"compare-versions": "^6.1.0",
|
|
35
34
|
"howler": "clockwork-dog/howler.js#fix-looping-clips",
|
|
36
35
|
"reconnecting-websocket": "^4.4.0"
|
|
37
36
|
},
|