¡@

Home 

2014/10/15 ¤U¤È 10:16:06

iphone Programming Glossary: youtubevideohtml

Objective c - How to autoplay a youtube video in a UIWebView

http://stackoverflow.com/questions/15717754/objective-c-how-to-autoplay-a-youtube-video-in-a-uiwebview

inside it. when the user tap the play button I add a UIWebView to this cell and play a youtube video. static NSString youTubeVideoHTML @ html body style margin 0 iframe class youtube player type text html width 0.0f height 0.0f src http www.youtube.com embed.. embed @ frameborder 0 iframe body html void playVideoWithId NSString videoId NSString html NSString stringWithFormat youTubeVideoHTML self.frame.size.width self.frame.size.height videoId self loadHTMLString html baseURL nil The problem This code doesn't.. again this code mostly based on this post I just changed it to load from a string instead of a file static NSString youTubeVideoHTML @ DOCTYPE html html head style body margin 0px 0px 0px 0px style head body div id player div script var tag document.createElement..

UIWebView modal YouTube player “Done” button action

http://stackoverflow.com/questions/5959367/uiwebview-modal-youtube-player-done-button-action

alloc initWithFrame CGRectMake 0 0 320 220 youTubeWV loadRequest NSURLRequest requestWithURL sourceURL NSString youTubeVideoHTML NSString stringWithFormat @ embed id yt src http www.youtube.com watch v CadgUJRZfEE type application x shockwave flash.. yt src http www.youtube.com watch v CadgUJRZfEE type application x shockwave flash width 320 height 220 embed NSString youTubeVideoHTML @ html head meta name viewport content initial scale 1.0 user scalable no width 220 head body style background #FFFFF margin.. x shockwave flash wmode transparent width 320 height 220 embed object div body html youTubeWV loadHTMLString youTubeVideoHTML baseURL nil self.view addSubview youTubeWV The video is displayed without problem in the modal view quicktime player that..