From fc03b50708582ccce8c1cc93040e69877ad8d9ba Mon Sep 17 00:00:00 2001 From: Sam Bostock Date: Mon, 21 Jul 2025 10:09:02 -0400 Subject: [PATCH] Also pause music on `participant-joined` The existing triggers pause music (Apple Music & Spotify, respectively) on `call-started`. However, a user can join a Room and be waiting for a while for other participants to join, and may choose to resume their music. Therefore, it makes sense to also pause music on `participant-joined`. --- triggers/pause-music/README.md | 2 +- triggers/pause-music/participant-joined | 3 +++ triggers/pause-spotify/README.md | 2 +- triggers/pause-spotify/participant-joined | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 triggers/pause-music/participant-joined create mode 100755 triggers/pause-spotify/participant-joined diff --git a/triggers/pause-music/README.md b/triggers/pause-music/README.md index 2d6e91f..d0ea41f 100644 --- a/triggers/pause-music/README.md +++ b/triggers/pause-music/README.md @@ -1,3 +1,3 @@ # Pause Apple Music -This trigger automatically pauses Apple Music when a call starts. It will initially prompt for access to Apple Music, after which no additional setup is required. +This trigger automatically pauses Apple Music when a call starts, and when a participant joins. It will initially prompt for access to Apple Music, after which no additional setup is required. diff --git a/triggers/pause-music/participant-joined b/triggers/pause-music/participant-joined new file mode 100755 index 0000000..fce607e --- /dev/null +++ b/triggers/pause-music/participant-joined @@ -0,0 +1,3 @@ +#!/usr/bin/env osascript + +if application "Music" is running then tell application "Music" to pause diff --git a/triggers/pause-spotify/README.md b/triggers/pause-spotify/README.md index 7aa4cb2..7dabc36 100644 --- a/triggers/pause-spotify/README.md +++ b/triggers/pause-spotify/README.md @@ -1,3 +1,3 @@ # Pause Spotify -This trigger automatically pauses Spotify when a call starts. It will initially prompt for access to Spotify, after which no additional setup is required. +This trigger automatically pauses Spotify when a call starts, and when a participant joins. It will initially prompt for access to Spotify, after which no additional setup is required. diff --git a/triggers/pause-spotify/participant-joined b/triggers/pause-spotify/participant-joined new file mode 100755 index 0000000..96fe296 --- /dev/null +++ b/triggers/pause-spotify/participant-joined @@ -0,0 +1,3 @@ +#!/usr/bin/env osascript + +if application "Spotify" is running then tell application "Spotify" to pause