Enabling Airplay in php script?

Discussion in 'iOS Programming' started by newtoiphonesdk, Mar 15, 2011.

  1. newtoiphonesdk macrumors 6502a

    Joined:
    Jul 30, 2010
    #1
    I have an app that pulls in a php script that is populated by an RSS Feed. I would like to enable Airplay in this. All the files that populate it are .mp3s. Is this something I need to change in the script, or does it need to be done in the app?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Pretty sure you need to change the player in the app. How are you playing the files?
     
  3. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #3
    I'm using webview as the delegate. The php script has the mp3s linked to the name, so that when a user clicks on it in the webview, it starts playing in the app.
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    In that case you need to alter the HTML of the page (possibly this is in the PHP script). You need to add this attribute to the player tag:

    Code:
    x-webkit-airplay="allow"
    
    I do not know which tags support this however. It may only be the HTML5 video/audio ones. You can read about this in the iOS 4.3 release notes.

    p.s. I knew nothing about this attribute or how to do this before answering this question. I found this out in under 1 minute with Google. Perhaps you should go on a course or something on how to search?
     
  5. robbieduncan, Mar 16, 2011
    Last edited by a moderator: Mar 16, 2011

    robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    You're welcome. I some effort into it (and a smaller amount of effort into finding a solution to your problem which you are welcome to as well). But it was a serious suggestion. It's taken 12 hours to get an answer this way whereas a quick search would have got you the answer within 5 minutes.
     
  6. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #6
    I had done the same search and answered your question 12 hours before you asked it. The iOS 4.3 release notes states that those codes must be on either a QT plugin or HTML5. The php script written has neither, and was why I had asked the question if there was another way to do it, or if it could be implemented in the code itself. This is a help forum, and you shouldn't assume that no one googles anything before they come here. The attitude is not wanted.
     
  7. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #7
    So why not say what you have tried? By not telling the people you are asking for help as much information as possible you are hindering their ability to help you and wasting their time. Your attitude to seeking help is not engendering me to help you in future.
     
  8. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #8
    Please read: http://www.mikeash.com/getting_answers.html and http://whathaveyoutried.com

    Asking a general, open ended question will get you exactly this kind of response, because you haven't given anyone any clue as to what you have actually already tried and doesn't work. How can we assume anything other than you haven't googled it?

    B
     

Share This Page