@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.initVideo({
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 async initVideo(param: InitParam) {
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
@@ -1,4 +1,5 @@
1
1
  // 负责导出assets下的模块,如: export { default } from './assets/xxx.ts'
2
+
2
3
  export { } from './assets/video/Interface';
3
4
  export { VideoComponent } from './assets/video/base/VideoComponent';
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-video",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",