- From: Matthew Gregan <kinetik@flim.org>
- Date: Fri, 13 Mar 2009 15:11:45 +1300
Hi, It's possible that neither a 'play' nor 'playing' event will be fired when a media element that has ended playback is played again. When first played, paused is set to false. When played again, playback has ended, so play() seeks to the beginning, but paused does not change (as it's already false), so the substeps that may fire play or playing are not run. If the media resource is cached, the readyState remains at HAVE_FUTURE_DATA, so any 'play' or 'playing' events triggered by state transitions are not raised. This behaviour seems reasonable if the media element has a loop attribute, since playback never really stops (as it restarts immediately upon ending). For non-looping media it seems strange that no event is raised to indicate that playback has begun again. Looking at the event summary table, it seems reasonable to expect a 'playing' event to be fired during the second play through, but this doesn't happen because none of the steps that required the event to be fired are reached during the second play through. Is this the intended behaviour or a case the spec does not handle correctly? Thanks, -mjg -- Matthew Gregan |/ /| kinetik at flim.org
Received on Thursday, 12 March 2009 19:11:45 UTC