From 5bff1d2cab610c57963ef21df7982d03446e612d Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 30 Jun 2016 12:51:13 -0700 Subject: [PATCH] Scope media pausing to the open conversation // FREEBIE --- js/views/inbox_view.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index ea6b67b5b..c60cb73d5 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -39,11 +39,8 @@ className: 'conversation-stack', open: function(conversation) { var id = 'conversation-' + conversation.cid; - if(id !== this.el.firstChild.id) { - this.$("video").each(function() { - this.pause(); - }); - this.$("audio").each(function() { + if (id !== this.el.firstChild.id) { + this.$el.first().find('video, audio').each(function() { this.pause(); }); var $el = this.$('#'+id);