Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube YTHelper view video playback starting automatically after pause

Using YTHelper view to play youtube video, issues we are facing are

  1. if we pause video it still starts playing again automatically

  2. 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.

like image 884
prasad Avatar asked Dec 29 '25 18:12

prasad


1 Answers

You have to remove window.setInterval(forcePlay, 5000); from the YTPlayerView-iframe-player.html file and it should fix the problem.

like image 56
valbu17 Avatar answered Dec 31 '25 08:12

valbu17



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!