objective c - youtube video embed in iphone app but giving me white empty box -
i trying embed youtube video in app , using function
- (void)embedyoutube:(nsstring *)urlstring frame:(cgrect)frame { nsstring *embedhtml = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent;\ color: white;\ }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; nsstring *html = [nsstring stringwithformat:embedhtml, urlstring, frame.size.width, frame.size.height]; uiwebview *videoview = [[uiwebview alloc] initwithframe:frame]; [videoview loadhtmlstring:html baseurl:nil]; [self.view addsubview:videoview]; }
also calling :
[self embedyoutube:@"http://www.youtube.com/watch?v=5abkqmqiyei" frame:cgrectmake(30, 200, 260, 200)];
but when run app gives me white empty box .
here question : how make sure embed working ?
i trying embed youtube video in app , using function also calling : but when run app gives me white empty box . here question : how make sure embed working ? | |||||||||||||||||||||
|