Allow landscape for Youtube embedded video Objective C -


i have app supports portrait have embedded youtube videos should have possibility play in landscape, can't find solution this.. code webview yt video loaded:

ytview = [[uiwebview alloc] initwithframe:cgrectmake(0,0,self.view.frame.size.width,170)];         ytview.delegate = self;         [ytview setallowsinlinemediaplayback:yes];         [ytview setmediaplaybackrequiresuseraction:no];          [_scrollingview addsubview:ytview];          nsstring* embedhtml = [nsstring stringwithformat:@"\                                <html>\                                <body style='margin:0px;padding:0px;'>\                                <script type='text/javascript' src='http://www.youtube.com/iframe_api'></script>\                                <script type='text/javascript'>\                                function onyoutubeiframeapiready()\                                {\                                ytplayer=new yt.player('playerid',{events:{onready:onplayerready}})\                                }\                                function onplayerready(a)\                                { \                                a.target.playvideo(); \                                }\                                </script>\                                <iframe id='playerid' type='text/html' width='%f' height='%d' src='http://www.youtube.com/embed/%@?enablejsapi=1&rel=0&playsinline=1&autoplay=1' frameborder='0'>\                                </body>\                                </html>", self.view.frame.size.width, 170, needle];         [ytview loadhtmlstring:embedhtml baseurl:[[nsbundle mainbundle] resourceurl]]; 

does have solution problem?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -