How do Instagram videos and iOS apps play videos?

Without opening a full-screen video player?

Do they use web browsing? What is the video format?

+6
source share
2 answers

I looked at the Instagram application using Reveal and it looks like they are using AVPlayer , which allows them to customize it more than if they used UIWebView or MPMoviePlayerController .

+3
source

use / try below code that works, i was hoping.

 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 *htmlString = [NSString stringWithFormat:embedHTML, yourURLString, width,height];//set width and height [webView loadHTMLString:htmlStr baseURL:nil]; [self.view addSubview:webView]; 

or

use the second approach using the delegate method of the UIWebView class

allowInlineMediaPlayback

0
source

All Articles