The code can be broken down to this snippet, which contains weird stuff only:
const sth = function ( { test = true } = {} ){ }
So thats a function expression, but it has so called default parameters , that means if you dont pass a value, e.g.
sth();
This special part fills in the value for you:
= {}
So if you dont pass a value it rather takes an empty object. Now it goes on with object destructuring, take this example:
const {key} = {key:"value"};
console.log(key) // "value"
So object destructuring just moves the keys as variables into the context, the upper equals:
const key = {key:"value"}.key;
So now putting it all together:
{
audio_muted = false,
trim_type = 0,
source_type = 'camera',
// ...
} = {}
This sets the variables audio_muted and so on based on the keys with the same name in the passed object and if they're not passed the values are set.