From f983f0771b8c0c2a15e65abc9ebac5cccc2b2bbe Mon Sep 17 00:00:00 2001 From: Calvin Tam Date: Wed, 5 Aug 2015 20:36:48 -0700 Subject: [PATCH] Revert "Eliminated running try catch when player.type="youtube"" This reverts commit 5fcfd5fa4f56f657a53de24c20f8522c37241e0d. --- src/js/plyr.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/js/plyr.js b/src/js/plyr.js index 982023bb..782e6397 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1245,16 +1245,15 @@ targetTime = player.media.duration; } - // Set the current time - if(player.type == "video" || player.type == "audio") { - // Try/catch incase the media isn't set and we're calling seek() from source() and IE moans - try { - player.media.currentTime = targetTime.toFixed(1); - } - catch(e) {} - } + // Set the current time + // Try/catch incase the media isn't set and we're calling seek() from source() and IE moans + try { + player.media.currentTime = targetTime.toFixed(1); + } + catch(e) {} + // YouTube - else if(player.type == "youtube") { + if(player.type == "youtube") { player.embed.seekTo(targetTime); // Trigger timeupdate