0
votes

I am trying to use YTPlayerView in my Swift (2.x), iOS 9 project but I am only able to show the video preview with the play symbol. Nothing happens when you click the symbol.

playerView.loadWithVideoId("someId")
1

1 Answers

0
votes

This was a bug with some previous versions of the YTPlayerView.

Update your Podfile to point to the repo head and update the pod:

pod 'youtube-ios-player-helper', :git=>'https://github.com/youtube/youtube-ios-player-helper', :commit=>'head'

Then try calling loadWithVideoId again, or with an empty playerVars dictionary:

self.playerView.loadWithVideoId("U5vgRJ0zK6Y")

or

self.playerView.loadWithVideoId("U5vgRJ0zK6Y", playerVars: [:])