Added preview thumbnails setter & fixed cannot set property 'hover' of null (#2256)
* added iPad to isIos * elements.controls can be null * elements.controls can be null * added previewThumbnails setter * fixed readme formatting * previewThumbnails setter to method
This commit is contained in:
@ -1030,6 +1030,23 @@ class Plyr {
|
||||
return this.media === document.pictureInPictureElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the preview thubmnails for the current source
|
||||
*/
|
||||
setPreviewThumbnails(thumbnailSource) {
|
||||
if (this.previewThumbnails && this.previewThumbnails.loaded) {
|
||||
this.previewThumbnails.destroy();
|
||||
this.previewThumbnails = null;
|
||||
}
|
||||
|
||||
Object.assign(this.config.previewThumbnails, thumbnailSource);
|
||||
|
||||
// Create new instance if it is still enabled
|
||||
if (this.config.previewThumbnails.enabled) {
|
||||
this.previewThumbnails = new PreviewThumbnails(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger the airplay dialog
|
||||
* TODO: update player with state, support, enabled
|
||||
|
Reference in New Issue
Block a user