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.

453 questions
4
votes
1 answer

AirPlay iOS Receiver / Recorder

How would I setup an AirPlay video & audio receiver for iOS (and then save the stream as a video file)? I know that this goes against Apple's guidelines, this is not intended for AppStore distribution. I am fine using private APIs. Note: I am using…
Benjy Wiener
  • 1,085
  • 2
  • 9
  • 27
4
votes
0 answers

Swift: How to airplay video using AVKit to Apple TV when AirPlay Device is Connected and Mirroring is Off

Apple TV is connected on same WiFi network. AirPlay device is shown as Connected on AirPlay Picker. Video playing but only when mirroring is turned on. Screens array count is 2 only when mirroring is turned on. Is there a way to display contents on…
Jitendra
  • 842
  • 1
  • 9
  • 25
4
votes
0 answers

AVPlayer: AirPlay button shows up in control center even though allowsExternalPlayback is set to NO

I've got an instance of AVPlayer which plays some media, but I don't want user to be able to stream it via AirPlay. So I set allowsExternalPlayback property of AVPlayer to NO. However it doesn't seem to affect AirPlay button in control center, so it…
HiveHicks
  • 2,294
  • 5
  • 28
  • 42
4
votes
3 answers

UIViewController displayed sideways on AirPlay screen when launched from landscape iPad

I'm attempting to display a full screen, 16:9, UIViewController on an external display using AirPlay. The goal here is to replace AirPlay mirroring with a custom view controller that will span the full size of the external screen. Everything seems…
francis
  • 5,889
  • 3
  • 27
  • 51
4
votes
0 answers

AVPlayer overrides iPad screen mirroring

My iPad app plays video via an embedded AVplayerViewController. When I mirror the app to an Apple TV, the video appears only on the TV and takes over the full screen. The embedded player shows the following message: "TV Connected. this video is…
Brendenw
  • 785
  • 1
  • 6
  • 22
4
votes
4 answers

How to check if the device is connected via airplay?

I had the problem to check if I am connected to an airplay device and if it is connected via mirroring or streaming. But the check needs to be done before the video started. airPlayVideoActive only return YES if the video already started.
4
votes
1 answer

YouTube embed AirPlay UIWebView

I am developing a video application which contains a lot of video from different sources. One of the options in the application has to be to play videos through airplay on a TV. For displaying YouTube video in my application I am using YTPlayerView,…
Leon Boon
  • 357
  • 3
  • 16
4
votes
1 answer

Streaming audio to multiple AirPlay devices

Anyone know how to stream audio to multiple AirPlay destinations? Apparently, this was possible through Core Audio at some point in the past, but on 10.9 and 10.10, this does not seem possible. iTunes does it, so what's the secret? Here is some code…
Lazloman
  • 1,289
  • 5
  • 25
  • 50
4
votes
0 answers

set nowplayingInfo for showing song title, artist on airplay (apple tv), not work

I have search all about the setting song info for airplay, look like simple, but I still can not make my app work well. I use MPMoviePlayerController to play an audio. And I have also read AirPlay overview in developer.apple.com. I have set the…
prettydog
  • 235
  • 3
  • 12
4
votes
2 answers

iOS: Airplay picker MPVolumeView alternative

I'm using MPVolumeView to pick airplay device for avplayer airplay playback. Is there any possible non-private API alternative for doing this, so I would be able to provide my own UI Controls for picking airplay device? By referring to the API, I…
ambientlight
  • 7,212
  • 3
  • 49
  • 61
4
votes
1 answer

Is it possible to get the current date of an HTTP Live Stream being played through AirPlay?

Working on an iOS project that uses HTTP Live Streaming (HLS), we found that when the app uses AirPlay, to play the streaming on a Apple TV, the currentDate property of the currentItem of the AVPlayer returns nil. In other words: AVPlayerItem *item…
LuisEspinoza
  • 8,508
  • 6
  • 35
  • 57
4
votes
3 answers

MPVolumeView AirPlay button not showing up

Using MPVolumeView I wanted to create an AirPlay output button for the app's audio. MPVolumeView *volumeView = [ [MPVolumeView alloc] initWithFrame:CGRectMake(20, 20, 220, 20)]; [volumeView setShowsVolumeSlider:NO]; [volumeView…
Peter V
  • 2,478
  • 6
  • 36
  • 54
4
votes
3 answers

Underscan issue with AirPlay mirroring

I'm having some issues with AirPlay. The thing is, I'm developing with the ATV3, and my TV set supports 1080p. But when I start screen mirroring and receive the new instance of UIScreen, the bounds and the applicationFrame are both giving me a 720p…
Gonzalo Larralde
  • 3,523
  • 25
  • 30
4
votes
1 answer

Airplay Mirroring (iPhone to Mac) like reflection or AirServer

Is there are way to do this. I couldn't find to much in the apple documentation. Sorry if I'm totally missing this. I know my way around code. I'm 16 and kind of new to some of this. I have some apps on the app store so I know what I'm doing…
evan.stoddard
  • 698
  • 1
  • 5
  • 22
4
votes
1 answer

The way to find out if AirPlay audio device is in use, password protected by CoreAudio methods

I'm currently facing a problems with AirPlay device inside of my application. I used this topic as a sample for configuration of airplay device. But currently couldn't find any solution for two problems: First of all, i couldn't detect if airplay…