I have written an iOS app that communicates with a python script running on a pi via mqtt.
The python script plays videos via an instance of OMXPlayer and automatically sends information about the video to the iOS app.
I am curious to know wether there is a way for the Python script/mqtt on the pi to respond to a mqtt message while OMXPlayer is playing on the pi. It seems that the OMXPlayer, at least in the Python script as it is at the moment, seems to block the broker from responding.
What I would like to have happen is that when the iOS app asks, the pi responds with "I am playing a video right now".
I presume the solution might have to do with threading and inter-process communication on the pi, but I just don't know enough about those topics to think about the problem.
Can someone point me in the direction of an answer? Thanks.