summaryrefslogtreecommitdiffabout
authorWojciech Polak <polak@gnu.org>2014-01-16 19:09:27 (GMT)
committer Wojciech Polak <polak@gnu.org>2014-01-16 19:10:25 (GMT)
commit7406db3909192c0534885f39ec31521907faac7e (patch) (side-by-side diff)
tree4b937ca506d022dec02b2d3e8fe402e729195ebb
parent47ac26a805d54dc24babaa403492d59cb54457ae (diff)
downloadglifestream-7406db3909192c0534885f39ec31521907faac7e.tar.gz
glifestream-7406db3909192c0534885f39ec31521907faac7e.tar.bz2
Fix audio tag's autoplay.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--static/js/glifestream.js6
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
@@ -92,7 +92,7 @@
}
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)
var embed = audio_embeds[type];
else
@@ -113,6 +113,10 @@
$('.player').remove ();
$(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;
}

Return to:

Send suggestions and report system problems to the System administrator.