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
10
votes
3 answers

Disable AirPlay with MPMoviePlayerController

I have an instance of a MPMoviePlayerController which is being used to display some live streaming video on an iPhone app. This is working fine, however I wish to remove all AirPlay functionality. To be sure, I specifically disable AirPlay like…
Ben Williams
  • 4,695
  • 9
  • 47
  • 72
10
votes
0 answers

Show Video on external Screen using AirPlay and AVPlayer

I am using Apple Airplay and AVPlayer to show a video on an external display, while showing some controls on the device using Apple TV and AirPlay. I am using this class to display the AVPlayer on the external screen: #import…
Amandir
  • 679
  • 1
  • 7
  • 20
10
votes
2 answers

iOS: Audio and Video tap from Airplay

I have made a video player that is analyzing the realtime audio and video tracks from the video that is currently playing. The videos are stored on the iOS device (in the Apps Documents directory). This all works fine. I use MTAudioProcessingTap in…
Niek van der Steen
  • 1,413
  • 11
  • 33
9
votes
1 answer

Integrating AirPlay to iOS app in Swift

I want to cast a radio stream through AirPlay (to an AppleTV). I've researched a lot related to this topic, but I found the documentation really poor. This is the Apple documentation for AirPlay 2:…
anitteb
  • 762
  • 10
  • 21
9
votes
2 answers

Airplay: Mirror subview on external window

a design / architectural question on airplay. I have setup an external display in the AppDelegate: UIScreen *externalScreen = UIScreen.screens.lastObject; self.externalWindow = [[UIWindow alloc]…
marimba
  • 3,116
  • 5
  • 26
  • 29
8
votes
1 answer

Purpose of mediaPlaybackAllowsAirPlay property on UIWebView

The UIWebView Class Reference describes mediaPlaybackAllowsAirPlay as follows: A Boolean value that determines whether Air Play is allowed from this view. When the mediaPlaybackAllowsAirPlay is set to YES: If on my iPad I load a YouTube or Vimeo…
Rob Reuss
  • 1,400
  • 10
  • 20
8
votes
1 answer

Airplay from iPad - a separate UIView to display on Apple TV

I want to use Airplay to send images in high definition to a Apple TV. Airplay works fine on my iPad 2 with iOS 5.0.1. When I start my app, my UIScreen screens array only has 1 item in it. (the iPad of course). I register for the notification for…
bandejapaisa
  • 26,576
  • 13
  • 94
  • 112
8
votes
6 answers

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…
indragie
  • 18,002
  • 16
  • 95
  • 164
8
votes
1 answer

Decoding Airplay Packets in Java or C/C++ on Android

I'm currently working on an AirPlay receiver for a subpart of an android application. I am using the following framework: https://github.com/pentateu/DroidAirPlay While this works great on some mid range devices such as the miPad, we need to get…
Matthew Cawley
  • 2,828
  • 1
  • 31
  • 42
8
votes
2 answers

Does iOS provide any functionality to detect if external screen is a 'hardwired' TV Out / HDMI vs a 'network' Airplay display / device?

I've been searching round for a while to find a way to determine if an iOS external screen is cable connected OR over the air and can't find any obvious way. I've seen the unofficial AirPlay specs HERE, but can't see any obvious way of detecting…
Herwr
  • 494
  • 2
  • 7
7
votes
3 answers

iOS screen mirroring shows overscan borders on selected apps

Problem: iPhone screen mirroring & a dedicated external view of my app show an inch of a black border on all sides. But: Some views display perfect without black borders on the full-screen, e.g., the Apple TV menu and the photo app. Tried already -…
Michael Schmidt
  • 3,391
  • 5
  • 34
  • 39
7
votes
2 answers

Block AirPlay Mirroring on iOS 5

On iOS 5 with an iPad 2 or iPhone 4S, users can enable screen mirroring with their Apple TV and AirPlay. How can I prevent my app from being mirrored in this way? Is there any way to detect that this mirroring is taking place so I can prevent my…
Carl Veazey
  • 18,392
  • 8
  • 66
  • 81
7
votes
2 answers

AVPlayer with AWS Cookie using AirPlay

I trying to play a HLS stream provided by CloudFront. It works fine in the app. I just set the cookies in AVURLAsset then goes well. The problem is happening when I select a device(Apple TV) in the list provided by AirPlay. The stream don't start.…
7
votes
2 answers

how do I trigger the click event on AVRoutePickerView using swift

Using AVRoutePickerView, I'm able to do the Airplay programmatically upon tapping the Airplay icon. Now I want, on viewDidLoad it should initialize the AVRoutePickerView and even tap the airplay icon (no need to manually tap on icon). Here's my…
janubhai
  • 183
  • 1
  • 8
7
votes
3 answers

Airplay with Custom html5 controls

Does anyone know if there is a way to get Airplay to work on an html5 video that is using CUSTOM CONTROLS? That is the important part, I realize that you can just add the x-webkit-airplay="allow" attribute to the element if you are using the built…
Jim Cooper
  • 5,113
  • 5
  • 30
  • 35
1
2
3
30 31