feat: Add platform-specific VLC launch profiles (macOS working; Linux deferred)

- macOS: Uses direct binary path (/Applications/VLC.app/Contents/MacOS/VLC)
  with --no-play-and-exit --play-and-pause flags and AppleScript fullscreen toggle.
  Confirmed working: pause on last frame, stays in window.

- Linux: Uses shell command (vlc --no-play-and-exit --play-and-pause).
  Known issue: not going fullscreen, not pausing on end. Deferred for later
  investigation of flag interpretation vs launcher execution layer.

- Created separate profile constants: VLC_MIRROR_MAC_PROFILE and
  VLC_MIRROR_LINUX_PROFILE in ae_launcher__default_launch_profiles.ts

- Updated TODO__Agents.md with Linux VLC issue for future debugging

Files: ae_launcher__default_launch_profiles.ts, documentation/TODO__Agents.md
This commit is contained in:
Scott Idem
2026-05-20 19:09:15 -04:00
parent 5bb06c4904
commit c0f828ec2c
3 changed files with 59 additions and 12 deletions

View File

@@ -52,15 +52,20 @@ export interface LaunchProfile {
// url?: string;
}
function make_vlc_mirror_profile(): LaunchProfile {
/**
* macOS VLC profile — uses direct binary path for max reliability.
* Bypasses `open -a` argument-handling quirks that could lose file path or re-use existing process.
*/
function make_vlc_mirror_mac_profile(): LaunchProfile {
return {
app: 'VLC',
app: 'VLC (macOS)',
display_mode: 'mirror',
open_cmd: 'open -a "VLC" "{{path}}"',
// Direct binary path ensures VLC receives media file + flags reliably.
// `--no-play-and-exit` prevents closing on end, `--play-and-pause` holds final frame.
open_cmd: '/Applications/VLC.app/Contents/MacOS/VLC --no-play-and-exit --play-and-pause "{{path}}"',
post_delay_ms: 1000,
// Poll until VLC is frontmost before sending Cmd+F. A fixed delay is unreliable because
// `open -a VLC` returns immediately (just fires an Apple Event) — VLC cold-start on a
// loaded conference Mac can take 3-5 seconds before the window is visible and interactive.
// VLC cold-start on a loaded conference Mac can take 3-5 seconds.
// Polling (15 × 0.5 s = up to 7.5 s after the initial wait) fires as soon as VLC is ready.
post_script: `tell application "VLC"
activate
@@ -80,6 +85,20 @@ end tell`
};
}
/**
* Linux VLC profile — uses shell command for compatibility.
*/
function make_vlc_mirror_linux_profile(): LaunchProfile {
return {
app: 'VLC (Linux)',
display_mode: 'mirror',
// shell: prefix runs as bash command. Same flags as macOS: `--no-play-and-exit` keeps window open, `--play-and-pause` holds final frame.
open_cmd: 'shell:vlc --no-play-and-exit --play-and-pause "{{path}}"',
post_delay_ms: 1000
// No post_script on Linux — VLC opens fullscreen by default, no need to send F.
};
}
const POWERPOINT_MAC_EXTEND_PROFILE: LaunchProfile = {
app: 'Microsoft PowerPoint',
display_mode: 'extend',
@@ -168,7 +187,8 @@ tell application "System Events"
end tell`
};
const VLC_MIRROR_PROFILE: LaunchProfile = make_vlc_mirror_profile();
const VLC_MIRROR_MAC_PROFILE: LaunchProfile = make_vlc_mirror_mac_profile();
const VLC_MIRROR_LINUX_PROFILE: LaunchProfile = make_vlc_mirror_linux_profile();
const POWERPOINT_WIN_EXTEND_PROFILE: LaunchProfile = {
app: 'Microsoft Office PowerPoint (Windows)',
@@ -272,10 +292,20 @@ export const DEFAULT_LAUNCH_PROFILE_DEFS: DefaultLaunchProfileDefinition[] = [
aliases: ['pdf'],
profile: ACROBAT_MAC_MIRROR_PROFILE
},
{
name: 'vlc_mirror_mac',
aliases: [],
profile: VLC_MIRROR_MAC_PROFILE
},
{
name: 'vlc_mirror_linux',
aliases: [],
profile: VLC_MIRROR_LINUX_PROFILE
},
{
name: 'vlc_mirror',
aliases: ['mp4', 'mkv', 'mov', 'mpeg', 'avi', 'flv', 'ogg', 'ogv', 'mp3', 'm4v', 'm4a', 'webm', 'wmv', 'wav', 'aac', 'flac'],
profile: VLC_MIRROR_PROFILE
profile: VLC_MIRROR_MAC_PROFILE // Default to macOS (primary deployment platform)
},
{
name: 'powerpoint_win_extend',