在阅读LISTENING FOR VIDEO PLAYBACK WITHIN A WKWEBVIEW后,我想做类似的操作(快速操作),但是由于陈旧的引用,我怀疑这失败了;这出现在我的viewDidLoad()
// hack to see any notification looking for [AV]Player[View[Controller]]
NotificationCenter.default.addObserver(forName: nil, object: nil, queue: nil) { (_ note: Notification) in
if note.name.rawValue.contains("Player") {
Swift.print("note: \(note.name.rawValue)")
}
}
炸弹显然有些事情是不正确的;我正在尝试遵循类似的补丁程序,以获取玩家状态的通知。