Skip to content

Safari shows black UI after entering Portal Mode for MSE spatial Videos. #47295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jyavenard
Copy link
Member

@jyavenard jyavenard commented Jun 27, 2025

93215ec

Safari shows black UI after entering Portal Mode for MSE spatial Videos.
https://bugs.webkit.org/show_bug.cgi?id=294974
rdar://153932317

Reviewed by Jer Noble.

This is a regression from 295444@main. Following this change, we copied
the spatial metadata to the decoded CMSampleBuffer, however it would now
indicate that it has both a left and right image but we only provided the
left eye image.

For now, on visionOS, if the media being played contains spatial or immersive
content, disable WebCoreDecompressionSession and fallback to using AVSBDL.

* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h: When enqueuing a compressed sample,
also store if decompression session is to be used.
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm:
(WebCore::VideoMediaSampleRenderer::enqueueSample): Check if content has spatial or immersive content,
set flag accordingly.
(WebCore::VideoMediaSampleRenderer::decodeNextSampleIfNeeded):
(WebCore::VideoMediaSampleRenderer::totalVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::droppedVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::corruptedVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::totalFrameDelay const): use renamed member.

Canonical link: https://commits.webkit.org/296748@main

8d2e19c

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@jyavenard jyavenard self-assigned this Jun 27, 2025
@jyavenard jyavenard added the Media Bugs related to the HTML 5 Media elements. label Jun 27, 2025
@jyavenard jyavenard added the merge-queue Applied to send a pull request to merge-queue label Jun 27, 2025
https://bugs.webkit.org/show_bug.cgi?id=294974
rdar://153932317

Reviewed by Jer Noble.

This is a regression from 295444@main. Following this change, we copied
the spatial metadata to the decoded CMSampleBuffer, however it would now
indicate that it has both a left and right image but we only provided the
left eye image.

For now, on visionOS, if the media being played contains spatial or immersive
content, disable WebCoreDecompressionSession and fallback to using AVSBDL.

* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h: When enqueuing a compressed sample,
also store if decompression session is to be used.
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm:
(WebCore::VideoMediaSampleRenderer::enqueueSample): Check if content has spatial or immersive content,
set flag accordingly.
(WebCore::VideoMediaSampleRenderer::decodeNextSampleIfNeeded):
(WebCore::VideoMediaSampleRenderer::totalVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::droppedVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::corruptedVideoFrames const): use renamed member.
(WebCore::VideoMediaSampleRenderer::totalFrameDelay const): use renamed member.

Canonical link: https://commits.webkit.org/296748@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Safari-shows-black-UI-after-entering-Portal-Mode-for-MSE-spatial-Videos-Workaround branch from 8d2e19c to 93215ec Compare June 27, 2025 20:36
@webkit-commit-queue
Copy link
Collaborator

Committed 296748@main (93215ec): https://commits.webkit.org/296748@main

Reviewed commits have been landed. Closing PR #47295 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 93215ec into WebKit:main Jun 27, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants