Docs, restored loadSprite and supported static methods

This commit is contained in:
Sam Potts
2017-12-23 18:42:52 +00:00
parent 98ac98b4c2
commit 965fc0b2f5
10 changed files with 144 additions and 35 deletions

View File

@ -143,7 +143,6 @@ const defaults = {
'captions',
'quality',
'speed',
'loop',
],
// Localisation

View File

@ -1025,13 +1025,7 @@ class Plyr {
utils.off(this.elements.container, event, callback);
}
/**
* Check for support for a mime type (HTML5 only)
* @param {string} type - Mime type
*/
supports(type) {
return support.mime.call(this, type);
}
/**
* Destroy an instance
@ -1133,6 +1127,33 @@ class Plyr {
break;
}
}
/**
* Check for support for a mime type (HTML5 only)
* @param {string} type - Mime type
*/
supports(type) {
return support.mime.call(this, type);
}
/**
* Check for support
* @param {string} type - Player type (audio/video)
* @param {string} provider - Provider (html5/youtube/vimeo)
* @param {bool} inline - Where player has `playsinline` sttribute
*/
static supported(type, provider, inline) {
return support.check(type, provider, inline);
}
/**
* Load an SVG sprite into the page
* @param {string} url - URL for the SVG sprite
* @param {string} [id] - Unique ID
*/
static loadSprite(url, id) {
return utils.loadSprite(url, id);
}
}
export default Plyr;