Playing video in a Customview like iPad feature - iphone

When we call MPMoviePlayerController.play method, the movie player is opened and the video is played in a separate full screen. is it possible to play a video in a custom view, that is I have an image added on a view, when this image is clicked, the image has to be removed and the video has to play there itself as the feature in iPad.

Non-full screen playback of video is possible in iPhone OS 3.2 for iPad.
If you are porting an application that uses the MPMoviePlayerController class of the Media Player framework, you must change your code if you want it to run in iPhone OS 3.2. The old version of this class supports only full-screen playback using a simplified interface. The new version supports both full- and partial-screen playback and offers you more control over various aspects of the playback.
On the full-screen question, see this section of the iPad Programming Guide for further information, and this property of MPMoviePlayerController specifically.
Bear in mind that you can still only play one video at a time, and that this is only currently possible for iPad.

Not using MPMoviePlayerController, no.
You might be able to achieve this using a custom movie player, but I haven't seen one in the wild yet, and I don't know how it would be done.

Related

Can I avoid the native fullscreen video player in Jwplayer on iPhone

I came across this ans to avoid fullscreen video player in iPhone.Can we use this module to create video player custom controls.
I have using jwplayer and have own custom video controls (fast forward/backward, transcript, slow/fast, volume control, fullscreen).This controls gets hidden in iPhone and native iPhone video player is shown.
Is there any way to avoid this iphone fullscreen and still bring own custom controls.
Can this module be used for jwplayer? to bring own custom video control with jwplayer.
I have not seen that particular library in use with our player, so you're more than able to try it - but I cannot guarantee any success, nor can we provide support for its use.
With that being said, iOS 10 is slated to bring inline video playback to Safari for iPhone and the good news is our player is already set up in the way it needs to take advantage of this. Obviously, iOS 10 is in beta and not final yet so things are subject to change, but this is good news for those customers looking for inline video playback in Safari on iPhone.

Which options exist since iOS 4.0 to embed video in a view?

I'm shipping a quicktime .mov video encoded with H.264, low quality. It's about 2 MB small. Not full-screen.
The video must be embedded in a view. Is MPMoviePlayerController state-of-the-art for this purpose, or are there better (easier) options?
It's important that the video plays in the non-fullscreen view, and that playback controls are either overlayd on top of the video or can be customized. I'm not sure if MPMoviePlayerController is good for this.
MPMoviePlayerController and MPMoviePlayerViewController are two classes you can use to play video in iOS SDK.
MPMoviePlayerViewController is supposed to be presented as a modal view controller, so it's not what you're looking for.
MPMoviePlayerController plays the video onto a view (UIView) which you can add in your view hierarchy, which is what you need.
Be aware that on iOS < 3.2, MPMoviePlayerController is fullscreen only (not a problem if you're targeting 3.2 or newer).
Although you can do customizations by adding your own buttons (for play, pause and stop controls), sliders (for volume and seeking) and labels (to display duration and length), Apple encourages the use of standard video controls. The reason is that users are used to the standard UI (which is also pretty advanced, supporting features such as fine scrubbing), plus if Apple ever adds new features to it in future versions of iOS, you won't have to add them yourself in your customized implementation.
MPMoviePlayerController is the most straight forward way to play a video, you can do other things including
Play it on a web view
Use AVFoundation and AVPlayer to play the video
With MPMoviePlayerController the video isnt "embedded" in the view rather another view pops up and plays the video, with AVFoundation and AVPlayer you can actually embed it into your view...check out this stack over flow question which details how to use the AVFoundation to play a video here

Getting a UIView Animation to play through airplay

I'm using UIView animation blocks to crate a slidshow of images. I'd like to allow users to play those animations through AirPlay. Would I somehow have to save a video file and play that or is there something more clever that could be done?
In iOS 5, user will be able to mirror the screen using AirPlay to there other AirPlay devices (mainly the Apple TV).
In the current stable version of iOS (4.3.5 as of this writing), I don't think that can be made (except, like you said, with a video file).

Graphical Audio player in iOS

Is there a library or built in graphical player to represent a playing audio file in iOS.
I dont want a full screen player, but a small inline player that can be embedded into a UIView.
Does this exist in iOS?
Apple has a good example of this, avTouch. I have successfully adapted parts of their code to display audio levels in the past.
avTouch

Overriding iPhone shutter sound through SDK

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).
I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.
Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.
AFAIK the standard camera shutter sound cannot be changed via SDK.
This answer supports that. You can replace your own sound by switching sound files, but not in an app.
Some answers such as this one suggest using AVCapture, but this method takes video screenshots, which reduces the image quality. I
t appears that you can't change the shutter sound because you could make it a silent sound, and capturing images covertly is against the App Store policy. See this answer.
TLDR:
The only way to change the shutter sound is to use a video screen grab.