ConnectSDK / Connect-SDK-iOS

iOS source project for Connect SDK
Apache License 2.0
176 stars 139 forks source link

Support Xbox One Console #108

Closed eunikolsky closed 9 years ago

eunikolsky commented 9 years ago

The Xbox 1 console has the DLNA support, so Connect SDK should be able to work with it. Need to test that.

eunikolsky commented 9 years ago

Xbox's response XML contains tags with prefixes different from expected:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:GetVolumeResponse xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><CurrentVolume xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui2">12</CurrentVolume></m:GetVolumeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

e.g., SOAP-ENV:Envelope instead of s:Envelope and m:GetVolumeResponse instead of u:GetVolumeResponse. The parsing should be fixed.

eunikolsky commented 9 years ago

Fixed the DLNA XML parser regarding the namespace in tags.

eunikolsky commented 9 years ago

Continuing testing, there is a lot of volume subscription errors like this:

2015-01-14 09:48:53.146 Connect SDK Sampler[22102:590468] -[DLNAService valueForVolumeKey:atChannel:inResponse:] [Line 234] Unexpected contents for volume notification ((null) object)
2015-01-14 09:48:53.146 Connect SDK Sampler[22102:590468] Subscribe Vol Error A generic error occured: Could not find volume in subscription response

However, most of the notifications are not related to volume at all, so no volume subscription callback should be called. The issue is with the subscription URLs. For Sonos we use:

CALLBACK: <http://192.168.1.12:49291/MediaRenderer/RenderingControl/Event>\r\n
CALLBACK: <http://192.168.1.12:49291/MediaRenderer/AVTransport/Event>\r\n

and for Xbox:

CALLBACK: <http://192.168.1.12:49291/upnphost/udhisapi.dll?event=uuid:0f4810a6-4fb4-4fdf-8acc-81e751e7ec8a+urn:upnp-org:serviceId:RenderingControl>\r\n
CALLBACK: <http://192.168.1.12:49291/upnphost/udhisapi.dll?event=uuid:0f4810a6-4fb4-4fdf-8acc-81e751e7ec8a+urn:upnp-org:serviceId:AVTransport>\r\n

DLNAHTTPServer checks the URL path only when deciding which callbacks to call, so all notifications go through all the callbacks, which is wrong.

eunikolsky commented 9 years ago

Fixed the subscriptions issue.

eunikolsky commented 9 years ago

Merged into dev. Commit https://github.com/ConnectSDK/Connect-SDK-iOS/commit/5fd5f1a25feb40b46db5c4e10126b0b5fde74d7e