diff options
| author | Kawandeep Virdee | 2013-11-09 23:07:19 -0500 |
|---|---|---|
| committer | Kawandeep Virdee | 2013-11-09 23:07:19 -0500 |
| commit | 6ee24a16c215c217392c09a8df8c73ebb3244ccb (patch) | |
| tree | 5031b7dbb05d63675d26186c3c2ff856e5325666 /assets/js/views/sample.js | |
| parent | c6ea89e472f21a71d3cae95643b8fbde4bb22b17 (diff) | |
| parent | 78a56731b57c6b9a240e9409bad0d962fdf21655 (diff) | |
| download | clip-play-6ee24a16c215c217392c09a8df8c73ebb3244ccb.tar.bz2 | |
merge
Diffstat (limited to 'assets/js/views/sample.js')
| -rw-r--r-- | assets/js/views/sample.js | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js index ef1d681..7aab111 100644 --- a/assets/js/views/sample.js +++ b/assets/js/views/sample.js @@ -3,7 +3,7 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ onRender: function() { this.initialize_player(); - this.initialize_clip_drag_handles(); + this.initialize_clip_lines(); }, @@ -25,25 +25,24 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ var player = new OP.Player(iframe[0]); that.model.set('player', player); that.model.set('iframe', iframe); - }); - }, - - - initialize_clip_drag_handles: function() { - var $clip_line = this.$('.js-clip-line'); - $clip_line.draggable({ - axis: 'x', - handle: '.js-drag-handle', - scroll: false, - containment: $clip_line.parents('.progress-bar') + // Trying to get the duration but this returns 0 for some reason + // on the YouTube video I'm testing with + player.getDuration(function(value) { + that.model.set('duration', value); + }); }); - - $clip_line.on('dragstop', this.on_clip_drag_stop); }, + initialize_clip_lines: function() { + this.start_clip_line = new ClipPlay.Views.ClipLine({ + el: this.$('.js-start-position'), + model: this.model + }); - on_clip_drag_stop: function(e, ui) { - console.log('booyakacha'); + this.end_clip_line = new ClipPlay.Views.ClipLine({ + el: this.$('.js-end-position'), + model: this.model + }); } }); |
