i have this code for stream a video from my server :
import AVFoundation
import UIKit
import AVKit
class VideoController : UIViewController{
let avPlayerViewController = AVPlayerViewController()
var avPlayer : AVPlayer?
override func viewDidLoad() {
super.viewDidLoad()
playVideo();
}
func playVideo(){
let movieUrl : NSURL = NSURL(string : "http://---------")!;
self.avPlayer = AVPlayer(URL: movieUrl)
self.avPlayerViewController.player = self.avPlayer
self.avPlayerViewController.player?.play()
print("CI SIAMOOOOOOOOOOOOOOOOOOO");
}
}
the problem is that i can't see anything but able to hear the audio. What is the problem? sorry for bad english.