Page 2 of 7

Re: Add capability to play HTML5 native formats without bbcode

Posted: Tue Aug 04, 2015 8:30 am
by Tabitha2
Thank you shortmort37 for your work. I'll install it... ;)

Re: Add capability to play HTML5 native formats without bbcode

Posted: Thu Aug 06, 2015 9:19 am
by Tabitha2
I tested on my forum.

I have just 1 problem:
old attachments (mp3) do not work

error:
type mime not support

Re: Add capability to play HTML5 native formats without bbcode

Posted: Wed Sep 09, 2015 10:32 pm
by shortmort37
Sorry to just now be seeing this, Tabitha! Hmmm... 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

Re: Add capability to play HTML5 native formats without bbcode

Posted: Wed Sep 09, 2015 10:42 pm
by shortmort37
BTW, I said:
shortmort37 wrote: I've revised the hacks above to include utilizing the native capability of HTML5 browsers to play MP3 files.


Did you incorporate the update to styles/prosilver/template/attachment.html, and the additional change in phpbb/mimetype/extension_guesser.php? And add mp3 to the HTML5 extension group?

Dan

Re: Add capability to play HTML5 native formats without bbcode

Posted: Thu Sep 10, 2015 7:49 am
by Tabitha2
in the phpbb/mimetype/extension_guesser.php
I have

Code: Select all

'mp3'		=> 'audio/mp3',
what should I do please ?

Re: Add capability to play HTML5 native formats without bbcode

Posted: Thu Sep 10, 2015 2:14 pm
by shortmort37
Tabitha,

My initial post did not include support for mp3's. In adding it, I edited my initial post to include the change to extension_guesser.php, but also to make further revisions to attachment.html:
shortmort37 wrote:Find in styles/prosilver/template/attachment.html:

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>
After, add:

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 -->
Did you make that change? And, did you add mp3 to the HTML5 extension group, along with mp4, webm and ogv?

Dan

Re: Add capability to play HTML5 native formats without bbcode

Posted: Thu Sep 10, 2015 8:43 pm
by shortmort37
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
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.

Looks like you missed something in my revisions, Tabitha.

Dan

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 10:21 am
by Tabitha2
Hello shortmort37,
I already have this code in my attachment.html

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 -->

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 10:30 am
by Tabitha2
I remove the bbcode

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>
And I can't play older attachments

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 1:23 pm
by shortmort37
Did you create an HTML5 extension group, and did you add mp3 to it?

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 1:38 pm
by Tabitha2
Yes ;)
Image

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 1:44 pm
by shortmort37
Two questions:

1) Does the the mod work if you now add an mp3?

2) Your bbcode and player were different than mine. If you go into an older post and edit out the bbcode tags, does it now play natively? (Obviously, this will only work if (1) works.)

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 2:54 pm
by Tabitha2
1) yes
2) no
;)

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 3:06 pm
by shortmort37
Tabitha2 wrote: 2) no
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.

Dan

Re: Add capability to play HTML5 native formats without bbcode

Posted: Sun Sep 13, 2015 3:34 pm
by Tabitha2
2) don't work I tried
;)