diff --git a/validator/acts_validator/src/main/ets/pages/Player/PlayAudioList.ets b/validator/acts_validator/src/main/ets/pages/Player/PlayAudioList.ets index 9b67b747790769c1fec81abbd117576ec291e3e1..8aec046bfae68650604af16bb4ffa88efd9dfeba 100644 --- a/validator/acts_validator/src/main/ets/pages/Player/PlayAudioList.ets +++ b/validator/acts_validator/src/main/ets/pages/Player/PlayAudioList.ets @@ -43,14 +43,6 @@ struct audioNew { @State TestCaseList: Array = []; @State ColorObject: string[] = VarColor; - async aboutToAppear() { - this.getAudioData(); - } - - async getAudioData() { - this.TestCaseList = await this.MediaLib.getFileAssetsAlbum('Audios/ValidatorData/'); - } - async onPageShow() { let Test = null; let context = null; @@ -66,6 +58,7 @@ struct audioNew { Test = data; console.info("Succeeded in getting value of 'PlayerAudio'. Data: " + data); }); + this.TestCaseList = await this.MediaLib.getFileAssetsAlbum('Audios/ValidatorData/'); if (Test != 1) { let fd = fileio.openSync(ColorBackPath, 0o102, 0o666); diff --git a/validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets b/validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets index 5dfae64fc6d063d84d1e5bfde7762d7723982992..32634bc4a0e74c1013eaf66083e587d23822031d 100644 --- a/validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets +++ b/validator/acts_validator/src/main/ets/pages/Player/PlayVideo.ets @@ -26,7 +26,7 @@ struct playVideo { @State StepTips: string = '测试目的:用于测试视频播放暂停seek\n预期结果:视频播放暂停seek功能正常'; private tag: string = 'qlw'; @State Vue: boolean = false; - @State videoSrc: Resource = $rawfile('H264_AAC.mkv'); + @State videoSrc: string = router.getParams()['audioUrl']; @State isAutoPlay: boolean = true; @State showControls: boolean = true; controller: VideoController = new VideoController(); diff --git a/validator/acts_validator/src/main/ets/pages/Player/PlayVideoList.ets b/validator/acts_validator/src/main/ets/pages/Player/PlayVideoList.ets index b7fa39cfb609784828248b7fd37952004370e6b1..c319061e2129b19fb2552163cb0e471a0530c6ab 100644 --- a/validator/acts_validator/src/main/ets/pages/Player/PlayVideoList.ets +++ b/validator/acts_validator/src/main/ets/pages/Player/PlayVideoList.ets @@ -43,14 +43,6 @@ struct videoNew { @State TestCaseList: Array = []; @State ColorObject: string[] = VarColor; - async aboutToAppear() { - this.getVideoData(); - } - - async getVideoData() { - this.TestCaseList = await this.MediaLib.getFileAssetsAlbum('Videos/ValidatorData/'); - } - async onPageShow() { let Test = null; let context = null; @@ -66,6 +58,7 @@ struct videoNew { Test = data; console.info("Succeeded in getting value of 'PlayerVideo'. Data: " + data); }); + this.TestCaseList = await this.MediaLib.getFileAssetsAlbum('Videos/ValidatorData/'); if (Test != 1) { let fd = fileio.openSync(ColorBackPath, 0o102, 0o666); @@ -116,7 +109,7 @@ struct videoNew { fileio.closeSync(FD); let Fd = fileio.openSync(ColorBackPath, 0o102, 0o666); fileio.writeSync(Fd, Report); - filewrite(name1, results, titles) + filewrite(name1, results, titles); } else if (this.result === 'false') { this.ColorObject[this.current] = '#ffff0000';