Q
iPhone上
3
A
回答
6
的視頻的URL可能是問題。嵌入式視頻代碼是這樣
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>
通知的URL如何使用嵌入代替v的。
2
你的問題可能是YouTube的是基於Flash的,所以嵌入一個IFRAME是不會在iPhone上,不支持Flash的工作。 嘗試這樣的事情,而不是:的
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/A2V1WTF8tp4?hl=en&fs=1&autoplay=0&hd=1" width="620" height="3900">
<param name="movie" value="http://www.youtube.com/v/A2V1WTF8tp4" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<!-- Fallback content -->
<a href="http://www.youtube.com/watch?v=A2V1WTF8tp4">
<img src="http://img.youtube.com/vi/A2V1WTF8tp4/0.jpg" width="620" height="390" alt="Staff Gathers for Multicultural Springfest" />
</a>
</object>
0
我有一個UIWebView的子類來實現這一點,這是它如何工作的:
(在初始化:)
NSString* url = [NSString stringWithFormat: @"http://www.youtube.com/embed/A2V1WTF8tp4"];
CGRect theFrame = CGRectMake(0, 0, 400, 300);
NSString* embedHTML = [NSString stringWithFormat: @"<iframe width=%i height=%i src=%@ frameborder=10 allowfullscreen></iframe>", theFrame.size.width, theFrame.size.height, url];
[self loadHTMLString: embedHTML baseURL: nil]; // this method is part of UIWebView.
只要確保你的「視頻視圖」添加爲一個子視圖無論何種觀點擁有它。
相關問題
- 1. iPhone上
- 2. iPhone上
- 3. iPhone上
- 4. iPhone上
- 5. iPhone上
- 6. iPhone上
- 7. 在iPhone上安裝ipa iPhone
- 8. iphone:無法在iPhone上
- 9. iphone上的jquery.hover
- 10. iPhone上的libtask
- 11. 使iPhone上
- 12. Mcrypt在iPhone上
- 13. iPhone上的Fullcalendar
- 14. iPhone上的requestAnimationFrame
- 15. iphone上的ffmpeg
- 16. iPhone上的OpenSSL
- 17. RSA/ECB/iPhone上
- 18. iPhone上的FFmpeg
- 19. OpenCV.framewok在iPhone上
- 20. 在iPhone上
- 21. iphone上的caldav
- 22. 在iPhone上
- 23. .epub iPhone上
- 24. iPhone上的NSbeep()
- 25. iPhone上的UIModalPresentationFormSheet
- 26. iPhone上的Fork()
- 27. 使用iPhone上
- 28. iPhone上的libxml2
- 29. iPhone上的AudioSessionProperty
- 30. iPhone上的SSDP
類部分是沒有必要的,我只是複製它直接從YouTube博客[http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html] – 2011-06-03 23:30:49