diff --git a/frameworks/core/components/custom_paint/flutter_render_custom_paint.cpp b/frameworks/core/components/custom_paint/flutter_render_custom_paint.cpp index 3940aff1..8c0affef 100644 --- a/frameworks/core/components/custom_paint/flutter_render_custom_paint.cpp +++ b/frameworks/core/components/custom_paint/flutter_render_custom_paint.cpp @@ -157,13 +157,11 @@ void FlutterRenderCustomPaint::Paint(RenderContext& context, const Offset& offse } if (!canvasCache_.readyToDraw()) { auto imageInfo = SkImageInfo::Make(GetLayoutSize().Width() * viewScale, GetLayoutSize().Height() * viewScale, - SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kOpaque_SkAlphaType); + SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kUnpremul_SkAlphaType); canvasCache_.allocPixels(imageInfo); cacheBitmap_.allocPixels(imageInfo); -#ifdef USE_SYSTEM_SKIA canvasCache_.eraseColor(SK_ColorTRANSPARENT); cacheBitmap_.eraseColor(SK_ColorTRANSPARENT); -#endif skCanvas_ = std::make_unique(canvasCache_); cacheCanvas_ = std::make_unique(cacheBitmap_); } diff --git a/frameworks/core/components/video/media_player_callback.h b/frameworks/core/components/video/media_player_callback.h index 0eae4382..6a7e5f7a 100644 --- a/frameworks/core/components/video/media_player_callback.h +++ b/frameworks/core/components/video/media_player_callback.h @@ -48,7 +48,7 @@ public: case OHOS::Media::INFO_TYPE_SEEKDONE: LOGI("OnSeekDone callback"); if (positionUpdatedEvent_ != nullptr) { - positionUpdatedEvent_(extra); + positionUpdatedEvent_(extra / MILLISECONDS_TO_SECONDS); } break; case OHOS::Media::INFO_TYPE_EOS: @@ -65,6 +65,9 @@ public: } break; case OHOS::Media::INFO_TYPE_POSITION_UPDATE: + if (positionUpdatedEvent_ != nullptr) { + positionUpdatedEvent_(extra / MILLISECONDS_TO_SECONDS); + } break; case OHOS::Media::INFO_TYPE_MESSAGE: LOGI("OnMessage callback type: %{public}d", extra); diff --git a/frameworks/core/components/video/video_element.cpp b/frameworks/core/components/video/video_element.cpp index 7cac521d..bd7217e0 100644 --- a/frameworks/core/components/video/video_element.cpp +++ b/frameworks/core/components/video/video_element.cpp @@ -998,6 +998,12 @@ void VideoElement::OnPrepared( isStop_ = false; Start(); } + +#ifdef OHOS_STANDARD_SYSTEM + if (isAutoPlay_) { + Start(); + } +#endif } void VideoElement::OnPlayerStatus(bool isPlaying)