@vnejs/module.controller.audio 0.2.5 → 0.2.6

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/index.d.ts CHANGED
@@ -20,7 +20,6 @@ export declare abstract class ModuleControllerAudio<TEvents extends ModuleContro
20
20
  isPlaying: boolean;
21
21
  subscribe: () => void;
22
22
  init: () => void;
23
- getDefaultState: () => TState;
24
23
  onShow: () => void;
25
24
  onHide: () => void;
26
25
  onLoad: () => undefined;
package/dist/index.js CHANGED
@@ -19,16 +19,12 @@ export class ModuleControllerAudio extends ModuleCore {
19
19
  this.PARAMS_ALL = { layer: "view", name: this.AUDIO_NAME, duration: this.AUDIO_START_DURATION };
20
20
  this.PARAMS_DURATION = { duration: this.AUDIO_START_DURATION };
21
21
  };
22
- getDefaultState = () => ({ isShow: false });
23
22
  onShow = () => {
24
- this.updateState({ isShow: true });
25
23
  this.isPlaying = true;
26
24
  this.emit(this.EVENTS.AUDIO.GLOBAL_PAUSE, this.PARAMS_DURATION);
27
25
  this.emit(this.EVENTS.AUDIO.PLAY, { ...this.PARAMS_ALL, volume: this.getRealVolume() });
28
26
  };
29
27
  onHide = () => {
30
- if (this.state.isShow)
31
- this.updateState({ isShow: false });
32
28
  this.isPlaying = false;
33
29
  this.emit(this.EVENTS.AUDIO.STOP, this.PARAMS_ALL);
34
30
  this.emit(this.EVENTS.AUDIO.GLOBAL_RESUME, this.PARAMS_DURATION);
package/dist/types.d.ts CHANGED
@@ -4,6 +4,4 @@ export type ModuleControllerAudioEvents = ModuleCoreEvents & Record<AudioPluginN
4
4
  export type ModuleControllerAudioConstants = ModuleCoreConstants;
5
5
  export type ModuleControllerAudioSettings = ModuleCoreSettings;
6
6
  export type ModuleControllerAudioParams = ModuleCoreParams;
7
- export type ModuleControllerAudioState = {
8
- isShow: boolean;
9
- };
7
+ export type ModuleControllerAudioState = object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/module.controller.audio",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -60,17 +60,12 @@ export abstract class ModuleControllerAudio<
60
60
  this.PARAMS_DURATION = { duration: this.AUDIO_START_DURATION };
61
61
  };
62
62
 
63
- getDefaultState = (): TState => ({ isShow: false }) as TState;
64
-
65
63
  onShow = () => {
66
- this.updateState({ isShow: true } as Partial<TState>);
67
64
  this.isPlaying = true;
68
65
  this.emit(this.EVENTS.AUDIO.GLOBAL_PAUSE, this.PARAMS_DURATION);
69
66
  this.emit(this.EVENTS.AUDIO.PLAY, { ...this.PARAMS_ALL, volume: this.getRealVolume() });
70
67
  };
71
68
  onHide = () => {
72
- if (this.state.isShow) this.updateState({ isShow: false } as Partial<TState>);
73
-
74
69
  this.isPlaying = false;
75
70
  this.emit(this.EVENTS.AUDIO.STOP, this.PARAMS_ALL);
76
71
  this.emit(this.EVENTS.AUDIO.GLOBAL_RESUME, this.PARAMS_DURATION);
package/src/types.ts CHANGED
@@ -9,6 +9,4 @@ export type ModuleControllerAudioSettings = ModuleCoreSettings;
9
9
 
10
10
  export type ModuleControllerAudioParams = ModuleCoreParams;
11
11
 
12
- export type ModuleControllerAudioState = {
13
- isShow: boolean;
14
- };
12
+ export type ModuleControllerAudioState = object;