Docs for preview thumbs

This commit is contained in:
Sam Potts
2019-01-26 17:17:27 +11:00
parent ff066f0c2a
commit 8b57104f83
11 changed files with 42 additions and 32 deletions

16
dist/plyr.js vendored
View File

@ -3473,7 +3473,8 @@ typeof navigator === "object" && (function (global, factory) {
noCookie: false,
// Preview Thumbnails plugin
previewThumbnails: {
enabled: false
enabled: false,
src: ''
}
};
@ -6683,13 +6684,14 @@ typeof navigator === "object" && (function (global, factory) {
var _this2 = this;
return new Promise(function (resolve) {
if (!_this2.player.config.previewThumbnails.src) {
throw new Error('Missing previewThumbnails.src config attribute');
} // previewThumbnails.src can be string or list. If string, convert into single-element list
var src = _this2.player.config.previewThumbnails.src;
var urls = is.string(src) ? [src] : src; // Loop through each src url. Download and process the VTT file, storing the resulting data in this.thumbnails
if (is.empty(src)) {
throw new Error('Missing previewThumbnails.src config attribute');
} // If string, convert into single-element list
var urls = is.string(src) ? [src] : src; // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails
var promises = urls.map(function (u) {
return _this2.getThumbnail(u);

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6536,7 +6536,8 @@ typeof navigator === "object" && (function (global, factory) {
noCookie: false,
// Preview Thumbnails plugin
previewThumbnails: {
enabled: false
enabled: false,
src: ''
}
};
@ -9811,13 +9812,14 @@ typeof navigator === "object" && (function (global, factory) {
var _this2 = this;
return new Promise(function (resolve) {
if (!_this2.player.config.previewThumbnails.src) {
throw new Error('Missing previewThumbnails.src config attribute');
} // previewThumbnails.src can be string or list. If string, convert into single-element list
var src = _this2.player.config.previewThumbnails.src;
var urls = is$1.string(src) ? [src] : src; // Loop through each src url. Download and process the VTT file, storing the resulting data in this.thumbnails
if (is$1.empty(src)) {
throw new Error('Missing previewThumbnails.src config attribute');
} // If string, convert into single-element list
var urls = is$1.string(src) ? [src] : src; // Loop through each src URL. Download and process the VTT file, storing the resulting data in this.thumbnails
var promises = urls.map(function (u) {
return _this2.getThumbnail(u);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long