module.exports = config => {
  config.set({
    frameworks: ['jasmine'],

    files: ['*.js'],

    preprocessors: {
      '*.js': ['webpack'],
    },

    browsers: ['Chrome_fakeDevices'],

    plugins: [
      'karma-chrome-launcher',
      'karma-webpack',
      'karma-jasmine',
    ],

    webpack: {
      devtool: 'inline-source-map',
    },

    customLaunchers: {
      Chrome_fakeDevices: {
        base: 'Chrome',
        flags: ['--use-fake-device-for-media-stream',
                '--use-fake-ui-for-media-stream', '--disable-popup-blocking'],
      },
    },

    webpackMiddleware: {
      noInfo: true,
    },
  });
};

@@ -164,27 +164,38 @@
 s: %5B
-'Chrome_fakeDevices
+process.env.BROWSER %7C%7C 'chrome
 '%5D,%0A
@@ -387,26 +387,14 @@
     
-C
+c
 hrome
-_fakeDevices
 : %7B%0A
@@ -471,16 +471,16 @@
 tream',%0A
-
         
@@ -559,16 +559,198 @@
      %7D,%0A
+      firefox: %7B%0A        base: 'Firefox',%0A        prefs: %7B%0A          'media.navigator.permission.disabled': true,%0A          'media.navigator.streams.fake': true,%0A        %7D,%0A      %7D,%0A
     %7D,%0A%0A

Fix firefox launching from Karma