CopyPastor

Detecting plagiarism made easy.

Score: 1.8869483700020133; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-12-29
by jawadAli

Original Post

Original - Posted on 2017-09-26
by Bharath



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The problem seems to be with the App Transport security, after enabling it, it worked fine with the following sets of code in iOS 13, Also the above URL that you have provided seems to have associated https link, please use either https link or allow App Transport security
let avPlayerVC = AVPlayerViewController() let url = URL(string: "https://transom.org/wp-content/uploads/2004/03/stereo_40kbps.mp3?_=7")! let asset = AVURLAsset(url: url) let item = AVPlayerItem(asset: asset) let player = AVPlayer(playerItem: item) avPlayerVC.player = player present(avPlayerVC, animated: true) { player.play() }
But here I have used AVPlayerViewController and used the same instance of AVPlayer as you used in your code. I don't know how you are using the AVPlayer in your case, but the above case worked fine.
The problem seems to be with the App Transport security, after enabling it, it worked fine with the following sets of code in iOS 11, <br> Also the above URL that you have provided seems to have associated https link, please use either https link or allow App Transport security
let avPlayerVC = AVPlayerViewController() let url = URL(string: "https://transom.org/wp-content/uploads/2004/03/stereo_40kbps.mp3?_=7")! let asset = AVURLAsset(url: url) let item = AVPlayerItem(asset: asset) let player = AVPlayer(playerItem: item) avPlayerVC.player = player present(avPlayerVC, animated: true) { player.play() }
But here I have used AVPlayerViewController and used the same instance of AVPlayer as you used in your code.<br> I don't know how you are using the AVPlayer in your case, but the above case worked fine.

        
Present in both answers; Present only in the new answer; Present only in the old answer;