尝试开发视频播放器时收到此错误消息。
/Users/MNurdin/Documents/iOS/SwiftVideoPlayer/SwiftVideoPlayer/ViewController.swift:12:1: 输入' ViewController'不符合协议' MPMediaPlayback'
我的代码
import UIKit
import MediaPlayer
class ViewController: UIViewController, MPMediaPlayback { //error message here
var isPreparedToPlay: Bool = true
var currentPlaybackRate: Float = 0.0
var currentPlaybackTime: NSTimeInterval = 0.0
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
func play() {
}
func pause() {
}
func stop() {
}
func prepareToPlay() {
}
func beginSeekingBackward() {
}
func beginSeekingForward() {
}
func endSeeking() {
}
}
我在这里缺少什么?