Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Wednesday, March 23, 2016

UIWebview dos not playing mp4 Video

creative commons

a shared culture

To celebrate our 2008 fundraising campaign, Creative Commons has released ?A Shared Culture,? a short video by renowned filmmaker Jesse Dylan. Known for helming a variety of films, music videos, and the Emmy Award-winning ?Yes We Can? Barack Obama campaign video collaboration with rapper will.i.am, Dylan created ?A Shared Culture? to help spread the word about the Creative Commons mission.

In the video, some of the leading thinkers behind Creative Commons describe how the organization is helping ?save the world from failed sharing? through free tools that enable creators to easily make their work available to the public for legal sharing and remix. Dylan puts the Creative Commons system into action by punctuating the interview footage with dozens of photos that have been offered to the public for use under CC licenses. Similarly, he used two CC-licensed instrumental pieces by Nine Inch Nails as the video?s soundtrack music. These tracks, ?17 Ghosts II? and ?21 Ghosts III,? come from the Nine Inch Nails album Ghosts I-IV, which was released earlier this year under a Creative Commons BY-NC-SA license. (See attribution.)

Answer by Brendon for UIWebview dos not playing mp4 Video


Sounds like a codec issue. You can see what codecs the file uses if you open it in VLC on you computer , go to Window->Media Information->Codec Details. The answer here links to Apple's docs where you will find supported video and audio codecs:

https://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

https://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html

Answer by Vinny Coyne for UIWebview dos not playing mp4 Video


It may not be in an iPhone-friendly format.

Drag the mp4 file into iMovie and then click on Share -> Export Movie and select one of the iPhone-compatible formats.

Answer by Luke for UIWebview dos not playing mp4 Video


It may be a problem with the relative ../ path you're using. Try using a full absolute path - starting with http://.

Answer by Caleb for UIWebview dos not playing mp4 Video


One of the ways that video can fail to play in a UIWebView is if the web server hosting the video file doesn't support byte ranges. UIWebView doesn't download the entire .mp4 file at once; instead, it streams the video by requesting portions of the file. Most servers these days support byte ranges, but if yours doesn't, or if you've turned it off for some reason, you won't be able to serve video to an iOS device.

Answer by user2180698 for UIWebview dos not playing mp4 Video


I also have this problem,I have 2 .mp4 but one can use and one not, I try to format type file.mp4 to .mp4 for IPad and It's work,I think you should try.

Answer by MK HASAN for UIWebview dos not playing mp4 Video


To play mp4 video on iPhone programming is not very hard. Just we need to do ONE extra drag and drop.

please take a new single view project. then in the ViewController.m file just copy and paste this code

    #import "ViewController.h"       @interface ViewController ()       @end       @implementation ViewController     @synthesize webView;  - (void)viewDidLoad {  [super viewDidLoad];  // Do any additional setup after loading the view, typically from a nib.    CGRect screenRect = [[UIScreen mainScreen] bounds];    CGFloat screenWidth = screenRect.size.width;  CGFloat screenHeight = screenRect.size.height;    webView=[[UIWebView alloc]initWithFrame:CGRectMake(0,  0,screenWidth,screenHeight)];      NSURL *url = [[NSBundle mainBundle] URLForResource:@"testingHTML" withExtension:@"html"];  NSLog(@"%@",url);  [self.webView loadRequest:[NSURLRequest requestWithURL:url]];        // NSURL *nsurl=[NSURL URLWithString:url];  //NSURLRequest *nsrequest=[NSURLRequest requestWithURL:nsurl];  // [webView loadRequest:nsrequest];  [self.view addSubview:webView];            }    - (void)didReceiveMemoryWarning {  [super didReceiveMemoryWarning];  // Dispose of any resources that can be recreated.  }    @end  

Then create HTML file named as testingHTML.html

and copy and paste the following code in the HTML file

            

Thanks to Md Kamrul Hasan .....mdkamrul.hasan@marquette.edu

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.