【问题标题】:Enabling AirPlay for IOS application为 IOS 应用程序启用 AirPlay
【发布时间】:2015-01-08 05:08:55
【问题描述】:

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

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

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

【问题讨论】:

    标签: ios mpmovieplayercontroller airplay


    【解决方案1】:

    您必须发送者和接收者以及相同的 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 网络。

    【讨论】:

    • 嗨 kirti 感谢您快速重播。我在询问如何为我的应用程序启用播放选项,而不是询问所有其他要求。对于其他一些应用程序,它会在设置中显示该选项。
    • 但对于其他一些应用程序,即使没有接收器,它也会在设置中显示播放选项。
    • 你的代码是正确的,但是当你有相同网络的接收器时,就会显示符号。
    • 不可能请哪个APP。
    • GoCoder 应用程序。所以一旦你启动应用程序,它会在设置中显示你的airplay选项。
    猜你喜欢
    • 1970-01-01
    • 2018-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多