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
7
votes
2 answers

How to customize the Airplay button when airplay is active

Been trying to solve this issue for 2 days now and I give up. Im trying to implement a customized airplay button (I have to beacuse the background is white and the button must be black). Ive added a view in interfacebuilder and chose mpVolumeView…
chikuba
  • 4,229
  • 6
  • 43
  • 75
6
votes
2 answers

MPMoviePlayerController playing airPlay in background, crash when double tap home button

MPMoviePlayerController successfully plays airPlay when I go to the homescreen and app is in the background. But when i double tap the home button, the app crashes. This happens on iOS 5, but not is not on 4.3. To exclude other code, I've created a…
Olof
  • 5,348
  • 4
  • 25
  • 27
6
votes
3 answers

iOS AirPlay: my app is only notified of an external display when mirroring is ON?

I'm trying to enable AirPlay support in my app. I'm not doing video; I want to use the external display as a "second display". Here's my problem: if I choose "AppleTV" from my AirPlay button, my app doesn't get notified. The only time my app -does-…
Greg Maletic
  • 6,225
  • 8
  • 54
  • 73
6
votes
2 answers

How can I turn on AirPlay Screen Mirroring on the iPhone 4S programmatically

I have written an app for iPhones and for the 4S I want to support screen mirroring of the application over AirPlay. Using the System AirPlay picker the and with Mirroring turned on it will mirror the app without any issues. I would like to offer…
Mike Ullrich
  • 233
  • 3
  • 11
6
votes
2 answers

iOS app which runs on two screen (no mirroring)

I've created an iPad app which contains a slideshow and when this slideshow is tapped by the user he/she can entered some information. What I'd like to do now is to display the slideshow contents on a TV when connecting the TV and iPad through…
Fréderic Cox
  • 321
  • 2
  • 7
  • 22
6
votes
2 answers

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.
Timur Mustafaev
  • 4,869
  • 9
  • 63
  • 109
6
votes
0 answers

react native stream ios screen to local server

I am building a React Native application to be able to stream my phone content to a local NodeJS server. On android, it works great with MediaProjectionManager but on iOS this is more complicated. I tried to do it with RPScreenRecorder, this is my…
Ajouve
  • 9,735
  • 26
  • 90
  • 137
6
votes
4 answers

How to display the AirPlay Menu SwiftUI

Thanks to the airplay audio systemName emoji I made a nice icon Button(action: { showAirplay() }, label: { Image(systemName: "airplayaudio") .imageScale(.large) }) func showAirplay() { ??? } But I have no idea how to…
LetsGoBrandon
  • 498
  • 8
  • 23
6
votes
0 answers

Electron mirroring screen using using Airplay

I am working on Electron App for MacOS and I want to stream the MacOS Screen using Electron App I want to be able to : 1- Connect to the Airplay Device from the Electron App. 2- Mirror Screen to the Airplay Device from the Electron App. 3- Toggling…
Ebram
  • 1,042
  • 1
  • 13
  • 26
6
votes
3 answers

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…
1110
  • 7,829
  • 55
  • 176
  • 334
6
votes
0 answers

AirPlay Screen Mirroring in IOS

I want to apply screen mirroring through code.In iOS 11 and below we can achieve this task with MPVolumeView…
6
votes
3 answers

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…
rustyshelf
  • 44,963
  • 37
  • 98
  • 104
6
votes
1 answer

React-Native need airplay and chrome cast feature

I'm eager to know is there any way to integrate google's chrome cast and apple's airplay in react native app ?
Vineet
  • 4,525
  • 3
  • 23
  • 42
6
votes
3 answers

Initialising MPVolumeView causes app crash on iOS 11 beta 3

Since 3rd beta of iOS 11 my app has started crashing when initialising a MPVolumeView used for AirPlay. The following piece of code is working perfectly fine on earlier versions of iOS and iOS 11 beta 1 and 2. func setupAirplayButton() { let…
anders
  • 457
  • 2
  • 19
6
votes
2 answers

iOS - How can I display an 'AirPlay' popup menu in Swift?

How can I display an AirPlay popup menu in my Swift project? (Many applications like Spotify can display one like below):
adamsfamily
  • 1,746
  • 19
  • 37
1 2
3
30 31