the x-success parameter load or refresh the previous page

iOS, iPad, iPhone, tvOS specific usage questions
cdhknetz
Blank Cone
Blank Cone
Posts: 15
Joined: 26 Jul 2014 14:56

the x-success parameter load or refresh the previous page

Postby cdhknetz » 10 Jun 2015 04:34

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

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: the x-success parameter load or refresh the previous page

Postby fkuehne » 12 Jun 2015 11:51

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

cdhknetz
Blank Cone
Blank Cone
Posts: 15
Joined: 26 Jul 2014 14:56

Re: the x-success parameter load or refresh the previous page

Postby cdhknetz » 12 Jun 2015 15:59

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...

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: the x-success parameter load or refresh the previous page

Postby fkuehne » 14 Jun 2015 17:41

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

cdhknetz
Blank Cone
Blank Cone
Posts: 15
Joined: 26 Jul 2014 14:56

Re: the x-success parameter load or refresh the previous page

Postby cdhknetz » 16 Jun 2015 14:57

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 :

Code: Select all

x-success=webapp://xx?openurl=
so the x-success after the string split should be

Code: Select all

x-success=webapp://xx?openurl
the last "=" missed!

please fix that, because now i have no develop-enviroment for ios.
thank you very much!

dfuhrmann
Developer
Developer
Posts: 1183
Joined: 02 Jul 2012 11:09

Re: the x-success parameter load or refresh the previous page

Postby dfuhrmann » 16 Jun 2015 18:26

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.)

cdhknetz
Blank Cone
Blank Cone
Posts: 15
Joined: 26 Jul 2014 14:56

Re: the x-success parameter load or refresh the previous page

Postby cdhknetz » 17 Jun 2015 00:58

OK, i See! the character "=" should be "%3d" in the x-success.

thank you, dfuhrmann!


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 39 guests