Andrew Poulos
1/24/2015 2:08:00 AM
On 24/01/2015 12:29 PM, Christoph M. Becker wrote:
> Andrew Poulos wrote:
>
>> Currently I'm testing calling play() without setting autoplay and then
>> testing for onplay because it seems to me that devices that let you
>> start playback using code also allow autoplay.
>
> If I'm not mistaken, "all" browsers accept play(), if it is called on
> direct user interaction, e.g.
>
> button.onclick = function () {
> audio.play();
> };
>
> should work "everywhere" (e.g. on iOS), whereas
>
> window.onload = function () {
> audio.play();
> };
>
> does not necessarily.
>
Yes, you're right.
Perhaps I should've said "devices that let you start playback using
code, without any user input, also allow autoplay."
Andrew Poulos