diff --git a/component_ext/movingphoto/movingphoto_pattern.cpp b/component_ext/movingphoto/movingphoto_pattern.cpp index 26b6ac7c38c60bb37740fd3790146b29b9176682..3236dc4ed6c05b7c4a4a1ef063a58926c8b0d30d 100644 --- a/component_ext/movingphoto/movingphoto_pattern.cpp +++ b/component_ext/movingphoto/movingphoto_pattern.cpp @@ -1501,6 +1501,13 @@ void MovingPhotoPattern::PreparedToPlay() if (!isVisible_) { return; } + if (isRepeatChangePlayMode_ && historyAutoAndRepeatLevel_ == PlaybackMode::NONE && + + autoAndRepeatLevel_ == PlaybackMode::NONE) { + autoAndRepeatLevel_ = PlaybackMode::REPEAT; + historyAutoAndRepeatLevel_ = PlaybackMode::REPEAT; + isRepeatChangePlayMode_ = false; + } if (historyAutoAndRepeatLevel_ != PlaybackMode::NONE && autoAndRepeatLevel_ == PlaybackMode::NONE) { SelectPlaybackMode(historyAutoAndRepeatLevel_); @@ -1809,6 +1816,7 @@ void MovingPhotoPattern::RefreshMovingPhotoSceneManager() if (historyAutoAndRepeatLevel_ == PlaybackMode::REPEAT) { autoAndRepeatLevel_ = PlaybackMode::NONE; historyAutoAndRepeatLevel_ = PlaybackMode::NONE; + isRepeatChangePlayMode_ = true; Pause(); auto movingPhoto = AceType::DynamicCast(host); CHECK_NULL_VOID(movingPhoto); diff --git a/component_ext/movingphoto/movingphoto_pattern.h b/component_ext/movingphoto/movingphoto_pattern.h index f1f98292070e2983b23dd85f7b0b94af811e3811..940ee5ee662037ed875983dd56c45a21a5c919e1 100644 --- a/component_ext/movingphoto/movingphoto_pattern.h +++ b/component_ext/movingphoto/movingphoto_pattern.h @@ -333,6 +333,7 @@ private: bool isSetAutoPlayPeriod_ = false; bool isVisible_ = false; bool isChangePlayMode_ = false; + bool isRepeatChangePlayMode_ = false; bool isAutoChangePlayMode_ = false; bool needUpdateImageNode_ = false; bool isPlayWithMask_ = false;