Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b499adc447e6aa3d5d2dd7a9e2ae64c147a9bbc4
      
https://github.com/WebKit/WebKit/commit/b499adc447e6aa3d5d2dd7a9e2ae64c147a9bbc4
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
    M Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
    M 
Source/WebCore/Modules/modern-media-controls/media/spatial-video-support.js
    M Source/WebCore/dom/EventNames.json
    M Source/WebCore/html/HTMLAttributeNames.in
    M Source/WebCore/html/HTMLVideoElement.cpp
    M Source/WebCore/html/HTMLVideoElement.h
    M Source/WebCore/html/HTMLVideoElement.idl

  Log Message:
  -----------
  Spatial video renderer has no camera controls (experimental)
https://bugs.webkit.org/show_bug.cgi?id=322444
rdar://185726719

Reviewed by Andy Estes.

Field of view was a hardcoded constant with no zoom, the view always started 
looking forward, and a
page could neither frame the shot nor read back where the camera pointed.

Add x-webkit-fieldofview, x-webkit-yaw and x-webkit-pitch, reflected as 
fieldOfView, yaw and pitch
behind SpatialVideoRenderingEnabled, scheduling webkitcameraviewchanged on 
assignment. Assigning
applies the value whether or not it changed, so a page can return the camera to 
a known view after
the user has dragged it.

Expose the live camera separately as readonly cameraYaw, cameraPitch and 
cameraFieldOfView,
reported through MediaControlsHost::spatialCameraDidMove and announced with 
webkitcameramoved —
once per drawn frame, and dropped when unchanged.

* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::spatialCameraDidMove):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl:
* Source/WebCore/Modules/modern-media-controls/media/spatial-video-support.js:
(SpatialVideoSupport):
(SpatialVideoSupport.prototype.get mediaEvents):
(SpatialVideoSupport.prototype._maybeEnable):
(SpatialVideoSupport.prototype._resolveProjection):
(SpatialVideoSupport.prototype._applyDeclaredCameraView):
(SpatialVideoSupport.prototype._installInteraction):
(SpatialVideoSupport.prototype._removeInteraction):
(SpatialVideoSupport.prototype._drawLoop):
(SpatialVideoSupport.prototype._reportCamera):
(clampFieldOfView):
(clampPitch):
* Source/WebCore/dom/EventNames.json:
* Source/WebCore/html/HTMLAttributeNames.in:
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::attributeChanged):
(WebCore::HTMLVideoElement::spatialCameraDidMove):
* Source/WebCore/html/HTMLVideoElement.h:
* Source/WebCore/html/HTMLVideoElement.idl:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to