@clockworkdog/cogs-client 1.0.0-rc.6 → 1.0.0-rc.9
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/AudioPlayer.d.ts +4 -2
- package/dist/AudioPlayer.js +147 -84
- package/dist/AudioPlayer.js.map +1 -1
- package/dist/VideoPlayer.js +14 -8
- package/dist/VideoPlayer.js.map +1 -1
- package/dist/browser/index.js +163 -102
- package/dist/types/AudioState.d.ts +17 -6
- package/dist/types/AudioState.js +0 -8
- package/dist/types/AudioState.js.map +1 -1
- package/dist/types/CogsClientMessage.d.ts +8 -4
- package/dist/types/VideoState.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
export declare type ActiveAudioClipState = {
|
|
2
|
+
type: 'paused';
|
|
3
|
+
} | {
|
|
4
|
+
type: 'pause_requested';
|
|
5
|
+
fade: number | undefined;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'pausing';
|
|
8
|
+
} | {
|
|
9
|
+
type: 'playing';
|
|
10
|
+
} | {
|
|
11
|
+
type: 'play_requested';
|
|
12
|
+
} | {
|
|
13
|
+
type: 'stopping';
|
|
14
|
+
} | {
|
|
15
|
+
type: 'stop_requested';
|
|
16
|
+
fade: number | undefined;
|
|
17
|
+
};
|
|
7
18
|
export interface AudioClip {
|
|
8
19
|
config: {
|
|
9
20
|
preload: boolean;
|
package/dist/types/AudioState.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActiveAudioClipState = void 0;
|
|
4
|
-
var ActiveAudioClipState;
|
|
5
|
-
(function (ActiveAudioClipState) {
|
|
6
|
-
ActiveAudioClipState["Paused"] = "paused";
|
|
7
|
-
ActiveAudioClipState["Pausing"] = "pausing";
|
|
8
|
-
ActiveAudioClipState["Playing"] = "playing";
|
|
9
|
-
ActiveAudioClipState["Stopping"] = "stopping";
|
|
10
|
-
})(ActiveAudioClipState = exports.ActiveAudioClipState || (exports.ActiveAudioClipState = {}));
|
|
11
3
|
//# sourceMappingURL=AudioState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioState.js","sourceRoot":"","sources":["../../src/types/AudioState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AudioState.js","sourceRoot":"","sources":["../../src/types/AudioState.ts"],"names":[],"mappings":""}
|
|
@@ -16,14 +16,18 @@ interface TextHintsUpdateMessage {
|
|
|
16
16
|
type: 'text_hints_update';
|
|
17
17
|
lastSentHint: string;
|
|
18
18
|
}
|
|
19
|
+
export declare type Media = {
|
|
20
|
+
type: 'audio';
|
|
21
|
+
preload: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'video';
|
|
24
|
+
preload: boolean | 'auto' | 'metadata' | 'none';
|
|
25
|
+
};
|
|
19
26
|
interface MediaClientConfigMessage {
|
|
20
27
|
type: 'media_config_update';
|
|
21
28
|
globalVolume: number;
|
|
22
29
|
files: {
|
|
23
|
-
[path: string]:
|
|
24
|
-
preload: boolean;
|
|
25
|
-
type: 'audio' | 'video';
|
|
26
|
-
};
|
|
30
|
+
[path: string]: Media;
|
|
27
31
|
};
|
|
28
32
|
}
|
|
29
33
|
declare type MediaClientMessage = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clockworkdog/cogs-client",
|
|
3
|
-
"version": "v1.0.0-rc.
|
|
3
|
+
"version": "v1.0.0-rc.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"unpkg": "dist/browser/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"author": "Clockwork Dog <info@clockwork.dog>",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/howler": "2.2.
|
|
19
|
+
"@types/howler": "2.2.7",
|
|
20
20
|
"@typescript-eslint/eslint-plugin": "^4.12.0",
|
|
21
21
|
"@typescript-eslint/parser": "^4.12.0",
|
|
22
22
|
"browserify": "^17.0.0",
|