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

Airplay and repeatMode with MPMoviePlayerController

I am unable to get airplay to repeat a video. moviePlayer.repeatMode = MPMovieRepeatModeOne; [moviePlayer setAllowsAirPlay:YES]; This does not seem to work, it gets to the end of a video and airplay just stops. Does anyone know why, or how to get…
2
votes
1 answer

AirPlay icon differs with iOS versions

I am integrating AirPlay into my app. We currently support iOS 11-13. On iOS 13 I see the expected AirPlay icon (landscape oriented rectangle with an arrow pointed to the inside) when I connect to an AppleTV. When I use an iOS 12 device and connect…
ids
  • 65
  • 8
2
votes
1 answer

Detect the AirPlay Device Type iPhone is Connected To

Is there a way to get the AirPlay device type the iPhone is connected to? For instance, is there a way to know that the iPhone is connected to a HomePod, an Apple TV, or AirPods via AirPlay? I would like to show an icon in my app for which device…
Jacob Cavin
  • 2,169
  • 3
  • 19
  • 47
2
votes
0 answers

Detecting whether airplay devices are available

I'd like to display the Airplay icon in an iPhone app as an UIBarButtonItem only when airplay devices (other than the user's iPhone) are available. var volumeView = MPVolumeView! I've set up the UIBarButtonItem in the viewDidLoad() like…
nontomatic
  • 2,003
  • 2
  • 24
  • 38
2
votes
0 answers

Only `MPMediaItemPropertyTitle` appears when airplaying on tvOS, despite every other info being in control center

Trying to implement airplay functionality to play audio on Apple TV via airplay, the only info appearing on the tvOS UI is the title, despite every other info is present (and appears in the control center music UI without a problem). Working with…
nknr
  • 123
  • 6
2
votes
1 answer

Airplay connections notification and status bar airplay icon

As per the airplay usage is given in : https://support.apple.com/en-in/HT204289#iOS The app supports the airplay but I can't see this icon. Need to understand from development perspective how do we enable to show airplay icon when it is connected…
Abhishek Jadhav
  • 706
  • 5
  • 12
2
votes
1 answer

Present AirPlay route picker from a custom UIButton

I have a stylized UIButton subclass that I want to present the standard AirPlay route selection interface on tap. I know AVRoutePickerView is available but it does not appear to offer any customizations except to configure its tint and active tint…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
2
votes
1 answer

Set nowplayingInfo for showing metadata not work on airplay Apple TV

I am sending metadata from an audio app via the MPNowPlayingInfoCenter : title, artist, artwork.... On iPhone devices, all this information is correctly displayed in the control center of the device (as well as in Carplay which uses also these…
htan
  • 333
  • 1
  • 9
2
votes
0 answers

Notification AVPlayerItemDidPlayToEndTime not fired when streaming via AirPlay

I use AVPlayer to play a simple MP4 video. As I need to know when the video finishes, I add an observer for the notification AVPlayerItemDidPlayToEndTime. This works fine, if the video is played on the device, but the notification is never posted if…
Flo
  • 2,309
  • 20
  • 27
2
votes
2 answers

Enable iPad Airplay on HTML5 video

I'm doing this to enable Airplay on HTML5 video for my iPad 1st generation with iOS 4.3.1. // Prototype JS framework $('videoContainer').appendChild( new Element( 'video', { id: 'video0', src:…
JoJo
  • 19,587
  • 34
  • 106
  • 162
2
votes
2 answers

AirPlay button on custom view - problems

I am developing an iPhone application that supports AirPlay using MPMoviePlayerController. But, I need to display this AirPlay button in my custom-view. So, I took MPVolumeView and added it to my custom view; removed all the subviews from…
spd
  • 2,114
  • 1
  • 29
  • 54
2
votes
2 answers

Can I use AirPlay in iOS 4.3 to send still images to an Apple TV

I am aware that iOS 4.3 has a new API that lets developers send video from their Apps to an AppleTV. Is there any public API that allows developers to stream still images (Jpegs) instead of video to an Apple TV?
Jackson
  • 3,555
  • 3
  • 34
  • 50
2
votes
1 answer

How to fill metadata info for tvOS info panel when using Airplay?

I'm barely new to iOS. I'm able to reproduce streams(no local video) via AVPlayer using Airplay. Also, MPNowPlayingInfo and RemoteCommandManager are supported, using external medatada, not included into the streams. But, I would like to fill the…
kikeenrique
  • 2,589
  • 2
  • 25
  • 46
2
votes
0 answers

MPVolumeView Route button error on second touch in IOS 11

MPMediaControlsRemoteViewController Dismissing because view service terminated I am getting this error in the simulator on iOS 11 when I touch the Route button (MPVolumeView). The error doesn't appear in the debug log on the first touch, but does…
greencardigan
  • 393
  • 1
  • 3
  • 13
2
votes
0 answers

Fetching ID3 metadata while HLS stream is being played on AppleTV via Airplay

I am working on AVPlayer based streaming apps wherein I am relying on ID3 tags for reading metadata from the HLS stream. I am using KVO for this and observing AVPlayerItem’s timedMetadata property. This works perfectly well in normal scenario.…
Sachin
  • 139
  • 7