How to switch audio to your TV when you connect it over HDMI
Use KeyRoutines' Display changed trigger for connected and disconnected monitors. If Monitor connected says the TV is on, Wait until with Audio device connected waits for its HDMI audio and Set default audio device switches to it; otherwise it switches back to your speakers.
Steps
- 1
Watch the displays
Add Display changed set to connected or disconnected.
- 2
Is the TV on?
Add an If with Monitor connected for the TV.
- 3
Wait for its audio
Add Wait until with Audio device connected for the TV's audio device, with a 15-second timeout.
- 4
Switch to the TV
Add Set default audio device with the TV.
- 5
Switch back
In the Else branch, add Set default audio device with your speakers.
Tips
- Add Restore layout to move windows off the TV, or Move and resize to put a video player on it.
Questions
- Can it change the resolution for the TV too?
- Yes, with KeyRoutines Pro's Set display mode step.
- Does it work for a monitor with speakers?
- Yes. Any display whose audio shows up in Windows' sound devices works the same way.