原理很简单,其实就是用webView加载一段html代码
http://v.youku.com/v_show/id_XMTI1NzE0MzMwMA==.html?from=y1.7-1.2 加粗部分即为视频的id
var webView = UIWebView()
webView.frame = CGRectMake(0, 0, 320, 180)
let html = String(format: "<iframe height='180' width='320' src='http://player.youku.com/embed/XMTI1NzE0MzMwMA==' frameborder=0 allowfullscreen></iframe>")
webView.loadHTMLString(html, baseURL: nil)
self.view.addSubview(webView)