SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Embed sound and play into iPhone browser

    This is following code i am using to embed sound in a webpage

    HTML Code:
    <embed type="audio/mpeg" src="audio/Policeradio1.wav" autostart="false" width="111" height="110">
    but it plays like this in iPhone



    I want result should be like this:
    http://www.ouchh.com/Wav/sound.html


    Anyone can help me
    Last edited by Mittineague; Aug 25, 2010 at 12:03. Reason: Please do not use "bit.ly" URLs.

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,625
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Guessing that's just the way iPhone handles audio. Using third party browsers I've heard sound via a flash app. But 99.9&#37; don't have flash on iPhone. Maybe google "iphone audio JavaScript".

  3. #3
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That means there is no way to do this. audio through javascript is not working

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Honestly, you don't want to handle audio any other way than with the default player. Handheld devices have a lot to deal with in a small amount of space, having a default player that handles all media with an interface people will recognise and be able to use is a much better solution than custom players that can often be hard to work with (especially as many of them start downloading audio immediately!). Better to allow the iPhone to use that mechanism and let your users listen to the audio on demand. Having a standardized method of handling media is one of the iPhone's best features - it eliminates the need for nasty script or flash solutions.

  5. #5
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Scenario:
    You are given an option to try 14 sounds.
    Sound1 - Play
    Sound2 - Play
    Sound3 - Play
    Sound4 - Play
    ......

    If every sound is played in a default player, they have to use back button to go back to previous location and most users will not prefer to do this and will switch website.

  6. #6
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    No they don't, they hit the "done" button once they have finished listening, and upon doing that they return directly to the list of songs.

    Unless you have some genuine research to back up your statement, there's no justification to assume your users behaviour on such devices.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •