@next2d/media 3.15.1 → 3.16.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/media",
3
- "version": "3.15.1",
3
+ "version": "3.16.0",
4
4
  "description": "Next2D Media Package",
5
5
  "author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
6
6
  "license": "MIT",
@@ -24,9 +24,9 @@
24
24
  "url": "git+https://github.com/Next2D/Player.git"
25
25
  },
26
26
  "dependencies": {
27
- "@next2d/events": "3.15.1",
28
- "@next2d/net": "3.15.1",
29
- "@next2d/display": "3.15.1",
30
- "@next2d/geom": "3.15.1"
27
+ "@next2d/events": "3.16.0",
28
+ "@next2d/net": "3.16.0",
29
+ "@next2d/display": "3.16.0",
30
+ "@next2d/geom": "3.16.0"
31
31
  }
32
32
  }
@@ -4,84 +4,19 @@ import { register, unregister } from "./StreamSoundRegistry";
4
4
  /** Internal, opt-in backend. Never fetches/decodeAudioData()s a complete BGM into JS memory. */
5
5
  export class StreamSound {
6
6
  constructor(sound) {
7
- Object.defineProperty(this, "sound", {
8
- enumerable: true,
9
- configurable: true,
10
- writable: true,
11
- value: sound
12
- });
13
- Object.defineProperty(this, "element", {
14
- enumerable: true,
15
- configurable: true,
16
- writable: true,
17
- value: null
18
- });
19
- Object.defineProperty(this, "source", {
20
- enumerable: true,
21
- configurable: true,
22
- writable: true,
23
- value: null
24
- });
25
- Object.defineProperty(this, "gain", {
26
- enumerable: true,
27
- configurable: true,
28
- writable: true,
29
- value: null
30
- });
31
- Object.defineProperty(this, "url", {
32
- enumerable: true,
33
- configurable: true,
34
- writable: true,
35
- value: null
36
- });
37
- Object.defineProperty(this, "credentials", {
38
- enumerable: true,
39
- configurable: true,
40
- writable: true,
41
- value: false
42
- });
43
- Object.defineProperty(this, "ready", {
44
- enumerable: true,
45
- configurable: true,
46
- writable: true,
47
- value: false
48
- });
49
- Object.defineProperty(this, "active", {
50
- enumerable: true,
51
- configurable: true,
52
- writable: true,
53
- value: false
54
- });
55
- Object.defineProperty(this, "count", {
56
- enumerable: true,
57
- configurable: true,
58
- writable: true,
59
- value: 0
60
- });
61
- Object.defineProperty(this, "generation", {
62
- enumerable: true,
63
- configurable: true,
64
- writable: true,
65
- value: 0
66
- });
67
- Object.defineProperty(this, "playPending", {
68
- enumerable: true,
69
- configurable: true,
70
- writable: true,
71
- value: false
72
- });
73
- Object.defineProperty(this, "cancelLoad", {
74
- enumerable: true,
75
- configurable: true,
76
- writable: true,
77
- value: null
78
- });
79
- Object.defineProperty(this, "removePlaybackEvents", {
80
- enumerable: true,
81
- configurable: true,
82
- writable: true,
83
- value: null
84
- });
7
+ this.sound = sound;
8
+ this.element = null;
9
+ this.source = null;
10
+ this.gain = null;
11
+ this.url = null;
12
+ this.credentials = false;
13
+ this.ready = false;
14
+ this.active = false;
15
+ this.count = 0;
16
+ this.generation = 0;
17
+ this.playPending = false;
18
+ this.cancelLoad = null;
19
+ this.removePlaybackEvents = null;
85
20
  // Browser resources are allocated only by load()/play().
86
21
  }
87
22
  get canLoop() {
package/src/Sound.js CHANGED
@@ -23,95 +23,6 @@ export class Sound extends EventDispatcher {
23
23
  */
24
24
  constructor(options = {}) {
25
25
  super();
26
- Object.defineProperty(this, "_$stream", {
27
- enumerable: true,
28
- configurable: true,
29
- writable: true,
30
- value: void 0
31
- });
32
- /**
33
- * @type {AudioBufferSourceNode}
34
- * @default null
35
- * @private
36
- */
37
- Object.defineProperty(this, "_$source", {
38
- enumerable: true,
39
- configurable: true,
40
- writable: true,
41
- value: void 0
42
- });
43
- /**
44
- * @type {GainNode}
45
- * @default null
46
- * @private
47
- */
48
- Object.defineProperty(this, "_$gainNode", {
49
- enumerable: true,
50
- configurable: true,
51
- writable: true,
52
- value: void 0
53
- });
54
- /**
55
- * @type {boolean}
56
- * @default true
57
- * @private
58
- */
59
- Object.defineProperty(this, "_$stopFlag", {
60
- enumerable: true,
61
- configurable: true,
62
- writable: true,
63
- value: void 0
64
- });
65
- /**
66
- * @type {number}
67
- * @default 0
68
- * @private
69
- */
70
- Object.defineProperty(this, "_$currentCount", {
71
- enumerable: true,
72
- configurable: true,
73
- writable: true,
74
- value: void 0
75
- });
76
- /**
77
- * @type {number}
78
- * @default 1
79
- * @private
80
- */
81
- Object.defineProperty(this, "_$volume", {
82
- enumerable: true,
83
- configurable: true,
84
- writable: true,
85
- value: void 0
86
- });
87
- /**
88
- * @description AudioBuffer
89
- * AudioBuffer
90
- *
91
- * @type {AudioBuffer}
92
- * @default null
93
- * @public
94
- */
95
- Object.defineProperty(this, "audioBuffer", {
96
- enumerable: true,
97
- configurable: true,
98
- writable: true,
99
- value: void 0
100
- });
101
- /**
102
- * @description ループ回数の設定
103
- * Loop count setting.
104
- *
105
- * @type {string}
106
- * @default 0
107
- * @public
108
- */
109
- Object.defineProperty(this, "loopCount", {
110
- enumerable: true,
111
- configurable: true,
112
- writable: true,
113
- value: void 0
114
- });
115
26
  this._$stream = options.mode === "stream" ? new StreamSound(this) : null;
116
27
  this.loopCount = 0;
117
28
  this.audioBuffer = null;
@@ -14,34 +14,6 @@ export class SoundTransform {
14
14
  * @public
15
15
  */
16
16
  constructor(volume = 1, loop_count = 0) {
17
- /**
18
- * @description ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
19
- * The volume, ranging from 0 (silent) to 1 (full volume).
20
- *
21
- * @member {number}
22
- * @default 1
23
- * @public
24
- */
25
- Object.defineProperty(this, "volume", {
26
- enumerable: true,
27
- configurable: true,
28
- writable: true,
29
- value: void 0
30
- });
31
- /**
32
- * @description ループ回数の設定
33
- * Loop count setting.
34
- *
35
- * @type {boolean}
36
- * @default false
37
- * @public
38
- */
39
- Object.defineProperty(this, "loopCount", {
40
- enumerable: true,
41
- configurable: true,
42
- writable: true,
43
- value: void 0
44
- });
45
17
  this.volume = volume;
46
18
  this.loopCount = loop_count;
47
19
  }
package/src/Video.js CHANGED
@@ -28,224 +28,6 @@ export class Video extends DisplayObject {
28
28
  */
29
29
  constructor(width = 0, height = 0) {
30
30
  super();
31
- /**
32
- * @description キーフレーム総数
33
- * Total number of keyframes
34
- *
35
- * @type {number}
36
- * @default 0
37
- * @public
38
- */
39
- Object.defineProperty(this, "duration", {
40
- enumerable: true,
41
- configurable: true,
42
- writable: true,
43
- value: void 0
44
- });
45
- /**
46
- * @description ビデオを拡大 / 縮小する際にスムージング(補間)するかどうかを指定します。
47
- * Specifies whether the video should be smoothed (interpolated)
48
- * when it is scaled.
49
- *
50
- * @type {boolean}
51
- * @default true
52
- * @public
53
- */
54
- Object.defineProperty(this, "smoothing", {
55
- enumerable: true,
56
- configurable: true,
57
- writable: true,
58
- value: void 0
59
- });
60
- /**
61
- * @description ビデオをループ生成するかどうかを指定します。
62
- * Specifies whether to generate a video loop.
63
- *
64
- * @type {boolean}
65
- * @default false
66
- * @public
67
- */
68
- Object.defineProperty(this, "loop", {
69
- enumerable: true,
70
- configurable: true,
71
- writable: true,
72
- value: void 0
73
- });
74
- /**
75
- * @description ビデオの自動再生の設定。
76
- * Setting up automatic video playback.
77
- *
78
- * @type {boolean}
79
- * @default true
80
- * @public
81
- */
82
- Object.defineProperty(this, "autoPlay", {
83
- enumerable: true,
84
- configurable: true,
85
- writable: true,
86
- value: void 0
87
- });
88
- /**
89
- * @description 現在のキーフレーム
90
- * Current keyframe
91
- *
92
- *
93
- * @member {number}
94
- * @public
95
- */
96
- Object.defineProperty(this, "currentTime", {
97
- enumerable: true,
98
- configurable: true,
99
- writable: true,
100
- value: void 0
101
- });
102
- /**
103
- * @description ビデオの幅をピクセル単位で指定する整数です。
104
- * An integer specifying the width of the video, in pixels.
105
- *
106
- * @member {number}
107
- * @default 0
108
- * @public
109
- */
110
- Object.defineProperty(this, "videoWidth", {
111
- enumerable: true,
112
- configurable: true,
113
- writable: true,
114
- value: void 0
115
- });
116
- /**
117
- * @description ビデオの高さをピクセル単位で指定する整数です。
118
- * An integer specifying the height of the video, in pixels.
119
- *
120
- * @member {number}
121
- * @default 0
122
- * @public
123
- */
124
- Object.defineProperty(this, "videoHeight", {
125
- enumerable: true,
126
- configurable: true,
127
- writable: true,
128
- value: void 0
129
- });
130
- /**
131
- * @description ビデオが読み込まれているかどうかを返します。
132
- * Returns whether the video has been loaded.
133
- *
134
- * @type {boolean}
135
- * @default false
136
- * @public
137
- */
138
- Object.defineProperty(this, "loaded", {
139
- enumerable: true,
140
- configurable: true,
141
- writable: true,
142
- value: void 0
143
- });
144
- /**
145
- * @description ビデオが終了したかどうかを返します。
146
- * Returns whether the video has ended.
147
- *
148
- * @type {boolean}
149
- * @default false
150
- * @public
151
- */
152
- Object.defineProperty(this, "ended", {
153
- enumerable: true,
154
- configurable: true,
155
- writable: true,
156
- value: void 0
157
- });
158
- /**
159
- * @description Videoの機能を所持しているかを返却
160
- * Returns whether the display object has Video functionality.
161
- *
162
- * @type {boolean}
163
- * @readonly
164
- * @public
165
- */
166
- Object.defineProperty(this, "isVideo", {
167
- enumerable: true,
168
- configurable: true,
169
- writable: true,
170
- value: void 0
171
- });
172
- /**
173
- * @type {HTMLVideoElement}
174
- * @default null
175
- * @public
176
- */
177
- Object.defineProperty(this, "$videoElement", {
178
- enumerable: true,
179
- configurable: true,
180
- writable: true,
181
- value: void 0
182
- });
183
- /**
184
- * @type {OffscreenCanvas}
185
- * @default null
186
- * @public
187
- */
188
- Object.defineProperty(this, "$offscreenCanvas", {
189
- enumerable: true,
190
- configurable: true,
191
- writable: true,
192
- value: void 0
193
- });
194
- /**
195
- * @type {OffscreenCanvasRenderingContext2D}
196
- * @default null
197
- * @public
198
- */
199
- Object.defineProperty(this, "$context", {
200
- enumerable: true,
201
- configurable: true,
202
- writable: true,
203
- value: void 0
204
- });
205
- /**
206
- * @type {boolean}
207
- * @default true
208
- * @public
209
- */
210
- Object.defineProperty(this, "paused", {
211
- enumerable: true,
212
- configurable: true,
213
- writable: true,
214
- value: void 0
215
- });
216
- /**
217
- * @type {number}
218
- * @default -1
219
- * @private
220
- */
221
- Object.defineProperty(this, "_$timerId", {
222
- enumerable: true,
223
- configurable: true,
224
- writable: true,
225
- value: void 0
226
- });
227
- /**
228
- * @type {number}
229
- * @default 1
230
- * @private
231
- */
232
- Object.defineProperty(this, "_$volume", {
233
- enumerable: true,
234
- configurable: true,
235
- writable: true,
236
- value: void 0
237
- });
238
- /**
239
- * @type {string}
240
- * @default ""
241
- * @private
242
- */
243
- Object.defineProperty(this, "_$src", {
244
- enumerable: true,
245
- configurable: true,
246
- writable: true,
247
- value: void 0
248
- });
249
31
  this.videoWidth = width;
250
32
  this.videoHeight = height;
251
33
  // public params