-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppleTV3,1 'POST Photo' protocol Not Working anymore #157
Comments
Adding more info about AppleTV3,1 here:
|
If I try to send the image using cURL, I can see a Black Screen on the TV, and that is what I get from AppleTV3,1
Look at the cURL request:
The
|
I found out that Open Airplay PHP library works fine: https://github.com/jamesdlow/open-airplay
but the Shell example has the same issue that mine ( openairplay/open-airplay#8 )
The result is a black screen /disconnect. For some reason the PHP library works fine: https://github.com/jamesdlow/open-airplay/blob/master/PHP/airplay.php |
@loretoparisi, thanks for investigation and comments! We'll try to reproduce and fix it. |
Any news on this issue? |
I'm testing this on |
I can reproduce it now on OS |
OK, the problem is that ConnectSDK uses the |
Fixed in e05bfb5 and ConnectSDK/Connect-SDK-iOS-Lite@5916ff3. Merged into @loretoparisi, thanks for the bug report. |
@loretoparisi, please confirm the fix. |
thank you @eunikolsky going to check it out! |
So I have tried the Sampler App with the dev branch. 2015-06-07 19:47:26.297 ConnectSDKSampler[8680:874431] display photo failure: A generic error occured: STATUS CODE 404 MESSAGE:HTTP/1.1 404 Not Found The 404 error was not related to the image url that it works: http://ec2-54-201-108-205.us-west-2.compute.amazonaws.com/samples/media/photo.jpg, so I assume it is the protocol as you stated. In fact it was the POST method instead of PUT in the - (void) displayImageWithMediaInfo:(MediaInfo *)mediaInfo success:(MediaPlayerSuccessBlock)success failure:(FailureBlock)failure
{
_assetId = [[CTGuid randomGuid] stringValue];
NSString *commandPathComponent = @"photo";
NSURL *commandURL = [self.service.serviceDescription.commandURL URLByAppendingPathComponent:commandPathComponent];
ServiceCommand *command = [ServiceCommand commandWithDelegate:self target:commandURL payload:nil];
command.HTTPMethod = @"POST"; // Here with PUT it works :) Have you merged that file as well? That said,
|
@loretoparisi, have you updated the |
Yes, that was. I think we can close this issue. |
It seems that on AppleTV3,1 devices:
The 'Photo' protocol is not working anymore.
Media Control for "Video" and "Audio" works.
I's easy to test it. Just use the "Connect SDK Sampler" app against a AppleTV3,1 device and send a photo then.
The app will log an error:
2015-05-22 17:10:38.286 ConnectSDKSampler[8926:824787] display photo failure: A generic error occured
I get the same error using the old AirPlayKit ( r0th/AirplayKit#4 ), so it seems to be a Async Socket error from the AppleTV side to me.
The 'photo' protocol works fine with AirPlay compatible devices like "AirServer" ( http://www.airserver.com/ ).
Also, the "photo" protocol, works fine on AppleTV3,1 with Erica Sadun's AirFlick utility ( rica Sadun's AirFlick ). This seems very weird, since I assume this app is not updated from a while.
I add here that sending a photo image on Apple TV is sending a socket message like
with the image is of mime type jpeg or png.
Regarding ConnectSDK, the classes involved are
AirPlayServiceHTTP.m
andAirPlayServer.m
The image is sent by class method:
- (void) displayImageWithMediaInfo:(MediaInfo *)mediaInfo success:(MediaPlayerSuccessBlock)success failure:(FailureBlock)failure
The error that is trapped is a
ConnectError
and it has a status code of typeConnectStatusCode
that is not in the enum, so then you get here
in class method
+ (NSError *) generateErrorWithCode:(ConnectStatusCode)code andDetails:(id)details
This error is raised by
AirPlayServiceHTTP.m
in method:- (int) sendCommand:(ServiceCommand *)command withPayload:(id)payload toURL:(NSURL *)URL
due to a HTTP response code not 200:
where the HTTP Response status was 404 / Not Found.
Here are more debugging info about this request to AirServer
The text was updated successfully, but these errors were encountered: