Neal Caffrey Neal Caffrey - 4 years ago 204
iOS Question

How to change embed video size while playing in UIWebView?

I have a

with size 250x160, which should play video from

NSString *videoURL = @"";
NSString *videoHTML = [NSString stringWithFormat:@"\
<embed src=\"%@\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"%f\" height=\"%f\">\
</body></html>", videoURL, self.web.frame.size.width-20, self.web.frame.size.height-20];

[self.web loadHTMLString: videoHTML baseURL: nil];

While playing video I want to resize the
. When I make it, for example 2 times bigger, embed video stays how it was 250x160. How can I resize it without restarting it?

Answer Source

try affineTransform.

webview.transform = CGAffineTransformMakeScale(2, 2);


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download