Questions tagged [airplay]

Airplay is a streaming technology made by Apple to stream media to multiple devices wirelessly or to the Airplay SDK that offers deployment to many platforms.

Airplay?

Airplay is a Streaming Technology made by Apple Inc to stream media to multiple devices wirelessly or to the Airplay SDK that offers deployment to many platforms including iOS, macOS, tvOS, watchOS, Windows, Linux, Android, Symbian, and more recently, through the Airplay Arcade, all major consoles and handheld devices.


Apple added Airplay in Safari

In 2015 Apple added Airplay for HTML5 Video *default player, And a API for JavaScript Presentation mode, for those who wanna use their own video player.

This can be done by using the following code:

// Safari 9+
if (window.WebKitPlaybackTargetAvailabilityEvent) {
    video.addEventListener('webkitplaybacktargetavailabilitychanged', function(event) {
        switch (event.availability) {
            case "available":
                airPlay.style.display = 'block';
                break;
            default:
                airPlay.style.display = 'none';
        }
        airPlay.addEventListener('click', function() {
            video.webkitShowPlaybackTargetPicker();
        });
    });
}

NOTE: Airplay can be use for both Audio and Video.


In 2016 They added Picture In Picture to the default HTML5 Player, its also use Javascript Presentation mode API.

432 questions
45
votes
3 answers

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…
Jaanus
  • 17,268
  • 14
  • 62
  • 102
38
votes
6 answers

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…
Abai
  • 760
  • 1
  • 8
  • 16
34
votes
4 answers

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…
thf_dave
  • 383
  • 3
  • 7
28
votes
4 answers

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]…
lucianoenrico
  • 1,466
  • 1
  • 13
  • 21
25
votes
3 answers

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…
Insomniak
  • 404
  • 5
  • 17
21
votes
3 answers

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…
Jason Crystal
  • 251
  • 1
  • 3
  • 8
20
votes
2 answers

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…
Elmo
  • 5,743
  • 15
  • 64
  • 132
18
votes
5 answers

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. I really want to put a gradient layer over it so it matches, but anything I can find only…
coneybeare
  • 33,248
  • 21
  • 128
  • 182
15
votes
4 answers

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…
Mukesh2421
  • 171
  • 1
  • 5
14
votes
4 answers

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…
spd
  • 2,076
  • 1
  • 28
  • 51
13
votes
0 answers

Get Connected AirPlay Device Name

I want to get the name of the AirPlay or Bluetooth device my iPhone is connected to. I have somewhat achieved this with the following code... let currentRoute = AVAudioSession.sharedInstance().currentRoute for output in currentRoute.outputs { …
Jacob Cavin
  • 1,735
  • 3
  • 11
  • 34
12
votes
2 answers

MPNowPlayingInfoCenter nowPlayingInfo ignored for AVPlayer audio via AirPlay

I have implemented audio playback using AVPlayer, playing a remote mp3 url. I want to display the information about the currently playing audio using the MPNowPlayingInfoCenter nowPlayingInfo method. When I lock the screen, I do see the image and…
Andrew Kuklewicz
  • 10,291
  • 1
  • 31
  • 42
12
votes
1 answer

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…
V-Xtreme
  • 6,775
  • 6
  • 33
  • 76
12
votes
3 answers

AVAudioSessionCategoryPlayAndRecord makes AirPlay invisible

I am encountering the following problem: AirPlay becomes not available whenever I set play-and-record category to the audio session in my application: [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord …
Anastasia
  • 2,864
  • 1
  • 18
  • 31
11
votes
1 answer

How to reduce cutoff when playing audio using airplay?

When playing a sound from an iOS device connected to Apple TV via AirPlay (using iOS9.2), the first second or so of the sound playing is cut off. This unwanted behavior is not app specific, but system wide(eg. Apple's official apps have this bug…
echo
  • 965
  • 1
  • 10
  • 31
1
2 3
28 29