[PR #221] [MERGED] Add "Audio only" mode to Browser widget #223

Closed
opened 2026-03-02 04:00:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/eerimoq/moblin/pull/221
Author: @Copilot
Created: 2/8/2026
Status: Merged
Merged: 2/8/2026
Merged by: @eerimoq

Base: mainHead: copilot/add-audio-only-mode-picker


📝 Commits (4)

  • ed3dbbc Initial plan
  • 2f00c6b Add "Audio only" mode to Browser widget Mode picker
  • 94eb162 Replace audioAndVideoOnly and audioOnly booleans with mode enum in BrowserEffect
  • 3455589 Move Audio only footer text to separate Text view with empty Text spacer

📊 Changes

3 files changed (+16 additions, -6 deletions)

View changed files

📝 Moblin/Various/Settings/SettingsScene.swift (+3 -0)
📝 Moblin/VideoEffects/Browser/BrowserEffect.swift (+8 -6)
📝 Moblin/View/Settings/Scenes/Widgets/Widget/Browser/WidgetBrowserSettingsView.swift (+5 -0)

📄 Description

Adds an "Audio only" option to the Browser widget Mode picker. This mode behaves like "Audio and video only" but never renders video—no snapshots are taken and isEnabled() returns false.

  • SettingsWidgetBrowserMode: New .audioOnly enum case
  • BrowserEffect: Replaced the two derived booleans (audioAndVideoOnly, audioOnly) with a single mode: SettingsWidgetBrowserMode property; conditional checks use enum comparisons directly:
    // Before
    private let audioAndVideoOnly: Bool
    private let audioOnly: Bool
    guard !stopped, !audioAndVideoOnly, !audioOnly else { return }
    
    // After
    private let mode: SettingsWidgetBrowserMode
    guard !stopped, mode == .periodicAudioAndVideo else { return }
    
  • Settings UI: Footer text for the new mode added as a separate Text view with spacing

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/eerimoq/moblin/pull/221 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 2/8/2026 **Status:** ✅ Merged **Merged:** 2/8/2026 **Merged by:** [@eerimoq](https://github.com/eerimoq) **Base:** `main` ← **Head:** `copilot/add-audio-only-mode-picker` --- ### 📝 Commits (4) - [`ed3dbbc`](https://github.com/eerimoq/moblin/commit/ed3dbbc2aa4578b84a0cabcb289709c9323562d2) Initial plan - [`2f00c6b`](https://github.com/eerimoq/moblin/commit/2f00c6b353ce74f42f2b2fbd6218b724dfba3f50) Add "Audio only" mode to Browser widget Mode picker - [`94eb162`](https://github.com/eerimoq/moblin/commit/94eb1620287b5e89bd754470e29c6db1b84ef34f) Replace audioAndVideoOnly and audioOnly booleans with mode enum in BrowserEffect - [`3455589`](https://github.com/eerimoq/moblin/commit/3455589d03426b6e5bf57c5033cd0fbe9f2a6e57) Move Audio only footer text to separate Text view with empty Text spacer ### 📊 Changes **3 files changed** (+16 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Moblin/Various/Settings/SettingsScene.swift` (+3 -0) 📝 `Moblin/VideoEffects/Browser/BrowserEffect.swift` (+8 -6) 📝 `Moblin/View/Settings/Scenes/Widgets/Widget/Browser/WidgetBrowserSettingsView.swift` (+5 -0) </details> ### 📄 Description Adds an "Audio only" option to the Browser widget Mode picker. This mode behaves like "Audio and video only" but never renders video—no snapshots are taken and `isEnabled()` returns false. - **`SettingsWidgetBrowserMode`**: New `.audioOnly` enum case - **`BrowserEffect`**: Replaced the two derived booleans (`audioAndVideoOnly`, `audioOnly`) with a single `mode: SettingsWidgetBrowserMode` property; conditional checks use enum comparisons directly: ```swift // Before private let audioAndVideoOnly: Bool private let audioOnly: Bool guard !stopped, !audioAndVideoOnly, !audioOnly else { return } // After private let mode: SettingsWidgetBrowserMode guard !stopped, mode == .periodicAudioAndVideo else { return } ``` - **Settings UI**: Footer text for the new mode added as a separate `Text` view with spacing <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/eerimoq/moblin/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:00:48 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/moblin#223
No description provided.