日志控制
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { _decorator, Component, Node, tween, UIOpacity, Vec3, VideoPlayer } from 'cc';
|
||||
import Utils from '../Common/Utils';
|
||||
import { VideoRoleType } from '../Common/GlobalValue';
|
||||
import { logger } from "db://assets/Scripts/Main/Common/Logger";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**背景视频 */
|
||||
@@ -49,14 +51,14 @@ export class BgVideo extends Component {
|
||||
|
||||
update(deltaTime: number) {
|
||||
// if (this._isPlaying && this.vtype == VideoRoleType.Idle) {
|
||||
// console.log("BgVideo 主视频时长:", this.vp.currentTime, this.vp.duration);
|
||||
// logger.log("BgVideo 主视频时长:", this.vp.currentTime, this.vp.duration);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
/**播放视频 */
|
||||
playVideo(remoteUrl:string, loop:boolean = false, autoIn:boolean = true) {
|
||||
console.log("BgVideo 播放视频:", this.node.position)
|
||||
logger.log("BgVideo 播放视频:", this.node.position)
|
||||
this.vp.remoteURL = remoteUrl
|
||||
this.vp.loop = loop
|
||||
this.vp.stop()
|
||||
@@ -69,7 +71,7 @@ export class BgVideo extends Component {
|
||||
|
||||
/**暂停视频 */
|
||||
pauseVideo() {
|
||||
console.log("BgVideo 暂停视频:", this._vtype)
|
||||
logger.log("BgVideo 暂停视频:", this._vtype)
|
||||
this.vp.pause()
|
||||
}
|
||||
/**继续播放 */
|
||||
@@ -99,7 +101,7 @@ export class BgVideo extends Component {
|
||||
|
||||
|
||||
onVideoEvent(event1:any, event2:any) {
|
||||
// console.log("bgvideo BgVideo组件 event", event2, this._vtype)
|
||||
// logger.log("bgvideo BgVideo组件 event", event2, this._vtype)
|
||||
if (event2 == "ready-to-play") {
|
||||
// if (!this._emoShow) {
|
||||
// this._emoShow = true;
|
||||
|
||||
Reference in New Issue
Block a user