summaryrefslogtreecommitdiffstats
path: root/assets/js/views/sample.js
diff options
context:
space:
mode:
authorKawandeep Virdee2013-11-10 12:42:56 -0500
committerKawandeep Virdee2013-11-10 12:42:56 -0500
commit6450eea1310266129416a256cdff1f3f5d7f137c (patch)
treea856f6bc89452f7ed574784d431f0388d01bfa5c /assets/js/views/sample.js
parent4376526f8bc7e72e3d7cc958a97ade1104dc88d6 (diff)
downloadclip-play-6450eea1310266129416a256cdff1f3f5d7f137c.tar.bz2
added z-index stuff
Diffstat (limited to 'assets/js/views/sample.js')
-rw-r--r--assets/js/views/sample.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js
index aa07acd..21e0806 100644
--- a/assets/js/views/sample.js
+++ b/assets/js/views/sample.js
@@ -13,8 +13,8 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
initialize: function(options){
this.collection = options.collection;
-
this.listenTo(this.model, 'change:key', this.key_bind);
+ this.listenTo(this.model, 'change:playing', this.show_clip);
this.key_bind();
},
@@ -31,9 +31,9 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
src: iframe_src,
id: 'video-sample-' + that.model.cid
});
- var wrapper= document.createElement('div');
- $(wrapper).addClass("responsive-object");
+ var wrapper= document.createElement('span');
$(wrapper).append(iframe[0]);
+ $(wrapper).addClass("responsive-object");
$('#video').append(wrapper);
var player = new OP.Player(iframe[0]);
that.model.set('player', player);
@@ -47,7 +47,6 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
img_resize+=new_height;
that.model.set('thumbnail', img_resize);
-
window.BOKASHAKA = that.model;
player.getDuration(function(value) {
that.model.set('duration', value);
@@ -111,5 +110,17 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({
}, 500, function() {
Marionette.View.prototype.close.call(that, arguments);
});
- }
+ },
+
+ show_clip: function(){
+ var isPlaying = this.model.get('playing');
+ console.log('playing :' + isPlaying);
+ var $iframe_video = $('#video-sample-' + this.model.cid);
+ if(isPlaying){
+ $iframe_video.css({'z-index':10});
+ }
+ if(!isPlaying){
+ $iframe_video.css({'z-index':-10});
+ }
+ }
});