iPad App mirroring - TV out - ipad

I have a View : which plays video .
On view we can able to add image / Text above video layer .
Now we would like to show view with video playing on TV output .
I have used External Display Class ,Is there any way to get desired output .

Check out the Multiple Display Programming Guide by Apple. You will need to listen for UIScreenDidConnectNotification notifications and create a new UIWindow instance with your content to attach to the new UIScreen.
You may also find the AirPlay for Developers page helpful, particularly the WWDC videos.
Edit: if you are looking for a way to programmatically enable mirroring, this is not allowed by Apple. You will need to direct your users to bring up the system bar and toggle in on their own.

Related

Is there a way to create an enhanced casting on iOS?

I want to create an enhanced casting on my iOS app.
In simple words, I want to be able to customise the view that's on the screen the user is casting into.
UI for example:
User is watching a video on iOS device.
User clicks on airplay to cast the video to an external device, such as a TV.
Device's screen still showing the video, but on the external device the display contains the video with some customise widgets on it, and a window showing the camera coming from the iOS mobile.
I couldn't find any related information on web, maybe you'll have an idea on what can I do? and what is possible.
Thanks!

I want to design a screen which will show different number of videos on same screen based on certain condition

This is an iOS problem.
I want to design a screen which will show a video on full screen. After some time based on some backend condition if another video is available I have to show that by splitting the screen into two vertical halves. After some time if one more video is available I have to again split the screen and show the third video horizontally on the bottom of the screen.
I am new to iOS and I am not able to manage the screen split on runtime based on backend condition. please help me in this regard.
Using AVPlayer it possible to play multiple videos in a view. You can use Apple's AVPlayer.
An AVPlayer is a controller object used to manage the playback and
timing of a media asset. You can use an AVPlayer to play local and
remote file-based media, such as QuickTime movies and MP3 audio files,
as well as audiovisual media served using HTTP Live Streaming.

AirPlay View in YTPlayerView doesn't appear

I'm using YTPlayerView (YouTube helper library) in my iOS application and according to requirements, I've made custom controls for airplay, share, play etc. For that I've hidden the default controls of YTPlayer using "control" tag.
The problem I'm facing is that, when I play video via airplay on some other media (e.g. appleTV, air server), the default view of YTPlayerView saying "Streaming to ... " Doesn't appear.
I guess it's because I've hidden the default controls.
I want this view to appear on screen whenever user choose other route for video. Unfortunately I'm unable to find the solution. Is there any way to do this or any notification that's fired whenever user switches video route, so that I can place my custom view for that scenario.

Want to stream my application view on Apple TV using AirPlay Apl in ios sdk?

I want to stream my application on APPLE TV using AirPlay API.? How to use that?
Can it work through iPhone and iPad both?
If yesy please share some doc regarding or demo for the same
You can implement support for external displays very easily. Here is one blog post about it by Matt Gemmell: http://mattgemmell.com/2010/06/01/ipad-vga-output/
If the user enables AirPlay (by clicking the home button twice and then swiping left to reveal the AirPlay shortcut) with an Apple TV, your app will detect one additional screen, the Apple TV. You can then use the API described in the blog post above to stream your app's view to the Apple TV.
There is no way I know of to add an AirPlay button directly in your app, though.

Set Airplay manually?

I have an iPad app and I have a video playing in a view. I would like to play video using Airplay but by pressing my own button.
I have set allows airplay = YES and so forth, this works if I enable the full controls, but I want to set no controls and have my own button to play the video using Airplay.
So far, I have found no information that would allow me to play a video on AppleTV without allowing the normal controls.
So just using an UIButton action to force the airplay, or at least get available devices and set it manually. Anything that would allow me to do this.
MPVolumeView will only control audio, it won't control video. For that you'd need iOS 5's AVPlayer, or a movie controller.
An alternative for you might be to use AirplayKit, a 3rd party library.
https://github.com/rothacr/AirplayKit
To answer my own question.
This is quite possible without jailbreak.
Here is apple's own page explaining this, so this will pass the review process.
Apple developer library document explaining how to do this

Resources