summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/MediaEditor.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/ui/editor/MediaEditor.js')
-rw-r--r--public/assets/javascripts/ui/editor/MediaEditor.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/public/assets/javascripts/ui/editor/MediaEditor.js b/public/assets/javascripts/ui/editor/MediaEditor.js
index 47a938b..29ec9e5 100644
--- a/public/assets/javascripts/ui/editor/MediaEditor.js
+++ b/public/assets/javascripts/ui/editor/MediaEditor.js
@@ -3,7 +3,8 @@ var MediaEditor = FormView.extend({
el: "#mediaEditor",
events: {
- "click .play": "togglePlaying",
+ "click .playButton": "togglePlaying",
+ "change [name=keyframe]": "seek",
},
initialize: function(opt){
@@ -20,7 +21,7 @@ var MediaEditor = FormView.extend({
this.$units = this.$("[name=units]")
// video fields
- this.$playButton = this.$(".play")
+ this.$playButton = this.$(".playButton")
this.$loop = this.$("[name=loop]")
this.$mute = this.$("[name=mute]")
this.$keyframe = this.$("[name=keyframe]")
@@ -39,7 +40,7 @@ var MediaEditor = FormView.extend({
if (this.scenery) {
this.unbind()
}
-
+
this.bind(scenery)
this.$el.addClass("active")
@@ -71,17 +72,23 @@ var MediaEditor = FormView.extend({
this.$mute
this.$keyframe
*/
-
-
break
}
+
+ },
+
+ seek: function(){
+ var n = parseFloat( this.$keyframe.val() )
+ this.scenery.seek(n)
},
bind: function(scenery){
this.scenery = scenery
+ this.scenery.media.bound = true
},
unbind: function(){
+ this.scenery.media.bound = false
this.scenery = null
},