@clockworkdog/cogs-client 2.4.0 → 2.7.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/README.md +6 -6
- package/dist/AudioPlayer.js +1 -0
- package/dist/CogsConnection.d.ts +0 -8
- package/dist/CogsConnection.js +7 -39
- package/dist/VideoPlayer.js +4 -2
- package/dist/browser/index.js +1485 -1725
- package/dist/helpers/urls.d.ts +1 -7
- package/dist/helpers/urls.js +8 -11
- package/dist/index.js +17 -7
- package/dist/types/CogsClientMessage.d.ts +0 -1
- package/dist/types/CogsPluginManifest.d.ts +2 -0
- package/package.json +39 -39
- package/LICENSE +0 -21
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,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.COGS_SERVER_PORT = void 0;
|
|
4
|
+
exports.assetUrl = assetUrl;
|
|
5
|
+
exports.preloadUrl = preloadUrl;
|
|
5
6
|
exports.COGS_SERVER_PORT = 12095;
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Get the URL of an asset hosted by the COGS server.
|
|
9
|
+
*/
|
|
10
|
+
function assetUrl(file) {
|
|
7
11
|
const location = typeof window !== 'undefined' ? window.location : undefined;
|
|
8
12
|
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
|
-
}
|
|
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}`;
|
|
15
14
|
}
|
|
16
|
-
exports.assetUrl = assetUrl;
|
|
17
15
|
async function preloadUrl(url) {
|
|
18
16
|
const response = await fetch(url);
|
|
19
17
|
// We used arrayBuffer()` instead of `blob()` because the latter seems to fail on Pis when preloading some files
|
|
20
18
|
return URL.createObjectURL(new Blob([await response.arrayBuffer()]));
|
|
21
19
|
}
|
|
22
|
-
exports.preloadUrl = preloadUrl;
|
package/dist/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
40
|
};
|
|
@@ -123,6 +123,8 @@ export interface CogsPluginManifestJson {
|
|
|
123
123
|
/**
|
|
124
124
|
* COGS-managed key/value data store settings
|
|
125
125
|
*
|
|
126
|
+
* Added in COGS 5.4
|
|
127
|
+
*
|
|
126
128
|
* Allows certain key/value pairs to be saved to disk in the project folder alongside the plugin.
|
|
127
129
|
* Any key that is not listed here can still be used.
|
|
128
130
|
*/
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clockworkdog/cogs-client",
|
|
3
|
-
"
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"unpkg": "dist/browser/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"lint": "yarn lint:json && yarn lint:ts",
|
|
9
|
-
"lint:json": "prettier --list-different .eslintrc *.json",
|
|
10
|
-
"lint:ts": "eslint --ext .js,.ts --ignore-path .gitignore .",
|
|
11
|
-
"build": "tsc && browserify --debug --standalone COGS dist/index.js -o dist/browser/index.js",
|
|
12
|
-
"watch-build": "tsc -w",
|
|
13
|
-
"build-docs": "typedoc --out docs --name @clockworkdog/cogs-client src/index.ts",
|
|
14
|
-
"release": "yarn publish --access public"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [],
|
|
3
|
+
"description": "Connect to COGS to build a custom Media Master",
|
|
17
4
|
"author": "Clockwork Dog <info@clockwork.dog>",
|
|
5
|
+
"homepage": "https://github.com/clockwork-dog/cogs-sdk/tree/main/packages/javascript",
|
|
6
|
+
"version": "2.7.0",
|
|
7
|
+
"keywords": [],
|
|
18
8
|
"license": "MIT",
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/howler": "2.2.7",
|
|
21
|
-
"@types/node": "^18.14.1",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^4.12.0",
|
|
23
|
-
"@typescript-eslint/parser": "^4.12.0",
|
|
24
|
-
"browserify": "^17.0.0",
|
|
25
|
-
"eslint": "^7.17.0",
|
|
26
|
-
"eslint-config-prettier": "^7.1.0",
|
|
27
|
-
"eslint-plugin-prettier": "^3.3.1",
|
|
28
|
-
"prettier": "^2.2.1",
|
|
29
|
-
"typedoc": "^0.25.7",
|
|
30
|
-
"typescript": "^5.1.6"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@clockworkdog/media-stream-library-browser": "^11.1.1-fixes.6",
|
|
34
|
-
"compare-versions": "^6.1.0",
|
|
35
|
-
"howler": "clockwork-dog/howler.js#fix-looping-clips",
|
|
36
|
-
"reconnecting-websocket": "^4.4.0"
|
|
37
|
-
},
|
|
38
|
-
"description": "Connect to COGS to build a custom Media Master",
|
|
39
9
|
"repository": {
|
|
40
10
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/clockwork-dog/cogs-
|
|
11
|
+
"url": "git+https://github.com/clockwork-dog/cogs-sdk.git"
|
|
42
12
|
},
|
|
43
13
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/clockwork-dog/cogs-
|
|
14
|
+
"url": "https://github.com/clockwork-dog/cogs-sdk/issues"
|
|
45
15
|
},
|
|
46
|
-
"homepage": "https://cogs.show",
|
|
47
16
|
"files": [
|
|
48
17
|
"dist/**/*"
|
|
49
|
-
]
|
|
50
|
-
|
|
18
|
+
],
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"unpkg": "dist/browser/index.js",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "yarn types && yarn lint",
|
|
23
|
+
"types": "tsc --noEmit",
|
|
24
|
+
"lint": "eslint .",
|
|
25
|
+
"build": "yarn build:ts && yarn build:browser",
|
|
26
|
+
"build:ts": "tsc",
|
|
27
|
+
"build:browser": "browserify --debug --standalone COGS dist/index.js -o dist/browser/index.js",
|
|
28
|
+
"watch-build": "tsc -w",
|
|
29
|
+
"build-docs": "typedoc --out ../../docs/javascript --name @clockworkdog/cogs-client src/index.ts",
|
|
30
|
+
"release": "yarn npm publish --access public"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@clockworkdog/media-stream-library-browser": "11.1.1-fixes.7",
|
|
34
|
+
"howler": "clockwork-dog/howler.js#fix-looping-clips",
|
|
35
|
+
"reconnecting-websocket": "^4.4.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@eslint/js": "^9.17.0",
|
|
39
|
+
"@types/howler": "2.2.12",
|
|
40
|
+
"@types/node": "^22.10.2",
|
|
41
|
+
"browserify": "^17.0.1",
|
|
42
|
+
"eslint": "^9.17.0",
|
|
43
|
+
"eslint-config-prettier": "^9.1.0",
|
|
44
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
45
|
+
"prettier": "^3.4.2",
|
|
46
|
+
"typedoc": "^0.27.5",
|
|
47
|
+
"typescript": "~5.7.2",
|
|
48
|
+
"typescript-eslint": "^8.18.1"
|
|
49
|
+
}
|
|
50
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Clockwork Dog
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|