diff --git a/frameworks/core/components_ng/pattern/video/video_pattern.cpp b/frameworks/core/components_ng/pattern/video/video_pattern.cpp index 37c72138f210079d3f75255230620a58af9064d5..0aa1e9d28d0bafca037db7548f051ddf2e9f1af5 100644 --- a/frameworks/core/components_ng/pattern/video/video_pattern.cpp +++ b/frameworks/core/components_ng/pattern/video/video_pattern.cpp @@ -531,6 +531,7 @@ void VideoPattern::OnAttachToFrameNode() renderContextForMediaPlayer_->InitContext(false, "MediaPlayerSurface"); renderContext->UpdateBackgroundColor(Color::BLACK); renderContextForMediaPlayer_->UpdateBackgroundColor(Color::BLACK); + renderContext->SetClipToBounds(true); } void VideoPattern::OnModifyDone()