Page 1 of 1
the x-success parameter load or refresh the previous page
Posted: 10 Jun 2015 04:34
by cdhknetz
Hello,
i try the newest function with the following url to make the integration with my web-App:
vlc-x-callback://x-callback-url/ACTION?url=...&PARAMETER=...
The question is when i click the "done" button, it returns back to my APP but it refresh the preivious page. The feeling is not good. So could it be quietly returned back to the previous page?
thanks
Re: the x-success parameter load or refresh the previous page
Posted: 12 Jun 2015 11:51
by fkuehne
No, because what's happening is that it tells the OS to reveal the URL you provide, so it is up to Safari / your app to handle the situation correctly as in reloading or not reloading.
Re: the x-success parameter load or refresh the previous page
Posted: 12 Jun 2015 15:59
by cdhknetz
No, because what's happening is that it tells the OS to reveal the URL you provide, so it is up to Safari / your app to handle the situation correctly as in reloading or not reloading.
Dear Felix,
thanks for your reply. Yes, in my webapp, i made the URL just like:
Code: Select all
vlc-x-callback://x-callback-url/stream?url=rtsp://xyz.3gp&x-success=webapp://?openurl=
when the "openurl" parameter not filled (leave blank), then my webapp not reloading. But even that, the vlc reload it! I don't know how the x-success works? when the string contains "://", reload?
before i try the vlc for ios, i use another ios-player named "Goodplayer". It has also the URL scheme "appCallback=..." which works perfect for my situation.
But the problem is: sometimes the "Goodplayer" crashes...
Re: the x-success parameter load or refresh the previous page
Posted: 14 Jun 2015 17:41
by fkuehne
Well, I don't have a web-app to test this with. VLC's source code is open so you could sneak in a fix or give me access to your web-app.
Re: the x-success parameter load or refresh the previous page
Posted: 16 Jun 2015 14:57
by cdhknetz
Well, I don't have a web-app to test this with. VLC's source code is open so you could sneak in a fix or give me access to your web-app.
Dear Felix,
i think i found the bug/issue for that!
in the file "VLCAppDelegate.m" wrote the x-callback-url function:
Code: Select all
for (NSString *entry in [url.query componentsSeparatedByString:@"&"]) {
NSArray *keyvalue = [entry componentsSeparatedByString:@"="];
if (keyvalue.count < 2) continue;
NSString *key = keyvalue[0];
NSString *value = [keyvalue[1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
if ([key isEqualToString:@"url"])
movieURL = [NSURL URLWithString:value];
else if ([key isEqualToString:@"filename"])
fileName = value;
else if ([key isEqualToString:@"x-success"])
successCallback = [NSURL URLWithString:value];
else if ([key isEqualToString:@"x-error"])
errorCallback = [NSURL URLWithString:value];
}
for the value parsing here should be some problem. Because you do the String split with "="!
in my situation, the "x-success" paramter is :
so the x-success after the string split should be
the last "=" missed!
please fix that, because now i have no develop-enviroment for ios.
thank you very much!
Re: the x-success parameter load or refresh the previous page
Posted: 16 Jun 2015 18:26
by dfuhrmann
That looks wrong. For me, it looks like you should url-encode all special characters inside inner urls / parameters. (I do not know if this is implemented this way in the current version of VLC for iOS, though.)
Re: the x-success parameter load or refresh the previous page
Posted: 17 Jun 2015 00:58
by cdhknetz
OK, i See! the character "=" should be "%3d" in the x-success.
thank you, dfuhrmann!