Skip to content

Add a video element to hs.ui. Closes #149 - #157

Merged
cmsj merged 2 commits into
mainfrom
hs.ui-video
Aug 3, 2026
Merged

Add a video element to hs.ui. Closes #149#157
cmsj merged 2 commits into
mainfrom
hs.ui-video

Conversation

@cmsj

@cmsj cmsj commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Closes #149

@cmsj cmsj self-assigned this Aug 3, 2026
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds JavaScript-accessible video playback and SwiftUI video elements, with queue-loop cleanup and integration coverage.

  • Introduces HSVideo for playlist creation, playback control, seeking, looping, and volume.
  • Adds video elements to the hs.ui.window builder.
  • Extends color arguments to accept either hexadecimal strings or HSColor objects.
  • Adds regression tests for color coercion and video queue management.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
Hammerspoon 2/Engine/Types/HSVideo.swift Implements the video bridge and now removes looper-generated queue entries before restoring the single original item when looping is disabled.
Hammerspoon 2/Modules/hs.ui/Core/HSUIWindow.swift Adds video construction to the UI builder and supports JavaScript color coercion across relevant styling methods.
Hammerspoon 2/Modules/hs.ui/Elements/UIVideo.swift Adds a SwiftUI-backed video element with frame, opacity, and interaction modifiers.
Hammerspoon 2Tests/IntegrationTests/HSUIIntegrationTests.swift Adds regression coverage for color argument coercion and the previously reported loop queue cleanup behavior.

Reviews (2): Last reviewed commit: "Fix an issue found in code review" | Re-trigger Greptile

Comment thread Hammerspoon 2/Engine/Types/HSVideo.swift
@cmsj

cmsj commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@greptile

@cmsj
cmsj merged commit 7a2dcab into main Aug 3, 2026
4 checks passed
@cmsj
cmsj deleted the hs.ui-video branch August 3, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: native video playback (hs.ui video element or hs.video)

1 participant