瀏覽代碼

flacworker: don't use the Grand Unified Logger

There are just a couple of logs in this feature, and it's a standalone bundle,
which would bloat it due to cascaded dependencis.
j8
Saúl Ibarra Corretgé 5 年之前
父節點
當前提交
d436825a45
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4
    5
      react/features/local-recording/recording/flac/flacEncodeWorker.js

+ 4
- 5
react/features/local-recording/recording/flac/flacEncodeWorker.js 查看文件

@@ -1,4 +1,4 @@
1
-import logger from '../../logger';
1
+
2 2
 import {
3 3
     MAIN_THREAD_FINISH,
4 4
     MAIN_THREAD_INIT,
@@ -262,7 +262,7 @@ class Encoder {
262 262
             const errorNo
263 263
                 = Flac.FLAC__stream_encoder_get_state(this._encoderId);
264 264
 
265
-            logger.error('Error during encoding', FLAC_ERRORS[errorNo]);
265
+            console.error('Error during encoding', FLAC_ERRORS[errorNo]);
266 266
         }
267 267
     }
268 268
 
@@ -277,7 +277,7 @@ class Encoder {
277 277
 
278 278
             const status = Flac.FLAC__stream_encoder_finish(this._encoderId);
279 279
 
280
-            logger.log('Flac encoding finished: ', status);
280
+            console.log('Flac encoding finished: ', status);
281 281
 
282 282
             // free up resources
283 283
             Flac.FLAC__stream_encoder_delete(this._encoderId);
@@ -371,8 +371,7 @@ self.onmessage = function(e) {
371 371
 
372 372
     case MAIN_THREAD_NEW_DATA_ARRIVED:
373 373
         if (encoder === null) {
374
-            logger.error('flacEncoderWorker received data when the encoder is'
375
-                + 'not ready.');
374
+            console.error('flacEncoderWorker received data when the encoder is not ready.');
376 375
         } else {
377 376
             encoder.encode(e.data.buf);
378 377
         }

Loading…
取消
儲存