diff options
Diffstat (limited to 'assets/js/views/sample.js')
| -rw-r--r-- | assets/js/views/sample.js | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js index 6d1f95a..0c49469 100644 --- a/assets/js/views/sample.js +++ b/assets/js/views/sample.js @@ -119,13 +119,22 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({      show_clip: function(){          var isPlaying = this.model.get('playing'); -        console.log('playing :' + isPlaying);          var $iframe_video = $('#video-sample-' + this.model.cid);          if(isPlaying){ +            var $frames = $('iframe'); +            $frames.each(function(k,v){$(v).css({'z-index':-10})})              $iframe_video.css({'z-index':10});          }          if(!isPlaying){              $iframe_video.css({'z-index':-10}); + +            //if any others are playing, show them +            this.collection.each(function(sample){ +                if(sample.get('playing')){ +                    var $iframe = $('#video-sample-' + sample.cid); +                    $iframe.css({'z-index':10}); +                } +            });          }      }  }); | 
