[whatwg] video tag : loop for ever

Jonas Sicking jonas at sicking.cc
Wed Oct 29 17:52:25 PDT 2008

Eduard Pascual wrote:
> On Wed, Oct 29, 2008 at 6:16 PM, Jonas Sicking <jonas at sicking.cc> wrote:
>> Maciej (and I think others) have suggested that it would be useful if it was
>> possible to allow <audio> to be used such that a single file can be
>> downloaded that contains multiple sound effects, and then use javascript to
>> play different sound effects contained in that file at various times.
>> For example someone creating a shoot-em-up game might create a file that
>> contains the sound for "shoot weapon", "enemy exploding", "player dying",
>> and "player finishes level". It can then when appropriate use javascript to
>> play any one of these sound effects.
> Wouldn't multiple <audio> elements be better here? They'd point to the
> actual same file, but different fragments. That would even make the
> script less bloated (just selecting each element, instead of
> explicitly getting the appropriate fragment from the "master" file
> each time you need it). This brings the additional advantage that, in
> the event the server does support file fragments, only the actually
> required fragments will be downloaded.

The whole idea was to make a single HTTP request to the server. Doesn't 
seem like your proposal accomplishes that.

As I said, I'm fine with not satisfying this use case (of allowing 
multiple sound effects downloaded in a single request). But that was the 
use case that was cited.

/ Jonas

More information about the whatwg mailing list