diff --git a/entry/src/main/ets/constants/Constants.ets b/entry/src/main/ets/constants/Constants.ets index f7dc11847f84263f33862078bbb4d46c4f0a6acd..8a43b4e93f26a021268ee9b0909e9dc88c3fa4c9 100644 --- a/entry/src/main/ets/constants/Constants.ets +++ b/entry/src/main/ets/constants/Constants.ets @@ -112,7 +112,7 @@ export class Constants { /** * GridRow gutter lg. */ - public static readonly GRID_ROW_lg: number = 16; + public static readonly GRID_ROW_LG: number = 16; /** * GridRow gutter y. @@ -127,7 +127,7 @@ export class Constants { /** * Idle state. */ - public static readonly idle_STATUS: string = 'idle'; + public static readonly IDLE_STATUS: string = 'idle'; /** * Resource Initialization. diff --git a/entry/src/main/ets/pages/AVPlayer.ets b/entry/src/main/ets/pages/AVPlayer.ets index 93729199ec5d9a1f4149dd9e9a4e5bd022c857d8..60181ef666c82783d6728c99481be0e364229c87 100644 --- a/entry/src/main/ets/pages/AVPlayer.ets +++ b/entry/src/main/ets/pages/AVPlayer.ets @@ -26,20 +26,20 @@ export class AVPlayer { private surfaceID: string; private jumpNext: boolean = false; // It is used to distinguish between the player of the main interface and the player of the pip interface. - type: number = 0; - State: string = ''; - playStatus: boolean = true; + public type: number = 0; + private state: string = ''; + private playStatus: boolean = true; constructor(surfaceID: string, type: number) { this.surfaceID = surfaceID; this.type = type; getContext().eventHub.on('appStateChange', (fg: boolean) => { if (fg) { - if (this.State === Constants.PAUSED_STATUS) { + if (this.state === Constants.PAUSED_STATUS) { this.avPlayer?.play(); } } else { - if (this.State === Constants.PLAYING_STATUS) { + if (this.state === Constants.PLAYING_STATUS) { this.avPlayer?.pause(); } } @@ -68,10 +68,10 @@ export class AVPlayer { if (!this.avPlayer) { return; } - this.State = state; + this.state = state; switch (state) { // After the RESET API is successfully called, the state machine is triggered. - case Constants.idle_STATUS: + case Constants.IDLE_STATUS: Logger.info('AVPlayer state idle called.'); if (!this.jumpNext) { // Call the release operation to destroy the instance object. @@ -161,14 +161,14 @@ export class AVPlayer { } play(): void { - if ((this.State === Constants.PAUSED_STATUS || this.State === Constants.PREPARED_STATUS) && + if ((this.state === Constants.PAUSED_STATUS || this.state === Constants.PREPARED_STATUS) && this.playStatus === true) { this.avPlayer?.play(); } } pause(): void { - if (this.State === Constants.PLAYING_STATUS) { + if (this.state === Constants.PLAYING_STATUS) { this.avPlayer?.pause(); } } diff --git a/entry/src/main/ets/pages/VideoPlay.ets b/entry/src/main/ets/pages/VideoPlay.ets index 32a4ede4eef67efa75e280d65bd9f8d4bacff94d..0e1f00ee255e8560364ea28e77a81c95dbeb95f8 100644 --- a/entry/src/main/ets/pages/VideoPlay.ets +++ b/entry/src/main/ets/pages/VideoPlay.ets @@ -128,11 +128,11 @@ export struct PlayVideo { } setStatusStyle(statusBarContentColor: string): void { - let SystemBarProperties: window.SystemBarProperties = { + let systemBarProperties: window.SystemBarProperties = { statusBarContentColor: statusBarContentColor }; try { - let promise = this.mainWin.setWindowSystemBarProperties(SystemBarProperties); + let promise = this.mainWin.setWindowSystemBarProperties(systemBarProperties); promise.then(() => { Logger.info('Succeeded in setting the system bar properties.'); }).catch((err: BusinessError) => { diff --git a/entry/src/main/ets/pages/WindowPip.ets b/entry/src/main/ets/pages/WindowPip.ets index c2f6a204dd7db513cfef86ff652f6aa1a4c75b35..8ca1bf52de0e3699ceeafa74afe6f8eafbf81137 100644 --- a/entry/src/main/ets/pages/WindowPip.ets +++ b/entry/src/main/ets/pages/WindowPip.ets @@ -47,7 +47,6 @@ struct ImageWidthTitle { .alignItems(HorizontalAlign.Start) .onClick(() => { getContext().eventHub.emit('onStateChange', true); - // router.pushUrl({url:'pages/VideoPlay'}) this.pageInfos?.pushPath({ name: Constants.NAV_DESTINATION_NAME }, { launchMode: 3 }); }) .onAreaChange((oldArea: Area, newArea: Area) => { @@ -96,11 +95,11 @@ struct WindowPip { } setStatusStyle(statusBarContentColor: string): void { - let SystemBarProperties: window.SystemBarProperties = { + let systemBarProperties: window.SystemBarProperties = { statusBarContentColor: statusBarContentColor }; try { - let promise = this.mainWin.setWindowSystemBarProperties(SystemBarProperties); + let promise = this.mainWin.setWindowSystemBarProperties(systemBarProperties); promise.then(() => { Logger.info('Succeeded in setting the system bar properties.'); }).catch((err: BusinessError) => {