#774,解决录音列表,点击进入就是播放状态,需要点击进去是暂停状态不能自动播放bug
authorluozheng <1732036298@qq.com>
Wed, 25 Sep 2024 01:55:20 +0000 (09:55 +0800)
committerluozheng <1732036298@qq.com>
Wed, 25 Sep 2024 01:55:20 +0000 (09:55 +0800)
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp

index 6815da0..9aa2e6e 100644 (file)
@@ -165,6 +165,8 @@ namespace OHOS
     // 点击录音列表中录音播放
     int RecordingModel::RecordingListOnClickPlay(void)
     {
+        SetRecordingPlayerUri(directory + GetCurrentPlayRecordingName() + ".mp3");
+#if 0
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingModel::RecordingListOnClickPlay");
         int ret;
         int32_t playerState;
@@ -180,6 +182,7 @@ namespace OHOS
 
         state = p_RecordingPlayerView->GetPlayerButtonState();
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "state %d,line = %d", state, __LINE__);
+       
         if (state == UICheckBox::UICheckBoxState::UNSELECTED)
         {
             p_RecordingPlayerView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED);
@@ -207,6 +210,7 @@ namespace OHOS
             }
             RecordingPlayerStat();
         }
+#endif
         return OHOS_SUCCESS;
     }
 
@@ -216,7 +220,7 @@ namespace OHOS
         /* ------------------------------ 每次新的播放进度都设为0 ------------------------------ */
         SetCircleProgress(0); // 0:进度100%
         RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance();
-        if(p_RecordingPlayerView !=nullptr)
+        if (p_RecordingPlayerView != nullptr)
         {
             p_RecordingPlayerView->SetPlayerProgressBarValue(CircleProgress);
         }