diff options
| author | Jibon Costa <jiboncosta57@gmail.com> | 2020-03-26 16:42:54 +0600 |
|---|---|---|
| committer | Jibon Costa <jiboncosta57@gmail.com> | 2020-03-26 16:42:54 +0600 |
| commit | 9ee746c9484d9afc7168d3d4398e0e2df1d4b78d (patch) | |
| tree | 377e96585bf64913bb943e9db33bf8717b8c7374 /background.js | |
| parent | 4d486719013d57e49f93592cef217826f3f562a8 (diff) | |
| download | bbb-recorder-9ee746c9484d9afc7168d3d4398e0e2df1d4b78d.tar.gz bbb-recorder-9ee746c9484d9afc7168d3d4398e0e2df1d4b78d.zip | |
better record start
Diffstat (limited to 'background.js')
| -rw-r--r-- | background.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/background.js b/background.js index bc33384..cb2fb8b 100644 --- a/background.js +++ b/background.js @@ -13,6 +13,9 @@ chrome.runtime.onConnect.addListener(port => { case 'REC_STOP': recorder.stop() break + case 'REC_START': + recorder.start(); + break case 'REC_CLIENT_PLAY': if(recorder){ return @@ -70,9 +73,7 @@ chrome.runtime.onConnect.addListener(port => { }, ()=>{ }); } - setTimeout(function(){ - recorder.start(); - }, 3000) + }, error => console.log('Unable to get user media', error)) }) break |
