diff options
| author | Teddy Wing | 2013-11-10 02:00:26 -0500 | 
|---|---|---|
| committer | Teddy Wing | 2013-11-10 02:00:26 -0500 | 
| commit | 0a3ca12fce9c7b51e2917b7305623d5b5c03fbf8 (patch) | |
| tree | b766e40d087a47116fd76a9e0108674413ba3a4a /assets/js/models/sample.js | |
| parent | 43ee0521ea6e0417237b44eb46f377902793ab0d (diff) | |
| parent | a0b372e4e3268f478963d43ccf40b5cee1f6e082 (diff) | |
| download | clip-play-0a3ca12fce9c7b51e2917b7305623d5b5c03fbf8.tar.bz2 | |
Merge branch 'add-time-to-drag-handles'
Conflicts:
	assets/js/models/sample.js
Diffstat (limited to 'assets/js/models/sample.js')
| -rw-r--r-- | assets/js/models/sample.js | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/assets/js/models/sample.js b/assets/js/models/sample.js index 5483f01..7cb417f 100644 --- a/assets/js/models/sample.js +++ b/assets/js/models/sample.js @@ -11,6 +11,30 @@ ClipPlay.Models.Sample = Backbone.Model.extend({  	}, +	in_minutes_and_seconds: function(seconds) { +		var minutes = Math.floor(seconds / 60); +		seconds = Math.floor(seconds); +		var seconds = seconds - minutes * 60; +		 +		if (seconds < 10) { +			seconds = '0' + seconds; +		} +		console.log(minutes + ':' + seconds); +		return { +			minutes: minutes, +			seconds: seconds +		}; +	}, +	 +	start_in_minutes_and_seconds: function() { +		return this.in_minutes_and_seconds(this.get('start')); +	}, +	 +	stop_in_minutes_and_seconds: function() { +		return this.in_minutes_and_seconds(this.get('stop')); +	}, +	 +	  	play: function() {          console.log('playing');      //play then pause | 
