Eliminated running try catch when player.type="youtube"
This commit is contained in:
@ -1244,15 +1244,16 @@
|
|||||||
targetTime = player.media.duration;
|
targetTime = player.media.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the current time
|
// Set the current time
|
||||||
// Try/catch incase the media isn't set and we're calling seek() from source() and IE moans
|
if(player.type == "video" || player.type == "audio") {
|
||||||
try {
|
// Try/catch incase the media isn't set and we're calling seek() from source() and IE moans
|
||||||
player.media.currentTime = targetTime.toFixed(1);
|
try {
|
||||||
}
|
player.media.currentTime = targetTime.toFixed(1);
|
||||||
catch(e) {}
|
}
|
||||||
|
catch(e) {}
|
||||||
|
}
|
||||||
// YouTube
|
// YouTube
|
||||||
if(player.type == "youtube") {
|
else if(player.type == "youtube") {
|
||||||
player.embed.seekTo(targetTime);
|
player.embed.seekTo(targetTime);
|
||||||
|
|
||||||
// Trigger timeupdate
|
// Trigger timeupdate
|
||||||
|
Reference in New Issue
Block a user