Browse Source

ijkplayer暂时退回2.0.5版本

onecold 1 year ago
parent
commit
e9d79bce4f

+ 4 - 4
build-profile.json5

@@ -52,10 +52,10 @@
         }
       ]
     },
-    //    {
-    //      "name": "ijkplayer",
-    //      "srcPath": "./ijkplayer"
-    //    },////注释掉这个代码,用ohpm install @ohos/ijkplayer去装2.0.6版本
+        {
+          "name": "ijkplayer",
+          "srcPath": "./ijkplayer"
+        },////注释掉这个代码,用ohpm install @ohos/ijkplayer去装2.0.6版本
     {
       "name": "lib",
       "srcPath": "./lib"

BIN
entry/libs/openadsdk_6.7.0.har


+ 1 - 1
entry/oh-package.json5

@@ -6,7 +6,7 @@
   "author": "",
   "license": "LGPLv2.1 or later",
   "dependencies": {
-//    "@ohos/ijkplayer": "file:../ijkplayer",//注释掉这个代码,用ohpm install @ohos/ijkplayer去装2.0.6版本
+    "@ohos/ijkplayer": "file:../ijkplayer",//注释掉这个代码,用ohpm install @ohos/ijkplayer去装2.0.6版本
     "libentry.so": "file:./src/main/cpp/types/libentry",
 //    "@csj/openadsdk": "file:libs/openadsdk_6.7.0.har",
     "@tencent/wechat_open_sdk": "1.0.0"

+ 4 - 4
entry/src/main/ets/common/util/MediaTable.ets

@@ -1,5 +1,5 @@
 import relationalStore from '@ohos.data.relationalStore';
-import { StrUtil } from '@pura/harmony-utils';
+import { LogUtil, StrUtil } from '@pura/harmony-utils';
 import { VideoItem } from '../../viewmodel/VideoItem';
 import Logger from './Logger';
 import RdbUtils from './RdbUtils';
@@ -295,7 +295,7 @@ export default class MediaTable {
     try {
       const predicates = new relationalStore.RdbPredicates(RdbUtils.MEDIA_TABLE.tableName);
       predicates.equalTo('parentPath',  path);
-
+      LogUtil.info('onecold parentPath = '+path)
       // 2. 执行查询并处理结果
       this.accountTable.query(predicates,  (resultSet: relationalStore.ResultSet) => {
         // 3. 复用已有的解析逻辑
@@ -509,7 +509,7 @@ export default class MediaTable {
       const index = rs.getColumnIndex(col);
       return index >= 0 ? rs.getString(index) || '' : '';
     };
-    
+
     const safeGetNumber = (col: string) => {
       const index = rs.getColumnIndex(col);
       return index >= 0 ? rs.getDouble(index) || 0 : 0;
@@ -529,7 +529,7 @@ export default class MediaTable {
       safeGet(DB_COLUMNS.ALBUM),
       safeGet(DB_COLUMNS.FILE_NAME)
     );
-    
+
     // 设置额外属性,添加安全检查
     item.isFav = safeGetNumber(DB_COLUMNS.IS_FAV);
     item.duration = safeGet(DB_COLUMNS.DURATION);

+ 1 - 1
entry/src/main/ets/pages/UserCenter.ets

@@ -326,7 +326,7 @@ export struct UserCenter {
           }
           .width(100)
           .height(100)
-          .visibility(PreferencesUtil.getBooleanSync('isShowWX',false)?Visibility.Visible:Visibility.None)
+          // .visibility(PreferencesUtil.getBooleanSync('isShowWX',false)?Visibility.Visible:Visibility.None)
           .backgroundColor(Color.White)
           // .border({ color: this.themeColor, width: 2 })
           .borderRadius(20)

+ 8 - 8
entry/src/main/ets/view/LocalMusic.ets

@@ -37,7 +37,7 @@ import { ColorConversion } from '../common/util/ColorConversion';
 import { LyricController, LyricParser, LyricView2 } from '@seagazer/cclyric';
 import { AvSessionController } from '../controller/AvSessionController';
 import {
-  DeviceChangeReason,
+  // DeviceChangeReason,
   IjkMediaPlayer,
   InterruptEvent,
   InterruptHintType,
@@ -471,13 +471,13 @@ export struct LocalMusic {
     }
     this.mIjkMediaPlayer.on('audioInterrupt', event);
     // 音频设备断连回调处理
-    let deviceChangeEvent: Callback<InterruptEvent> = (event) => {
-      LogUtils.getInstance().LOGI(`Heanup deviceChange event: ${JSON.stringify(event)}`);
-      if (event.reason === DeviceChangeReason.REASON_OLD_DEVICE_UNAVAILABLE) { // 音频设备断开连接
-        this.pause();
-      }
-    }
-    this.mIjkMediaPlayer.on('deviceChange', deviceChangeEvent);
+    // let deviceChangeEvent: Callback<InterruptEvent> = (event) => {
+    //   LogUtils.getInstance().LOGI(`Heanup deviceChange event: ${JSON.stringify(event)}`);
+    //   if (event.reason === DeviceChangeReason.REASON_OLD_DEVICE_UNAVAILABLE) { // 音频设备断开连接
+    //     this.pause();
+    //   }
+    // }
+    // this.mIjkMediaPlayer.on('deviceChange', deviceChangeEvent);
 
 
 

+ 1 - 1
oh-package.json5

@@ -24,7 +24,7 @@
     "@sgaolei/lrc_parser": "^1.0.0",
     "@ohos/pinyin4js": "^2.0.2",
     "@simplepeng/spider-man": "^1.0.1",
-    "@ohos/ijkplayer": "^2.0.6"
+//    "@ohos/ijkplayer": "^2.0.6"
   },
   "dynamicDependencies": {}
 }