|
|
@@ -75,7 +75,7 @@ import app from '@system.app';
|
|
|
import { TextNodeController } from './PipLyricTextBuilder';
|
|
|
import { IndexerView } from './IndexerView';
|
|
|
import { KeyCode } from '@kit.InputKit';
|
|
|
-
|
|
|
+// import { FFmpeg, FFProgressMessageParser } from '@sj/ffmpeg';
|
|
|
const TAG = 'LocalMusic';
|
|
|
|
|
|
const DEFAULT_INDEX =
|
|
|
@@ -4398,6 +4398,9 @@ export struct LocalMusic {
|
|
|
LogUtil.info('this.currentSong.sampleRate =' + this.currentSong.sampleRate)
|
|
|
LogUtil.info('this.currentSongmimeType =' + this.currentSong.mimeType)
|
|
|
this.startPlayOrResumePlay()
|
|
|
+ // let outputPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.json'
|
|
|
+ // this.readCoverInfo(this.videoUrl,outputPath)
|
|
|
+ // this.readMediaInfo(this.videoUrl)
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
@@ -4405,6 +4408,32 @@ export struct LocalMusic {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // readCoverInfo(inputPath:string,outputPath:string){
|
|
|
+ // let commands = ["ffmpeg", "-i", inputPath, "-f ffmetadata",outputPath];
|
|
|
+ // FFmpeg.execute(commands, {
|
|
|
+ // logCallback: (logLevel: number, logMessage: string) => console.log(`[${logLevel}]${logMessage}`),
|
|
|
+ // progressCallback: (message: string) => console.log(`[onecold FFmpeg progress]${JSON.stringify(FFProgressMessageParser.parse(message))}`),
|
|
|
+ // }).then(() => {
|
|
|
+ // console.info("onecold FFmpeg execution succeeded.");
|
|
|
+ // }).catch((error: Error) => {
|
|
|
+ // console.error(`onecold FFmpeg execution failed with error: ${error.message}`);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // readMediaInfo(inputPath:string){
|
|
|
+ // let commands = ["ffprobe", "-v", "info", "-of", "json", "-show_entries", "stream=sample_rate,bit_rate", "-i", inputPath];
|
|
|
+ // let outputJson = "";
|
|
|
+ // FFmpeg.execute(commands, {
|
|
|
+ // logCallback: (logLevel: number, logMessage: string) => console.log(`[${logLevel}]${logMessage}`),
|
|
|
+ // outputCallback: (message: string) => { outputJson += message; },
|
|
|
+ // }).then(() => {
|
|
|
+ // console.info(`Execution succeeded with output: ${outputJson}`);
|
|
|
+ // }).catch((error: Error) => {
|
|
|
+ // console.error(`Execution failed with error: ${error.message}`);
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
@Builder
|
|
|
PlayController() {
|
|
|
Column() {
|
|
|
@@ -7018,6 +7047,8 @@ export struct LocalMusic {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
isBigScreen() {
|
|
|
if (this.currentWidthBreakpoint == WidthBreakpoint.WIDTH_LG) {
|
|
|
return true
|
|
|
@@ -8243,9 +8274,10 @@ export struct LocalMusic {
|
|
|
.onClick(() => {
|
|
|
DialogHelper.closeDialog('tips'); //关闭弹框
|
|
|
this.isShowPlay = false
|
|
|
- router.pushUrl({
|
|
|
- url: 'pages/SettingPage'
|
|
|
- }, router.RouterMode.Single);
|
|
|
+ this.mType = 3
|
|
|
+ // router.pushUrl({
|
|
|
+ // url: 'pages/SettingPage'
|
|
|
+ // }, router.RouterMode.Single);
|
|
|
})
|
|
|
}
|
|
|
|