@next2d/events 1.14.20
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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/Event.d.ts +424 -0
- package/dist/Event.js +560 -0
- package/dist/EventDispatcher.d.ts +138 -0
- package/dist/EventDispatcher.js +622 -0
- package/dist/EventPhase.d.ts +80 -0
- package/dist/EventPhase.js +94 -0
- package/dist/FocusEvent.d.ts +89 -0
- package/dist/FocusEvent.js +103 -0
- package/dist/HTTPStatusEvent.d.ts +107 -0
- package/dist/HTTPStatusEvent.js +139 -0
- package/dist/IOErrorEvent.d.ts +82 -0
- package/dist/IOErrorEvent.js +101 -0
- package/dist/MouseEvent.d.ts +163 -0
- package/dist/MouseEvent.js +207 -0
- package/dist/ProgressEvent.d.ts +97 -0
- package/dist/ProgressEvent.js +123 -0
- package/dist/VideoEvent.d.ts +145 -0
- package/dist/VideoEvent.js +181 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/package.json +42 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Event } from "./Event";
|
|
2
|
+
/**
|
|
3
|
+
* ビデオを再生または停止すると、VideoEvent オブジェクトを送出します。
|
|
4
|
+
*
|
|
5
|
+
* When a video is played or stopped, it sends out a VideoEvent object.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
* @memberOf next2d.events
|
|
9
|
+
* @extends Event
|
|
10
|
+
*/
|
|
11
|
+
export declare class VideoEvent extends Event {
|
|
12
|
+
private readonly _$bytesLoaded;
|
|
13
|
+
private readonly _$bytesTotal;
|
|
14
|
+
/**
|
|
15
|
+
* @param {string} type
|
|
16
|
+
* @param {boolean} [bubbles=true]
|
|
17
|
+
* @param {boolean} [cancelable=false]
|
|
18
|
+
* @param {number} [bytes_loaded=0]
|
|
19
|
+
* @param {number} [bytes_total=0]
|
|
20
|
+
*
|
|
21
|
+
* @constructor
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
constructor(type: string, bubbles?: boolean, cancelable?: boolean, bytes_loaded?: number, bytes_total?: number);
|
|
25
|
+
/**
|
|
26
|
+
* 指定されたクラスのストリングを返します。
|
|
27
|
+
* Returns the string representation of the specified class.
|
|
28
|
+
*
|
|
29
|
+
* @return {string}
|
|
30
|
+
* @default [class VideoEvent]
|
|
31
|
+
* @method
|
|
32
|
+
* @static
|
|
33
|
+
*/
|
|
34
|
+
static toString(): string;
|
|
35
|
+
/**
|
|
36
|
+
* @description 指定されたクラスの空間名を返します。
|
|
37
|
+
* Returns the space name of the specified class.
|
|
38
|
+
*
|
|
39
|
+
* @member {string}
|
|
40
|
+
* @default next2d.events.VideoEvent
|
|
41
|
+
* @const
|
|
42
|
+
* @static
|
|
43
|
+
*/
|
|
44
|
+
static get namespace(): string;
|
|
45
|
+
/**
|
|
46
|
+
* @description 指定されたオブジェクトのストリングを返します。
|
|
47
|
+
* Returns the string representation of the specified object.
|
|
48
|
+
*
|
|
49
|
+
* @return {string}
|
|
50
|
+
* @method
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
toString(): string;
|
|
54
|
+
/**
|
|
55
|
+
* @description 指定されたオブジェクトの空間名を返します。
|
|
56
|
+
* Returns the space name of the specified object.
|
|
57
|
+
*
|
|
58
|
+
* @member {string}
|
|
59
|
+
* @default next2d.events.VideoEvent
|
|
60
|
+
* @const
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
get namespace(): string;
|
|
64
|
+
/**
|
|
65
|
+
* @description progress イベントオブジェクトの type プロパティ値を定義します。
|
|
66
|
+
* Defines the value of the type property of a progress event object.
|
|
67
|
+
*
|
|
68
|
+
* @return {string}
|
|
69
|
+
* @default progress
|
|
70
|
+
* @const
|
|
71
|
+
* @static
|
|
72
|
+
*/
|
|
73
|
+
static get PROGRESS(): string;
|
|
74
|
+
/**
|
|
75
|
+
* @description play イベントオブジェクトの type プロパティ値を定義します。
|
|
76
|
+
* Defines the value of the type property of a play event object.
|
|
77
|
+
*
|
|
78
|
+
* @return {string}
|
|
79
|
+
* @default play
|
|
80
|
+
* @const
|
|
81
|
+
* @static
|
|
82
|
+
*/
|
|
83
|
+
static get PLAY(): string;
|
|
84
|
+
/**
|
|
85
|
+
* @description playStart イベントオブジェクトの type プロパティ値を定義します。
|
|
86
|
+
* Defines the value of the type property of a playStart event object.
|
|
87
|
+
*
|
|
88
|
+
* @return {string}
|
|
89
|
+
* @default playStart
|
|
90
|
+
* @const
|
|
91
|
+
* @static
|
|
92
|
+
*/
|
|
93
|
+
static get PLAY_START(): string;
|
|
94
|
+
/**
|
|
95
|
+
* @description playEnd イベントオブジェクトの type プロパティ値を定義します。
|
|
96
|
+
* Defines the value of the type property of a playEnd event object.
|
|
97
|
+
*
|
|
98
|
+
* @return {string}
|
|
99
|
+
* @default playEnd
|
|
100
|
+
* @const
|
|
101
|
+
* @static
|
|
102
|
+
*/
|
|
103
|
+
static get PLAY_END(): string;
|
|
104
|
+
/**
|
|
105
|
+
* @description pause イベントオブジェクトの type プロパティ値を定義します。
|
|
106
|
+
* Defines the value of the type property of a pause event object.
|
|
107
|
+
*
|
|
108
|
+
* @return {string}
|
|
109
|
+
* @default pause
|
|
110
|
+
* @const
|
|
111
|
+
* @static
|
|
112
|
+
*/
|
|
113
|
+
static get PAUSE(): string;
|
|
114
|
+
/**
|
|
115
|
+
* @description seek イベントオブジェクトの type プロパティ値を定義します。
|
|
116
|
+
* Defines the value of the type property of a seek event object.
|
|
117
|
+
*
|
|
118
|
+
* @return {string}
|
|
119
|
+
* @default seek
|
|
120
|
+
* @const
|
|
121
|
+
* @static
|
|
122
|
+
*/
|
|
123
|
+
static get SEEK(): string;
|
|
124
|
+
/**
|
|
125
|
+
* @description リスナーがイベントを処理しているときに読み込まれたアイテム数またはバイト数です。
|
|
126
|
+
* The number of items or bytes loaded when the listener processes the event.
|
|
127
|
+
*
|
|
128
|
+
* @return {number}
|
|
129
|
+
* @default 0
|
|
130
|
+
* @readonly
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
get bytesLoaded(): number;
|
|
134
|
+
/**
|
|
135
|
+
* @description 読み込みプロセスが成功した場合に読み込まれるアイテムまたはバイトの総数です。
|
|
136
|
+
* The total number of items or bytes that will be loaded
|
|
137
|
+
* if the loading process succeeds.
|
|
138
|
+
*
|
|
139
|
+
* @return {number}
|
|
140
|
+
* @default 0
|
|
141
|
+
* @readonly
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
get bytesTotal(): number;
|
|
145
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { Event } from "./Event";
|
|
2
|
+
/**
|
|
3
|
+
* ビデオを再生または停止すると、VideoEvent オブジェクトを送出します。
|
|
4
|
+
*
|
|
5
|
+
* When a video is played or stopped, it sends out a VideoEvent object.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
* @memberOf next2d.events
|
|
9
|
+
* @extends Event
|
|
10
|
+
*/
|
|
11
|
+
export class VideoEvent extends Event {
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} type
|
|
14
|
+
* @param {boolean} [bubbles=true]
|
|
15
|
+
* @param {boolean} [cancelable=false]
|
|
16
|
+
* @param {number} [bytes_loaded=0]
|
|
17
|
+
* @param {number} [bytes_total=0]
|
|
18
|
+
*
|
|
19
|
+
* @constructor
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
constructor(type, bubbles = false, cancelable = false, bytes_loaded = 0, bytes_total = 0) {
|
|
23
|
+
super(type, bubbles, cancelable);
|
|
24
|
+
/**
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @default 0
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
this._$bytesLoaded = bytes_loaded | 0;
|
|
30
|
+
/**
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @default 0
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
this._$bytesTotal = bytes_total | 0;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 指定されたクラスのストリングを返します。
|
|
39
|
+
* Returns the string representation of the specified class.
|
|
40
|
+
*
|
|
41
|
+
* @return {string}
|
|
42
|
+
* @default [class VideoEvent]
|
|
43
|
+
* @method
|
|
44
|
+
* @static
|
|
45
|
+
*/
|
|
46
|
+
static toString() {
|
|
47
|
+
return "[class VideoEvent]";
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @description 指定されたクラスの空間名を返します。
|
|
51
|
+
* Returns the space name of the specified class.
|
|
52
|
+
*
|
|
53
|
+
* @member {string}
|
|
54
|
+
* @default next2d.events.VideoEvent
|
|
55
|
+
* @const
|
|
56
|
+
* @static
|
|
57
|
+
*/
|
|
58
|
+
static get namespace() {
|
|
59
|
+
return "next2d.events.VideoEvent";
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @description 指定されたオブジェクトのストリングを返します。
|
|
63
|
+
* Returns the string representation of the specified object.
|
|
64
|
+
*
|
|
65
|
+
* @return {string}
|
|
66
|
+
* @method
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
toString() {
|
|
70
|
+
return this.formatToString("VideoEvent", "type", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @description 指定されたオブジェクトの空間名を返します。
|
|
74
|
+
* Returns the space name of the specified object.
|
|
75
|
+
*
|
|
76
|
+
* @member {string}
|
|
77
|
+
* @default next2d.events.VideoEvent
|
|
78
|
+
* @const
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
get namespace() {
|
|
82
|
+
return "next2d.events.VideoEvent";
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @description progress イベントオブジェクトの type プロパティ値を定義します。
|
|
86
|
+
* Defines the value of the type property of a progress event object.
|
|
87
|
+
*
|
|
88
|
+
* @return {string}
|
|
89
|
+
* @default progress
|
|
90
|
+
* @const
|
|
91
|
+
* @static
|
|
92
|
+
*/
|
|
93
|
+
static get PROGRESS() {
|
|
94
|
+
return "progress";
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @description play イベントオブジェクトの type プロパティ値を定義します。
|
|
98
|
+
* Defines the value of the type property of a play event object.
|
|
99
|
+
*
|
|
100
|
+
* @return {string}
|
|
101
|
+
* @default play
|
|
102
|
+
* @const
|
|
103
|
+
* @static
|
|
104
|
+
*/
|
|
105
|
+
static get PLAY() {
|
|
106
|
+
return "play";
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @description playStart イベントオブジェクトの type プロパティ値を定義します。
|
|
110
|
+
* Defines the value of the type property of a playStart event object.
|
|
111
|
+
*
|
|
112
|
+
* @return {string}
|
|
113
|
+
* @default playStart
|
|
114
|
+
* @const
|
|
115
|
+
* @static
|
|
116
|
+
*/
|
|
117
|
+
static get PLAY_START() {
|
|
118
|
+
return "playStart";
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @description playEnd イベントオブジェクトの type プロパティ値を定義します。
|
|
122
|
+
* Defines the value of the type property of a playEnd event object.
|
|
123
|
+
*
|
|
124
|
+
* @return {string}
|
|
125
|
+
* @default playEnd
|
|
126
|
+
* @const
|
|
127
|
+
* @static
|
|
128
|
+
*/
|
|
129
|
+
static get PLAY_END() {
|
|
130
|
+
return "playEnd";
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @description pause イベントオブジェクトの type プロパティ値を定義します。
|
|
134
|
+
* Defines the value of the type property of a pause event object.
|
|
135
|
+
*
|
|
136
|
+
* @return {string}
|
|
137
|
+
* @default pause
|
|
138
|
+
* @const
|
|
139
|
+
* @static
|
|
140
|
+
*/
|
|
141
|
+
static get PAUSE() {
|
|
142
|
+
return "pause";
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @description seek イベントオブジェクトの type プロパティ値を定義します。
|
|
146
|
+
* Defines the value of the type property of a seek event object.
|
|
147
|
+
*
|
|
148
|
+
* @return {string}
|
|
149
|
+
* @default seek
|
|
150
|
+
* @const
|
|
151
|
+
* @static
|
|
152
|
+
*/
|
|
153
|
+
static get SEEK() {
|
|
154
|
+
return "seek";
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* @description リスナーがイベントを処理しているときに読み込まれたアイテム数またはバイト数です。
|
|
158
|
+
* The number of items or bytes loaded when the listener processes the event.
|
|
159
|
+
*
|
|
160
|
+
* @return {number}
|
|
161
|
+
* @default 0
|
|
162
|
+
* @readonly
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
get bytesLoaded() {
|
|
166
|
+
return this._$bytesLoaded;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @description 読み込みプロセスが成功した場合に読み込まれるアイテムまたはバイトの総数です。
|
|
170
|
+
* The total number of items or bytes that will be loaded
|
|
171
|
+
* if the loading process succeeds.
|
|
172
|
+
*
|
|
173
|
+
* @return {number}
|
|
174
|
+
* @default 0
|
|
175
|
+
* @readonly
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
get bytesTotal() {
|
|
179
|
+
return this._$bytesTotal;
|
|
180
|
+
}
|
|
181
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./Event";
|
|
2
|
+
export * from "./EventDispatcher";
|
|
3
|
+
export * from "./EventPhase";
|
|
4
|
+
export * from "./FocusEvent";
|
|
5
|
+
export * from "./HTTPStatusEvent";
|
|
6
|
+
export * from "./IOErrorEvent";
|
|
7
|
+
export * from "./MouseEvent";
|
|
8
|
+
export * from "./ProgressEvent";
|
|
9
|
+
export * from "./VideoEvent";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./Event";
|
|
2
|
+
export * from "./EventDispatcher";
|
|
3
|
+
export * from "./EventPhase";
|
|
4
|
+
export * from "./FocusEvent";
|
|
5
|
+
export * from "./HTTPStatusEvent";
|
|
6
|
+
export * from "./IOErrorEvent";
|
|
7
|
+
export * from "./MouseEvent";
|
|
8
|
+
export * from "./ProgressEvent";
|
|
9
|
+
export * from "./VideoEvent";
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@next2d/events",
|
|
3
|
+
"version": "1.14.20",
|
|
4
|
+
"description": "Next2D Events Packages",
|
|
5
|
+
"author": "Toshiyuki Ienaga<ienaga@tvon.jp> (https://github.com/ienaga/)",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://next2d.app",
|
|
8
|
+
"bugs": "https://github.com/Next2D/Player/issues",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"Next2D",
|
|
28
|
+
"Next2D Events"
|
|
29
|
+
],
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/Next2D/Player.git"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@next2d/interface": "1.14.20",
|
|
36
|
+
"@next2d/display": "1.14.20",
|
|
37
|
+
"@next2d/core": "1.14.20",
|
|
38
|
+
"@next2d/util": "1.14.20",
|
|
39
|
+
"@next2d/net": "1.14.20",
|
|
40
|
+
"@next2d/share": "1.14.20"
|
|
41
|
+
}
|
|
42
|
+
}
|