@cc-component/cc-video 1.0.6 → 1.0.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.
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { IVideoParam, IVideoData } from "./base/IVideo";
|
|
1
|
+
import { IVideoParam, IVideoData, InitParam } from "./base/IVideo";
|
|
2
2
|
|
|
3
3
|
declare module "cc" {
|
|
4
4
|
namespace VideoModule {
|
|
5
5
|
/**开启日志打印 */
|
|
6
6
|
export function Debug(enabled: boolean);
|
|
7
|
+
/**初始化视频 */
|
|
8
|
+
export function InitVideo(param: InitParam)
|
|
7
9
|
/**提前加载视频 */
|
|
8
10
|
export function LoadVideo(url: string, param: IVideoParam)
|
|
9
11
|
/**播放单个视频 */
|
|
@@ -19,7 +19,7 @@ export class VideoComponent extends Component {
|
|
|
19
19
|
protected onLoad(): void {
|
|
20
20
|
//const camera = director.getScene().getComponentsInChildren(Camera)[0]
|
|
21
21
|
// camera.clearColor = new Color(0, 0, 0, 0)
|
|
22
|
-
VideoModule.
|
|
22
|
+
VideoModule.InitVideo({
|
|
23
23
|
node: this.node.getChildByPath('video'),
|
|
24
24
|
cover: this.node.getChildByName('cover'),
|
|
25
25
|
bg: this.node.getChildByName('bg'),
|
|
@@ -26,7 +26,7 @@ export class VideoModule {
|
|
|
26
26
|
}
|
|
27
27
|
/**视频地址 */
|
|
28
28
|
remote_url = "https://hcy-cdn-domestic.wyx.cn/online/comeback/";
|
|
29
|
-
static
|
|
29
|
+
static InitVideo(param: InitParam) {
|
|
30
30
|
// if (BYTEDANCE) {
|
|
31
31
|
// param.bg.active = true;
|
|
32
32
|
// this.remote_url += "video_dy/"
|
package/index.ts
CHANGED