I'm writing a control point for streaming from a NAS to an Audio player. I have succeeded in writing the code for loading and playing tracks, stopping and starting the player, but I don't understand how to handle the "Subscription Service" that is required for receiving events (presumably these will tell the Control Point when a track has finished playing or the player has stopped, for example).
The format for playing etc in b4a is, for example:
I have seen documents that refer to the following:
Are these headers? How to I write this in b4a?
How do I listen for the events? Is there something special I have to set up in http2utils?
Do I use the word "SUBSCRIBE" in place of "POST", or is it totally different?
I'm pretty proud of myself for having made it this far with the UPnP coding, but now feeling lost again!
Any help would be appreciated.
The format for playing etc in b4a is, for example:
B4X:
Dim UPnPReq As HttpJob
UPnPReq.Initialize("AVTAction " & CodeName, Me)
UPnPReq.PostString(ActionURL, Action)
UPnPReq.GetRequest.SetHeader("SOAPAction", sSOAPHeader)
UPnPReq.GetRequest.SetContentEncoding("utf-8")
UPnPReq.GetRequest.SetContentType("text/xml; charset=""utf-8""")
UPnPReq.GetRequest.Timeout = 5000
I have seen documents that refer to the following:
B4X:
SUBSCRIBE publisher path HTTP/1.1
HOST: publisher host:publisher port
CALLBACK:
NT: upnp:event
TIMEOUT: Second-requested subscription duration
Are these headers? How to I write this in b4a?
How do I listen for the events? Is there something special I have to set up in http2utils?
Do I use the word "SUBSCRIBE" in place of "POST", or is it totally different?
I'm pretty proud of myself for having made it this far with the UPnP coding, but now feeling lost again!
Any help would be appreciated.