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

Airplay with AVPlayer?

Is there any way to support AirPlay with AVPlayer? I know it can be done with MPMoviePlayerController, but I see no indication of AVPlayer support in the documentation. Thanks!
tba
  • 6,229
  • 8
  • 43
  • 63
5
votes
1 answer

iOS13 external screen mirroring, getting error: setScreen should not be called

I am trying to present a custom view controller to external connected screen in iOS 13. I followed this tutorial: http://www.spazstik-software.com/blog/article/how-to-display-custom-content-on-a-external-screen-from-a-ios-device I have following…
Kumari Shalini
  • 644
  • 7
  • 9
5
votes
3 answers

AVAudioPlayer and AirPlay - possible?

I'm trying to ascertain whether it's possible to toggle AirPlay support using the AVAudioPlayer class. From what I have read: AirPlay is a technology that lets your application stream audio to Apple TV and to third-party AirPlay speakers and…
Ben Novakovic
  • 581
  • 7
  • 17
5
votes
1 answer

How to disable AirPlay button in Safari?

I'm trying to remove airplay button from native Safari video player on iOS and Mac and I was not able to find a working solution. It seems imposible to disable it even though documentation says otherwise I use an .m3u8 source for the video (an…
user11907070
  • 51
  • 1
  • 4
5
votes
2 answers

Is it possible to simulate multiple audio outputs for the iPhone and/or the simulator?

I have the following code, but it doesn't display the route button. MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectZero]; volumeView.showsRouteButton = YES; volumeView.showsVolumeSlider = NO; [volumeView sizeToFit]; [self.view…
Erik B
  • 40,889
  • 25
  • 119
  • 135
5
votes
1 answer

AirPlay service registered by `DNSServiceRegister` cannot be discovered by iOS 11

Multicast is disabled in our ethernet, so I registered proxy services (_airplay._tcp & _raop._tcp) pointed to Apple TV's IP with DNSServiceRegister in my app, register and detect the service on the same phone. It works fine in iOS 10, but my service…
Nix Wang
  • 814
  • 10
  • 18
5
votes
1 answer

Disable Airplay with allowsExternalPlayback but audio is still playing

I've disabled Airplay with allowsExternalPlayback , the video on AVPlayer is finished but audio is still playing . Please, help me, I tried to find solution with the help of google but I am not able to solve this problem:(
5
votes
0 answers

MPVolumeView Airplay Button Disappears

I have created a custom video player in Swift using AVPlayer and am using the MPVolumeView for the volume control as well as AirPlay. The views initialize perfectly, but I am running into a case where the AirPlay button disappears inside the…
Mike Walker
  • 2,944
  • 8
  • 30
  • 62
5
votes
2 answers

Airplay Button is not showing in Player Controls with AVPlayer

I created a Video Player using AVPlayer and AVPlayerViewController. I have set "allowsExternalPlayback" property to true and also "usesExternalPlaybackWhileExternalScreenIsActive" property to true. But still I am not getting Airplay Icon in Player…
Abhishek
  • 3,304
  • 4
  • 30
  • 44
5
votes
1 answer

How to programmatically discover the iOS devices list and Connect for mirroring using airplay?

I want to create an application, where user didn't know about the discovery of nearby devices (like iphone, ipad and appletv, etc)and select the only appleTv, if available in nearby then connect atomically and start mirror. For this I read the…
Tom Sawyer
  • 596
  • 5
  • 17
5
votes
1 answer

How can i set MPVolumeView with swift?

i want to set Iphone Speaker default. My volume control swift code is below. It is works fine but when i tapped airplay button i see automatically select the second.(Iphone) var wrapperView = UIView(frame:…
davudi
  • 117
  • 3
  • 13
5
votes
0 answers

Split audio route in active VoiceChat AVAudioSession to play at AirPlay but record using a device

I'm building a video chat app for iPhone. One of the requirements that it should work fine with AirPlay. Once I'm switching to AirPlay the video goes to the AppleTV but audio stays on the phone. The resulting audio route is Speaker-and-EmbeddedMic…
Mando
  • 11,414
  • 17
  • 86
  • 167
5
votes
4 answers

AirPlay to Apple TV Fullscreen

Currently, any app that I make for iPhone/iPad can be mirrored to the Apple TV via AirPlay. However, even in landscape mode, it only takes up the center part of the screen, with black on left and right sides. What all is involved with getting it…
user717452
  • 33
  • 14
  • 73
  • 149
5
votes
2 answers

USB Connected iPhone Screen Mirroring

Apples AirPlay protocol enable mirroring the device screen/audio to a remote device ( eg. a Desktop computer ) via WiFi. Given an iOS device USB connected to a Desktop computer, Is it possible to route AirPlay payload through the USB connection…
user3861866
  • 310
  • 1
  • 3
  • 12
5
votes
0 answers

iOS: How to make one view controller mirror another's actions

I'm trying to "mirror" a view controller: app instantiates view controller 1 (of class A) app instantiates view controller 2 (also of class A) on another UIWindow (external display, via Airplay or physical connector) any touch event that view…