Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Autoplay the Youtube video in UIWebview in iOS

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.04k
    Comment on it

    if you are using the UIWebview and want to autoplay the video from url then just add the "autoplay=1" at the end of the url.

    Here is the code:

    NSString *url=@"https://www.youtube.com/watch?v=vs3sVrm_W4o&autoplay=1";
    
    
    [self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
    self.webview.scrollView.bounces = NO;
    [self.webview setMediaPlaybackRequiresUserAction:NO]; 

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: