我试图在我的Swift(2.x),iOS 9项目中使用YTPlayerView,但我只能用播放符号显示视频预览。单击符号时没有任何反应。
playerView.loadWithVideoId("someId")
答案 0 :(得分:0)
这是YTPlayerView
的某些先前版本的错误。
更新您的Podfile以指向repo head并更新pod:
pod 'youtube-ios-player-helper', :git=>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head'
然后尝试再次调用loadWithVideoId
,或者使用空playerVars
字典:
self.playerView.loadWithVideoId("U5vgRJ0zK6Y")
或
self.playerView.loadWithVideoId("U5vgRJ0zK6Y", playerVars: [:])