我正在尝试在我的项目中集成一个库,这里是github https://github.com/rinov/YoutubeKit/tree/0.1.2的链接
但我得到这个错误“在'super.init'调用之前”自我使用的方法调用'defaultConfiguration'在这两个方法中
public init(frame: CGRect = .zero, playerVars: [String: AnyObject]) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
self.playerVars = playerVars
}
public init(frame: CGRect = .zero, playerVars: [VideoEmbedParameter] = []) {
super.init(frame: frame, configuration: defaultConfiguration())
commonInit()
guard !playerVars.isEmpty else { return }
var params: [String: AnyObject] = [:]
playerVars.forEach {
let property = $0.property
params[property.key] = property.value
}
self.playerVars = params
}
有什么帮助吗?