EzDevInfo.com

airplay

Airplay bindings to Ruby

AirPlay button on custom view

4.3 finally :) I am searching right now how to add air play button to custom view. I have MPMoviePlayer that load movie. I disabled standard controls and added overlay view with my custom play, pause, stop, volume buttons. If anybody know how to add button that will be air play please share knowledge? I cant't find what notification to send, what to listen...:(


Source: (StackOverflow)

airplay in simulator - objective-c

I've set "allowsAirPlay" to "YES" in my MPMoviePlayerController, but AirPlay button doesn't appear. Does iOS simulator support AirPlay? And give please some example how to stream video through Apple TV for example.


Source: (StackOverflow)

Advertisements

AVAudioSessionCategoryPlayAndRecord with Airplay

My app uses the microphone and outputs audio, so I am setting my Audio Session to the Play and Record Category, but this seems to disable Airplay. If I set the category to Play, Airplay works fine with my output (but obviously the input doesn't work).

I've tried overriding the output route to speaker, in case it needed that to output over Airplay, but no joy.

Any ideas?


Source: (StackOverflow)

Detecting the AirPlay latency

While I realize that AirPlay has inherent lag/latency, I'm wondering if there's a way for a (currently hypothetical) iPhone app to detect what that latency is. If so, how precise can that latency value be? I'm more curious in whether an app can "know" its own AirPlay latency, rather than simply minimize it.


Source: (StackOverflow)

AirPlay messes up localhost

Since the last OSX update (Yosemite), my localhost server is full of error messages from airplay (but I am not using it). Each times it's the same:

[31/Oct/2014 05:40:42] code 400, message Bad request version ('RTSP/1.0')
[31/Oct/2014 05:40:42] "GET /info?txtAirPlay&txtRAOP RTSP/1.0" 400 -

It's just annoying to have its server full of error messages so if anyone has a clue to fix that or to remove airplay, I would be very thankful :)


Source: (StackOverflow)

MPNowPlayingInfoCenter not reacting properly when pausing playback

I am trying to get MPNowPlayingInfoCenter to work properly when pausing playback. (I have a streaming music app that uses AVPlayer for playback, and I am playing back in my Apple TV over Airplay.) Everything but pausing seems to be reflected correctly in the Apple TV UI. I am initializing it like this:

MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
NSDictionary *songInfo = @{
    MPMediaItemPropertyTitle: title,
    MPMediaItemPropertyArtist: artist
};
center.nowPlayingInfo = songInfo;

Since I am streaming, I do not have duration info upon starting the playback. When I get “ready” signal from the stream, I update the duration that shows up correctly on my Apple TV:

MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
NSMutableDictionary *playingInfo = [NSMutableDictionary dictionaryWithDictionary:center.nowPlayingInfo];
[playingInfo setObject:[NSNumber numberWithFloat:length] forKey:MPMediaItemPropertyPlaybackDuration];
center.nowPlayingInfo = playingInfo;

I can also seek with this technique when the user seeks the track:

[playingInfo setObject:[NSNumber numberWithFloat:length * targetProgress] forKey:MPNowPlayingInfoPropertyElapsedPlaybackTime];

The one thing I can NOT figure out is, how to pause the playhead on my Apple TV. When user taps pause in my UI, I am trying to do something like:

MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
NSMutableDictionary *playingInfo = [NSMutableDictionary dictionaryWithDictionary:center.nowPlayingInfo];        
[playingInfo setObject:[NSNumber numberWithFloat:0.0f] forKey:MPNowPlayingInfoPropertyPlaybackRate];            
center.nowPlayingInfo = playingInfo;

Instead of pausing, this seeks the playhead back to zero and keeps advancing it.

How do I get the playhead to pause correctly in my Apple TV UI?


Source: (StackOverflow)

Native Android/iOS development vs Marmalade SDK

Our company is on the verge of picking between native Android/iPhone development and some cross-platform solution, specifically Marmalade SDK (former Airplay SDK).

We are a computer vision company, meaning we need low level access to the camera devices. Also, our applications are computationally expensive, meaning we tend to squeeze out every little bit of processing power available.

Our team has sufficient experience in both Objective-C and Java (or C) to provide platform specific solutions. However our main focus was always on C++, as such we would like to prevent fragmenting out team and rather work with a cross-platform solution.

Our biggest fear is that choosing Marmalade will either sacrifice processing speed (main concern) or severely increase development time by complicating low level access to camera frame buffer.

So my question is, besides the obvious, what are the advantages, but specifically limitations of Marmalade SDK for processor intensive video processing applications.


Source: (StackOverflow)

Decoding AirPlay Mirroring Protocol

I want my app to mirror the display of my iPad 2 to my Mac.

I have published the _airplay._tcp service and am listening on the port 7100. The app shows in the AirPlay menu and the Mirroring option is also there. Video and audio streaming work perfectly.

But I don't know how to decode the FairPlay encryption (POST /fp-setup) to support AirPlay mirroring. I have taken reference from http://www.aorensoftware.com/blog/2011/08/20/exploring-airplay-mirroring-internals/. If anyone has any idea on how to do that, please tell me.


Source: (StackOverflow)

Customize the Airplay button's appearance

I use a standard gradient overlay (done in photoshop) to make buttons look nicer in my app. I added an Airplay button, but the aesthetics are not matching.

enter image description here

I really want to put a gradient layer over it so it matches, but anything I can find only shows how to do this with a png, not an existing UIView. If not the gradient layer, I just need someway, any way, to change the appearance of the Apple airplay button while keeping its functionality intact.

The setup code is simple:

MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:frame];
[volumeView setShowsVolumeSlider:NO];
[bottomPanel addSubview:volumeView];

How can I get the appearance of this to match my controls?


Source: (StackOverflow)

MPVolumeView change size of Airplay icon

I have an MPVolumeView on one of my views, which comes up with an Airplay icon when there are other output sources available. That's all fine, but the icon is tiny, no matter how big I set the frame for MPVolumeView it doesn't get any bigger.

Anyone know how to increase the size of the airplay icon?


Source: (StackOverflow)

AirPlay support, MPMoviePlayerController and MPVolumeView relation

I am developing an iPhone application that has support for video play. I am using MPMoviePlayerController with custom controls for playing the video. For this purpose I have set control style of MPMoviePlayerController to MPMovieControlStyleNone.

I would like to support AirPlay feature for the video being played. As per the documentation, we have to set the 'allowsAirPlay' property of MPMoviePlayerController to YES to enable AirPlay feature. How can I display the AirPlay button on my player UI if I am using MPMoviePlayerController with custom controls?

I have tried the following:

  1. Instantiated MPVolumeView
  2. Set the showsRouteButton and showsVolumeSlider properties of MPVolumeView to NO to hide the volume slider and route button
  3. Added MPVolumeView on my custom player View

I have not given the reference of MPVolumeView and MPMoviePlayerController to each other. But, if 'allowsAirPlay' of MPMoviePlayerController is set to YES then AirPlay button gets displayed on MPVolumeView. How are MPVolumeView and MPMoviePlayerController related? Please let me know the connection between these two classes which are created independently.

Thanks and Regards, Deepa


Source: (StackOverflow)

Implementing android as a server (receiver) in airplay

I want to create the airplay in android in which my android device will work as a airplay server(receiver)and iPhone device will work as a receiver . I have used jmdns in my application which is open source library in java for the airplay . It is working fine for the audio . But when I come to the video and image then there is lot of struggle for me even with the discovery of the device .Here is my code for the creating and registering the service :

    ServiceInfo info = ServiceInfo.create(identifier + "@" + name + "._raop._tcp.local", identifier + "@" + name, port, "tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1");

        dns = JmmDNS.Factory.getInstance();
        ((JmmDNSImpl)dns).inetAddressAdded(new NetworkTopologyEventImpl(JmDNS.create(InetAddress.getByName("localhost")), InetAddress.getByName("localhost")));

        try {
            Thread.sleep(1000); // If this isn't done the Announcement sometimes doesn't go out on the local interface
        } catch (InterruptedException e) {
            e.printStackTrace(System.err);
        }

        dns.registerService(info);

when i change that ._raop in the first line to the ._airplay then the device has been discovered for the image and audio in the iPad. When i select the device for playing the video the it show the message "This video is playing android(server name )". But in server side i am not getting any packets to process. I am studied Jmdns lot . But i am not getting how to implement the video and image in the airplay using jmdns . Any ideas ?


Source: (StackOverflow)

How to do screen mirroring using AirPlay from the application (not from control panel) in iOS?

I am using MPVolumeView to show AirPlay button. I need to show a custom wallpaper to Apple Tv through mirroring with audio. Audio is playing properly on Apple Tv but wallpaper image is not showing. I am using AVAudioController for playing audio. I have checked YouTube application in which screen mirroring is working from application for video playing. Is it possible to screen mirroring within the app using AVAudioController?

Help me to solve this issue. Thanks in advance.


Source: (StackOverflow)

List available output audio target AVAudioSession

I need to list the audio outputs available to an iOS application. My question is similar to this one: How to list available audio output route on iOS

i tried this code:

NSError *setCategoryError = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback
                                                      error: &setCategoryError];

NSError *activationError = nil;
[[AVAudioSession sharedInstance] setActive: YES error: &activationError];

…
NSLog(@"session.currentRoute.outputs count %d", [[[[AVAudioSession sharedInstance] currentRoute] outputs ] count]);
for (AVAudioSessionPortDescription *portDesc in [[[AVAudioSession sharedInstance] currentRoute] outputs ]) {
    NSLog(@"-----");
    NSLog(@"portDesc UID %@", portDesc.UID);
    NSLog(@"portDesc portName %@", portDesc.portName);
    NSLog(@"portDesc portType %@", portDesc.portType);
    NSLog(@"portDesc channels %@", portDesc.channels);
}

However I always see just one output port (the count is 1), also if I have two (an Airplay and a Built-in speaker). If I use the Music application I am able to see both ports and switch between them. In my app I only see the one that I have selected.

There is something else that I need to do?

Thank you

EDIT:

i tried this code, too:

CFDictionaryRef asCFType = nil;
UInt32 dataSize = sizeof(asCFType);
AudioSessionGetProperty(kAudioSessionProperty_AudioRouteDescription, &dataSize, &asCFType);
NSDictionary *audioRoutesDesc = (__bridge NSDictionary *)asCFType;
NSLog(@"audioRoutesDesc %@", audioRoutesDesc);

but the dictionary list just one output destinations. Moreover the input sources array is empty (I have a iPhone 4s)

EDIT2:

I got something working using MPVolumeView . This component has a button that lets you choose the output audio route, like in the Music App.

If you want you can hide the slider (and have only the button) using:

self.myMPVolumeView.showsVolumeSlider = NO;

Source: (StackOverflow)

AirPlay API for Mac OS X

Is there currently any API (public or private) that will allow a 3rd party Mac OS X application to stream audio to AirPlay receivers? Airfoil by Rogue Amoeba Software seems to be able to do this, same goes for Erica Sadun's AirFlick, but I was unable to find any source code that would demonstrate how to do this. Any pointers are appreciated!


Source: (StackOverflow)