Feature Request: Add obs_frontend_close_projector() API for Complete Projector Control

KRMaravilla

New Member
Currently, OBS lacks a native API to close projectors programmatically, forcing script/workflow developers to rely on workarounds. Implementing obs_frontend_close_projector() would:

  1. Enable Toggle Functionality
    • Allow hotkeys/scripts to seamlessly open/close projectors (like a true toggle).
    • Fixes the current "open-only" limitation.
  2. Streamline Automation
    • Essential for Stream Decks, macros, and scene transitions where projectors need to close dynamically.
  3. Mirror Existing Design
    • Complements obs_frontend_open_projector() for API consistency.
  4. Use Cases:
    • Close preview projectors when switching scenes
    • Reset multiview layouts without restarting OBS
    • Memory management for long streaming sessions
Example Lua Snippet:

obs.frontend_close_projector(0) -- Closes all scene projectors

Why This Matters:
This small addition would unlock powerful scripting potential while maintaining OBS's lightweight core.

Would love feedback from devs!

Key Features:
✅ Simple implementation (mirrors open_projector logic)
✅ Backward-compatible
✅ No performance overhead
 
Top