我正在尝试在我的 Swift (2.x)、iOS 9 项目中使用 YTPlayerView,但我只能显示带有播放符号的视频预览。单击符号时没有任何反应。
playerView.loadWithVideoId("someId")
我正在尝试在我的 Swift (2.x)、iOS 9 项目中使用 YTPlayerView,但我只能显示带有播放符号的视频预览。单击符号时没有任何反应。
playerView.loadWithVideoId("someId")
这是一些以前版本的YTPlayerView
.
更新您的 Podfile 以指向 repo 头并更新 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: [:])