获取电影路径

时间:2014-05-01 20:59:15

标签: ios objective-c webview uiwebview

我的问题是:我怎样才能获得使用WebView播放的嵌入式电影的完整路径? 我有链接到嵌入视频。比如http://www.youtube.com/embed/eZ-SBtUInVY

然后我播放它我从 Apple 获得NSLog,如:

  setting movie path: http://r2---sn-gvnuxaxjvh-3bqe.googlevideo.com/videoplayback?expire=1399003124&mv=m&source=youtube&ratebypass=yes&signature=471986566CED342721806219ED9832F2E1472285.6A36B27ABA52E84481624C0DC9E49A1CBA189035&key=yt5&mt=1398980522&id=799f9206d5089d56&sver=3&fexp=903903%2C911429%2C930802%2C945110%2C916623%2C919116%2C937417%2C913434%2C923341%2C936923&sparams=id%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&upn=uSChP8VUmjk&itag=18&mws=yes&ipbits=0&ip=178.68.55.93&ms=au&cpn=y6Ydw8KJGizaTSA7&ptk=theorchardmusic&oid=J8vAyKuNSYBIN_9RIdxggQ&pltype=contentugc&c=WEB&cver=html5

  RTCReporting: resolve from http://pancake.apple.com/bags/hls?version=4.12

然后有时会出错。 - 我在这里看了这个,发现可以玩嵌入webView

我的代码

UIWebView *webView = [[UIWebView alloc]initWithFrame: (CGRectEqualToRect(frame, CGRectZero) ? CGRectMake(50, 50, 250, 250) : frame)];
webView.scalesPageToFit = YES;
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
[webView loadRequest:request];
[self.view addSubview:webView];

0 个答案:

没有答案