Гость
10 Янв 2013 16:54

Audio Field 8.19 -- clicking the blue arrow does not play the audio file and the player does not show up when gzip is enabled in the theme settings for compression. When gzip is not selected in compression it functions as expected.

May I also suggest not using the jwplayer. For commercial sites it is a $100 license. Instead you can use the free html5 player http://mediaelementjs.com/

We were able to get it in with one line of code

 <audio src="/uploads/<?php echo $file->subfolder; ?>/<?php echo $file->fullpath; ?>" type="audio/mp3" width="100%" controls="controls" preload="none"></audio>

Последние изменения: 18 Апр 2014


Sergey
Total posts: 13,748
10 Янв 2013 23:24

Audio Field 8.19 -- clicking the blue arrow does not play the audio file and the player does not show up when gzip is enabled in the theme settings for compression. When gzip is not selected in compression it functions as expected.

Regarding template GZIP and magnifications. This is well known issue that when yoothem try to create single javascript file out of all included, it leads to more problems that advantages. Me personally, I have never been able to use those on my sites. Although I am developer and it is not hard for me to fix, I found it almost imposible the way they do it.

I suggest just do not use it.

Audio Field 8.19 -- clicking the blue arrow does not play the audio file and the player does not show up when gzip is enabled in the theme settings for compression. When gzip is not selected in compression it functions as expected.

May I also suggest not using the jwplayer. For commercial sites it is a $100 license. Instead you can use the free html5 player http://mediaelementjs.com/

Perhaps you are right. But advantage of JW is that it can switch to Flash mode if browser does not support this type of files. For pure HTML5 we would not use any player at all. Just HTML5. But we know that sometimes we need to use flash to play because browser cannot understand file format.


Гость
11 Янв 2013 11:15

Sergey the http://mediaelementjs.com/ player has flash fallback as well. I promise if you visit the site you will not be disappointed at what it can do! :D please take just a moment to visit the page and see its specs. You will see it is perfect for Co8 :-)


Sergey
Total posts: 13,748
12 Янв 2013 12:16

I agree. Very nice one. I'll try to switch to this player. :)


Гость
12 Апр 2013 14:29

Sergey I just wanted to comment to put this on your list. I look forward to you doing this. Thanks so much.


Sergey
Total posts: 13,748
14 Апр 2013 22:33

we have updated player to JW6. But we will not be able to change it to other player in Cobalt 8 anyway :) We will try to make it for Cobalt 9


Гость
16 Апр 2013 08:33

OK thank you.


justanotherguy
Total posts: 88
27 Март 2014 18:43

I vote for this new player to be in CB9 as well. Thank You.


Sergey
Total posts: 13,748
28 Март 2014 07:30

justanotherguy I vote for this new player to be in CB9 as well. Thank You.

Noted!


justanotherguy
Total posts: 88
17 Апр 2014 18:57

For those of you who might want to get this working in CO8 we did the following: IN components/com_cobalt/fields/audio/audio.php around line 125 we changed the following:

/*Commented out the lines so the jwplayer would not load*/
// JFactory::getDocument()->addScript(JURI::root(TRUE) . '/media/mint/jwplayer/jwplayer.js');
// JFactory::getDocument()->addScript(JURI::root(TRUE) . '/media/mint/js/modernizr.js');
/*Commented out the lines so the jwplayer would not load*/

Then IN components/com_cobalt/fields/audio/tmpl/output/default.php around line 49 we changed the following:

<!--replace jwplayer with MediaElement.js player-->
<audio src="/uploads/<?php echo $file->subfolder; ?>/<?php echo $file->fullpath; ?>" type="audio/mp3" width="100%" controls="controls" preload="none"></audio>
<!--replace jwplayer with MediaElement.js player-->

Then in the same default.php file around line 54 we changed the following:

<!-- to hide the play button -->
<!-- <a href="javascript:void(0)" id="file_play_<?php echo $record->id;?>_<?php echo $k;?>"
onclick="play<?php echo $record->id;?>('<?php echo str_replace('.' . $file->ext, '', $this->getFileUrl($file))?>', <?php echo $k;?>, <?php echo $compare;?>)">
<img src="/<?php echo JURI::root(TRUE)?>/media/mint/icons/16/control.png" alt="<?php echo JText::_('P_PLAY')?>" align="absmiddle"></a> -->
<!-- to hide the play button -->

Note that the audio player was already installed on our site in a YooTheme template. So the audio call could be used. If the player is not already on your site you will have to follow the player documentation here: http://mediaelementjs.com/ to tweak this setup for your site.

@Sergey perhaps this info helps you get this in to CO8 for everyone so we don't have to wait got CO9 :-)


Sergey
Total posts: 13,748
18 Апр 2014 05:55

@justanotherguy Yes! This is perfect post. Thank you very much!


justanotherguy
Total posts: 88
18 Апр 2014 15:06

@Sergey My pleasure you have done so much for all of us. Its probably not the cleanest solution and you are welcome to delete unneeded lines. Thank You again my friend.

Работает на Cobalt