답변:
다음을 사용하여 시도 할 수 이탈을 간단한 AppleScript로 설정 set volume output volume 0
헤드폰을 분리 할 때 트리거 할 수 있습니다. 물론 헤드폰을 다시 연결하면 볼륨을 다시 올리도록 다른 트리거를 설정할 수 있습니다.
Breakaway는 더 이상 웹 사이트에서 유지 관리되지 않지만 Sourceforge에서 계속 다운로드 할 수 있습니다 . 잭을 연결 해제하면 스피커를 음소거하고 Spotify를 일시 중지하고 잭이 연결되면 Spotify를 재생하기 위해 다음 두 개의 AppleScript와 연결했습니다. makeuseof 지침에 따라 AppleScript를 작성하고 Breakaway에 연결하는 방법을 확인하십시오.
jack-disconnected.scpt
set volume output volume 0
tell application "System Events"
set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
tell application "Spotify" to pause
end if
jack-connected.scpt
tell application "System Events"
set MyList to (name of every process)
end tell
if (MyList contains "Spotify") is true then
tell application "Spotify"
if player state is paused then play
end tell
end if