aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalvin Tam <calvintam236@gmail.com>2015-08-05 20:36:48 -0700
committerCalvin Tam <calvintam236@gmail.com>2015-08-05 20:36:48 -0700
commitf983f0771b8c0c2a15e65abc9ebac5cccc2b2bbe (patch)
tree4190c3edf05af332bbcc611693b91ed5af10ab5e
parent9f1e5a55f43eae1d46828d0ea3c5a0396dfd6523 (diff)
downloadplyr-f983f0771b8c0c2a15e65abc9ebac5cccc2b2bbe.tar.lz
plyr-f983f0771b8c0c2a15e65abc9ebac5cccc2b2bbe.tar.xz
plyr-f983f0771b8c0c2a15e65abc9ebac5cccc2b2bbe.zip
Revert "Eliminated running try catch when player.type="youtube""
This reverts commit 5fcfd5fa4f56f657a53de24c20f8522c37241e0d.
-rw-r--r--src/js/plyr.js17
1 files 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