b3c8c83830
- Changed the lib used to record the audio (videojs-record). - Changed the audio recording format to .ogg, this will keep compatibility with sending to channels, Telegram, Whatsapp, Web Widget and API. - Changed the visualization of recording waves, it is now using bars, the same format used by applications (Whatsapp and Telegram) Fixes: #4115
33 lines
821 B
JavaScript
33 lines
821 B
JavaScript
const { environment } = require('@rails/webpacker');
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
const resolve = require('./resolve');
|
|
const vue = require('./loaders/vue');
|
|
|
|
environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin());
|
|
environment.loaders.prepend('vue', vue);
|
|
|
|
environment.loaders.append('opus', {
|
|
test: /encoderWorker\.min\.js$/,
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: '[name].[ext]',
|
|
},
|
|
});
|
|
|
|
environment.loaders.append('audio', {
|
|
test: /\.(mp3)(\?.*)?$/,
|
|
loader: 'url-loader',
|
|
query: {
|
|
limit: 10000,
|
|
name: 'audio/[name].[ext]',
|
|
},
|
|
});
|
|
|
|
environment.config.merge({ resolve });
|
|
environment.config.set('output.filename', chunkData => {
|
|
return chunkData.chunk.name === 'sdk'
|
|
? 'js/[name].js'
|
|
: 'js/[name]-[hash].js';
|
|
});
|
|
|
|
module.exports = environment;
|