I am using UIImagePickerController with:
[picker setAllowsEditing:YES];`
picker.mediaTypes is set to kUTTypeMovie and kUTTypeImage
But I would like to set this option only for movies and not for images. How can I implement this?
you can try to make two sperate buttons(action) for movie and image. when the user wants to capture image disable the editing. Or, I would go with
Fully-Customized Media Capture and Browsing which will enable you to do many flexible things
EDIT: Also 'cameraOverlayView' can help. you make a custom view where you make button to handle the event.
Related
Now that this functionality is available in iOS5, is it possible to initiate image capture using one of the volume buttons?
I am using AVFoundation framework for my image capture app.
Thanks!
Take a photo on the volume-up event when using UIImagePickerController with custom camera controls is used and we have set "showsCameraControls" to NO.
Here, the Notification event name was changed for volumeChanged event , #"AVSystemController_SystemVolumeDidChangeNotification" to #"_UIApplicationVolumeUpButtonDownNotification"
You can find an answer from this link:
https://stackoverflow.com/a/27180527/3759546
Please help me with my question.
Is there any way to get image from camera without UIImagePickerController?
I need to render current image(from camera) into image on my view and update it by timer.
May be AVCaptureStillImageOutput? I didn't find any examples.
Any ideas?
Yes, you can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are responsible for opening the iPhone's camera and record video or capture audio. It calls the same classes which are called by UIImagePickerController.
I hope it helps.
I would like to test around a bit with augmented reality. My first problem is how to get the picture that comes from the camera as background for my view? For what i want to do, i dont need to access the picture, i just need it as background. I found a few solutions how to take a picture with the camera, but nothing that gives me a picture that comes from the camera.
thanks,.
I would use AVFoundation for that.
You need to set up an AVCaptureSession with an AVCaptureDevice and an AVCaptureDeviceInput. Finally - and this is what you're interested in - set up an AVCaptureVideoPreviewLayer.
Send the startRunning: message to your AVCaptureSession object, and you should be good to go.
Docs here: http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW14
another way would be using UIImagePickerController .
Create an instance, say picker and set: picker.showsCameraControls = NO .
And finally set cameraOverlayView with your overlay: picker.cameraOverlayView = someViewController.view.
Hope this helps.
I am developing an app that plays internet radio. Owing to my lack of skill, i have only used the stock MPMoviePlayerController.
This is so far been able to play a few m3u streams (like the 'feeling floyd' station)
However, i was wondering if there was any way to have this MPMoviePlayerViewController to show me extra information.. like the song that is playing (which information i was able to extract form teh metadata.)
I can get this information all right, but how do i put it on the screen?
Can I make an overlay or something? (the centre of the MPMovieplayer is taken up by the quicktime background... it would be great if i could use an overlay on this space to show current music information or whatever.)
Is this overlay thing possible? if not, is there any other way?
Thank you very much!
V
If you want your own custom view over the player you can add it as a subview to the player's view as [player.view addSubview:yourView];
Get the moviePlayer property of MPMoviePlayerViewController. I think you should be able to to do this [moviePlayer.view addSubview:myView].
The documentation shows 3 control styles:
MPMovieControlStyleNone,
MPMovieControlStyleEmbedded,
MPMovieControlStyleFullscreen,
MPMovieControlStyleDefault = MPMovieControlStyleFullscreen
I want the controls to mimic the kind found in Apple's "Videos" app, which do not have a fullscreen button or an aspect ratio button. None of the above do this. How do we achieve that?
Just looked for a similar solution (following up on a client request saying: "I want the same behavior than in Apple's app Videos").
Result of my research: It is not possible.
In fullscreen mode, you either:
show no control (and the user can't control the playing of the video)
show the controls when starting to play the video (and they automatically disappear after 5 seconds).
Apple has likely used a private API for this.
By iterating all MPMoviePlayerController subviews, then hide the full screen button stackoverflow.com/a/27482687/928599
Yes you can hide the full screen button. Use MPMovieControlStyleFullscreen with MPMovieScalingModeFill property. My example code is as under:
mpplayerObject.controlStyle = MPMovieControlStyleFullscreen;
[mpplayerObject setScalingMode:MPMovieScalingModeFill];