IOS x-callback-url Second Callback Load Failure
x-callback-url video playback fails after the first time the app returns to the originating app.
Steps to view error. 1 ) from a third party app execute a x-callback-url callback command with a success scheme specified example: "vlc-x-callback://x-callback-url/stream?x-success=whitetailr-a%3A%2F%2Fsuccess&x-error=whitetailr-a%3A%2F%2Ferror&url=https%3A%2F%2Fdl.dropboxusercontent.com%2Fu%2F41567853%2FVLCBugCallbackFailSecondVideo.mp4
2 ) Once the x-success scheme has returned you to the app that initiated the playback, run another scheme request like the first
The Result: VLC will lock up and fail to play the video. On some occasions the app will return to the app that initiated the request and you will hear the video audio playing in the background (you will not see it, you will be in the app that initiated the playback).
Here I explain and demonstrate the bug in a simple app.
https://dl.dropboxusercontent.com/u/41567853/VLCBugCallbackFailSecondVideo.mp4
SWIFT 2 Code that calls the Scheme:
var encodedQueryParam_URL:String = "https://dl.dropboxusercontent.com/u/41567853/VLCBugCallbackFailSecondVideo.mp4"
encodedQueryParam_URL=encodedQueryParam_URL.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet())!
print("escapedString: \(encodedQueryParam_URL)")
var encodedQueryParam_SUCCESS:String = "whitetailr-a://success"
encodedQueryParam_SUCCESS=encodedQueryParam_SUCCESS.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet())!
print("escapedString: \(encodedQueryParam_SUCCESS)")
var encodedQueryParam_ERROR:String = "whitetailr-a://success"
encodedQueryParam_ERROR=encodedQueryParam_ERROR.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet())!
print("escapedString: \(encodedQueryParam_ERROR)")
let url:NSURL=NSURL(string: "vlc-x-callback://x-callback-url/stream?x-success=\(encodedQueryParam_SUCCESS)&x-error=\(encodedQueryParam_ERROR)&url=\(encodedQueryParam_URL)")!
UIApplication.sharedApplication().openURL(url)
Note: in the app I have specified "whitetailr-a" as the Scheme in the "URL Types"