Skip to content

Commit 0ce2699

Browse files
authored
Merge pull request #1166 from galacean/main
Merge origin/main into origin/dev
2 parents 1af8d22 + e906f6c commit 0ce2699

File tree

17 files changed

+70
-14
lines changed

17 files changed

+70
-14
lines changed

CHANGELOG-zh_CN.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88

99
---
1010

11+
## 2.6.5
12+
13+
`2025-08-29`
14+
15+
- Fix: video `gotoAndStop` func. [#1159](https://github.com/galacean/effects-runtime/pull/1159) @ChengYi996
16+
17+
## 2.6.4
18+
19+
`2025-08-26`
20+
21+
- Fix: add video assets dispose logic. [#1157](https://github.com/galacean/effects-runtime/pull/1157) @wumaolinmaoan
22+
23+
## 2.6.3
24+
25+
`2025-08-22`
26+
27+
- Fix: the adapter returns a string when loading JSON from a relative path in the miniprogram. [#1145](https://github.com/galacean/effects-runtime/pull/1145) @yiiqii
28+
- Fix: plain object judgment. [#1147](https://github.com/galacean/effects-runtime/pull/1147) @wumaolinmaoan
29+
1130
## 2.6.2
1231

1332
`2025-08-15`

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@
77

88
---
99

10+
## 2.6.5
11+
12+
`2025-08-29`
13+
14+
- Fix: video `gotoAndStop` func. [#1159](https://github.com/galacean/effects-runtime/pull/1159) @ChengYi996
15+
16+
## 2.6.4
17+
18+
`2025-08-26`
19+
20+
- Fix: add video assets dispose logic. [#1157](https://github.com/galacean/effects-runtime/pull/1157) @wumaolinmaoan
21+
22+
## 2.6.3
23+
24+
`2025-08-22`
25+
26+
- Fix: the adapter returns a string when loading JSON from a relative path in the miniprogram. [#1145](https://github.com/galacean/effects-runtime/pull/1145) @yiiqii
27+
- Fix: plain object judgment. [#1147](https://github.com/galacean/effects-runtime/pull/1147) @wumaolinmaoan
28+
1029
## 2.6.2
1130

1231
`2025-08-15`

packages/effects-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-core",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects runtime core for the web",
55
"module": "./dist/index.mjs",
66
"main": "./dist/index.js",

packages/effects-core/src/composition.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ export class Composition extends EventEmitter<CompositionEvent<Composition>> imp
251251
private paused = false;
252252
private isEndCalled = false;
253253
private _textures: Texture[] = [];
254+
private videos: HTMLVideoElement[] = [];
254255

255256
/**
256257
* 合成中消息元素创建/销毁时触发的回调
@@ -305,6 +306,15 @@ export class Composition extends EventEmitter<CompositionEvent<Composition>> imp
305306

306307
this.renderer = renderer;
307308
this._textures = scene.textures;
309+
310+
for (const key of Object.keys(scene.assets)) {
311+
const videoAsset = scene.assets[key];
312+
313+
if (videoAsset instanceof HTMLVideoElement) {
314+
this.videos.push(videoAsset);
315+
}
316+
}
317+
308318
this.postProcessingEnabled = scene.jsonScene.renderSettings?.postProcessingEnabled ?? false;
309319
this.getEngine().renderLevel = scene.renderLevel;
310320

@@ -905,6 +915,14 @@ export class Composition extends EventEmitter<CompositionEvent<Composition>> imp
905915
// textures.forEach(tex => tex && tex.dispose());
906916
}
907917
}
918+
919+
for (const video of this.videos) {
920+
video.pause();
921+
video.removeAttribute('src');
922+
video.load();
923+
}
924+
this.videos = [];
925+
908926
this.rootItem.dispose();
909927
// FIXME: 注意这里增加了renderFrame销毁
910928
this.renderFrame.dispose();

packages/effects-helper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-helper",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects runtime helper for the web",
55
"module": "./dist/index.js",
66
"types": "./dist/index.d.ts",

packages/effects-threejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-threejs",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects runtime threejs plugin for the web",
55
"module": "./dist/index.mjs",
66
"main": "./dist/index.js",

packages/effects-webgl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-webgl",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects runtime webgl for the web",
55
"types": "./dist/index.d.ts",
66
"files": [

packages/effects/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects runtime player for the web",
55
"module": "./dist/index.mjs",
66
"main": "./dist/index.js",

plugin-packages/alipay-downgrade/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-plugin-alipay-downgrade",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects player downgrade plugin for Alipay",
55
"module": "./dist/index.mjs",
66
"main": "./dist/index.js",

plugin-packages/downgrade/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@galacean/effects-plugin-downgrade",
3-
"version": "2.6.2",
3+
"version": "2.6.5",
44
"description": "Galacean Effects player downgrade plugin",
55
"module": "./dist/index.mjs",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)