Cuando escucho música en iTunes, la música se detiene automáticamente cuando se realiza una llamada de Skype. Recientemente cambié a Spotify para mi recurso de música. ¿Puedo tener la misma función de pausa con Spotify que con iTunes?
Hay múltiples formas de lograr esto. Aquí hay dos posibles soluciones:
pitón _ Esto ya ha sido respondido en esta pregunta de desbordamiento de pila .
simplificar _ Una de las características de Simplify es la pausa automática en las llamadas de Skype:
Si está utilizando Mac OS (OS X), pruebe este AppleScript que desarmé rápidamente (tenga en cuenta que no soy realmente un desarrollador de OS X y mi conocimiento de AppleScript es, por decir lo menos, 'intermedio')
https://github.com/jhuseinovic/skype-spotify-ctrl
(*
This script was developed by John Huseinovic (john@huseinovic.net)
The purpose of the script is to pause any playing track in Spotify when there is a active/incoming call in skype and resume playing after the call is finished.
The script will only monitor if the both Skype and Spotify are running!
*)
set spotify_status to null
set notificationTitle to "Skype-Spotify Controller"
set call_started to false
set music_was_playing to false
repeat
if application "Skype" is running and application "Spotify" is running then
tell application "Skype"
set calls to «event sendskap» given «class cmnd»:"SEARCH ACTIVECALLS", «class scrp»:"AnsweringScript"
set callID to last word of calls
if callID is not "CALLS" then
using terms from application "Spotify"
set spotify_status to the player state of application "Spotify" as string
end using terms from
set status to «event sendskap» given «class cmnd»:"GET CALL " & callID & " STATUS", «class scrp»:"AnsweringScript"
set caller to «event sendskap» given «class cmnd»:"GET CALL " & callID & " PARTNER_HANDLE", «class scrp»:"AnsweringScript"
set call_started to true
#log "set call_started to " & call_started
if spotify_status = "playing" then
set music_was_playing to true
display notification "Active call with " & last word of caller & "! Spotify was " & spotify_status & ", going to pause it." with title notificationTitle
tell application "Spotify" to pause
end if
else
#log "call_started is " & call_started
if call_started is true and music_was_playing is true then
display notification "Detected terminated Skype call, resuming Spotify! Enjoy =)" with title notificationTitle
tell application "Spotify" to play
end if
set call_started to false
end if
end tell
delay 1
else
delay 10
end if
end repeat
Ruscos