2015-01-08 35 views
1

您好我正在開發IOS應用程序,其中我在我的應用程序中顯示HLS視頻。我想爲我的應用程序啓用Airplay選項。 我試圖在下列方式:爲IOS應用程序啓用AirPlay

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

但它沒有顯示我的應用程序的Airplay選項。一旦我開始播放視頻(我的播放器出現在屏幕上),我在我的設置AirPlay選項不會出現時檢查它。 是否需要其他設置?需要一些幫助。謝謝。

回答

0

您必須有發件人和收件人以及同樣的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的迷你或iPod touch(第4代以後)

接收器: Apple TV(第二代或第三代),AirPort Express或AirPlay功能的揚聲器或接收器

注意:SNEDER和RECEIVERS連接到同一個Wi-Fi網絡。

+0

嗨kirti謝謝你的快速回放。我在詢問如何爲我的應用程序啓用airplay選項,而不是詢問所有其他要求。對於其他一些應用程序,它在設置中顯示該選項。 – nilkash

+0

但是對於某些其他應用程序,即使沒有接收器,它也會在設置中顯示播放選項。 – nilkash

+0

你的代碼是正確的,但是當你具有相同網絡的RECEIVERS時,顯示該符號。 –