aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2014-01-16 20:09:27 +0100
committerWojciech Polak <polak@gnu.org>2014-01-16 20:10:25 +0100
commit7406db3909192c0534885f39ec31521907faac7e (patch)
tree4b937ca506d022dec02b2d3e8fe402e729195ebb
parent47ac26a805d54dc24babaa403492d59cb54457ae (diff)
downloadglifestream-7406db3909192c0534885f39ec31521907faac7e.tar.gz
glifestream-7406db3909192c0534885f39ec31521907faac7e.tar.bz2
Fix audio tag's autoplay.
-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
@@ -89,13 +89,13 @@
if ($('.player', this.parentNode).length) {
$('.player', this.parentNode).remove ();
return false;
}
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
return true;
if (type == 'thesixtyone') {
@@ -110,12 +110,16 @@
var id = a[1];
embed = embed.replace (/{ID}/g, id);
$('.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;
}
/* find menu */
function $M (entry) {
return $('.entry-controls-switch', entry.parentNode.parentNode.parentNode)[0];

Return to:

Send suggestions and report system problems to the System administrator.