youtube / youtube-ios-player-helper

Lightweight helper library that allows iOS developers to add inline playback of YouTube videos through a WebView
Other
1.64k stars 680 forks source link

didChangeToState Delegate method not getting fired #404

Open pathikhb opened 4 years ago

pathikhb commented 4 years ago

Using the latest version of YTPlayerView. The youtube videos load fine in the player, however, I noticed that when I pause or do other actions, the "didChangeToState" delegate method never gets fired. What am I doing wrong?

brol1dev commented 3 years ago

I tested the latest version of the library (1.0.2) with our sample app and didChangeToState delegate method is working fine.

Check the sample app which is located in https://github.com/youtube/youtube-ios-player-helper/tree/master/Project/youtube-player-ios-example. Try to see if you have any differences. Notice that you need to set a class as the delegate to receive delegate method calls (for example https://github.com/youtube/youtube-ios-player-helper/blob/master/Project/youtube-player-ios-example/youtube-player-ios-example/SingleVideoViewController.m#L32).