modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
14 lines (13 loc) • 336 B
JavaScript
/*!
{
"name": "Audio Loop Attribute",
"property": "audioloop",
"tags": ["audio", "media"]
}
!*/
/* DOC
Detects if an audio element can automatically restart, once it has finished
*/
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
Modernizr.addTest('audioloop', 'loop' in createElement('audio'));
});