Find out if device is playing #335
-
Hello, I have made a simple Bluetooth speaker with a touch display, and I want to implement a play/pause button. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hmm, I am not able to see any issue. To me it makes perfect sense that you can only push play() on something that is stopped or suspended and that you can stop() only something that is playing. I would suggest that you deactivate the buttons that are not valid at the actual state. |
Beta Was this translation helpful? Give feedback.
Hmm, I am not able to see any issue. To me it makes perfect sense that you can only push play() on something that is stopped or suspended and that you can stop() only something that is playing. I would suggest that you deactivate the buttons that are not valid at the actual state.
I would recommend to use the set_on_audio_state_changed() callback method so that you are informed about state changes.