为 IOS 应用程序启用 AirPlay

Enabling AirPlay for IOS application

您好,我正在开发 IOS 应用程序,我在应用程序中显示 HLS 视频。我想为我的应用程序启用 Airplay 选项。 我尝试了以下方式:

 _moviePlayer =  [[MPMoviePlayerController alloc]
                 initWithContentURL:url];
[_moviePlayer setAllowsAirPlay:YES];

但它没有为我的应用程序显示 Airplay 选项。我在我的设置 AirPlay 选项中开始播放视频(我的播放器出现在屏幕上)后检查了它没有出现。 是否需要任何其他设置。需要一些帮助。谢谢。

您必须发送方和接收方以及相同的 WIFI 网络,然后 AirPlay 会显示在屏幕的 iPhone 上以访问控制中心。否则 AirPlay 符号不会显示在控制中心上。

要使用 AirPlay,您需要这些:

   1. iPhone 4 (or later), iPad, iPad mini, or iPod touch (4th generation or later)
   2. For videos or photos: Apple TV (2nd or 3rd generation)
   3. For music: Apple TV (2nd or 3rd generation), AirPort Express, or AirPlay-enabled speakers or receivers

使用 AirPlay

1. Connect your iOS device and Apple TV or AirPort Express to the same Wi-Fi network.
2. Swipe up from the bottom of your screen to access Control Center.
3. Tap AirPlay.

SNEDER : iPhone 4(或更高版本)、iPad、iPad mini 或 iPod touch(第 4 代或更高版本)

接收器: Apple TV(第 2 代或第 3 代)、AirPort Express 或支持 AirPlay 的扬声器或接收器

注意:SNEDER 和 RECEIVERS 连接到同一个 Wi-Fi 网络。