diff --git a/entry/src/main/ets/pages/AVPlayer.ets b/entry/src/main/ets/pages/AVPlayer.ets index 789d18d9e49a57b8d9fe6b1f2d2d7f33f1733471..308d93d382d598dfd612e4e4e739562884bfe4d1 100644 --- a/entry/src/main/ets/pages/AVPlayer.ets +++ b/entry/src/main/ets/pages/AVPlayer.ets @@ -19,8 +19,10 @@ import { common } from '@kit.AbilityKit'; import { media } from '@kit.MediaKit'; import { Constants } from '../constants/Constants'; import Logger from '../utils/Logger'; + const uiContext: UIContext | undefined = AppStorage.get('uiContext'); let UIContext = uiContext!.getHostContext()!; + export class AVPlayer { private avPlayer?: media.AVPlayer; // The surfaceID is used to display the screen. @@ -71,7 +73,7 @@ export class AVPlayer { } this.State = state; switch (state) { - // After the RESET API is successfully called, the state machine is triggered. + // After the RESET API is successfully called, the state machine is triggered. case Constants.idle_STATUS: Logger.info('AVPlayer state idle called.'); if (!this.jumpNext) { @@ -162,7 +164,8 @@ export class AVPlayer { } play() { - if ((this.State === Constants.PAUSED_STATUS || this.State === Constants.PREPARED_STATUS) && this.playStatus === true) { + if ((this.State === Constants.PAUSED_STATUS || this.State === Constants.PREPARED_STATUS) && + this.playStatus === true) { this.avPlayer?.play(); } } diff --git a/entry/src/main/ets/pages/VideoPlay.ets b/entry/src/main/ets/pages/VideoPlay.ets index 20cda19096ff2f3ed23aaab1cc68b2dc2775fcd0..93bc8bb7874bbb1733abab8b94a3df5b404c32f9 100644 --- a/entry/src/main/ets/pages/VideoPlay.ets +++ b/entry/src/main/ets/pages/VideoPlay.ets @@ -22,6 +22,7 @@ import Logger from '../utils/Logger'; const TAG = Constants.NAV_DESTINATION_NAME; const uiContext: UIContext | undefined = AppStorage.get('uiContext'); let UIContext = uiContext!.getHostContext()!; + @Extend(Text) function textType() { .padding({ left: $r('app.integer.other_padding') }) diff --git a/entry/src/main/ets/pages/WindowPip.ets b/entry/src/main/ets/pages/WindowPip.ets index 6243b3aaa8a11442f777ee5fc9fbbe12076e6755..a8dd0390f65b2a4d7427b63ce93315d04ebffdcb 100644 --- a/entry/src/main/ets/pages/WindowPip.ets +++ b/entry/src/main/ets/pages/WindowPip.ets @@ -16,8 +16,10 @@ import { Constants } from '../constants/Constants'; import { PlayVideo } from './VideoPlay'; import Logger from '../utils/Logger'; + const uiContext: UIContext | undefined = AppStorage.get('uiContext'); let UIContext = uiContext!.getHostContext()!; + @Component struct ImageWidthTitle { @State imageHeight: number = 0;