Skip to content

Camera player UI improvements#5149

Merged
bgoncal merged 3 commits into
mainfrom
camera-player-ui-improvements
Jul 17, 2026
Merged

Camera player UI improvements#5149
bgoncal merged 3 commits into
mainfrom
camera-player-ui-improvements

Conversation

@bgoncal

@bgoncal bgoncal commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Camera player UI improvements, independent of two-way audio:

  • Extracts the WebRTC player controls into a dedicated WebRTCVideoPlayerControlsView.
  • Adds WebRTCVideoPlayerViewControllerWrapper (a UIViewControllerRepresentable that drives the player view controller from SwiftUI via an isVideoPlaying binding).
  • Reworks the WebRTCVideoPlayerView and CameraPlayerView layout.

The talkback control is present but stays hidden (gated on isTalkbackSupported, which is false on main), so this PR is purely UI and adds no two-way-audio behavior.

Base for the stacked two-way-audio PR #4994.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

Copilot AI review requested due to automatic review settings July 17, 2026 13:10
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

⚠️ Unused L10n strings detected

Found 5 unused localization strings in the codebase.

Click to see details
Parsing Strings.swift...
Found 2158 L10n strings

Reading all Swift source code...
Read 7383184 characters of Swift code

Checking for unused strings...
Checked 100/2158 strings...
Checked 200/2158 strings...
Checked 300/2158 strings...
Checked 400/2158 strings...
Checked 500/2158 strings...
Checked 600/2158 strings...
Checked 700/2158 strings...
Checked 800/2158 strings...
Checked 900/2158 strings...
Checked 1000/2158 strings...
Checked 1100/2158 strings...
Checked 1200/2158 strings...
Checked 1300/2158 strings...
Checked 1400/2158 strings...
Checked 1500/2158 strings...
Checked 1600/2158 strings...
Checked 1700/2158 strings...
Checked 1800/2158 strings...
Checked 1900/2158 strings...
Checked 2000/2158 strings...
Checked 2100/2158 strings...

================================================================================
UNUSED STRINGS REPORT
================================================================================

Found 5 unused strings:


WATCH:
  - L10n.Watch.Complications.Builder.previewFooter
    Key: watch.complications.builder.preview_footer
    Line: 5835
  - L10n.Watch.Complications.Builder.sourceCustom
    Key: watch.complications.builder.source_custom
    Line: 5865
  - L10n.Watch.Complications.Builder.templateColor
    Key: watch.complications.builder.template_color
    Line: 5877
  - L10n.Watch.Complications.Builder.textTemplate
    Key: watch.complications.builder.text_template
    Line: 5895

ROOT:
  - L10n.debugSectionLabel
    Key: debug_section_label
    Line: 26

================================================================================
Total unused: 5
================================================================================

================================================================================
Copy-paste these keys into the "Lokalise: Delete Keys" workflow (keys input):
================================================================================
debug_section_label,watch.complications.builder.preview_footer,watch.complications.builder.source_custom,watch.complications.builder.template_color,watch.complications.builder.text_template

To remove them, run the
Lokalise: Delete Keys
workflow — it deletes the keys from Lokalise and opens a PR removing them from
Localizable.strings and regenerating Strings.swift. Copy-paste these keys into the keys input:

debug_section_label,watch.complications.builder.preview_footer,watch.complications.builder.source_custom,watch.complications.builder.template_color,watch.complications.builder.text_template

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the in-app WebRTC camera player UI by extracting player controls into a reusable SwiftUI view, moving the UIViewControllerRepresentable wrapper into its own file, and adjusting the camera player navigation/title layout to better fit the updated controls design (as groundwork for the stacked two-way-audio PR).

Changes:

  • Extract WebRTC toolbar controls (mute + talkback UI) into WebRTCVideoPlayerControlsView.
  • Add a standalone WebRTCVideoPlayerViewControllerWrapper to host WebRTCVideoPlayerViewController from SwiftUI.
  • Rework WebRTCVideoPlayerView and CameraPlayerView layout/toolbar placements and add SwiftUI previews.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Sources/App/Cameras/CameraPlayer/WebRTC/WebRTCVideoPlayerViewControllerWrapper.swift Introduces a standalone UIViewControllerRepresentable wrapper for the WebRTC player VC.
Sources/App/Cameras/CameraPlayer/WebRTC/WebRTCVideoPlayerView.swift Uses the extracted controls view and removes the previously inlined wrapper; adds a #Preview.
Sources/App/Cameras/CameraPlayer/WebRTC/WebRTCVideoPlayerControlsView.swift New extracted SwiftUI control surface (talkback + mute) used by the WebRTC player view.
Sources/App/Cameras/CameraPlayer/CameraPlayerView.swift Adjusts toolbar placements and constrains the title/subtitle label width for the updated UI.

@bgoncal
bgoncal enabled auto-merge (squash) July 17, 2026 13:40
@bgoncal
bgoncal disabled auto-merge July 17, 2026 13:40
@bgoncal
bgoncal enabled auto-merge (squash) July 17, 2026 13:40
@bgoncal
bgoncal merged commit 10d9295 into main Jul 17, 2026
11 checks passed
@bgoncal
bgoncal deleted the camera-player-ui-improvements branch July 17, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants