diff options
author | Wojciech Polak <polak@gnu.org> | 2014-01-16 20:09:27 +0100 |
---|---|---|
committer | Wojciech Polak <polak@gnu.org> | 2014-01-16 20:10:25 +0100 |
commit | 7406db3909192c0534885f39ec31521907faac7e (patch) | |
tree | 4b937ca506d022dec02b2d3e8fe402e729195ebb | |
parent | 47ac26a805d54dc24babaa403492d59cb54457ae (diff) | |
download | glifestream-7406db3909192c0534885f39ec31521907faac7e.tar.gz glifestream-7406db3909192c0534885f39ec31521907faac7e.tar.bz2 |
Fix audio tag's autoplay.
-rw-r--r-- | static/js/glifestream.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/static/js/glifestream.js b/static/js/glifestream.js index d17ec52..553ac96 100644 --- a/static/js/glifestream.js +++ b/static/js/glifestream.js @@ -94,3 +94,3 @@ if (type == 'audio') - var embed = '<audio src="'+ $('a', this).attr ('href') +'" controls="true" autoplay="autoplay">'+ _('Your browser does not support it.') +'</audio>'; + var embed = '<audio src="'+ $('a', this).attr ('href') +'" controls="true">'+ _('Your browser does not support it.') +'</audio>'; else if (type in audio_embeds) @@ -115,2 +115,6 @@ $(this.parentNode).append ('<div class="player audio">' + embed + '</div>'); + if (type == 'audio') { + var $au = $(this.parentNode).find ('audio'); + if ($au.length) $au[0].play (); + } return false; |