3

ビデオ画面の品質が異なる多数の URLがありArray、ユーザーが使用している現在のネットワーク速度に応じてリンクを選択します。再生中でもネットワークが頻繁に変更されるため、ストリーミング中にリンクを変更するにはどうすればよいですか?

これは以下の私のコードです。リンクは、ユーザーがどのネットワークであるかがわかった後に受信されます。

 NSOperationQueue.mainQueue().addOperationWithBlock({ () -> Void in
        let player = AVPlayer(URL: NSURL(string: stringUrl)!)
        self.playerViewController = AVPlayerViewController()
        self.playerViewController!.player = player
        currentView.view.window?.rootViewController?.presentViewController(self.playerViewController!, animated: true, completion: nil)
    })
4

0 に答える 0