Only on the phone, when wowza player is running, network call to our API server does not get return value from the server. If I make the same our server call, after wowza player.stop , it works again. Any idea or previous similar reported issues you know ? I know it is very strange.
I installed proxy server and found that server return data to client
I tried 1027 sample SwfitPlayerSampleApp. I changed Mute button to invoke the the network call to some third party http entry. As I said , if player is not running we can see , as soon as we press mute.
data = 347 bytes
{“args”:{“foo1”:“bar1”,“foo2”:“bar2”},“headers”:{“x-forwarded-proto”:“https”,“host”:“postman-echo.com”,“accept”:"/",“accept-encoding”:“br, gzip, deflate”,“accept-language”:“en-us”,“user-agent”:“PlayerSampleApp.swift/201807091354 CFNetwork/975.0.3 Darwin/18.2.0”,“x-forwarded-port”:“443”},“url”:“https://postman-echo.com/get?foo1=bar1&foo2=bar2”}
data = Optional(347 bytes)
error = nil
But when player is running, network callback is not call, until I stop the wowza player
I changed muteButton method in the sample to the following.
@IBAction func didTapMuteButton(_ sender:AnyObject?) {
let url = URL(string: “https://postman-echo.com/get?foo1=bar1&foo2=bar2”);
var request = URLRequest(url: url!)
request.httpMethod = “GET”
let configuration = URLSessionConfiguration.ephemeral
let session = URLSession(configuration: configuration, delegate: nil, delegateQueue: OperationQueue.main)
let task = session.dataTask(with: request, completionHandler: { [weak self] (data: Data?, response: URLResponse?, error: Error?) -> Void in
if let data = data {
print(“data = (data)” );
let str = String(data: data, encoding: String.Encoding.utf8) ?? “Data could not be printed”
print(str)
}
print(“data = (data)” );
print(“error = (error)” );
// Parse the data in the response and use it
})
task.resume()
//self.player.muted = !self.player.muted
//let muteButtonImage = UIImage.init(named: self.player.muted ? “volume_mute” :“volume_unmute”)
//self.muteButton.setImage(muteButtonImage, for: UIControlState.normal)
//self.volumeSlider.isEnabled = !self.player.muted
}