allowsAirPlay not showing Air Play button in MPMoviePlayerViewController - ios

I'm using an MPMoviePlayerViewController to play a video. I set the instance's moviePlayer.allowsAirPlay to true as it is false by default. However, the Air Play button never shows up in the player controls. Could I have done something wrong, or are there specific guidelines for Air Play? The videos are 640x480, file types AVFileTypeQuickTimeMovie, .mov extension, H264, and PCM audio.
Does an AirPlay device need to be in the vicinity before the button even shows up? I don't have an airplay device, but am an app developer and want to make sure my users can do so if they have such a device.

OK, apparently the way it works is it checks for AirPlay compatible devices when loading, so the button does not appear unless some are available.

Related

Why isn't the iOS browser playing audio from this MP4 video?

I have 100+ videos encoded in H.264 video with MP3 audio for a HTML5-video project, but the Audio won't work on iOS. (No sound, but working video). It works perfectly on Android. They all have the same encoding setup, but here's one of the videos
Googled for several days and can't seem to find any known problems with iOS and MP3-audio. What's wrong?
Check to see if the ringer of hardware device is turned off. If you flip the ringer off and on and the audio turns off and on, then that is the cause.

you tube video does not autoplay on tablet

The video automatically plays when it's a computer, but when the website is opened from any tablet, it doesn't play.
It cannot be done. Apple doesn't allow that.
In Safari on iOS (for all devices, including iPad), where the user may
be on a cellular network and be charged per data unit, preload and
autoplay are disabled.
Safari HTML5 Audio and Video Guide

Stream video via AirPlay without affecting app?

I have a native app and would like to stream video to an Apple TV over AirPlay, but without affecting the app screen. The video should NOT to be shown on the app screen -- only on the Apple TV.
Is this possible in iOS 7?
Yes, it is possible:
If you use AirPlay to allow users to redirect content to an external
device display, you can either mirror the current app content on the
second display or show different content on it.

Remove QuickTime logo while AirPlay

In my iOS app, I use MPMoviePlayerController for video playback. When I enable AirPlay, there is a QuickTime logo, which I would like to remove, superimposes on the AirPlay background.
It only happens with my app on iOS 7.0.4. On iOS versions prior to 7.0.4 such as 7.0.0 or 6.1, there is no QuickTime logo shown, the AirPlay background is displayed as usual.
Anyone has any ideas why the QuickTime logo is there and how we could remove it?
To be clear, I used video content for playback, not audio-only content; and I'm talking about the background view when using AirPlay only.
Thanks!

How to continue play html5 audio when screen locked?

I have an audio element in the UIWebView, but when I lock the screen, the audio will be paused. How can I continue to play it when the screen locked?
If you are talking about iOS devices, then as long as you do not bookmark the site to the home screen and Safari is open and playing the audio, it will continue to play when the screen locks. Only if you try to multi-task will it shut off the sound on your page.
You must ensure that background audio is enabled in your iOS app. You can find a sample project here https://github.com/jsagorin/iOSBackgroundAudio

Resources