ios - UIWebView加载HTML视频
ringa_lee
ringa_lee 2017-04-18 09:35:38
0
2
487

怎样用UIWebView的loadHTML方法加载视频?有embed标签,里面有视频链接。我用手机打的,完整标签复制不过来,希望有思路的或者做过的指点一下,万分感谢!

ringa_lee
ringa_lee

ringa_lee

reply all (2)
伊谢尔伦

NSString *url=@"your url";
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
self.webview.scrollView.bounces = NO;
[self.webview setMediaPlaybackRequiresUserAction:NO];

    Peter_Zhu

    When UIWebView opens a video link, it will jump to MPMoviePlayerViewController by default. You can directly create an MPMoviePlayerViewController to load the video

    MPMoviePlayerViewController *moviePl = [[MPMoviePlayerViewController alloc] initWithContentURL:URL];
    [self presentMoviePlayerViewControllerAnimated:moviePl];

    You can try it

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!