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

Detecting Airplay status in SwiftUI

I can use this to add an Airplay button to my view: AirPlayView() .frame(width: 44, height: 44) ... struct AirPlayView: UIViewRepresentable { func makeUIView(context: Context) -> UIView { let routePickerView =…
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
1 answer

Stream HTTPS (and password protected) m3u8 to AirPlay

Similar to other questions I've seen I find that I cannot stream my HTTPS (and password protected via JWT/server-side auth) m3u8 TS streams to AirPlay. The files are being served via my own API/web app using HTML. My HLS stream play fine on my…
Will Haley
  • 703
  • 1
  • 9
  • 25
0
votes
1 answer

Airplay support iOS

I'am trying to add airplay for my audio app. Here is my code let buttonView = UIView(frame: CGRect(x: 0, y: 0, width: 50, height: 50)) let routerPickerView = AVRoutePickerView(frame: buttonView.bounds) routerPickerView.tintColor =…
0
votes
1 answer

Applescript -- How do I insert a class name into a list without the quotes?

I need to insert an AppleScript class name into a list without the quotes so I can enable AirPlay. i.e. I would like my script to create the following list depending on user interaction: {AirPlay device "Computer", AirPlay device "Apple TV"} Note…
RobK
  • 156
  • 1
  • 9
0
votes
0 answers

How do I stop AirPlay media pausing when app enters background

I have an iOS app built in React Native that plays video content using the react-native-video package and allows the use of AirPlay. When the app enters the background (pressing the home button, locking the screen or opening the swipe down menu) the…
tombottles
  • 11
  • 3
0
votes
0 answers

iOS - how to determine if Apple TV is selected under speaker & TV's?

My app plays videos in WKWebview, and before I play a video, I want to know if Apple TV was previously selected from the attached menu. This is different than detecting if AirPlay or screen mirroring is active as both will evaluate as false prior to…
egekhter
  • 2,067
  • 2
  • 23
  • 32
0
votes
1 answer

In Airplay SDK, Iw2DCreateImage return Heap 0 out of memory problem on png larger than 360x360 px

In Airplay SDK, When my code gets to the following, and if my image.png is larger than 360x360 px I get: "Heap 0 out of memory. Allocating 1766400 bytes but only 2198280 available (1318780 LFB). Increase icf setting [s3e] MemSize (current value is…
Dex
  • 1
  • 2
0
votes
1 answer

Directing Audio to Air Play Speakers from a MacOS Swift Application Using AVPlayer

Im trying to direct audio from a MacOS application I've written in SWIFT directly to air play speakers. I can direct audio to onboard sound outputs or say a USB DAC no problems. I can get audio device ids for say a connected USB DAC and direct audio…
Cull
  • 23
  • 5
0
votes
0 answers

Leveraging delegates in Swift 5.2

I am working on a mobile app and I would like to know when a user closes the Airplay route selection window. In the documentation for the AVRoutePickerView, its delegate supposedly has a function,…
jbodily
  • 3,613
  • 2
  • 20
  • 21
0
votes
1 answer

React to audio being connected & disconnected to an airplay device

I'm looking for a way to immediately react to the audio output being connected and disconnected to an airplay device. There are UIScreen.didConnectNotification and UIScreen.didDisconnectNotification but they will only notify when mirroring is…
nontomatic
  • 2,003
  • 2
  • 24
  • 38
0
votes
1 answer

using swift can we airplay photos on Apple TV programmatically?

I want to build a simple app in iOS using swift which shows the photos of the album in my app and on button click it should airplay on my Apple TV. I read so many documents and articles but not sure if we can do it for photos. Few have said for…
Manisha
  • 372
  • 3
  • 13
0
votes
1 answer

How to play video on both devices iPad and TV with airplay in Ionic 4

I'm developing a iPad specific hybrid application using Ionic 4. Currently I'm using Ionic4 Streaming Media to play video in the application. Airplay is working fine but there is one of the requirement from the client is to show stream video on both…
user585014
  • 157
  • 5
  • 14
0
votes
1 answer

Avoid animation of AirPlay button in MPVolumeView

I am developing an iPhone application that supports AirPlay using MPMoviePlayerController. When the user click on the play button Player custom View is added to a window. Hence didMoveToWindow is getting called. In this method I create…
spd
  • 2,114
  • 1
  • 29
  • 54
0
votes
1 answer

Is there any guide lines for AirPlay on iOS

I there any guide line for AirPlay on iOS? Any sample code and tutorial is well cone. The only thing I could find is in What's New in iOS from apple.
Alex Terente
  • 12,006
  • 5
  • 51
  • 71
0
votes
1 answer

MPMusicPlayerController.systemMusicPlayer and playback info from AirPlay?

Is it possible to get data about currently playing track via AirPlay (iOS, Swift)? My app does not have any player but it communicates with Bluetooth device that can play music. I can get info about current audio track like this: let systemPlayer =…
bdolewski
  • 163
  • 1
  • 11