Reputation: 994
i am new to ios. and in my app i want to play youtube video. but i dont want to use webview. reason is when youtube video stop its showing suggestion of other video.so is there any possible way to stop that suggestion? or may be stop webview when video is finish. or there is any other way to play youtube video without uiwebview. by using youtube video url. so what i want is 1> possible to stop showing suggestion after stop video in uiwebview.
otherwise
2> any other possibility to play youtube video without uiwebview using youtube video url.
Upvotes: 1
Views: 705
Reputation: 4513
You should use the official YouTube helper library.
https://developers.google.com/youtube/v3/guides/ios_youtube_helper
YouTube requires to be played via UIWebView, so that they can do validation and other important stuff.
As for the suggestions at the end, you can detect when a video state change with a delegate method: (void)playerView:(YTPlayerView *)playerView didChangeToState:(YTPlayerState)state
Upvotes: 1