i do r&d but i didn't get anywhere how to increase or decrease brightness of mpmovieplayercontroller i have found in ALPlaycontroller it is a custom player but i don't want in this so please tell me there is any way to increase or decrease the brightness of mpmovieplayercontroller in IOS
You can't control the brightness of the movie player, it follows the device screen brightness.
You'll have to change the brightness of the movie either by editing it before serving it, or by building a custom player that uses CIFilter to adjust brightness of the frames as they arrive.
Related
I am making a clock app and I wanted to know how can I check what the current brightness level is set to and how can i adjust brightness in my application in xcode 4 with a UISlider instead of telling the user to go to their iphone/ipad setting app and adjust the brightness there? I can't find any code/api for it.
I have seen quite a few clock apps in appstore where the user can adjust the brightness of the display just by moving the finger up or down.
You're looking for the brightness property of UIScreen.
Sample code:
[UIScreen mainScreen].brightness = 0.5;
Available in iOS 5.0 and later.
How can I allow iOS device to dim screen and auto-lock the device while playing a video with AVFoundation. Playing a video with AVPlayer disable screen auto-lock by default. Is there anyway to re-enable it without pausing the video play.
why you want screen to go idle while playing video? The real answer is it can't be done. Following are just work arounds with serious downsides.
The only method apple allows us to use is
[UIApplication sharedApplication].idleTimerDisabled
You can dim screen programmatically by using a UIView with color black and slowly changing it alpha property to create the illusion of screen going idle.
I worked on the application where we used AVPlayer to display video backgrounds in application. Our solution was to stop video after some idle time. I mean implementing idle timer on our side. And then send message to all background players to stop them. It's the only good workaround I know.
I want implement camera like Instagram . all photo is Fixed size.
but I can't set UIImagePickerController frame with CGRectMake(0,0,200,200);
how can I change camera's view size?
how can let all photo fixed size?
it's fullscreen now!
need help.3Q
As UIImagePickerController is a standard iOS controller,I don't think it allow to set frame to make it custom sized.But still you can give a look at cameraOverlayView.There is a very small chance you can do something with dis.
camera like instagram usually be implemented with AVFoundation, which is more flexible, and use AVCaptureSession with the camera preview layer for the camera preview size
I'm planning on making a game for the iPhone and want to have the background constantly animated. I figured rather than looping a series of images, I'd play a video. Is it possible for me to play a video (with no controls popping up), and have graphics overtop of it (the actual game)? Or would I just be better off with looping images?
(I figured SO would be a better place to ask this than Game Development)
Yes, using AVFoundation, or even the MPMoviePlayerController with the controls property turned off.
You can have anything you like overlaying the video. The performance for that is much better in iOS4 than earlier OS versions.
You can use MPMoviePlayerController and set the control style to none.
MPMoviePlayerController control style and MPMoviePlayerController control style list
I've few doubts regarding movie player app
How can I customize the screen size. I want only video or movie to be played only to half the screen and I want to add custom controls buttons to the remaining half of movie player.
In movie player example overlay view is there but how to change the name of the button and label in that and I'm unable to do that.
The MPMovePlayer UI cannot be modified. It plays fullscreen video, and provides the default controls. There's currently no way to do what you need in the official iPhone SDK.
Use this link for video player customization:
https://developer.apple.com/library/ios/samplecode/MoviePlayer_iPhone/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007798
download sample code and modify accordingly.