I try to have a simple toggle script for Play and Pause action on the same button.
Means my Bluray player has Pause and Play separated and there is no Play/Pause toggle IR code.
Therefor I want to put both IR codes on the same button and use it as ping/pong.
When entering the page I would like to have the related button showing the "Pause" symbol. As soon as I execute this button it should send the Pause IR code and then switch this button to "Play" including changing the symbol. If I then execute this new play button it should execute the Play IR code and switch then back to the initial pause function.
The code I used / found related to that is made power tracking which I do not need as I do not need to track actual status.