0

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")
JAL
  • 41,701
  • 23
  • 172
  • 300
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434

1 Answers1

0

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: [:])
JAL
  • 41,701
  • 23
  • 172
  • 300