@next2d/media 1.18.12 → 2.0.1

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.
Files changed (110) hide show
  1. package/README.md +2 -2
  2. package/package.json +13 -26
  3. package/src/MediaUtil.d.ts +104 -0
  4. package/src/MediaUtil.js +203 -0
  5. package/src/Sound/service/SoundDecodeService.d.ts +10 -0
  6. package/src/Sound/service/SoundDecodeService.js +30 -0
  7. package/src/Sound/service/SoundEndedEventService.d.ts +11 -0
  8. package/src/Sound/service/SoundEndedEventService.js +21 -0
  9. package/src/Sound/service/SoundLoadStartEventService.d.ts +12 -0
  10. package/src/Sound/service/SoundLoadStartEventService.js +19 -0
  11. package/src/Sound/service/SoundProgressEventService.d.ts +12 -0
  12. package/src/Sound/service/SoundProgressEventService.js +16 -0
  13. package/src/Sound/usecase/SoundBuildFromCharacterUseCase.d.ts +13 -0
  14. package/src/Sound/usecase/SoundBuildFromCharacterUseCase.js +23 -0
  15. package/src/Sound/usecase/SoundLoadEndEventUseCase.d.ts +12 -0
  16. package/src/Sound/usecase/SoundLoadEndEventUseCase.js +35 -0
  17. package/src/Sound/usecase/SoundLoadUseCase.d.ts +13 -0
  18. package/src/Sound/usecase/SoundLoadUseCase.js +38 -0
  19. package/src/Sound.d.ts +136 -0
  20. package/src/Sound.js +247 -0
  21. package/src/SoundMixer/service/SoundMixerStopAllService.d.ts +9 -0
  22. package/src/SoundMixer/service/SoundMixerStopAllService.js +32 -0
  23. package/src/SoundMixer/service/SoundMixerUpdateVolumeService.d.ts +9 -0
  24. package/src/SoundMixer/service/SoundMixerUpdateVolumeService.js +29 -0
  25. package/src/SoundMixer.d.ts +28 -0
  26. package/src/SoundMixer.js +37 -0
  27. package/src/SoundTransform.d.ts +35 -0
  28. package/src/SoundTransform.js +48 -0
  29. package/src/Video/service/VideoApplyChangesService.d.ts +11 -0
  30. package/src/Video/service/VideoApplyChangesService.js +16 -0
  31. package/src/Video/service/VideoCreateElementService.d.ts +9 -0
  32. package/src/Video/service/VideoCreateElementService.js +16 -0
  33. package/src/Video/service/VideoEndedEventService.d.ts +11 -0
  34. package/src/Video/service/VideoEndedEventService.js +22 -0
  35. package/src/Video/service/VideoLoadedmetadataEventService.d.ts +12 -0
  36. package/src/Video/service/VideoLoadedmetadataEventService.js +21 -0
  37. package/src/Video/service/VideoProgressEventService.d.ts +11 -0
  38. package/src/Video/service/VideoProgressEventService.js +15 -0
  39. package/src/Video/usecase/VideoBuildFromCharacterUseCase.d.ts +13 -0
  40. package/src/Video/usecase/VideoBuildFromCharacterUseCase.js +22 -0
  41. package/src/Video/usecase/VideoCanplaythroughEventUseCase.d.ts +11 -0
  42. package/src/Video/usecase/VideoCanplaythroughEventUseCase.js +26 -0
  43. package/src/Video/usecase/VideoPlayEventUseCase.d.ts +11 -0
  44. package/src/Video/usecase/VideoPlayEventUseCase.js +31 -0
  45. package/src/Video/usecase/VideoRegisterEventUseCase.d.ts +12 -0
  46. package/src/Video/usecase/VideoRegisterEventUseCase.js +29 -0
  47. package/src/Video.d.ts +245 -0
  48. package/src/Video.js +428 -0
  49. package/{dist → src}/index.d.ts +1 -0
  50. package/{dist → src}/index.js +1 -0
  51. package/src/interface/IAjaxEvent.d.ts +5 -0
  52. package/src/interface/IAjaxEvent.js +1 -0
  53. package/src/interface/IAjaxOption.d.ts +13 -0
  54. package/src/interface/IAjaxOption.js +1 -0
  55. package/src/interface/IBlendMode.d.ts +1 -0
  56. package/src/interface/IBlendMode.js +1 -0
  57. package/src/interface/IBounds.d.ts +6 -0
  58. package/src/interface/IBounds.js +1 -0
  59. package/src/interface/ICharacter.d.ts +5 -0
  60. package/src/interface/ICharacter.js +1 -0
  61. package/src/interface/IDictionaryTag.d.ts +8 -0
  62. package/src/interface/IDictionaryTag.js +1 -0
  63. package/src/interface/IFilterArray.d.ts +2 -0
  64. package/src/interface/IFilterArray.js +1 -0
  65. package/src/interface/IGrid.d.ts +6 -0
  66. package/src/interface/IGrid.js +1 -0
  67. package/src/interface/ILoopConfig.d.ts +8 -0
  68. package/src/interface/ILoopConfig.js +1 -0
  69. package/src/interface/ILoopType.d.ts +1 -0
  70. package/src/interface/ILoopType.js +1 -0
  71. package/src/interface/IMovieClipActionObject.d.ts +5 -0
  72. package/src/interface/IMovieClipActionObject.js +1 -0
  73. package/src/interface/IMovieClipCharacter.d.ts +17 -0
  74. package/src/interface/IMovieClipCharacter.js +1 -0
  75. package/src/interface/IMovieClipLabelObject.d.ts +4 -0
  76. package/src/interface/IMovieClipLabelObject.js +1 -0
  77. package/src/interface/IMovieClipSoundObject.d.ts +5 -0
  78. package/src/interface/IMovieClipSoundObject.js +1 -0
  79. package/src/interface/IPlaceObject.d.ts +14 -0
  80. package/src/interface/IPlaceObject.js +1 -0
  81. package/src/interface/IShapeCharacter.d.ts +14 -0
  82. package/src/interface/IShapeCharacter.js +1 -0
  83. package/src/interface/ISoundCharacter.d.ts +4 -0
  84. package/src/interface/ISoundCharacter.js +1 -0
  85. package/src/interface/ISoundTag.d.ts +6 -0
  86. package/src/interface/ISoundTag.js +1 -0
  87. package/src/interface/ISurfaceFilter.d.ts +6 -0
  88. package/src/interface/ISurfaceFilter.js +1 -0
  89. package/src/interface/ITextFieldCharacter.d.ts +26 -0
  90. package/src/interface/ITextFieldCharacter.js +1 -0
  91. package/src/interface/ITextFieldType.d.ts +1 -0
  92. package/src/interface/ITextFieldType.js +1 -0
  93. package/src/interface/ITextFormatAlign.d.ts +1 -0
  94. package/src/interface/ITextFormatAlign.js +1 -0
  95. package/src/interface/IURLLoaderDataFormat.d.ts +1 -0
  96. package/src/interface/IURLLoaderDataFormat.js +1 -0
  97. package/src/interface/IURLRequestHeader.d.ts +4 -0
  98. package/src/interface/IURLRequestHeader.js +1 -0
  99. package/src/interface/IURLRequestMethod.d.ts +1 -0
  100. package/src/interface/IURLRequestMethod.js +1 -0
  101. package/src/interface/IVideoCharacter.d.ts +11 -0
  102. package/src/interface/IVideoCharacter.js +1 -0
  103. package/dist/Sound.d.ts +0 -206
  104. package/dist/Sound.js +0 -501
  105. package/dist/SoundMixer.d.ts +0 -68
  106. package/dist/SoundMixer.js +0 -114
  107. package/dist/SoundTransform.d.ts +0 -80
  108. package/dist/SoundTransform.js +0 -111
  109. package/dist/Video.d.ts +0 -328
  110. package/dist/Video.js +0 -897
@@ -1,80 +0,0 @@
1
- /**
2
- * SoundTransform クラスにはボリュームとループのプロパティが含まれます。
3
- *
4
- * The SoundTransform class contains properties for volume and loop.
5
- *
6
- * @class
7
- * @memberOf next2d.media
8
- */
9
- export declare class SoundTransform {
10
- private _$volume;
11
- private _$loop;
12
- /**
13
- * @param {number} [volume=1]
14
- * @param {boolean} [loop=false]
15
- *
16
- * @constructor
17
- * @public
18
- */
19
- constructor(volume?: number, loop?: boolean);
20
- /**
21
- * @description 指定されたクラスのストリングを返します。
22
- * Returns the string representation of the specified class.
23
- *
24
- * @return {string}
25
- * @default [class SoundTransform]
26
- * @method
27
- * @static
28
- */
29
- static toString(): string;
30
- /**
31
- * @description 指定されたクラスの空間名を返します。
32
- * Returns the space name of the specified class.
33
- *
34
- * @return {string}
35
- * @default next2d.media.SoundTransform
36
- * @const
37
- * @static
38
- */
39
- static get namespace(): string;
40
- /**
41
- * @description 指定されたオブジェクトのストリングを返します。
42
- * Returns the string representation of the specified object.
43
- *
44
- * @return {string}
45
- * @default [object SoundTransform]
46
- * @method
47
- * @public
48
- */
49
- toString(): string;
50
- /**
51
- * @description 指定されたオブジェクトの空間名を返します。
52
- * Returns the space name of the specified object.
53
- *
54
- * @return {string}
55
- * @default next2d.media.SoundTransform
56
- * @const
57
- * @public
58
- */
59
- get namespace(): string;
60
- /**
61
- * @description ループ設定です。
62
- * loop setting.
63
- *
64
- * @member {boolean}
65
- * @default false
66
- * @public
67
- */
68
- get loop(): boolean;
69
- set loop(loop: boolean);
70
- /**
71
- * @description ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
72
- * The volume, ranging from 0 (silent) to 1 (full volume).
73
- *
74
- * @member {number}
75
- * @default 1
76
- * @public
77
- */
78
- get volume(): number;
79
- set volume(volume: number);
80
- }
@@ -1,111 +0,0 @@
1
- import { $clamp } from "@next2d/share";
2
- /**
3
- * SoundTransform クラスにはボリュームとループのプロパティが含まれます。
4
- *
5
- * The SoundTransform class contains properties for volume and loop.
6
- *
7
- * @class
8
- * @memberOf next2d.media
9
- */
10
- export class SoundTransform {
11
- /**
12
- * @param {number} [volume=1]
13
- * @param {boolean} [loop=false]
14
- *
15
- * @constructor
16
- * @public
17
- */
18
- constructor(volume = 1, loop = false) {
19
- /**
20
- * @type {number}
21
- * @default 1
22
- * @private
23
- */
24
- this._$volume = 1;
25
- /**
26
- * @type {boolean}
27
- * @default false
28
- * @private
29
- */
30
- this._$loop = false;
31
- // setup
32
- this.volume = volume;
33
- this.loop = loop;
34
- }
35
- /**
36
- * @description 指定されたクラスのストリングを返します。
37
- * Returns the string representation of the specified class.
38
- *
39
- * @return {string}
40
- * @default [class SoundTransform]
41
- * @method
42
- * @static
43
- */
44
- static toString() {
45
- return "[class SoundTransform]";
46
- }
47
- /**
48
- * @description 指定されたクラスの空間名を返します。
49
- * Returns the space name of the specified class.
50
- *
51
- * @return {string}
52
- * @default next2d.media.SoundTransform
53
- * @const
54
- * @static
55
- */
56
- static get namespace() {
57
- return "next2d.media.SoundTransform";
58
- }
59
- /**
60
- * @description 指定されたオブジェクトのストリングを返します。
61
- * Returns the string representation of the specified object.
62
- *
63
- * @return {string}
64
- * @default [object SoundTransform]
65
- * @method
66
- * @public
67
- */
68
- toString() {
69
- return "[object SoundTransform]";
70
- }
71
- /**
72
- * @description 指定されたオブジェクトの空間名を返します。
73
- * Returns the space name of the specified object.
74
- *
75
- * @return {string}
76
- * @default next2d.media.SoundTransform
77
- * @const
78
- * @public
79
- */
80
- get namespace() {
81
- return "next2d.media.SoundTransform";
82
- }
83
- /**
84
- * @description ループ設定です。
85
- * loop setting.
86
- *
87
- * @member {boolean}
88
- * @default false
89
- * @public
90
- */
91
- get loop() {
92
- return this._$loop;
93
- }
94
- set loop(loop) {
95
- this._$loop = loop;
96
- }
97
- /**
98
- * @description ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
99
- * The volume, ranging from 0 (silent) to 1 (full volume).
100
- *
101
- * @member {number}
102
- * @default 1
103
- * @public
104
- */
105
- get volume() {
106
- return this._$volume;
107
- }
108
- set volume(volume) {
109
- this._$volume = $clamp(+volume, 0, 1, 0);
110
- }
111
- }
package/dist/Video.d.ts DELETED
@@ -1,328 +0,0 @@
1
- import { DisplayObject } from "@next2d/display";
2
- import type { BoundsImpl, VideoCharacterImpl, DictionaryTagImpl, ParentImpl, PlayerHitObjectImpl, Character } from "@next2d/interface";
3
- import type { CanvasToWebGLContext } from "@next2d/webgl";
4
- /**
5
- * サーバーまたはローカルに保存された録画済みビデオファイルを再生する Video オブジェクトです。
6
- * ビデオストリームを再生するには、attachNetStream() を使用して、ビデオを Video オブジェクトに関連付けます。
7
- * 次に、addChild() を使用して、Video オブジェクトを表示リストに追加します。
8
- *
9
- * A Video object that plays a recorded video file stored on a server or locally.
10
- * To play a video stream, use attachNetStream() to attach the video to the Video object.
11
- * Then, add the Video object to the display list using addChild().
12
- *
13
- * @class
14
- * @memberOf next2d.media
15
- * @extends DisplayObject
16
- */
17
- export declare class Video extends DisplayObject {
18
- private _$smoothing;
19
- private _$loop;
20
- private _$autoPlay;
21
- private readonly _$bounds;
22
- private _$bytesLoaded;
23
- private _$bytesTotal;
24
- private _$timerId;
25
- _$video: HTMLVideoElement | null;
26
- private _$stop;
27
- private _$volume;
28
- private _$ready;
29
- private _$context;
30
- private _$cacheKeys;
31
- private readonly _$cacheParams;
32
- /**
33
- * @param {number} [width = 0]
34
- * @param {number} [height = 0]
35
- *
36
- * @constructor
37
- * @public
38
- */
39
- constructor(width?: number, height?: number);
40
- /**
41
- * @description 指定されたクラスのストリングを返します。
42
- * Returns the string representation of the specified class.
43
- *
44
- * @return {string}
45
- * @default [class Video]
46
- * @method
47
- * @static
48
- */
49
- static toString(): string;
50
- /**
51
- * @description 指定されたクラスの空間名を返します。
52
- * Returns the space name of the specified class.
53
- *
54
- * @return {string}
55
- * @default next2d.media.Video
56
- * @const
57
- * @static
58
- */
59
- static get namespace(): string;
60
- /**
61
- * @description 指定されたオブジェクトのストリングを返します。
62
- * Returns the string representation of the specified object.
63
- *
64
- * @return {string}
65
- * @default [object Video]
66
- * @method
67
- * @public
68
- */
69
- toString(): string;
70
- /**
71
- * @description 指定されたオブジェクトの空間名を返します。
72
- * Returns the space name of the specified object.
73
- *
74
- * @return {string}
75
- * @default next2d.media.Video
76
- * @const
77
- * @public
78
- */
79
- get namespace(): string;
80
- /**
81
- * @description 既にアプリケーションにロードされているデータのバイト数です。
82
- * The number of bytes of data that have been loaded into the application.
83
- *
84
- * @member {number}
85
- * @default 0
86
- * @readonly
87
- * @public
88
- */
89
- get bytesLoaded(): number;
90
- /**
91
- * @description アプリケーションにロードされるファイルの総バイト数。
92
- * The total size in bytes of the file being loaded into the application.
93
- *
94
- * @member {number}
95
- * @default 0
96
- * @readonly
97
- * @public
98
- */
99
- get bytesTotal(): number;
100
- /**
101
- * @description 現在のキーフレーム
102
- * Current keyframe
103
- *
104
- *
105
- * @member {number}
106
- * @readonly
107
- * @public
108
- */
109
- get currentTime(): number;
110
- /**
111
- * @description キーフレーム総数
112
- * Total number of keyframes
113
- *
114
- * @member {number}
115
- * @readonly
116
- * @public
117
- */
118
- get duration(): number;
119
- /**
120
- * @description ビデオをループ生成するかどうかを指定します。
121
- * Specifies whether to generate a video loop.
122
- *
123
- * @member {boolean}
124
- * @default false
125
- * @public
126
- */
127
- get loop(): boolean;
128
- set loop(loop: boolean);
129
- /**
130
- * @description ビデオの自動再生の設定。
131
- * Setting up automatic video playback.
132
- *
133
- * @member {boolean}
134
- * @default true
135
- * @public
136
- */
137
- get autoPlay(): boolean;
138
- set autoPlay(auto_play: boolean);
139
- /**
140
- * @description ビデオを拡大 / 縮小する際にスムージング(補間)するかどうかを指定します。
141
- * Specifies whether the video should be smoothed (interpolated)
142
- * when it is scaled.
143
- *
144
- * @member {boolean}
145
- * @default true
146
- * @public
147
- */
148
- get smoothing(): boolean;
149
- set smoothing(smoothing: boolean);
150
- /**
151
- * @description 映像コンテンツへの URL を指定します。
152
- * Specifies the URL to the video content.
153
- *
154
- * @member {string}
155
- * @default ""
156
- * @public
157
- */
158
- get src(): string;
159
- set src(src: string);
160
- /**
161
- * @description ビデオストリームの高さをピクセル単位で指定する整数です。
162
- * An integer specifying the height of the video stream, in pixels.
163
- *
164
- * @member {number}
165
- * @default 320
166
- * @readonly
167
- * @public
168
- */
169
- get videoHeight(): number;
170
- /**
171
- * @description ビデオストリームの幅をピクセル単位で指定する整数です。
172
- * An integer specifying the width of the video stream, in pixels.
173
- *
174
- * @member {number}
175
- * @default 240
176
- * @readonly
177
- * @public
178
- */
179
- get videoWidth(): number;
180
- /**
181
- * @description ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
182
- * The volume, ranging from 0 (silent) to 1 (full volume).
183
- *
184
- * @member {number}
185
- * @default 1
186
- * @public
187
- */
188
- get volume(): number;
189
- set volume(volume: number);
190
- /**
191
- * @description Video オブジェクトに現在表示されているイメージ(ビデオストリームではない)をクリアします。
192
- * Clears the image currently displayed
193
- * in the Video object (not the video stream).
194
- *
195
- * @return {void}
196
- * @method
197
- * @public
198
- */
199
- clear(): void;
200
- /**
201
- * @description ビデオストリームの再生を一時停止します。
202
- * Pauses playback of a video stream.
203
- *
204
- * @return {void}
205
- * @method
206
- * @public
207
- */
208
- pause(): void;
209
- /**
210
- * @description ローカルディレクトリまたは Web サーバーからメディアファイルを再生します。
211
- * Plays a media file from a local directory or a web server;
212
- *
213
- * @returns {void}
214
- * @method
215
- * @public
216
- */
217
- play(): void;
218
- /**
219
- * @description 指定された位置に最も近いキーフレームをシークします。
220
- * Seeks the keyframe closest to the specified location.
221
- *
222
- * @param {number} offset
223
- * @return {void}
224
- * @method
225
- * @public
226
- */
227
- seek(offset: number): void;
228
- /**
229
- * @return {void}
230
- * @method
231
- * @private
232
- */
233
- _$update(): void;
234
- /**
235
- * @return {void}
236
- * @method
237
- * @private
238
- */
239
- _$start(): void;
240
- /**
241
- * @return {HTMLVideoElement}
242
- * @method
243
- * @private
244
- */
245
- _$initializeVideo(): HTMLVideoElement;
246
- /**
247
- * @return {void}
248
- * @method
249
- * @private
250
- */
251
- _$createContext(): void;
252
- /**
253
- * @param {object} character
254
- * @return {void}
255
- * @method
256
- * @private
257
- */
258
- _$buildCharacter(character: Character<VideoCharacterImpl>): void;
259
- /**
260
- * @param {object} character
261
- * @return {void}
262
- * @method
263
- * @private
264
- */
265
- _$sync(character: VideoCharacterImpl): void;
266
- /**
267
- * @param {object} tag
268
- * @param {DisplayObjectContainer} parent
269
- * @return {object}
270
- * @method
271
- * @private
272
- */
273
- _$build(tag: DictionaryTagImpl, parent: ParentImpl<any>): VideoCharacterImpl;
274
- /**
275
- * @param {CanvasToWebGLContext} context
276
- * @param {Float32Array} matrix
277
- * @returns {void}
278
- * @method
279
- * @private
280
- */
281
- _$clip(context: CanvasToWebGLContext, matrix: Float32Array): void;
282
- /**
283
- * @param {CanvasToWebGLContext} context
284
- * @param {Float32Array} matrix
285
- * @param {Float32Array} color_transform
286
- * @return {void}
287
- * @method
288
- * @private
289
- */
290
- _$draw(context: CanvasToWebGLContext, matrix: Float32Array, color_transform: Float32Array): void;
291
- /**
292
- * @param {CanvasRenderingContext2D} context
293
- * @param {Float32Array} matrix
294
- * @param {object} options
295
- * @return {boolean}
296
- * @method
297
- * @private
298
- */
299
- _$mouseHit(context: CanvasRenderingContext2D, matrix: Float32Array, options: PlayerHitObjectImpl): boolean;
300
- /**
301
- * @param {CanvasRenderingContext2D} context
302
- * @param {array} matrix
303
- * @param {object} options
304
- * @return {boolean}
305
- * @method
306
- * @private
307
- */
308
- _$hit(context: CanvasRenderingContext2D, matrix: Float32Array, options: PlayerHitObjectImpl): boolean;
309
- /**
310
- * @param {Float32Array} [matrix=null]
311
- * @return {object}
312
- * @method
313
- * @private
314
- */
315
- _$getBounds(matrix?: Float32Array | null): BoundsImpl;
316
- /**
317
- * @return {void}
318
- * @method
319
- * @private
320
- */
321
- _$createWorkerInstance(): void;
322
- /**
323
- * @return {void}
324
- * @method
325
- * @private
326
- */
327
- _$postProperty(): void;
328
- }