colthreepv / angular-media-player

AngularJS Directive that wraps <audio> or <video> tag exposing methods and properties to manipulate your player
http://colthreepv.github.io/angular-media-player/
MIT License
228 stars 71 forks source link

Android Browser Requires User Interaction before Playing Audio #58

Open lylepratt opened 10 years ago

lylepratt commented 10 years ago

Reference: http://blog.foolip.org/2014/02/10/media-playback-restrictions-in-blink/

Workaround: However, I’ve also found a workaround for current browsers. As of WebKit r108831, all restrictions are removed in the first successful load() or play() call. Any user gesture is accepted, so one can listen to all input events and remove the restrictions as soon as the user clicks, touches or uses the keyboard. One does not need to start playback at that point, but can wait until a later time. For example, one could “liberate” a number of audio elements for later use in a game.

Thoughts? Can we build this into this library?