Using YTHelper view to play youtube video, issues we are facing are
if we pause video it still starts playing again automatically
when video is playing in full screen, if user clicks on done button, it stops playing and after few seconds it starts playing automatically in full screen.
NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @0,
@"showinfo" : @0,
@"autohide" : @0,
@"rel" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:@"M7lc1UVf-VE" playerVars:playerVars];
Sample code attached for reference.
You have to remove window.setInterval(forcePlay, 5000); from the YTPlayerView-iframe-player.html file and it should fix the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With