@vnejs/plugins.media.video 0.0.2 → 0.1.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/modules/video.js +4 -8
- package/modules/view.js +5 -3
- package/package.json +5 -6
package/modules/video.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleController } from "@vnejs/module.components";
|
|
2
2
|
|
|
3
|
-
export class Video extends
|
|
3
|
+
export class Video extends ModuleController {
|
|
4
4
|
name = "video";
|
|
5
5
|
|
|
6
6
|
emitInteract = () => this.emit(this.EVENTS.INTERACT.EMIT);
|
|
@@ -29,7 +29,7 @@ export class Video extends Module.Controller {
|
|
|
29
29
|
beforeShow = async () => this.emit(this.EVENTS.INTERFACE.TEXT_HIDE);
|
|
30
30
|
afterHide = async () => {
|
|
31
31
|
await this.emit(this.EVENTS.INTERACT.POP, { key: this.name });
|
|
32
|
-
this.
|
|
32
|
+
this.emit(this.EVENTS.SCENARIO.NEXT, { module: this.name });
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
onExecLineHandler = async (line = "") => {
|
|
@@ -40,11 +40,7 @@ export class Video extends Module.Controller {
|
|
|
40
40
|
await this.emit(this.EVENTS.INTERACT.PUSH, { key: this.name, handler: this.emitHide });
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
onPreloadLineHandler = async ({
|
|
44
|
-
line,
|
|
45
|
-
priority = this.CONST.MEDIA.PRIORITIES.BACKGROUND,
|
|
46
|
-
isConstant = false,
|
|
47
|
-
} = {}) => {
|
|
43
|
+
onPreloadLineHandler = async ({ line, priority = this.CONST.MEDIA.PRIORITIES.BACKGROUND, isConstant = false } = {}) => {
|
|
48
44
|
const { name = "" } = line.match(this.CONST.VIDEO.LINE_REG).groups;
|
|
49
45
|
|
|
50
46
|
if (name) await this.emit(this.EVENTS.VIDEO.LOAD, { name, priority, isConstant });
|
package/modules/view.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleView } from "@vnejs/module.components";
|
|
2
2
|
|
|
3
3
|
import { render } from "../view";
|
|
4
4
|
|
|
5
|
-
export class VideoView extends
|
|
5
|
+
export class VideoView extends ModuleView {
|
|
6
6
|
name = "video.view";
|
|
7
|
+
|
|
7
8
|
animationTime = 300;
|
|
8
|
-
renderFunc = render;
|
|
9
9
|
updateEvent = this.EVENTS.VIDEO.UPDATE;
|
|
10
|
+
|
|
11
|
+
renderFunc = render;
|
|
10
12
|
updateHandler = this.onUpdateReactComponent;
|
|
11
13
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.media.video",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"publish:major:plugin": "npm run publish:major",
|
|
8
|
+
"publish:minor:plugin": "npm run publish:minor",
|
|
9
|
+
"publish:patch:plugin": "npm run publish:patch",
|
|
7
10
|
"publish:major": "npm version major && npm publish --access public",
|
|
8
11
|
"publish:minor": "npm version minor && npm publish --access public",
|
|
9
12
|
"publish:patch": "npm version patch && npm publish --access public"
|
|
10
13
|
},
|
|
11
14
|
"author": "",
|
|
12
15
|
"license": "ISC",
|
|
13
|
-
"description": ""
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"@vnejs/shared": "*",
|
|
16
|
-
"@vnejs/module": "*"
|
|
17
|
-
}
|
|
16
|
+
"description": ""
|
|
18
17
|
}
|