Nav Link On

iPhone Dev Forums > General Development > Web App Development > how to launch MP3 from webpage on iPhone

Reply

 

LinkBack Thread Tools Display Modes
Old 01-07-2010, 03:12 PM   #1 (permalink)
Junior Member
Default Avatar
 
Join Date: Jan 2010
Posts: 3
Question how to launch MP3 from webpage on iPhone

Hi, I'm new to iPhone web apps so any help appreciated.

I have a very basic link to an MP3 on a webpage but it will not launch on mobile safari.

<a href="https://mysite.com/mymusicfile.MP3">mymusicfile</a>

Do I have to specify anything else in the HTML A tag to get the default player to launch on the iPhone?


Many Thanks
jamez is offline   Reply With Quote
Old 01-07-2010, 07:28 PM   #2 (permalink)
Administrator
 
MarkHernandez's Avatar
 
Join Date: Mar 2008
Location: San Diego, CA
Posts: 508
Default

Have you seen this working on anyone else's webapp site? Hmmmm.
MarkHernandez is offline   Reply With Quote
Old 01-08-2010, 08:56 AM   #3 (permalink)
Junior Member
Default Avatar
 
Join Date: Jan 2010
Posts: 3
Default

I'll take a look.

The HTML above works in all other browsers, Internet Explorer, Firefox, Crome, etc. But not in Safari or Mobile Safari.

I'm wondering if Apple force you to use their own Quicktime or iTunes to play MP3's from websites? Don't really mind as long as they play. Maybe I have to force the native MP3 player on the iPhone to launch when using standard HTML links to MP3's?? I've tried the same HTML but with PDF files and they launch fine in the native iPhone PDF reader.

Any ideas? Thanks.
jamez is offline   Reply With Quote
Old 01-09-2010, 06:02 PM   #4 (permalink)
Senior Member
 
hello24's Avatar
 
Join Date: Jan 2010
Location: London, UK
Posts: 126
Send a message via Skype™ to hello24
Default

You might want to try and play that using Quicktime inside your webpage. Not 100% sure it works.
hello24 is offline   Reply With Quote
Old 01-11-2010, 09:40 AM   #5 (permalink)
Junior Member
Default Avatar
 
Join Date: Jan 2010
Posts: 3
Default

OK now working. Looks like safari or the webserver doesn't want to stream MP3 using this HTML <a href="music.mp3"> ...

Changed to <a onclick="window.location.href='music.mp3'" ... and Quicktime launches fine.

Thanks.

Last edited by jamez; 01-11-2010 at 02:08 PM.
jamez is offline   Reply With Quote
Reply

iPhone Dev Forums > General Development > Web App Development


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC1