@revideo/2d 0.4.7 → 0.4.8-alpha.1031
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/editor/editor/tsconfig.build.tsbuildinfo +1 -1
- package/lib/components/Media.d.ts.map +1 -1
- package/lib/components/Media.js +1 -6
- package/lib/components/Video.d.ts.map +1 -1
- package/lib/components/Video.js +3 -2
- package/lib/components/View2D.d.ts.map +1 -1
- package/lib/components/View2D.js +2 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +2 -1
- package/lib/scenes/Scene2D.d.ts +1 -0
- package/lib/scenes/Scene2D.d.ts.map +1 -1
- package/lib/scenes/Scene2D.js +10 -2
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/lib/components/Media.ts +0 -6
- package/src/lib/components/Video.ts +2 -1
- package/src/lib/components/View2D.ts +1 -0
- package/src/lib/components/index.ts +1 -0
- package/src/lib/scenes/Scene2D.ts +11 -1
|
@@ -21,6 +21,7 @@ export class View2D extends Rect {
|
|
|
21
21
|
frame.style.pointerEvents = 'none';
|
|
22
22
|
frame.style.top = '0';
|
|
23
23
|
frame.style.left = '0';
|
|
24
|
+
frame.style.fontFeatureSettings = 'normal';
|
|
24
25
|
frame.style.opacity = '0';
|
|
25
26
|
frame.style.overflow = 'hidden';
|
|
26
27
|
document.body.prepend(frame);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Vector2,
|
|
12
12
|
useLogger,
|
|
13
13
|
} from '@revideo/core';
|
|
14
|
-
import {Audio, Node, Video, View2D} from '../components';
|
|
14
|
+
import {Audio, Media, Node, Video, View2D} from '../components';
|
|
15
15
|
|
|
16
16
|
export class Scene2D extends GeneratorScene<View2D> implements Inspectable {
|
|
17
17
|
private view: View2D | null = null;
|
|
@@ -199,6 +199,16 @@ export class Scene2D extends GeneratorScene<View2D> implements Inspectable {
|
|
|
199
199
|
return returnObjects;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
public override stopAllMedia() {
|
|
203
|
+
const playingMedia = Array.from(this.registeredNodes.values())
|
|
204
|
+
.filter((node): node is Media => node instanceof Media)
|
|
205
|
+
.filter(video => (video as Media).isPlaying());
|
|
206
|
+
|
|
207
|
+
for (const media of playingMedia) {
|
|
208
|
+
media.dispose();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
202
212
|
protected recreateView() {
|
|
203
213
|
this.execute(() => {
|
|
204
214
|
const size = this.getSize();
|