aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-11-14 13:28:52 +0100
committerSam Potts <sam@potts.es>2017-11-14 13:28:52 +0100
commit9c4b53d761929ab7305f6bfdbd7fc541ed902d43 (patch)
treed12112fead4b013f2755d5d0a84ba5df80d0a1d0 /src/js/plyr.js
parent0ec0addbda014850dd948cff50f81473f4099df5 (diff)
downloadplyr-9c4b53d761929ab7305f6bfdbd7fc541ed902d43.tar.lz
plyr-9c4b53d761929ab7305f6bfdbd7fc541ed902d43.tar.xz
plyr-9c4b53d761929ab7305f6bfdbd7fc541ed902d43.zip
Fix for YouTube .getVideoData() issue (fixes #709)
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 8f411a35..2e200876 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
-// plyr.js v2.0.17
+// plyr.js v2.0.18
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
@@ -44,7 +44,7 @@
displayDuration: true,
loadSprite: true,
iconPrefix: 'plyr',
- iconUrl: 'https://cdn.plyr.io/2.0.17/plyr.svg',
+ iconUrl: 'https://cdn.plyr.io/2.0.18/plyr.svg',
blankUrl: 'https://cdn.plyr.io/static/blank.mp4',
clickToPlay: true,
hideControls: true,
@@ -1768,8 +1768,10 @@
plyr.media.currentTime = 0;
plyr.media.muted = instance.isMuted();
- // Set title
- config.title = instance.getVideoData().title;
+ // Set title if possible
+ if (typeof instance.getVideoData === 'function') {
+ config.title = instance.getVideoData().title;
+ }
// Set the tabindex
if (plyr.supported.full) {