aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-12-23 18:42:52 +0000
committerSam Potts <sam@potts.es>2017-12-23 18:42:52 +0000
commit965fc0b2f5a377f16c8521b57e8667358b9ca38d (patch)
tree8d37c05fc00dc21b53c000a9fc5370880e0719c6 /src/js/plyr.js
parent98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1 (diff)
downloadplyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.tar.lz
plyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.tar.xz
plyr-965fc0b2f5a377f16c8521b57e8667358b9ca38d.zip
Docs, restored loadSprite and supported static methods
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js35
1 files changed, 28 insertions, 7 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index b6162b44..e40097b0 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -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;