[adpt] Prohibit the same audio resource from being played more than once at the same time (#22)

nigelmegitt has just created a new issue for https://github.com/w3c/adpt:

== Prohibit the same audio resource from being played more than once at the same time ==
Through experimentation, I have found that browser playback of multiple `<audio>` elements with the same source URL can cause issues. 

In the condition that an ADPT document specifies multiple audio resources whose playback does not overlap in time, but which all have the same `src` URL, for example because they use `@clipBegin` and `@clipEnd` to play different subsections, one implementation approach in Javascript is to create a separate `Audio` object for each one.

However, when testing this, on Firefox, some of them don't load the data, presumably because the browser is trying to keep a lid on resource usage. The result is that although `play()` is called, the resource sits in a waiting state, often for longer than the required duration! The result for the user is that the description audio doesn't play, and it is unpredictable which descriptions this affects.

Caching the `Audio` element on a per-URL basis, and reusing it, solves the issue. However this approach has a limitation, which is that if there is a requirement to play that audio more than once simultaneously, it won't work.

I'm pretty sure we already agreed that overlapping descriptions are not a requirement, but this implementation issue pushes me firmly into the "we should specify this prohibition" camp, to simplify implementations.

Please view or discuss this issue at https://github.com/w3c/adpt/issues/22 using your GitHub account

Received on Tuesday, 28 April 2020 09:25:42 UTC