Skip to content
This repository
Browse code

Merge pull request #29 from AltIvan/master

Feature to seek times such as "01:02" (string)
  • Loading branch information...
commit b56bb1ab9d3aa0a6671672b159104541e66b7639 2 parents 2903e53 + 4e670e6
Nirvana Tikku authored March 27, 2013

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  jQuery.tubeplayer.js
8  jQuery.tubeplayer.js
@@ -669,6 +669,14 @@
669 669
 		}),
670 670
 		
671 671
 		seek: buildFN(function(evt,param,p){
  672
+
  673
+			if (/:/.test(param)) {
  674
+				var parts = param.split(":").reverse();
  675
+				param = 0;
  676
+				for (var i = 0; i < parts.length; i++) {
  677
+					param += Math.pow(60, i) * (parts[i] | 0);
  678
+				}
  679
+			}
672 680
 			
673 681
 			p.ytplayer.seekTo(param, true);
674 682
 			

0 notes on commit b56bb1a

Please sign in to comment.
Something went wrong with that request. Please try again.