Quantcast
Channel: UIWebView loadHTMLString for playing video file - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Mike for UIWebView loadHTMLString for playing video file

$
0
0

Try this code:

  NSString *html = @"\<html><head>\<style type=\"text/css\">\  body {\  background-color: transparent;\  color: white;\  }\</style>\</head><body style=\"margin:0\">\<embed id=\"yt\" src=\"http://www.youtube.com/v/6eK-W32IME0?fs=1&hl=en_US&enablejsapi=1\" type=\"application/x-shockwave-flash\" \  width=\"320\" height=\"200\"></embed>\</body></html>";  // Load the html into the webview  [videoView loadHTMLString:html baseURL:nil];

Also, I have found that the "youtu.be" does not work properly if your testing on an American iOS. It needs to be localized.

Mike


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>