0

我使用淡入 GIF,一旦音频播放器准备好,它就会被 HTML5 播放器替换。

这在 Firefox 中运行良好,但在 Chrome 中,播放器会立即显示,并暂时显示“声音当前不可用”。

有没有办法避免这种情况?

$('a[href*="soundcloud.com"]').each(function(){
  var $link = $(this);
  $.getJSON('http://soundcloud.com/oembed?format=js&url=' + this.href + '&iframe=true&callback=?', function(response){
    $link.replaceWith(response.html);
  });
});

你可以在这里找到它的要点:https ://gist.github.com/1723694

布局:

<a href="http://soundcloud.com/..." target="_blank">
  <div class="background-fade-in-gif" width="100%" height="162px"></div>
</a>
4

0 回答 0