Browse Source

fix: message-view page now correctly plays webcam videos

Paul Frazee 4 years ago
parent
commit
048042a8ba
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      ui/lib/com/message.js

+ 5
- 0
ui/lib/com/message.js View File

@@ -5,6 +5,7 @@ var paramap  = require('pull-paramap')
5 5
 var mlib = require('ssb-msgs')
6 6
 var schemas = require('ssb-msg-schemas')
7 7
 var ssbref = require('ssb-ref')
8
+var pauser = require('pause-offscreen')
8 9
 var app = require('../app')
9 10
 var ui = require('../ui')
10 11
 var modals = require('../ui/modals')
@@ -103,6 +104,10 @@ module.exports = function (msg, opts) {
103 104
     msg.el.appendChild(h('.well.text-muted', { style: 'margin: 5px 0 0 88px' }, com.icon('flash'), ' Replies will auto-update in realtime.'))
104 105
   }
105 106
 
107
+  // add offscreen pausing
108
+  var unlistenPauser = pauser(msgEl)
109
+  ui.onTeardown(unlistenPauser)
110
+
106 111
   return msgEl
107 112
 }
108 113
 

Loading…
Cancel
Save