shortmort37 wrote: I've revised the hacks above to include utilizing the native capability of HTML5 browsers to play MP3 files.
Code: Select all
'mp3' => 'audio/mp3',
Did you make that change? And, did you add mp3 to the HTML5 extension group, along with mp4, webm and ogv?shortmort37 wrote:Find in styles/prosilver/template/attachment.html:
After, add:Code: Select all
<!-- ELSEIF _file.S_QUICKTIME_FILE --> <object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="320" height="285"> <param name="src" value="{_file.U_DOWNLOAD_LINK}" /> <param name="controller" value="true" /> <param name="autoplay" value="false" /> <param name="type" value="video/quicktime" /> <embed name="qtstream_{_file.ATTACH_ID}" src="{_file.U_DOWNLOAD_LINK}" pluginspage="http://www.apple.com/quicktime/download/" enablejavascript="true" controller="true" width="320" height="285" type="video/quicktime" autoplay="false"></embed> </object>
Code: Select all
<!-- ELSEIF _file.S_H5_FILE --> <!-- IF _file.MIMETYPE == 'audio/mp3' --> <audio controls name="media"> <source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}"> </audio> <!-- ELSE --> <video controls name="media"> <source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}"> </video> <!-- ENDIF -->
I just now did this. Formerly, the mp3's on my production forum required the JPlayer download to play. I eliminated that bbcode, ported my hack, and the mp3's that were previously loaded now play natively in an HTML5 browser.shortmort37 wrote: I haven't yet ported the mp3 hack to my production forum, where I have mp3's uploaded (for playing with a downloaded player). I'll try it there, and get back.
Dan
Code: Select all
<!-- ELSEIF _file.S_H5_FILE -->
<!-- IF _file.MIMETYPE == 'audio/mp3' -->
<audio controls name="media">
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
</audio>
<!-- ELSE -->
<video controls name="media">
<source src="{_file.U_DOWNLOAD_LINK}" type="{_file.MIMETYPE}">
</video>
<!-- ENDIF -->
Code: Select all
<param name="movie" value="images/scmp3player.swf">
<param name="FlashVars" value="playerID=1&bg=0x9DA5BF&leftbg=0xeeeeee&lefticon=0x666666&rightbg=0x394670&rightbghover=0x999999&righticon=0xE7E7EF&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&loop=no&autostart=no&soundFile={URL}">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object>
Try it, and see if it now plays. Sorry if your mileage varies from mine... You might try defining a [mp3]...[/mp3] bbcode that does nothing at all, i.e., so its presence in your existing posts defaults to HTML5 behavior.Tabitha2 wrote: 2) no