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

adding UIBackgroundModes "audio" gets app rejected when playing a video for AirPlay?

I am developing an app that streams HLS videos on AVPlayer. As per the guide over here https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html and…
basum
  • 319
  • 1
  • 3
  • 18
0
votes
1 answer

AirPlay external screen returning (0, 0, 0, 0) as bounds

I'm working with AirPlay right now to display an AVPlayerLayer. Here is a snippet of my code: let secondScreen = UIScreen.screens()[1] secondScreen.overscanCompensation = UIScreenOverscanCompensation(rawValue: 3)! let…
HarryL
  • 33
  • 4
0
votes
2 answers

Is there any public api to detect AirPlay available or not

I have implement the MPVolumeView to show Airplay option but I don't know how to hide MPVolumeView if Airplay options/sources are no longer available. Is there any public API which can detecting AirPlay option/source are available or not. So that…
Karamjeet Singh
  • 460
  • 1
  • 5
  • 16
0
votes
1 answer

How to send audio output to Apple TV?

I want to add a button to send the audio output to the Applle TV. I use below code but it does not work. Can you help what I am doing wrong? First I change the AVAudioSession category to be AVAudioSessionCategorySoloAmbient (for searching the…
ondermerol
  • 524
  • 1
  • 11
  • 29
0
votes
1 answer

How to differentiate apple tv and other devices in airplay?

I am trying to connect apple tv through airplay, but the issue is some time if i connect any other external device like bluetooth or some other device it shows like device connected in window. So i want to identify which device is connected i have…
Yohan
  • 1,108
  • 9
  • 21
0
votes
1 answer

AVSpeechSynthesizer and AirPlay — Audio Device Sleeping?

If I use AVSpeechSynthesizer to speak some text it works fine on the device but as soon as I use AirPlay the start of the speech will get cut off unless something was just spoken before. It appears that the audio device is going to sleep. Below is…
Daniel Radtke
  • 307
  • 2
  • 11
0
votes
1 answer

How to AirPlay audio to multiple AirPlay devices from an iOS device?

Normally only one AirPlay device is selectable in the MPVolumeView when playing audio. However it seems that it is possible to AirPlay to multiple devices since Whaale iOS app does. How might the Whaale app stream to multiple devices? (I don't care…
Steve Moser
  • 7,647
  • 5
  • 55
  • 94
0
votes
1 answer

AirPlay protocol - how to use raw PCM instead of ALAC

I'd like to use PCM instead of ALAC to send audio to an AirPlay compatible. device. The device I'm using all have at least a cn=0 and an et=0 in their mDNS TXT capabilities, so I assume I can use raw PCM/L16 and unencrypted. But the only doc I've…
philippe_44
  • 337
  • 3
  • 11
0
votes
0 answers

Capture Audio pipe in Pure Data

I'm using shairport-sync, on a Raspberry Pi, and want its audio output to go into Pure Data and then to the speakers (the Pd patch only contains a link between [adc~] and [dac~]. I first tried to select the loopback device as output for shairport…
Corentoulf
  • 15
  • 8
0
votes
1 answer

ios 9 play mp4 fullscreen video over HDMI lightning adapter

I'm, developing an iOS 9 app which works like a video kiosk. Users can tap on an iPad and a video should be displayed on a connected 1080p screen. I've tried this answer here but it looks pretty outdated and isn't working any more. From the Apple…
Chris
  • 2,296
  • 4
  • 27
  • 46
0
votes
0 answers

HTML5

Given a vanilla HTML5
jerluc
  • 4,186
  • 2
  • 25
  • 44
0
votes
1 answer

Game for Apple TV appears tilted on the big screen

Since a few years back I have a "iPhone is the controller, game screen displayed on TV by way of Apple TV and Air Play" project slowly going. It's like a space-shooter-maze kind of game, except there is no shooting and the objective is to steer a…
Jonny
  • 15,955
  • 18
  • 111
  • 232
0
votes
0 answers

Airplay IOS multiple view controller

I am trying to implement an application with a number of viewcontrollers presented through a hierarchy with different viewing on the iPad and Airplay device. I am using objective C and Storyboard. I have updated the app delegate and I can see my…
Xian
  • 13
  • 4
0
votes
1 answer

iOS AirPlay Action Sheet for public app store publishing - like in Spotify

I've been working on a project that involves AirPlay endpoint selection and was wondering how the guys at Spotify had done the following in-app selection of the available AirPlay endpoints (you can see an AirPlay icon/message at the bottom of the…
Roberto Andrade
  • 1,793
  • 1
  • 21
  • 27
0
votes
0 answers

AirPlay View in YTPlayerView doesn't appear

I'm using YTPlayerView (YouTube helper library) in my iOS application and according to requirements, I've made custom controls for airplay, share, play etc. For that I've hidden the default controls of YTPlayer using "control" tag. The problem I'm…
Fayza Nawaz
  • 2,256
  • 3
  • 26
  • 61