Bug 46897 - REGRESSION: Audio on Forvo will not play
Summary: REGRESSION: Audio on Forvo will not play
Status: RESOLVED DUPLICATE of bug 45188
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P1 Major
Assignee: Nobody
URL: http://forvo.com
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2010-09-30 07:08 PDT by Mark
Modified: 2010-10-14 10:33 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2010-09-30 07:08:36 PDT
Audio on Forvo, which uses HTML5 tags I think, will not play at all. With Safari 5.02 it plays eventually but may take 10s up to a minute or 2. On latest Chrome, it plays instantly.
Comment 1 Alexey Proskuryakov 2010-10-01 23:10:10 PDT
My results:
Safari 5.0.2: sometimes works perfectly, other times crashes.

Thread 12 Crashed:
0   libSystem.B.dylib             	0x00007fff83219668 asl_close + 19
1   com.apple.SystemConfiguration 	0x00007fff834ceb25 __SCThreadSpecificDataFinalize + 30
2   libSystem.B.dylib             	0x00007fff83204b68 _pthread_tsd_cleanup + 82
3   libSystem.B.dylib             	0x00007fff8320481c _pthread_exit + 147
4   libSystem.B.dylib             	0x00007fff83204309 thread_start + 13

Local debug build of r68339: just doesn't work, nothing happens when I press a play button. Nothing is logged to console.
Comment 2 Eric Carlson 2010-10-14 10:33:33 PDT
I haven't reproduced the crash yet, but the audio doesn't autoplay because the element is created with setting innerHTML - https://bugs.webkit.org/show_bug.cgi?id=45188. 

function Play(id, path_mp3, path_ogg) {
  var path_mp3='http://'+_SERVER_HOST+'/player-mp3Handler.php?path='+path_mp3;
  var path_ogg='http://'+_SERVER_HOST+'/player-oggHandler.php?path='+path_ogg;
  var audioTagSupport = !!(document.createElement('audio').canPlayType);
  
  if (audioTagSupport) {
    myAudio = new Audio(""); 
    canPlayMp3 = ("no" != myAudio.canPlayType("audio/mpeg")) && ("" != myAudio.canPlayType("audio/mpeg"));
    canPlayOgg = ("no" != myAudio.canPlayType("audio/ogg")) && ("" != myAudio.canPlayType("audio/ogg"));
  } else {
    canPlayMp3 = false;
    canPlayOgg = false;
  }

  if (navigator.userAgent.toLowerCase().indexOf('iphone')!=-1) {
    window.location.href=path_mp3;
    return false;
  }
  else if (canPlayMp3) {
    var html='<audio autoplay="true"><source src="'+ path_mp3 +'"></audio>';
  }
  else if(canPlayOgg) {
    var html='<audio autoplay="true"><source src="'+ path_ogg +'"></audio>';
  }
  else {
    var html='<object type="application/x-shockwave-flash" data="'+player_path+'" width="1" height="1">'+
    '<param name="movie" value="'+player_path+'" />'+
    '<param name="flashvars" value="path='+path_mp3+'&amp;_SERVER_HTTP_HOST='+_SERVER_HOST+'" />'+
    '</object>';
  }
  
  var container=document.getElementById('player');
  container.innerHTML=html;
  sumHit(id);
  return true;
}

*** This bug has been marked as a duplicate of bug 45188 ***