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
3
votes
1 answer

Supporting AirPlay for Photos and Videos in 3rd party iPhone app

The default Photos app in iPhone supports AirPlay for both Photos and Videos. But, Apple has given API for setting allowsAirPlay only in MPMoviePlayerController i.e only for videos. If I support it only for Videos user will complain for not…
spd
  • 2,114
  • 1
  • 29
  • 54
3
votes
1 answer

AirPlay: volume control is disabled when connected to Apple TV

I'm implementing AirPlay support in a podcast app. I added an AVRoutePickerView and the AirPlay devices are loading fine and I can connect to a device successfully. I'm testing in an Apple TV and the audio plays well but it's using always the max…
ricardopereira
  • 11,118
  • 5
  • 63
  • 81
3
votes
1 answer

AirPlay: redirect audio by showing the available devices popup

I'm trying to implement the same AirPlay button as the Music.app. The button displays a popup with a list of available devices which the user can select to reroute the audio. While searching about my issue, I found out the MPVolumeView but that's…
ricardopereira
  • 11,118
  • 5
  • 63
  • 81
3
votes
0 answers

AirPlay 2 with multiple instances of AVPlayer

Our app plays two audio streams at once: a Foreground (vocal) stream, and a background (music) stream. To handle playback we have 2 AVPlayer instances, one for foreground, and one for background. With AirPlay 1, this works great. You choose the new…
Jeff
  • 4,751
  • 5
  • 31
  • 35
3
votes
0 answers

MPVolumeView route button not showing consistently in IOS 11 update

I created IOS app for live streaming with use of AVPlayer. I add the airplay routes button with help of MPVolumeView. After update of IOS 11, airplay routes button not coming up properly on screen. Sometime it show on screen sometimes not showing on…
3
votes
0 answers

Airplay Screen Mirroring

I want to make an Airplay Server like AirServer. I follow the Unofficial AirPlay Protocol Specification and have got the Post/stream request { authTime = "514438570.684865"; channel = 36; configTime = "0.005387008190155029"; connectTime =…
xuanpf
  • 25
  • 3
3
votes
0 answers

put back ipad screen after video airplay ios

Scenario: I am mirroring iPad app on Apple tv. Tapping on button starts video. Video plays via Airplay on tv. let playerViewController = AVPlayerViewController() let player = AVPlayer(url: videoURL as URL) playerViewController.player =…
Saqib Omer
  • 5,387
  • 7
  • 50
  • 71
3
votes
0 answers

AirPlay, Chromecast, Miracast SDK

I would like to realize an Android application that would be able to display an AirPlay, Miracast or Chromecast stream. This application will be a basic Viewer of these 3 technologies. I would like that when you launch it, you can see it on your…
X6Entrepreneur
  • 971
  • 2
  • 10
  • 30
3
votes
0 answers

Airplay Txt Record

I'm publishing a NetService for Airplay in an iOS app, but am unsure if I have my txt record correct. Specifically, I'm not sure what the pk and pi values are suppose to be. Here's the txt record I'm using: { deviceid = "xxxxx"; features =…
Jake
  • 13,097
  • 9
  • 44
  • 73
3
votes
0 answers

Airplay error Unknown VADPortStatus: -16612

I've created two bonjour services: _airplay._tcp.local (port 7000) and _raop._tcp.local (port 41952). When I publish these services, they show up in the control center in iOS as expected. However, when I attempt to connect to them the airplay…
Jake
  • 13,097
  • 9
  • 44
  • 73
3
votes
1 answer

iOS background Airplay

I'm trying to to airplay video even when the app is in the background. Is this possible? I've enabled Audio, AirPlay, and Picture in Picture for background modes, in app capabilities. I've also set AVAudioSession category: do { try…
Alterecho
  • 665
  • 10
  • 25
3
votes
0 answers

How to handle Airplay pair-setup request

Observed that pair-setup response sends 32 byte string to iPhone with following header RTSP/1.0 200 OK Content-Type: application/octet-stream Server: AirTunes/220.68 CSeq: 0 Content-Length: 32 what string it sends to iPhone? if anyone knows…
3
votes
0 answers

Open native AirPlay mirroring menu

How can I create a button outside of a MediaPlayer which can be used to open the native AirPlay mirroring menu? If you look at the Spotify app they have a button which is used to open Apples native menu. How can I achieve this myself? Spotify:…
anders
  • 457
  • 2
  • 19
3
votes
1 answer

Turn off mirroring programmatically in iOS while airplaying to apple tv?

I am working around airplaying in iOS and I can able to do that without any issues. My issue is when mirroring is turned on i can see my mobile screen on apple tv, but I want to turn off mirroring programmatically and have to show apple tv default…
Yohan
  • 1,108
  • 9
  • 21
3
votes
1 answer

MPNowPlayingInfoCenter nowPlayingInfo not shown while playing Video in an AVPlayer

I am working on an app that has Video streaming. I use AVPlayer to stream the videos, on the device or using AirPlay. When you use AirPlay, you can lock the screen and the video continues playing. On the home screen of your device you'll get the…
Bocaxica
  • 3,911
  • 3
  • 37
  • 54