@cc-component/cc-video 1.2.5 → 1.2.7
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.
|
@@ -3,6 +3,7 @@ import { VideoModule } from './VideoModule';
|
|
|
3
3
|
import { Camera } from 'cc';
|
|
4
4
|
import { director } from 'cc';
|
|
5
5
|
import { Color } from 'cc';
|
|
6
|
+
import { gfx } from 'cc';
|
|
6
7
|
const { ccclass, property } = _decorator;
|
|
7
8
|
@ccclass('VideoComponent')
|
|
8
9
|
export class VideoComponent extends Component {
|
|
@@ -17,8 +18,11 @@ export class VideoComponent extends Component {
|
|
|
17
18
|
@property({ displayName: '远程地址根目录', tooltip: '视频远程地址全路径示例: https://hcy-cdn-domestic.wyx.cn/online/comeback/xxx.mp4' })
|
|
18
19
|
remote_url: string = 'https://hcy-cdn-domestic.wyx.cn/online/comeback/video/'
|
|
19
20
|
protected onLoad(): void {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const cameras = director.getScene().getComponentsInChildren(Camera)
|
|
22
|
+
cameras.forEach(camera => {
|
|
23
|
+
camera.clearColor = new Color(0, 0, 0, 0)
|
|
24
|
+
camera.clearFlags = gfx.ClearFlagBit.COLOR
|
|
25
|
+
})
|
|
22
26
|
VideoModule.InitVideo({
|
|
23
27
|
node: this.node.getChildByPath('video'),
|
|
24
28
|
cover: this.node.getChildByName('cover'),
|
|
@@ -195,7 +195,7 @@ export class VideoPlayWX extends BaseVideo {
|
|
|
195
195
|
this.videoPlayer.x = 2000;
|
|
196
196
|
this.stop()
|
|
197
197
|
this.isReady = false;
|
|
198
|
-
console.error(this.videoPlayer)
|
|
198
|
+
// console.error(this.videoPlayer)
|
|
199
199
|
//this.seek(0)
|
|
200
200
|
// this.videoPlayer.src = '';
|
|
201
201
|
//this.videoPlayer.destroy()
|