@next2d/media 1.18.12 → 2.0.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.
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
@@ -0,0 +1,26 @@
1
+ import type { ITextFormatAlign } from "./ITextFormatAlign";
2
+ import type { ITextFieldType } from "./ITextFieldType";
3
+ import type { IBounds } from "./IBounds";
4
+ export interface ITextFieldCharacter {
5
+ symbol?: string;
6
+ extends: string;
7
+ font: string;
8
+ size: number;
9
+ align: ITextFormatAlign;
10
+ color: number;
11
+ leading: number;
12
+ letterSpacing: number;
13
+ leftMargin: number;
14
+ rightMargin: number;
15
+ fontType: number;
16
+ autoSize: number;
17
+ inputType: ITextFieldType;
18
+ multiline: boolean;
19
+ wordWrap: boolean;
20
+ border: boolean;
21
+ scroll: boolean;
22
+ thickness: number;
23
+ thicknessColor: number;
24
+ bounds: IBounds;
25
+ text: string;
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type ITextFieldType = "input" | "static";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type ITextFormatAlign = "center" | "left" | "right";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type IURLLoaderDataFormat = "json" | "arraybuffer" | "text";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface IURLRequestHeader {
2
+ name: string;
3
+ value: string;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type IURLRequestMethod = "DELETE" | "GET" | "HEAD" | "OPTIONS" | "POST" | "PUT";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { IBounds } from "./IBounds";
2
+ export interface IVideoCharacter {
3
+ symbol?: string;
4
+ extends: string;
5
+ buffer: number[] | null;
6
+ videoData: Uint8Array;
7
+ volume: number;
8
+ loop: boolean;
9
+ autoPlay: boolean;
10
+ bounds: IBounds;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/Sound.d.ts DELETED
@@ -1,206 +0,0 @@
1
- import { URLRequest } from "@next2d/net";
2
- import { EventDispatcher } from "@next2d/events";
3
- import type { DisplayObjectContainer } from "@next2d/display";
4
- import type { SoundTagImpl, SoundCharacterImpl, Character } from "@next2d/interface";
5
- /**
6
- * Sound クラスを使用すると、アプリケーション内のサウンドを処理することができます。
7
- * Sound クラスを使用すると、Sound オブジェクトの作成や、外部 MP3 ファイルのオブジェクトへのロードと再生ができます。
8
- *
9
- * The Sound class lets you work with sound in an application.
10
- * The Sound class lets you create a Sound object,
11
- * load and play an external MP3 file into that object.
12
- *
13
- * @class
14
- * @memberOf next2d.media
15
- * @extends EventDispatcher
16
- */
17
- export declare class Sound extends EventDispatcher {
18
- readonly _$sources: AudioBufferSourceNode[];
19
- private _$bytesLoaded;
20
- private _$bytesTotal;
21
- private _$volume;
22
- private _$currentCount;
23
- private _$src;
24
- private _$loopCount;
25
- private _$stopFlag;
26
- _$character: Character<SoundCharacterImpl> | null;
27
- _$audioBuffer: AudioBuffer | null;
28
- _$arrayBuffer: ArrayBuffer | null;
29
- /**
30
- * @constructor
31
- * @public
32
- */
33
- constructor();
34
- /**
35
- * @description 指定されたクラスのストリングを返します。
36
- * Returns the string representation of the specified class.
37
- *
38
- * @return {string}
39
- * @default [class Sound]
40
- * @method
41
- * @static
42
- */
43
- static toString(): string;
44
- /**
45
- * @description 指定されたクラスの空間名を返します。
46
- * Returns the space name of the specified class.
47
- *
48
- * @return {string}
49
- * @default next2d.media.Sound
50
- * @const
51
- * @static
52
- */
53
- static get namespace(): string;
54
- /**
55
- * @description 指定されたオブジェクトのストリングを返します。
56
- * Returns the string representation of the specified object.
57
- *
58
- * @return {string}
59
- * @default [object Sound]
60
- * @method
61
- * @public
62
- */
63
- toString(): string;
64
- /**
65
- * @description 指定されたオブジェクトの空間名を返します。
66
- * Returns the space name of the specified object.
67
- *
68
- * @return {string}
69
- * @default next2d.media.Sound
70
- * @const
71
- * @public
72
- */
73
- get namespace(): string;
74
- /**
75
- * @description 既にアプリケーションにロードされているデータのバイト数です。
76
- * The number of bytes of data that have been loaded into the application.
77
- *
78
- * @member {number}
79
- * @default 0
80
- * @readonly
81
- * @public
82
- */
83
- get bytesLoaded(): number;
84
- /**
85
- * @description アプリケーションにロードされるファイルの総バイト数。
86
- * The total size in bytes of the file being loaded into the application.
87
- *
88
- * @member {number}
89
- * @default 0
90
- * @readonly
91
- * @public
92
- */
93
- get bytesTotal(): number;
94
- /**
95
- * @description ループ回数の設定
96
- * Loop count setting.
97
- *
98
- * @member {number}
99
- * @default 0
100
- * @public
101
- */
102
- get loopCount(): number;
103
- set loopCount(loop_count: number);
104
- /**
105
- * @description 外部サウンドのURL
106
- * URL for external sound.
107
- *
108
- * @member {string}
109
- * @default ""
110
- * @public
111
- */
112
- get src(): string;
113
- set src(url: string);
114
- /**
115
- * @description ボリュームです。範囲は 0(無音)~ 1(フルボリューム)です。
116
- * The volume, ranging from 0 (silent) to 1 (full volume).
117
- *
118
- * @member {number}
119
- * @default 1
120
- * @public
121
- */
122
- get volume(): number;
123
- set volume(volume: number);
124
- /**
125
- * @description Sound クラスを複製します。
126
- * Duplicate the Sound class.
127
- *
128
- * @return {Sound}
129
- * @method
130
- * @public
131
- */
132
- clone(): Sound;
133
- /**
134
- * @description 指定した URL から外部 MP3 ファイルのロードを開始します。
135
- * Initiates loading of an external MP3 file from the specified URL.
136
- *
137
- * @param {URLRequest} request
138
- * @return {void}
139
- * @method
140
- * @public
141
- */
142
- load(request: URLRequest): void;
143
- /**
144
- * @param {ProgressEvent} event
145
- * @return {void}
146
- * @method
147
- * @private
148
- */
149
- _$loadStart(event: ProgressEvent): void;
150
- /**
151
- * @param {ProgressEvent} event
152
- * @return {void}
153
- * @method
154
- * @private
155
- */
156
- _$progress(event: ProgressEvent): void;
157
- /**
158
- * @param {ProgressEvent} event
159
- * @return {void}
160
- * @method
161
- * @private
162
- */
163
- _$loadEnd(event: ProgressEvent): void;
164
- /**
165
- * @description サウンドを再生します。
166
- * Play a sound.
167
- *
168
- * @param {number} [start_time=0]
169
- * @return {void}
170
- * @method
171
- * @public
172
- */
173
- play(start_time?: number): void;
174
- /**
175
- * @description チャンネルで再生しているサウンドを停止します。
176
- * Stops the sound playing in the channel.
177
- *
178
- * @return {void}
179
- * @method
180
- * @public
181
- */
182
- stop(): void;
183
- /**
184
- * @param {object} tag
185
- * @param {MovieClip} parent
186
- * @return {void}
187
- * @method
188
- * @private
189
- */
190
- _$build(tag: SoundTagImpl, parent: DisplayObjectContainer): void;
191
- /**
192
- * @param {number} [start_time=0]
193
- * @param {number} [offset=0]
194
- * @return {void}
195
- * @method
196
- * @private
197
- */
198
- _$createBufferSource(start_time?: number, offset?: number): void;
199
- /**
200
- * @param {Event} event
201
- * @return {void}
202
- * @method
203
- * @private
204
- */
205
- _$endEventHandler(event: Event): void;
206
- }