Customizing the media player in iphone - iphone

In my iphone app i want to change the buttons of media player.for example (play/pause)button,(full screen button)etc.Is this possible.please help me.

I'm sorry but I'm afraid that you can only create you own.
You will need to hide the controller:
[moviePlayer setControlStyle:MPMovieControlStyleNone];
and use a UIToolbar.

Related

uibarbutton and popoverview on iPhone

I am looking for a great tutorial to implement a popoverview on iPhone all I found so far is talking about the ipad or is crashing
You cannot implement the UIPopover in iPhone.
Please refer UIElementGuidelines
For a nice popover tutorial check this site.
For popover in iPhone use the following Open source controls:
FPPopover
ModalView in iPhone
KGModal
MJPopupviewcontroller
UAmodalpanel
RNBlurmodalview
For more check this site
you cannot implement the standard popoverview in iphone. Have to make a custom view that replicate the popoverview.
Check these :
http://www.50pixels.com/blog/labs/open-library-fppopover-ipad-like-popovers-for-iphone/
This May help you great sample code you can find
https://github.com/takashisite/TSPopover
https://github.com/kyoshikawa/ZPopoverController
https://github.com/ddebin/DDPopoverBackgroundView
https://github.com/werner77/WEPopover

Using popover control in iPhone

pop = [[UIPopoverController alloc] initWithContentViewController:popoverView];
pop.delegate = self; //optional
CGSize size = CGSizeMake(300, 100); // size of view in popover…V2
pop.popoverContentSize = size;
[pop presentPopoverFromRect:control.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Youtube link: http://www.youtube.com/watch?v=1iykxemuxbk
It works fine in simulator, but crashes when running on iPhone.
I can easily get so many articles to implement on iPad, but on iPhone couldn't find a fruitful one. Plz help
UIPopOverController isn't available for iPhone. ONLY iPad.
UIPopOverController will not work for iPhone it will work on Ipad only
If you want to simulate a popover look-alike (e.g. Facebook app), on the iPhone, you will have to code it from scratch using UIViews and custom graphics.
As others said, the popover API is iPad-only.
A popover-like open source project that works on iPhone:
here it is
Try using WEPopover framework. Here is the link https://github.com/werner77/WEPopover
If you really want to use popover in iphone then try this library. This is pretty cool. I integrated with my ios app.
Custom popover controller for iphone

Handling of iAd in iphone?

I have some following requirements, I don't know can we do this in iPhone or not.
Requirements are like
1.Can i open ad in safari browser after click.
2.Can i open ad in application itself in webView.
3.If i open ad in webview in that if i click particular link that link can open in safari browser.
If anyone knows all this. please help me. I will appreciate. Thank u in advance.
This isn't how iAd works, with iAd you implement the ad banner, and Apple pushes you content to fill it with, which you have VERY limited control over.
To do what you're asking I recommend that you make your own ad, but not an iAd. Doing this you can make whatever you want(within reason) happen when the user clicks it.
Ex.
- (void)callUpAd
{
UIView *myAdSubView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 40)];
//add your ad material here
[self.view addSubview:myAdSubView];
}

iPhone MPMoviePlayer hide movie Control

hi i want hide movie control (Play - next - volume and ..)from MPMoviePlayer ...
what can i do ?
You can do this by this line of code
which hides the controls of the
player.
[player setMovieControlMode:MPMovieControlModeHidden];
Haven't tried it, but isn't there a setHidden:YES you can do?
iOS 3.2 and later use "setControlStyle" e.g.
[player setControlStyle:MPMovieControlStyleNone];
Check out the movieControlMode property of MPMoviePlayerController. You'll probably want MPMovieControlModeHidden.

MPMoviePlayer Audio Album art

I am streaming an MP3 file using MPMoviePlayer, and I would like to have an image displayed instead of the default Quicktime logo in the background.
I found out a way to have an image overlay the player, but the problem with that, is you have to tap outside the image to get the player controls to appear. And when they do appear, they are underneath the image.
Does someone know how to do this?
Thanks,
John
backgroundColor is deprecated, and diving into private View structures is dangerous. This worked fine for me:
UIImageView *coverImageView = [[UIImageView alloc] initWithImage:coverImage];
coverImageView.contentMode = UIViewContentModeScaleAspectFit;
coverImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
coverImageView.frame = moviePlayerController.view.bounds;
[moviePlayerController.view addSubview:coverImageView];
Most every app on the iPhone is made of a hierarchy of views. You could go up to the top root node of the movie player and walk down the child views recursively and set the hidden value to YES until you find the right item, then insert your UIImageView below that item. That way, the controls stay on top and still respond to user inputs.
The risk you run is if Apple changes the MPMoviePlayer UI and shuffles the view hierarchy, but you'll probably have lots of advance notice and can patch your app to allow for the new layout.
There is a question as to whether this is kosher for appstore apps, but many current apps (especially camera/picture-taking ones) are doing it to get rid of standard window elements.
Use AVAudioPlayer and implement your own player UI.
it will work check this
MPMoviePlayerController *moviePlayerController=[[MPMoviePlayerController alloc] initWithContentURL:theURL];
moviePlayerController.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"Default.png"]];