84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
怎样用UIWebView的loadHTML方法加载视频?有embed标签,里面有视频链接。我用手机打的,完整标签复制不过来,希望有思路的或者做过的指点一下,万分感谢!
ringa_lee
NSString *url=@"your url";[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];self.webview.scrollView.bounces = NO;[self.webview setMediaPlaybackRequiresUserAction:NO];
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
NSString *url=@"your url";
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
self.webview.scrollView.bounces = NO;
[self.webview setMediaPlaybackRequiresUserAction:NO];
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