[whatwg] Audio(): loop() with 0 or negative value as argument

On Sat, 4 Aug 2007, Michael A. Puls II wrote:
> 
> I see "The loopcount content attribute gives the number of times to play 
> the clip. The default value is 1."
> 
> IMO:
> 
> The name "loopcount" and the description for loopcount contradict each 
> other. It seems that the description is what is intended though.

Yeah, I tried to fix that recently. Is it still broken?


> However, if loopcount has a default of 1, that to me means the first 
> time playing through is considered a loop. If so, do loopstart and 
> loopend override start and end during the first time of playback (the 
> steps seem confusing to me) or do loopstart and loopend only kick in 
> when the file truly loops and starts playing the second time etc.?

Maybe we should rename 'loopcount' to 'playcount'...?


> Also, if the first time playing is considered a loop and the loopcount 
> starts at 1, should currentLoop start at 1 also? Or, if the index is 
> just meant to be zero-based, which one of these represents what 
> currentLoop returns?
> 
> currentLoopArray[0] = first time playing
> currentLoopArray[1] = second time playing
> 
> if (currentLoop == 0) {
>     this is the first time playing;
> }

This one is correct.


> loopcount has a default of 1 because the first time playing is 
> considered a loop.

Well, the first time isn't considered a loop really, but yes, the 
"loopcount" assumes each play is a loop.


> loopstart and loopend only kick in after the first time playing because 
> they don't consider the first time playing a loop.

Right. loopstart is the start when you loop, which happens at the end of 
each loop... as it were.


> currentLoop considers the firt time playing a loop. So, if it's the 
> first time the file is playing, it will return 0 because the index is 
> zero-based.

Right.


> So, if you could, add a definition of what a "loop" is in this case and 
> say that the first time playing is considered a loop. And, if loopstart 
> and loopend only kick in after the first time playing (the first true 
> loop), we need a name (like "looped play" with a defintition) to 
> differentiate it from "loop".

Hmm. Is the spec really ambigious?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 18 October 2007 18:13:32 UTC