¿Se puede detener Spotify cuando se realiza una llamada de Skype, de forma similar a como lo hace iTunes?

3

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 musical. ¿Puedo tener la misma funcionalidad de pausa con Spotify que con iTunes?

    
pregunta Andra 14.05.2013 - 12:03

2 respuestas

4

Hay múltiples maneras de lograr esto. Aquí hay dos soluciones posibles:

respondido por el grg 15.05.2013 - 17:05
0

Si está utilizando Mac OS (OS X), intente este AppleScript, hice un rápido repaso (tenga en cuenta que no soy realmente un desarrollador de OS X y mi conocimiento de AppleScript es, por decir lo menos, "intermedio" )

enlace

(*
This script was developed by John Huseinovic ([email protected])
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
    
respondido por el jnovic 15.03.2017 - 18:15

Lea otras preguntas en las etiquetas